1 00:00:00,000 --> 00:00:01,220 Morning guys. 2 00:00:01,220 --> 00:00:03,460 Uh, can everyone hear me in the back? 3 00:00:03,640 --> 00:00:04,840 Okay. 4 00:00:04,900 --> 00:00:07,460 Uh, so my name is Magno Logan. 5 00:00:07,460 --> 00:00:10,180 I'm gonna be your host for the rest of the day. 6 00:00:10,180 --> 00:00:12,300 Just introducing the speakers here. 7 00:00:12,300 --> 00:00:17,860 Uh, it's an honor to be here and be volunteering and helping this village. 8 00:00:17,920 --> 00:00:24,760 Um, so yeah, without further ado, uh, I'd like to introduce Yangyang Wang. 9 00:00:24,760 --> 00:00:30,680 Uh, she's a cloud security architect, uh, leading implementation of security tasks at HITRUST. 10 00:00:30,680 --> 00:00:38,980 Uh, she has led integration security into various CICD pipelines, uh, and created successful security programs and culture. 11 00:00:38,980 --> 00:00:45,420 And she's going to be talking about automate pain testing in dockerized CICD environments. 12 00:00:45,800 --> 00:00:47,360 Give her a round of applause. 13 00:00:51,670 --> 00:00:52,650 Thank you. 14 00:00:52,650 --> 00:00:53,670 Good morning. 15 00:00:53,670 --> 00:00:54,910 Thanks for coming. 16 00:00:54,910 --> 00:00:58,270 And I hope you're happy by end of the presentation. 17 00:00:58,330 --> 00:01:09,070 So today's topic is about, um, automation, uh, in, uh, automating dynamic application security testing in CICD pipelines. 18 00:01:09,070 --> 00:01:15,070 So before I start, how many people are actually very familiar with the CICD pipelines? 19 00:01:16,370 --> 00:01:17,570 Okay. 20 00:01:17,870 --> 00:01:21,450 How many people here are security professionals? 21 00:01:24,390 --> 00:01:25,130 Okay. 22 00:01:25,130 --> 00:01:26,830 I see some overlapping here. 23 00:01:26,830 --> 00:01:27,270 All right. 24 00:01:27,270 --> 00:01:28,290 That's good. 25 00:01:29,370 --> 00:01:36,270 So before I start, um, I wanted to, um, to say that I'm here on my personal capacity. 26 00:01:36,270 --> 00:01:42,390 And what I say, what I express in this presentation does not represent my organization. 27 00:01:45,430 --> 00:01:53,250 So the outline of the presentation is that, well, you know, in the me and I age, I have to introduce myself, obviously. 28 00:01:53,670 --> 00:02:05,870 And then, uh, I'm going to briefly talk about the CICD pipelines because I know some people probably are not, um, I mean, probably know something or not a lot, or some people don't know. 29 00:02:05,870 --> 00:02:08,050 So I'm just going to cover it quickly. 30 00:02:08,090 --> 00:02:14,890 And then I'm going to talk about some characteristics of the CICD that's relevant to pen testing. 31 00:02:15,150 --> 00:02:27,930 And then, um, I'm going to talk about the reasons of this project, which is the challenges that I encountered trying to automate a dynamic testing task in CICD environment. 32 00:02:28,090 --> 00:02:37,350 And then I'm going to introduce the approach that we, we did, and then how we integrated with Selenium test to make it even more awesome. 33 00:02:40,360 --> 00:02:42,060 So who I am? 34 00:02:42,060 --> 00:02:45,440 I'm a cloud application security architect. 35 00:02:45,440 --> 00:02:47,160 And so it's a mouthful, I know. 36 00:02:47,160 --> 00:02:51,640 And it means a lot of different things to different organization. 37 00:02:51,640 --> 00:02:54,580 But I live in San Francisco, in Bay Area. 38 00:02:54,960 --> 00:03:01,400 I think generally, um, architect, particularly in startups, it means you do everything, really. 39 00:03:05,060 --> 00:03:07,720 So I want to talk about the CICD. 40 00:03:07,720 --> 00:03:20,440 Um, so CICD stands for continuous integration, which means that you commit your code multiple times a day into a centralized repo that you share with your team. 41 00:03:20,440 --> 00:03:25,740 And then continuous delivery, that's what CICD stands for. 42 00:03:25,740 --> 00:03:33,980 That just means every code should be releasable and that you can, you can deploy a code on a push of a button. 43 00:03:34,420 --> 00:03:47,840 And the pipeline means from the, uh, the automation of the entire process, starting from when developers, uh, commit their code and then build tests and deployment. 44 00:03:47,840 --> 00:03:52,360 All of this is, uh, automated, meaning everything is powered by code. 45 00:03:52,360 --> 00:03:56,320 There is no physical environment that you have to deal with anymore. 46 00:03:58,260 --> 00:04:00,880 So why does it matter? 47 00:04:00,880 --> 00:04:16,060 Um, so I wanted to just compare what, what, uh, um, software integration is before the CI and what, uh, software delivery is before continuous delivery. 48 00:04:16,060 --> 00:04:25,740 And so that way it will be clear why the existing tool, the pentesting tools are not suitable for the environment. 49 00:04:25,980 --> 00:04:37,360 So before continuous integration, when people, people, they, engineers, they write their code on their own and they test it in their own local environment. 50 00:04:37,360 --> 00:04:38,780 And then they integrate. 51 00:04:38,780 --> 00:04:41,320 Sometimes it's a week, sometimes it's a month. 52 00:04:41,320 --> 00:04:47,520 And then that big gap, big bang happens and things will fail in, inavoidably. 53 00:04:47,520 --> 00:04:57,240 And so you might, you know, really, if you're all software engineers, you know how mid to the deadline for delivery is hard, especially in the past. 54 00:04:57,240 --> 00:05:04,060 And I don't know how many of you are actually in CICD environment, but if you're not in this environment, it's pretty hard. 55 00:05:04,060 --> 00:05:07,760 And if you are, it's still hard, but slightly easier. 56 00:05:08,980 --> 00:05:16,400 So when continuous integration comes and engineers have controls of almost everything. 57 00:05:16,500 --> 00:05:29,740 You, they write code, they write the tests and, and all the tests are automated and happening as they're writing the code, merging the code, and then the build happens right there after they merge the code automatically. 58 00:05:29,980 --> 00:05:32,860 And so it's, it's all together. 59 00:05:32,860 --> 00:05:38,740 By the time the code gets to integration stage, the test will happen automatically too. 60 00:05:38,780 --> 00:05:46,320 And if there is any issue, it gets the commit fails and they have to fix the issues, whatever that is. 61 00:05:47,860 --> 00:06:01,020 And then for software delivery before the continuous delivery, and you have to have someone to do the test after integration, and you have to have a team to do the deployment. 62 00:06:01,020 --> 00:06:06,200 And obviously there are human interactions there to get it, to make it happen. 63 00:06:06,420 --> 00:06:19,540 And with continuous delivery, and it's same thing when engineers commit their code, all the tests, all the release tests, deployment tests, all happen there. 64 00:06:19,640 --> 00:06:27,840 And so, theoretically, when you have, when your code is done, it's committed and it's merged into the master branch. 65 00:06:27,840 --> 00:06:33,140 And sometimes it's even in local branch and your code is, everything is okay. 66 00:06:33,140 --> 00:06:35,560 It's ready to be deployed, supposedly. 67 00:06:35,580 --> 00:06:39,920 However, when it comes to implementation, there are shades of gray, obviously. 68 00:06:39,920 --> 00:06:45,240 And most of the time, there is still some kind of human interaction for deployment. 69 00:06:45,240 --> 00:06:46,920 It really depends on the company. 70 00:06:49,320 --> 00:06:55,520 So, this is something I found online from Instagram website. 71 00:06:55,520 --> 00:06:57,040 I don't work for Instagram. 72 00:06:57,140 --> 00:07:01,380 And that's just to illustrate how fast things are moving today. 73 00:07:01,380 --> 00:07:05,800 And they deploy their backend code 30 to 50 times a day. 74 00:07:05,800 --> 00:07:09,700 And oftentimes, most of the time, there is no human interaction at all. 75 00:07:09,700 --> 00:07:14,380 And what they're saying is that their engineering moves fast. 76 00:07:14,380 --> 00:07:19,320 So, that's one of the key words for CICD, fast. 77 00:07:19,320 --> 00:07:24,060 And then, make it easier to find your bad commits and fix them. 78 00:07:24,060 --> 00:07:25,880 So, that's another key word too. 79 00:07:25,880 --> 00:07:30,680 And particularly, in the sense of finding your security bugs. 80 00:07:30,680 --> 00:07:32,640 I will come to it later. 81 00:07:34,140 --> 00:07:43,000 So, I just touched the characteristics of CICD pipelines in terms of DAST testing. 82 00:07:43,020 --> 00:07:46,140 I haven't explained what DAST is. 83 00:07:46,140 --> 00:07:48,300 And I assume most people here know. 84 00:07:48,300 --> 00:07:50,500 And if you don't know, can you raise your hand? 85 00:07:51,480 --> 00:07:52,320 Okay. 86 00:07:52,680 --> 00:07:58,100 So, dynamic application security testing basically means you have to have a running app. 87 00:07:58,100 --> 00:08:06,820 And then, you either manually or use a tool or both to point to your running app and look for security vulnerabilities. 88 00:08:07,420 --> 00:08:17,840 So, anyway, the characteristics that's relevant to automate your DAST is the build are repeatable and deterministic. 89 00:08:17,840 --> 00:08:21,320 And then also, that everything is automated. 90 00:08:21,320 --> 00:08:25,800 All the release, all the testing, testing, different testing. 91 00:08:25,800 --> 00:08:28,560 And also, they're really fast. 92 00:08:32,010 --> 00:08:51,750 So, the reason that's relevant is because when the build is, when the entire process is repeatable and deterministic, obviously, if you think about it, if you can automate your security testing here, then you have a repeatable and deterministic way to do that as well. 93 00:08:51,750 --> 00:08:53,490 So, that's why it's relevant here. 94 00:08:53,490 --> 00:08:55,350 And then that's automate. 95 00:08:55,350 --> 00:09:06,190 That means, you know how often times security teams would chase after the engineering team and often times would say, that's deployed, I don't know. 96 00:09:06,290 --> 00:09:08,010 Oh, that's what happens? 97 00:09:08,090 --> 00:09:09,190 No one told me. 98 00:09:09,190 --> 00:09:12,070 I mean, every one of you said that, I guarantee you. 99 00:09:12,070 --> 00:09:15,130 If you didn't say that, you're not a security person. 100 00:09:15,210 --> 00:09:17,430 I've been in this field long enough, I know. 101 00:09:19,450 --> 00:09:31,450 So, when, so if you think about the automation, then, and it's deterministic, then that means you can automate your security steps and do the same thing, which is a plus sign. 102 00:09:31,450 --> 00:09:33,050 And that, to me, it's a good thing. 103 00:09:34,850 --> 00:09:37,690 And then, also, testing environment. 104 00:09:37,690 --> 00:09:48,670 In the past, you have to set up a environment specifically for testing and you have to wait for people to tell you which one is going to be released and you're going to deploy into the testing environment and you're going to test. 105 00:09:48,670 --> 00:09:52,170 None of them is necessary anymore for CICD pipeline. 106 00:09:56,250 --> 00:09:59,030 And so, challenges. 107 00:09:59,290 --> 00:10:06,710 If you look at the existing DAST tools, oftentimes, it needs some kind of human interactions. 108 00:10:07,090 --> 00:10:09,210 They want you to put a URL in there. 109 00:10:09,210 --> 00:10:11,350 They want you to put the credential in there. 110 00:10:11,350 --> 00:10:17,290 They want you to put parameters there, what to exclude, what to include, this and that. 111 00:10:17,670 --> 00:10:22,550 It seems like, is it even worse to automate that? 112 00:10:22,550 --> 00:10:26,970 Because some tools does offer API tools to let you automate that. 113 00:10:26,970 --> 00:10:30,970 But it's like, this still involves a lot of human steps. 114 00:10:32,490 --> 00:10:39,290 And then, also, this is relevant if you are running in a containerized environment. 115 00:10:39,370 --> 00:10:41,370 You have to have a running app. 116 00:10:41,370 --> 00:10:44,170 And I will touch that later a little bit more. 117 00:10:44,370 --> 00:10:57,210 And also, oftentimes, with the existing DAST tools, you have to have a separate reporting system where someone else, where whoever's doing the test have to log into the UI, find the vulnerabilities. 118 00:10:57,690 --> 00:11:02,070 And generally, you create a Jira ticket or some other system, whatever. 119 00:11:02,910 --> 00:11:07,590 You know, if you wanted to make an engineer do that, you know what they're saying? 120 00:11:07,590 --> 00:11:10,870 Because I've been told that I have too many tools to run. 121 00:11:10,870 --> 00:11:13,330 I don't want to log into another tool. 122 00:11:14,330 --> 00:11:14,970 Yeah. 123 00:11:16,850 --> 00:11:27,930 So, if you think about all the CI, CD, and the state of the DAST tool, you would be thinking about panicking. 124 00:11:27,930 --> 00:11:28,570 What do I do? 125 00:11:28,570 --> 00:11:29,930 Because it's a black box. 126 00:11:29,930 --> 00:11:36,810 Code gets into the pipeline, and production website comes out of that pipeline. 127 00:11:36,970 --> 00:11:39,850 So, fear not. 128 00:11:39,850 --> 00:11:48,110 So, what we can do is unpack one of the CI, CD pipeline, one of the process from beginning to end. 129 00:11:48,110 --> 00:11:55,410 So, oftentimes, you would always have an SCM, let it be GitHub, GitLab, whatever you're using. 130 00:11:55,410 --> 00:11:59,710 And then you always have to have some kind of build testing. 131 00:11:59,710 --> 00:12:02,550 And in CI, CD environment, it's automated. 132 00:12:02,550 --> 00:12:08,530 But most of the time, build testing are automated to some degree today anyway. 133 00:12:08,530 --> 00:12:12,350 And then you generally have some kind of integration test. 134 00:12:12,350 --> 00:12:18,770 And in a very automated environment, the build test and integration tests are usually combined. 135 00:12:18,770 --> 00:12:20,510 And then you have production. 136 00:12:21,910 --> 00:12:24,630 So, build server. 137 00:12:24,630 --> 00:12:25,630 What is the build server? 138 00:12:25,630 --> 00:12:30,510 It's nothing but a server that you can do anything in it, run anything in it. 139 00:12:30,570 --> 00:12:31,810 So, awesome. 140 00:12:31,810 --> 00:12:34,630 You can run any kind of security testing there, too. 141 00:12:35,030 --> 00:12:37,290 And then, so, that means you have two places. 142 00:12:37,290 --> 00:12:38,530 It depends on your environment. 143 00:12:38,530 --> 00:12:42,850 You may have one or two places that you can do security testing. 144 00:12:42,950 --> 00:12:46,030 And that's during build tests or integration tests. 145 00:12:47,750 --> 00:13:02,290 So, with that knowledge and the knowledge of... well, with that knowledge, so, I know my requirements for a DASTA tool is that this tool needs to be completely automated. 146 00:13:02,290 --> 00:13:07,490 And no matter which environment I'm testing, I have to be able to integrate it easily. 147 00:13:07,490 --> 00:13:12,070 And then it should produce a report within the CI, CD pipeline. 148 00:13:12,070 --> 00:13:14,190 So, whichever tool that you're using. 149 00:13:14,230 --> 00:13:23,410 And then it should be relatively fast, because fast is one of the characteristics of CI, CD pipelines. 150 00:13:23,410 --> 00:13:25,490 And it needs to be scalable. 151 00:13:27,690 --> 00:13:41,090 So, before I get into the details of how we implemented it, I want to talk about a little bit of container images or containers, just in case that any one of you are not familiar with it. 152 00:13:41,090 --> 00:13:45,390 Container, basically, think about the OS in the old time. 153 00:13:45,390 --> 00:13:50,090 Basically, you have everything in code of that OS. 154 00:13:50,090 --> 00:13:57,810 So, it's lightweight, stand-alone, executable package of software that includes your code library and configurations, everything you need. 155 00:13:57,810 --> 00:14:03,150 So, no matter where you have this container, you just start it and run it. 156 00:14:03,230 --> 00:14:04,730 So, that's the idea. 157 00:14:04,730 --> 00:14:12,640 And then with container, oftentimes, companies will do orchestration, meaning managing the life cycle of the container. 158 00:14:12,640 --> 00:14:17,320 So, you can think about that as an abstraction of network layer. 159 00:14:17,320 --> 00:14:31,880 So, you know how you have to set up, you used to have to work with the DevOps engineers to set up the environment and the network interface, how the servers talk to each other, how the servers can be accessed internally. 160 00:14:31,880 --> 00:14:36,520 All of those can be taken care of by orchestration layer. 161 00:14:36,520 --> 00:14:38,240 And that's code as well. 162 00:14:38,240 --> 00:14:40,180 So, that's what I was trying to say. 163 00:14:40,180 --> 00:14:43,260 There's no physical servers anymore. 164 00:14:43,460 --> 00:14:44,780 Everything's code. 165 00:14:46,080 --> 00:15:01,720 I know those of you who were here for the last presentation and Jim talked about how he thinks serverless is the future and then dockerization and orchestration, it's gonna die. 166 00:15:02,000 --> 00:15:03,840 Well, I don't know if it's gonna die in the future. 167 00:15:03,840 --> 00:15:06,580 I know that's what's happening right now where I am. 168 00:15:06,580 --> 00:15:12,500 I live in San Francisco and in my area, containerization is huge. 169 00:15:13,840 --> 00:15:18,600 So, this is just some statistics I found on Datadog. 170 00:15:18,600 --> 00:15:27,420 So, this was, this data was like March last year and it was saying docker runs on 20% of all the servers they monitor. 171 00:15:27,520 --> 00:15:33,340 And then there was a 75% increase of using docker. 172 00:15:33,340 --> 00:15:37,060 It's like March, the year prior to that. 173 00:15:37,060 --> 00:15:38,920 So, you can imagine it's a lot more now. 174 00:15:38,920 --> 00:15:42,600 Actually, where I am, it feels like it's 100%. 175 00:15:42,600 --> 00:15:46,340 I mean, my unbiased stats, obviously. 176 00:15:46,720 --> 00:15:55,420 And also, another thing to be noticed is when companies use orchestration, servers goes up and down all the time. 177 00:15:55,420 --> 00:15:59,180 That's another challenge for DAST testing, obviously. 178 00:16:00,520 --> 00:16:06,740 So, um, so now I know what we want from a DAST tool in DAST environment. 179 00:16:06,740 --> 00:16:11,660 I know where we can integrate it and I start looking for tools. 180 00:16:11,660 --> 00:16:18,340 And, um, I know I want a dockerized solution because that's what works best for us. 181 00:16:18,340 --> 00:16:22,420 And then I know there's a plus thing. 182 00:16:22,420 --> 00:16:26,780 I mean, it's a nice to have thing, which is integrated with the Selenium test automation. 183 00:16:26,900 --> 00:16:34,360 And because when you integrate with the Selenium test, then you test exactly what's released, no more, no less. 184 00:16:34,360 --> 00:16:47,380 And that's, to me, that's somewhat important in CICD pipelines because with DAST tool, oftentimes you have to crawl the entire website and you have to test more than what you need to. 185 00:16:47,380 --> 00:16:50,020 And obviously that slows down the tests. 186 00:16:51,380 --> 00:16:59,000 So, um, and then you want the result to be available in the engineering CICD pipeline. 187 00:16:59,000 --> 00:17:00,640 To me, it's Jenkins UI. 188 00:17:00,860 --> 00:17:07,780 Um, and then, uh, the tool should find meaningful vulnerabilities out of the box. 189 00:17:08,960 --> 00:17:14,300 So that leaves me with two choices, ZAP and BURP. 190 00:17:14,300 --> 00:17:24,260 And so there is the existing docker image and it's well-maintained with a ZAP image and it's well-maintained by OWASP. 191 00:17:24,260 --> 00:17:28,060 And, but the findings are kind of limited. 192 00:17:28,060 --> 00:17:38,380 And so I looked into BURP and there is some kind of open source docker images, but usually it's only suitable for, uh, interactive use. 193 00:17:38,380 --> 00:17:40,140 It's not for automation. 194 00:17:40,600 --> 00:17:49,060 And so what that makes me think that I can automate it with the headless, uh, headless extension anyway. 195 00:17:49,060 --> 00:17:55,840 And the important thing is, uh, BURP out of the box produces a lot of meaningful findings. 196 00:17:56,060 --> 00:17:57,420 And to me, that was important. 197 00:17:57,420 --> 00:18:02,320 If I'm going to do something, if I'm going to spend my time, I wanted it to, to count, right? 198 00:18:02,320 --> 00:18:06,080 I don't want to just check another box and that's not what I'm here for. 199 00:18:06,780 --> 00:18:11,360 Um, so BURP, I know you can integrate with the Selenium tests. 200 00:18:11,360 --> 00:18:13,160 In ZAP, I looked for information. 201 00:18:13,160 --> 00:18:15,260 I didn't find any, so I'm not sure. 202 00:18:15,320 --> 00:18:19,340 And adding that, I think the findings wasn't sufficient. 203 00:18:19,340 --> 00:18:21,280 So I decided to go with the BURP. 204 00:18:22,760 --> 00:18:29,280 So, um, here's, uh, I guess, uh, it's unfortunate for now. 205 00:18:29,740 --> 00:18:34,860 Um, I got this, uh, acceptance for the talk like two, three weeks ago. 206 00:18:34,860 --> 00:18:41,080 I didn't have enough time to work with my organization to open source it, but we're working on it. 207 00:18:41,080 --> 00:18:44,840 I work in a, uh, highly regulated environment. 208 00:18:44,840 --> 00:18:47,720 We have, um, we have HIPAA data. 209 00:18:47,720 --> 00:18:49,840 It's, uh, very restrictive. 210 00:18:49,840 --> 00:18:54,840 So I have to go through a lot of hoops to get it open source, but I'm getting there. 211 00:18:55,400 --> 00:19:02,240 So with that being said, I can talk to you on what I did, but I won't be able to show you the source code. 212 00:19:02,460 --> 00:19:03,880 Not today. 213 00:19:05,920 --> 00:19:17,100 So, um, headless BURP extension, um, if you haven't used it, it's a command line interface, uh, that you can use with, uh, BURP suite. 214 00:19:17,100 --> 00:19:19,520 And then it's usually used for automation. 215 00:19:20,000 --> 00:19:39,040 And one of the, another, uh, some of the good things that when you actually, uh, integrate with the Selenium tests is, uh, um, beyond you test exactly what you release, no more, no less, and you can pass the URL and you can pass the TLS search, well, and credentials, 216 00:19:39,040 --> 00:19:39,920 um, pass. 217 00:19:39,920 --> 00:19:41,780 I mean, you don't have to do anything. 218 00:19:41,800 --> 00:19:48,080 Basically Selenium is a headless browser and it just calls your website and the QAs have to do that anyway. 219 00:19:48,080 --> 00:19:55,840 So they have that part set up and you set up BURP to listen to the Selenium traffic and it's a passive listen. 220 00:19:55,840 --> 00:20:01,340 It captures all the credentials, the URLs, and, and then the search is set up from QSID. 221 00:20:01,340 --> 00:20:03,420 You don't have to worry about anything. 222 00:20:03,540 --> 00:20:10,460 And imagine if you were gonna, um, actually deal with any other, that's the two, those are the things you have to do manually. 223 00:20:10,460 --> 00:20:16,040 So integration with the Selenium helps tremendously when it comes to automation. 224 00:20:16,660 --> 00:20:27,800 And then, uh, with the headless BURP, it also produces the JUnit and HTML reports and also might integrate that with Jenkins UI. 225 00:20:27,800 --> 00:20:38,560 And also the headless BURP has a feature that you can tune the false positive off and that will just produce actionable findings. 226 00:20:39,860 --> 00:20:47,580 So the steps of, uh, Dockerized headless BURP is this, that's what I did. 227 00:20:47,580 --> 00:20:55,160 And there are about like four, five different open source, the BURP, um, BURP doc images on GitHub. 228 00:20:55,160 --> 00:20:56,240 You can find them. 229 00:20:56,240 --> 00:20:59,380 But this particular one I found it most useful. 230 00:20:59,380 --> 00:21:04,900 If you follow this guy's instruction, you will get to the UI phase. 231 00:21:04,900 --> 00:21:19,140 And then after you have the doc image, uh, created locally, then you have to build the proxy and the scanner, the BURP, the headless BURP proxy and scanner, and then copy that into the doc image you have. 232 00:21:19,140 --> 00:21:21,560 Sounds straightforward enough, right? 233 00:21:21,660 --> 00:21:29,280 Um, there are a lot of bumps, sweet bumps that I had to go through and I'm sharing it with you guys. 234 00:21:29,280 --> 00:21:30,680 Hopefully you don't have to do it. 235 00:21:30,680 --> 00:21:39,460 Actually, if you knew exactly what I'm talking about here, your speed of Dockerizing headless BURP is going to be a lot shorter than mine. 236 00:21:39,460 --> 00:21:44,940 And so basically the only way to active BURP license is through the UI. 237 00:21:44,960 --> 00:21:46,740 There is no other way. 238 00:21:47,080 --> 00:21:53,640 And then use Docker volume option to persist your data, whatever you need to persist. 239 00:21:54,060 --> 00:21:59,100 And then, uh, this reference is actually, um, from BURP suite. 240 00:21:59,100 --> 00:22:06,820 It's, uh, it's on their support page and they will tell you, they will help you to Dockerize, uh, their BURP. 241 00:22:06,820 --> 00:22:14,040 And so if you have questions, I suggest you to go there, check it out there, and you'll find some valuable information. 242 00:22:14,180 --> 00:22:22,900 And then, um, you have to build the headless proxy and scanner because, uh, the app in the BURP B app does not work. 243 00:22:22,900 --> 00:22:24,160 It didn't work with me. 244 00:22:24,160 --> 00:22:25,480 I don't know why. 245 00:22:25,480 --> 00:22:29,640 And so I built it myself and it worked. 246 00:22:29,820 --> 00:22:42,400 So another thing is if you want your BURP to work with Selenium, you have to set the listening mode to all interface because you have to listen externally versus internal. 247 00:22:42,860 --> 00:22:46,920 And, um, yeah, I can't stress enough. 248 00:22:46,920 --> 00:22:53,820 And so I followed this guy's instruction and then I forgot to restart my computer and it didn't work. 249 00:22:53,820 --> 00:22:56,560 And I stuck and I was like, what's going on? 250 00:22:56,560 --> 00:23:00,220 And I had to post the issue on his, uh, GitHub repo. 251 00:23:00,260 --> 00:23:03,020 And it turns out I just need to restart my computer. 252 00:23:03,020 --> 00:23:05,580 I just read the instructions more carefully. 253 00:23:05,580 --> 00:23:07,460 Problem solved. 254 00:23:08,040 --> 00:23:11,200 So any questions about this? 255 00:23:13,630 --> 00:23:20,390 I think I'm using 1.7.17 or 17.7, something like that. 256 00:23:22,530 --> 00:23:24,690 Yeah, the newer is the way I tested. 257 00:23:24,690 --> 00:23:29,610 It didn't work with, uh, the headless proxy and scanner, unfortunately. 258 00:23:30,210 --> 00:23:31,850 This is kind of a boring question 259 00:23:39,070 --> 00:23:39,630 . 260 00:23:40,370 --> 00:23:44,490 Yeah, I think that's a question you should talk to Port Swigger. 261 00:23:48,050 --> 00:23:53,570 Yeah, I, I practiced like 100 times. 262 00:23:55,210 --> 00:24:00,110 So yeah, so the Docker license is different than the BURP suite for a license. 263 00:24:00,110 --> 00:24:03,290 You need a separate license for Docker version or no? 264 00:24:03,290 --> 00:24:05,190 I checked the online. 265 00:24:05,190 --> 00:24:07,850 I don't think they have that model right now. 266 00:24:13,360 --> 00:24:14,200 Yeah. 267 00:24:19,040 --> 00:24:24,100 So yeah, license question, you should all talk to the company because I have no idea how they do it. 268 00:24:24,440 --> 00:24:28,900 The reason I don't know either yet, I, I'm going to talk about it in a bit. 269 00:24:30,200 --> 00:24:44,180 So once you have a Docker and if you work in a company, you're doing this project for your company, this is the time you hand the Docker repo to your DevOps guy and then tell them what you want and the magic will happen. 270 00:24:44,180 --> 00:24:46,360 So basically that's what happened to me. 271 00:24:46,360 --> 00:25:16,340 So what happened is I checked in the Docker image and it immediately tricked a build in our build server and then the image got pushed to our, to the image, our image registry and, and then, and then the rest I POC'd it out and worked with a QA team and we tested it out with Selenium and everything worked out like much better than I thought. 272 00:25:16,360 --> 00:25:20,520 I can't complain really. 273 00:25:20,520 --> 00:25:24,600 I thought it was better than I ever asked. 274 00:25:24,620 --> 00:25:29,120 So unfortunately, like I said, I'm here on my personal capacity. 275 00:25:29,280 --> 00:25:31,260 I couldn't show you a live demo. 276 00:25:31,280 --> 00:25:34,540 There's no way I'm going to show a live demo in DevCon anyway. 277 00:25:36,340 --> 00:25:47,520 So, but I recorded a, I recorded my screens to go through the entire process in this image to just give you an idea of what happened and what the end result is. 278 00:25:49,480 --> 00:25:53,920 So before I move on to that demo, I just want to talk about it. 279 00:25:53,920 --> 00:26:11,860 So we actually integrated with the integration tests and so we haven't done for like all the engineers when they run their tests that we haven't done there yet because right now we have other issues to solve before we can move there. 280 00:26:11,860 --> 00:26:15,120 So that's another reason I didn't know. 281 00:26:15,320 --> 00:26:18,960 So, okay, I'm going to do the demo. 282 00:26:27,760 --> 00:26:29,840 I guess it's going to go through very fast. 283 00:26:29,840 --> 00:26:31,300 I can't pause it, it looks like. 284 00:26:31,300 --> 00:26:37,800 So this is, I'm showing you, I'm just trying to show that I made changes to the Git repo. 285 00:26:37,880 --> 00:26:45,160 And it's going to show up and will trigger a test, a CICD, will trigger a build in the CI server. 286 00:27:04,170 --> 00:27:08,950 So I made changes in the readme file and then I had to commit it. 287 00:27:29,760 --> 00:27:31,500 So now the code is committed. 288 00:27:31,660 --> 00:27:33,240 Git push made it happen. 289 00:27:35,160 --> 00:27:37,560 So I'm going to refresh the page. 290 00:27:38,240 --> 00:27:43,220 And this wasn't there, the DevCon demo online wasn't there, now it's there. 291 00:27:43,220 --> 00:27:48,240 So commit was successful, now I go to our CI server. 292 00:27:48,360 --> 00:27:50,780 So those are the steps that happened. 293 00:27:51,040 --> 00:27:53,160 I wish I could pause it. 294 00:27:53,520 --> 00:27:55,340 Maybe I could, yeah. 295 00:27:56,900 --> 00:28:02,640 So those are the steps that happened after the build was triggered. 296 00:28:02,640 --> 00:28:06,540 So I think this is okay to talk about it. 297 00:28:06,540 --> 00:28:08,820 We actually used CircleCI. 298 00:28:09,440 --> 00:28:16,020 And in CircleCI, they spin up a Docker image, they set up the environment, they do whatever task you ask it to do. 299 00:28:16,020 --> 00:28:19,760 So in this case, build a Docker image, in their Docker image. 300 00:28:20,360 --> 00:28:25,260 And then it pushed the image to our image registry. 301 00:28:44,640 --> 00:28:48,920 So this is where the integration happens in our environment. 302 00:28:48,920 --> 00:28:51,920 We're still trying to move it into one environment. 303 00:28:51,920 --> 00:29:01,640 But suffice it to say, once it gets into integration environment, it triggered a burp proxy, it started it up. 304 00:29:01,960 --> 00:29:08,140 All of this is automated, no humans are doing anything behind. 305 00:29:21,920 --> 00:29:24,320 Usually you're committed to your own branch. 306 00:29:24,320 --> 00:29:26,980 I mean, it depends on how your organization is set up. 307 00:29:26,980 --> 00:29:31,560 But unless you're doing it yourself, I would imagine you have to have your own branch. 308 00:29:31,560 --> 00:29:37,260 So I had my own branch, and it got pushed to the master because of that. 309 00:29:39,520 --> 00:29:42,540 Everything's done and I'm finished working on this project. 310 00:29:43,080 --> 00:29:47,660 I'm sure there will be maintenance, but right now it's pretty much done. 311 00:29:47,800 --> 00:29:49,860 So that's why it was committed to master. 312 00:30:01,670 --> 00:30:05,030 So this test took 23 minutes. 313 00:30:05,070 --> 00:30:08,590 It's relatively long, but I also had a test that took about 5 minutes. 314 00:30:08,590 --> 00:30:12,630 So this is another thing to consider when you want to do integration. 315 00:30:12,630 --> 00:30:17,290 How long it takes to actually do the test for your environment. 316 00:30:17,290 --> 00:30:25,170 If it's too long, you probably won't be able to integrate with the development pipeline. 317 00:30:26,930 --> 00:30:30,790 So that's what happened in Jenkins. 318 00:30:31,310 --> 00:30:38,650 All the reports were generated and they were actually posted into Jenkins. 319 00:30:38,650 --> 00:30:43,850 And then there's a stack message sent to me, so I know that a report is done. 320 00:30:44,930 --> 00:30:49,690 Because it's still kind of early for me, I'm still manually tuning the tool. 321 00:30:49,710 --> 00:30:54,770 So that way I can feel comfortable to hand it to everyone and just say, Hey, go ahead and take it. 322 00:30:55,310 --> 00:30:56,150 Everything's okay. 323 00:30:56,150 --> 00:30:57,810 There's very few false positives. 324 00:30:57,810 --> 00:31:03,010 Because with all the security testing tools, I'm sure you all know, it always has a false positive. 325 00:31:03,010 --> 00:31:06,890 And then a lot of things are environmental, you have to tune them off. 326 00:31:22,650 --> 00:31:25,430 That's in the plan, we haven't done it yet. 327 00:31:25,510 --> 00:31:37,290 Because like I said, I don't feel 100% comfortable that I can just fail build yet, because I haven't finished tuning the reports yet, like the false positives. 328 00:31:37,290 --> 00:31:46,790 And then the second thing is, your website that you're going through, do you happen to be using REST API, or what are you using to test it? 329 00:31:47,390 --> 00:31:48,610 Good question. 330 00:31:48,610 --> 00:31:53,030 So right now, it's an integration test into the UI. 331 00:31:54,050 --> 00:31:57,590 It's actually powered by the Selenium tests. 332 00:31:59,130 --> 00:32:02,370 So I have thought about the UI. 333 00:32:02,370 --> 00:32:05,850 I thought that I can probably integrate it with a REST API tool. 334 00:32:05,850 --> 00:32:07,470 So that's my next step. 335 00:32:08,730 --> 00:32:15,170 Maybe it's a basic question, but how did you do it? 336 00:32:15,590 --> 00:32:20,110 So you see that the step here, publish HTML report. 337 00:32:21,010 --> 00:32:24,670 Once this gets done, it produces a report. 338 00:32:25,470 --> 00:32:33,530 So when the report is produced in Jenkins, you can actually post it using code to post it into the UI. 339 00:32:34,530 --> 00:32:36,710 Using a webhook or something? 340 00:32:38,410 --> 00:32:40,890 Actually, it's not webhook. 341 00:32:41,330 --> 00:32:46,190 We use a... I don't know if I can talk about our environment. 342 00:32:46,190 --> 00:32:53,950 We use a specific kind of way to post things in Jenkins, but it's code. 343 00:32:53,950 --> 00:32:55,470 It's not webhook. 344 00:32:56,030 --> 00:32:57,650 It's custom code. 345 00:32:57,830 --> 00:32:59,750 It's not that custom. 346 00:32:59,750 --> 00:33:01,650 You can find sample code. 347 00:33:01,650 --> 00:33:06,650 So I think that part, I should be able to open source it once I go through all the hook. 348 00:33:06,650 --> 00:33:09,030 And I will post the sample code online. 349 00:33:09,030 --> 00:33:10,850 You should be able to see it and you can just use it. 350 00:33:10,850 --> 00:33:16,450 So theoretically, you can go all the way back to GitHub and then into the IDE of the development. 351 00:33:16,450 --> 00:33:18,810 Yeah, that's the idea. 352 00:33:18,810 --> 00:33:19,350 Yeah. 353 00:33:26,140 --> 00:33:30,480 So with Selenium, you know, it's a curator. 354 00:33:30,480 --> 00:33:36,940 It does all the function tests for the particular feature you're going to release. 355 00:33:37,120 --> 00:33:39,220 And Burp is just out of the box. 356 00:33:39,220 --> 00:33:40,760 I didn't do anything special. 357 00:33:40,760 --> 00:33:42,700 I haven't started tuning it yet. 358 00:33:42,780 --> 00:33:46,120 But I'm curious to see what I can find once I start tuning it. 359 00:33:46,120 --> 00:33:53,500 Yeah, so theoretically, you could replace Burp with a commercial, really available, endless, dynamic schema. 360 00:33:53,500 --> 00:33:54,560 That's what I'm thinking. 361 00:33:55,300 --> 00:33:56,560 Yeah, that's what I'm thinking. 362 00:33:56,560 --> 00:34:01,140 I hope the commercial tools, if there are any representatives here, they're listening. 363 00:34:01,140 --> 00:34:01,680 I listen. 364 00:34:01,680 --> 00:34:03,340 Yeah, because I don't have to do this. 365 00:34:03,340 --> 00:34:05,340 I can spend my time doing other things. 366 00:34:06,660 --> 00:34:09,440 I was wondering, are you getting pushbacks from the developers? 367 00:34:09,440 --> 00:34:13,420 Because I'm getting pushbacks from the developers saying anything over a few minutes. 368 00:34:14,160 --> 00:34:18,800 And they're concerned about, because they want to do this integration multiple times. 369 00:34:18,960 --> 00:34:25,600 And if you start putting this in sequential, eventually we're going to have multiple security tools running this. 370 00:34:25,600 --> 00:34:30,120 We've got to parallelize all of this and potentially run this on multiple build services. 371 00:34:30,320 --> 00:34:33,840 Yeah, so I can see that. 372 00:34:33,840 --> 00:34:39,120 So I did the integration phase, so it's a little bit later already. 373 00:34:39,120 --> 00:34:44,320 Usually QA, that's QA's group, and usually their tests take an hour or two anyway. 374 00:34:44,320 --> 00:34:45,660 So they don't mind. 375 00:34:45,660 --> 00:34:47,360 But I know what you're saying. 376 00:34:47,360 --> 00:34:57,860 So what I was thinking is, to make it happen within a dev environment, I might try out Zap. 377 00:34:57,860 --> 00:35:01,540 That's what I was thinking for what I'm going to do next. 378 00:35:02,500 --> 00:35:07,180 Remember that engineers develop their code and the tricks they build. 379 00:35:07,180 --> 00:35:12,180 And it goes through all kinds of tests, sometimes coverage and quality tests, all of those. 380 00:35:12,180 --> 00:35:13,520 You can add Zap there. 381 00:35:13,520 --> 00:35:15,320 That's my next step. 382 00:35:18,670 --> 00:35:21,030 Finding persistence between runs? 383 00:35:21,570 --> 00:35:25,230 Can you check the same findings between runs? 384 00:35:25,510 --> 00:35:32,450 Yeah, if the code is the same, the findings are the same. 385 00:35:32,450 --> 00:35:33,830 No difference at all. 386 00:35:33,830 --> 00:35:35,890 It works pretty well. 387 00:35:51,210 --> 00:35:57,230 Yeah, so that's the part where I said it works pretty amazingly when you use Selenium. 388 00:35:57,430 --> 00:36:06,590 Initially I thought I had to set up a burp, but it turns out none of this is necessary, because Selenium has to handle the credential itself. 389 00:36:06,590 --> 00:36:12,890 And once it logs in, the tokens get carried out in the subsequent requests. 390 00:36:13,370 --> 00:36:15,090 So there you have it. 391 00:36:15,090 --> 00:36:16,870 You don't have to deal with the credentials. 392 00:36:29,560 --> 00:36:32,580 So that's the report out of the box. 393 00:36:33,060 --> 00:36:34,820 That's the findings I have. 394 00:36:34,820 --> 00:36:36,640 I would say it's pretty good. 395 00:36:37,080 --> 00:36:40,700 For how cheap Burp Suite is, I really can't complain. 396 00:36:42,300 --> 00:36:45,740 Yeah, and that's the end of the presentation. 397 00:36:50,770 --> 00:36:52,990 Thank you. 398 00:36:54,490 --> 00:36:57,830 Any other questions? 399 00:37:00,820 --> 00:37:05,640 Addressing false positives per system? 400 00:37:05,920 --> 00:37:16,820 Yeah, so with Headless Burp, that's the part where I was hoping that their DAS representatives here, that they can come up with a commercial tool. 401 00:37:16,960 --> 00:37:20,020 There's a configuration file. 402 00:37:20,020 --> 00:37:25,940 You can add specific findings there as a filter, but you have to do it manually. 403 00:37:26,420 --> 00:37:30,360 You can do it, but it's kind of... there's a lot of work. 404 00:37:30,360 --> 00:37:36,020 Is that based on the finding type, or is it based on... 405 00:37:36,780 --> 00:37:37,860 That's finding type. 406 00:37:37,960 --> 00:37:40,100 Yeah, unfortunately. 407 00:37:40,100 --> 00:37:50,700 So in this example, even though you've only made like maybe five changes to the code in this particular reason, with Burp you're still testing the entire build, correct? 408 00:37:50,700 --> 00:37:51,840 Right, yeah, yeah. 409 00:37:51,840 --> 00:37:58,800 Have you given any consideration to figuring out a way just to test what's changed to make it even faster? 410 00:37:58,800 --> 00:38:04,840 You mean, when you say test, do you mean in the CI server? 411 00:38:04,900 --> 00:38:08,300 Well, when you run the Burp DAS, kind of. 412 00:38:08,780 --> 00:38:14,480 Can you configure Burp so, say, it knows from a manifest or something? 413 00:38:14,500 --> 00:38:17,020 You know, those five changes ended up in the code. 414 00:38:18,880 --> 00:38:23,340 So, I... okay, so I know where the confusion comes from. 415 00:38:23,340 --> 00:38:33,160 So the committing part, and then trigger test in CI and commit the... and then push the image to image registry, that's for Burp. 416 00:38:33,160 --> 00:38:35,420 The test is not for Burp. 417 00:38:35,420 --> 00:38:38,120 I used... I put the image down. 418 00:38:38,120 --> 00:38:40,340 So if I show you this diagram... 419 00:38:41,520 --> 00:38:48,920 So, what I did is I commit the code that triggered this entire process, and then the image got pushed here. 420 00:38:48,920 --> 00:38:54,160 And this part doesn't have anything to do with how I created the Burp image anymore. 421 00:38:54,160 --> 00:38:55,760 It just looks at the image, correct? 422 00:38:55,820 --> 00:38:57,000 Yeah, I just put the image... 423 00:38:58,560 --> 00:39:02,740 It doesn't know how the image was built, it just knows the image. 424 00:39:03,220 --> 00:39:05,420 What do you mean when you say it doesn't know how... 425 00:39:05,420 --> 00:39:07,100 So, like, if you have like a... 426 00:39:07,820 --> 00:39:14,000 You can have all kinds of rules, you know, manifest, YAML, all that stuff. 427 00:39:14,000 --> 00:39:19,220 But when you're testing on the dev side, does it know anything about that? 428 00:39:19,240 --> 00:39:21,510 Yeah, it... well, so... 429 00:39:22,340 --> 00:39:25,680 In this step, update deployment. 430 00:39:25,680 --> 00:39:28,420 If you're using some kind of orchestration... 431 00:39:29,600 --> 00:39:33,900 Yeah, the orchestration actually sends a request to your environment. 432 00:39:33,900 --> 00:39:44,220 So, if you're in a Kubernetes environment, Kubernetes receives the request, and it updates your environment by pulling the newest image to here. 433 00:39:44,220 --> 00:39:50,580 So, if you make changes, and there's another environment that's using the image, it will get updated. 434 00:39:50,580 --> 00:39:55,380 But we don't have to worry about it, because all those are set up via the orchestration. 435 00:39:55,380 --> 00:39:59,640 Right, so you'll have the previous image and the new image, so... 436 00:39:59,640 --> 00:40:06,740 Yeah, yeah, yeah, the infrastructure code takes care of it. 437 00:40:07,060 --> 00:40:07,620 Yeah. 438 00:40:09,080 --> 00:40:09,760 Yeah. 439 00:40:13,960 --> 00:40:15,640 I'm sorry, what did you say? 440 00:40:15,640 --> 00:40:15,960 When you 441 00:40:25,780 --> 00:40:29,300 change, you get the newest image? 442 00:40:29,380 --> 00:40:30,020 Yeah. 443 00:40:32,200 --> 00:40:44,960 So, the image, only if there are changes to the burp suite image that I made, the information will get updated via the update deployment part. 444 00:40:45,400 --> 00:40:51,320 The orchestration part takes care of that, to pull the new image, and know when to pull the new image. 445 00:40:51,680 --> 00:40:53,920 It only pulls the new image if there are changes. 446 00:40:53,920 --> 00:40:57,140 If there are no changes, obviously it doesn't pull new images. 447 00:41:09,320 --> 00:41:16,220 Yes, but... so, well, my username is pinkgladiator on GitHub. 448 00:41:35,470 --> 00:41:42,690 So, actually, none of us, once it's set up, none of us does anything. 449 00:41:42,690 --> 00:41:48,470 So , Selenium sends all the requests to the website you are testing. 450 00:41:48,470 --> 00:41:59,610 And burp proxy passively listens and records all the traffic, and then takes the information, the data, that it recorded from burp proxy. 451 00:41:59,610 --> 00:42:14,950 And then, when that's done, when Selenium test is done, I kill burp proxy, set up a burp scanner to scan the information I just collected from Selenium. 452 00:42:14,950 --> 00:42:20,630 So there are three types of tests you can do with this. 453 00:42:20,630 --> 00:42:30,310 You can test the app inside the container, you can test whether you can break out of the container, or whether you can achieve root ownership of the container. 454 00:42:30,310 --> 00:42:32,410 Which of those three did you test? 455 00:42:33,150 --> 00:42:37,850 This is a test application outside of the container. 456 00:42:39,070 --> 00:42:42,510 So, basically, it's nothing fancy. 457 00:42:42,510 --> 00:42:48,530 I didn't try to... you're saying if I tried to escalate the privilege to get the root privilege? 458 00:42:48,530 --> 00:42:50,150 None of those, yeah. 459 00:42:56,300 --> 00:42:58,640 We have hack one for that. 460 00:42:58,640 --> 00:43:01,100 We have. 461 00:43:02,700 --> 00:43:04,460 Yeah, that would be good. 462 00:43:04,460 --> 00:43:05,820 Okay, sure. 463 00:43:06,040 --> 00:43:11,880 Yeah, those things, you can't find them via this kind of automated testing. 464 00:43:11,880 --> 00:43:14,240 Yeah, it's a lot more complicated. 465 00:43:14,940 --> 00:43:15,620 Yeah. 466 00:43:16,540 --> 00:43:19,860 That needs human involvement, that's why we always have jobs. 467 00:43:23,800 --> 00:43:26,220 Yeah, I think that's it. 468 00:43:26,220 --> 00:43:27,160 My time's up. 469 00:43:27,160 --> 00:43:28,060 Thank you.