WEBVTT

00:00.000 --> 00:01.220
Morning guys.

00:01.220 --> 00:03.460
Uh, can everyone hear me in the back?

00:03.640 --> 00:04.840
Okay.

00:04.900 --> 00:07.460
Uh, so my name is Magno Logan.

00:07.460 --> 00:10.180
I'm gonna be your host for the rest of the day.

00:10.180 --> 00:12.300
Just introducing the speakers here.

00:12.300 --> 00:17.860
Uh, it's an honor to be here and be volunteering and helping this village.

00:17.920 --> 00:24.760
Um, so yeah, without further ado, uh, I'd like to introduce Yangyang Wang.

00:24.760 --> 00:30.680
Uh, she's a cloud security architect, uh, leading implementation of security tasks at HITRUST.

00:30.680 --> 00:38.980
Uh, she has led integration security into various CICD pipelines, uh, and created successful security programs and culture.

00:38.980 --> 00:45.420
And she's going to be talking about automate pain testing in dockerized CICD environments.

00:45.800 --> 00:47.360
Give her a round of applause.

00:51.670 --> 00:52.650
Thank you.

00:52.650 --> 00:53.670
Good morning.

00:53.670 --> 00:54.910
Thanks for coming.

00:54.910 --> 00:58.270
And I hope you're happy by end of the presentation.

00:58.330 --> 01:09.070
So today's topic is about, um, automation, uh, in, uh, automating dynamic application security testing in CICD pipelines.

01:09.070 --> 01:15.070
So before I start, how many people are actually very familiar with the CICD pipelines?

01:16.370 --> 01:17.570
Okay.

01:17.870 --> 01:21.450
How many people here are security professionals?

01:24.390 --> 01:25.130
Okay.

01:25.130 --> 01:26.830
I see some overlapping here.

01:26.830 --> 01:27.270
All right.

01:27.270 --> 01:28.290
That's good.

01:29.370 --> 01:36.270
So before I start, um, I wanted to, um, to say that I'm here on my personal capacity.

01:36.270 --> 01:42.390
And what I say, what I express in this presentation does not represent my organization.

01:45.430 --> 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.

01:53.670 --> 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.

02:05.870 --> 02:08.050
So I'm just going to cover it quickly.

02:08.090 --> 02:14.890
And then I'm going to talk about some characteristics of the CICD that's relevant to pen testing.

02:15.150 --> 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.

02:28.090 --> 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.

02:40.360 --> 02:42.060
So who I am?

02:42.060 --> 02:45.440
I'm a cloud application security architect.

02:45.440 --> 02:47.160
And so it's a mouthful, I know.

02:47.160 --> 02:51.640
And it means a lot of different things to different organization.

02:51.640 --> 02:54.580
But I live in San Francisco, in Bay Area.

02:54.960 --> 03:01.400
I think generally, um, architect, particularly in startups, it means you do everything, really.

03:05.060 --> 03:07.720
So I want to talk about the CICD.

03:07.720 --> 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.

03:20.440 --> 03:25.740
And then continuous delivery, that's what CICD stands for.

03:25.740 --> 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.

03:34.420 --> 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.

03:47.840 --> 03:52.360
All of this is, uh, automated, meaning everything is powered by code.

03:52.360 --> 03:56.320
There is no physical environment that you have to deal with anymore.

03:58.260 --> 04:00.880
So why does it matter?

04:00.880 --> 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.

04:16.060 --> 04:25.740
And so that way it will be clear why the existing tool, the pentesting tools are not suitable for the environment.

04:25.980 --> 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.

04:37.360 --> 04:38.780
And then they integrate.

04:38.780 --> 04:41.320
Sometimes it's a week, sometimes it's a month.

04:41.320 --> 04:47.520
And then that big gap, big bang happens and things will fail in, inavoidably.

04:47.520 --> 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.

04:57.240 --> 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.

05:04.060 --> 05:07.760
And if you are, it's still hard, but slightly easier.

05:08.980 --> 05:16.400
So when continuous integration comes and engineers have controls of almost everything.

05:16.500 --> 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.

05:29.980 --> 05:32.860
And so it's, it's all together.

05:32.860 --> 05:38.740
By the time the code gets to integration stage, the test will happen automatically too.

05:38.780 --> 05:46.320
And if there is any issue, it gets the commit fails and they have to fix the issues, whatever that is.

05:47.860 --> 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.

06:01.020 --> 06:06.200
And obviously there are human interactions there to get it, to make it happen.

06:06.420 --> 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.

06:19.640 --> 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.

06:27.840 --> 06:33.140
And sometimes it's even in local branch and your code is, everything is okay.

06:33.140 --> 06:35.560
It's ready to be deployed, supposedly.

06:35.580 --> 06:39.920
However, when it comes to implementation, there are shades of gray, obviously.

06:39.920 --> 06:45.240
And most of the time, there is still some kind of human interaction for deployment.

06:45.240 --> 06:46.920
It really depends on the company.

06:49.320 --> 06:55.520
So, this is something I found online from Instagram website.

06:55.520 --> 06:57.040
I don't work for Instagram.

06:57.140 --> 07:01.380
And that's just to illustrate how fast things are moving today.

07:01.380 --> 07:05.800
And they deploy their backend code 30 to 50 times a day.

07:05.800 --> 07:09.700
And oftentimes, most of the time, there is no human interaction at all.

07:09.700 --> 07:14.380
And what they're saying is that their engineering moves fast.

07:14.380 --> 07:19.320
So, that's one of the key words for CICD, fast.

07:19.320 --> 07:24.060
And then, make it easier to find your bad commits and fix them.

07:24.060 --> 07:25.880
So, that's another key word too.

07:25.880 --> 07:30.680
And particularly, in the sense of finding your security bugs.

07:30.680 --> 07:32.640
I will come to it later.

07:34.140 --> 07:43.000
So, I just touched the characteristics of CICD pipelines in terms of DAST testing.

07:43.020 --> 07:46.140
I haven't explained what DAST is.

07:46.140 --> 07:48.300
And I assume most people here know.

07:48.300 --> 07:50.500
And if you don't know, can you raise your hand?

07:51.480 --> 07:52.320
Okay.

07:52.680 --> 07:58.100
So, dynamic application security testing basically means you have to have a running app.

07:58.100 --> 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.

08:07.420 --> 08:17.840
So, anyway, the characteristics that's relevant to automate your DAST is the build are repeatable and deterministic.

08:17.840 --> 08:21.320
And then also, that everything is automated.

08:21.320 --> 08:25.800
All the release, all the testing, testing, different testing.

08:25.800 --> 08:28.560
And also, they're really fast.

08:32.010 --> 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.

08:51.750 --> 08:53.490
So, that's why it's relevant here.

08:53.490 --> 08:55.350
And then that's automate.

08:55.350 --> 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.

09:06.290 --> 09:08.010
Oh, that's what happens?

09:08.090 --> 09:09.190
No one told me.

09:09.190 --> 09:12.070
I mean, every one of you said that, I guarantee you.

09:12.070 --> 09:15.130
If you didn't say that, you're not a security person.

09:15.210 --> 09:17.430
I've been in this field long enough, I know.

09:19.450 --> 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.

09:31.450 --> 09:33.050
And that, to me, it's a good thing.

09:34.850 --> 09:37.690
And then, also, testing environment.

09:37.690 --> 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.

09:48.670 --> 09:52.170
None of them is necessary anymore for CICD pipeline.

09:56.250 --> 09:59.030
And so, challenges.

09:59.290 --> 10:06.710
If you look at the existing DAST tools, oftentimes, it needs some kind of human interactions.

10:07.090 --> 10:09.210
They want you to put a URL in there.

10:09.210 --> 10:11.350
They want you to put the credential in there.

10:11.350 --> 10:17.290
They want you to put parameters there, what to exclude, what to include, this and that.

10:17.670 --> 10:22.550
It seems like, is it even worse to automate that?

10:22.550 --> 10:26.970
Because some tools does offer API tools to let you automate that.

10:26.970 --> 10:30.970
But it's like, this still involves a lot of human steps.

10:32.490 --> 10:39.290
And then, also, this is relevant if you are running in a containerized environment.

10:39.370 --> 10:41.370
You have to have a running app.

10:41.370 --> 10:44.170
And I will touch that later a little bit more.

10:44.370 --> 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.

10:57.690 --> 11:02.070
And generally, you create a Jira ticket or some other system, whatever.

11:02.910 --> 11:07.590
You know, if you wanted to make an engineer do that, you know what they're saying?

11:07.590 --> 11:10.870
Because I've been told that I have too many tools to run.

11:10.870 --> 11:13.330
I don't want to log into another tool.

11:14.330 --> 11:14.970
Yeah.

11:16.850 --> 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.

11:27.930 --> 11:28.570
What do I do?

11:28.570 --> 11:29.930
Because it's a black box.

11:29.930 --> 11:36.810
Code gets into the pipeline, and production website comes out of that pipeline.

11:36.970 --> 11:39.850
So, fear not.

11:39.850 --> 11:48.110
So, what we can do is unpack one of the CI, CD pipeline, one of the process from beginning to end.

11:48.110 --> 11:55.410
So, oftentimes, you would always have an SCM, let it be GitHub, GitLab, whatever you're using.

11:55.410 --> 11:59.710
And then you always have to have some kind of build testing.

11:59.710 --> 12:02.550
And in CI, CD environment, it's automated.

12:02.550 --> 12:08.530
But most of the time, build testing are automated to some degree today anyway.

12:08.530 --> 12:12.350
And then you generally have some kind of integration test.

12:12.350 --> 12:18.770
And in a very automated environment, the build test and integration tests are usually combined.

12:18.770 --> 12:20.510
And then you have production.

12:21.910 --> 12:24.630
So, build server.

12:24.630 --> 12:25.630
What is the build server?

12:25.630 --> 12:30.510
It's nothing but a server that you can do anything in it, run anything in it.

12:30.570 --> 12:31.810
So, awesome.

12:31.810 --> 12:34.630
You can run any kind of security testing there, too.

12:35.030 --> 12:37.290
And then, so, that means you have two places.

12:37.290 --> 12:38.530
It depends on your environment.

12:38.530 --> 12:42.850
You may have one or two places that you can do security testing.

12:42.950 --> 12:46.030
And that's during build tests or integration tests.

12:47.750 --> 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.

13:02.290 --> 13:07.490
And no matter which environment I'm testing, I have to be able to integrate it easily.

13:07.490 --> 13:12.070
And then it should produce a report within the CI, CD pipeline.

13:12.070 --> 13:14.190
So, whichever tool that you're using.

13:14.230 --> 13:23.410
And then it should be relatively fast, because fast is one of the characteristics of CI, CD pipelines.

13:23.410 --> 13:25.490
And it needs to be scalable.

13:27.690 --> 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.

13:41.090 --> 13:45.390
Container, basically, think about the OS in the old time.

13:45.390 --> 13:50.090
Basically, you have everything in code of that OS.

13:50.090 --> 13:57.810
So, it's lightweight, stand-alone, executable package of software that includes your code library and configurations, everything you need.

13:57.810 --> 14:03.150
So, no matter where you have this container, you just start it and run it.

14:03.230 --> 14:04.730
So, that's the idea.

14:04.730 --> 14:12.640
And then with container, oftentimes, companies will do orchestration, meaning managing the life cycle of the container.

14:12.640 --> 14:17.320
So, you can think about that as an abstraction of network layer.

14:17.320 --> 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.

14:31.880 --> 14:36.520
All of those can be taken care of by orchestration layer.

14:36.520 --> 14:38.240
And that's code as well.

14:38.240 --> 14:40.180
So, that's what I was trying to say.

14:40.180 --> 14:43.260
There's no physical servers anymore.

14:43.460 --> 14:44.780
Everything's code.

14:46.080 --> 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.

15:02.000 --> 15:03.840
Well, I don't know if it's gonna die in the future.

15:03.840 --> 15:06.580
I know that's what's happening right now where I am.

15:06.580 --> 15:12.500
I live in San Francisco and in my area, containerization is huge.

15:13.840 --> 15:18.600
So, this is just some statistics I found on Datadog.

15:18.600 --> 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.

15:27.520 --> 15:33.340
And then there was a 75% increase of using docker.

15:33.340 --> 15:37.060
It's like March, the year prior to that.

15:37.060 --> 15:38.920
So, you can imagine it's a lot more now.

15:38.920 --> 15:42.600
Actually, where I am, it feels like it's 100%.

15:42.600 --> 15:46.340
I mean, my unbiased stats, obviously.

15:46.720 --> 15:55.420
And also, another thing to be noticed is when companies use orchestration, servers goes up and down all the time.

15:55.420 --> 15:59.180
That's another challenge for DAST testing, obviously.

16:00.520 --> 16:06.740
So, um, so now I know what we want from a DAST tool in DAST environment.

16:06.740 --> 16:11.660
I know where we can integrate it and I start looking for tools.

16:11.660 --> 16:18.340
And, um, I know I want a dockerized solution because that's what works best for us.

16:18.340 --> 16:22.420
And then I know there's a plus thing.

16:22.420 --> 16:26.780
I mean, it's a nice to have thing, which is integrated with the Selenium test automation.

16:26.900 --> 16:34.360
And because when you integrate with the Selenium test, then you test exactly what's released, no more, no less.

16:34.360 --> 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.

16:47.380 --> 16:50.020
And obviously that slows down the tests.

16:51.380 --> 16:59.000
So, um, and then you want the result to be available in the engineering CICD pipeline.

16:59.000 --> 17:00.640
To me, it's Jenkins UI.

17:00.860 --> 17:07.780
Um, and then, uh, the tool should find meaningful vulnerabilities out of the box.

17:08.960 --> 17:14.300
So that leaves me with two choices, ZAP and BURP.

17:14.300 --> 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.

17:24.260 --> 17:28.060
And, but the findings are kind of limited.

17:28.060 --> 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.

17:38.380 --> 17:40.140
It's not for automation.

17:40.600 --> 17:49.060
And so what that makes me think that I can automate it with the headless, uh, headless extension anyway.

17:49.060 --> 17:55.840
And the important thing is, uh, BURP out of the box produces a lot of meaningful findings.

17:56.060 --> 17:57.420
And to me, that was important.

17:57.420 --> 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?

18:02.320 --> 18:06.080
I don't want to just check another box and that's not what I'm here for.

18:06.780 --> 18:11.360
Um, so BURP, I know you can integrate with the Selenium tests.

18:11.360 --> 18:13.160
In ZAP, I looked for information.

18:13.160 --> 18:15.260
I didn't find any, so I'm not sure.

18:15.320 --> 18:19.340
And adding that, I think the findings wasn't sufficient.

18:19.340 --> 18:21.280
So I decided to go with the BURP.

18:22.760 --> 18:29.280
So, um, here's, uh, I guess, uh, it's unfortunate for now.

18:29.740 --> 18:34.860
Um, I got this, uh, acceptance for the talk like two, three weeks ago.

18:34.860 --> 18:41.080
I didn't have enough time to work with my organization to open source it, but we're working on it.

18:41.080 --> 18:44.840
I work in a, uh, highly regulated environment.

18:44.840 --> 18:47.720
We have, um, we have HIPAA data.

18:47.720 --> 18:49.840
It's, uh, very restrictive.

18:49.840 --> 18:54.840
So I have to go through a lot of hoops to get it open source, but I'm getting there.

18:55.400 --> 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.

19:02.460 --> 19:03.880
Not today.

19:05.920 --> 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.

19:17.100 --> 19:19.520
And then it's usually used for automation.

19:20.000 --> 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,

19:39.040 --> 19:39.920
um, pass.

19:39.920 --> 19:41.780
I mean, you don't have to do anything.

19:41.800 --> 19:48.080
Basically Selenium is a headless browser and it just calls your website and the QAs have to do that anyway.

19:48.080 --> 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.

19:55.840 --> 20:01.340
It captures all the credentials, the URLs, and, and then the search is set up from QSID.

20:01.340 --> 20:03.420
You don't have to worry about anything.

20:03.540 --> 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.

20:10.460 --> 20:16.040
So integration with the Selenium helps tremendously when it comes to automation.

20:16.660 --> 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.

20:27.800 --> 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.

20:39.860 --> 20:47.580
So the steps of, uh, Dockerized headless BURP is this, that's what I did.

20:47.580 --> 20:55.160
And there are about like four, five different open source, the BURP, um, BURP doc images on GitHub.

20:55.160 --> 20:56.240
You can find them.

20:56.240 --> 20:59.380
But this particular one I found it most useful.

20:59.380 --> 21:04.900
If you follow this guy's instruction, you will get to the UI phase.

21:04.900 --> 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.

21:19.140 --> 21:21.560
Sounds straightforward enough, right?

21:21.660 --> 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.

21:29.280 --> 21:30.680
Hopefully you don't have to do it.

21:30.680 --> 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.

21:39.460 --> 21:44.940
And so basically the only way to active BURP license is through the UI.

21:44.960 --> 21:46.740
There is no other way.

21:47.080 --> 21:53.640
And then use Docker volume option to persist your data, whatever you need to persist.

21:54.060 --> 21:59.100
And then, uh, this reference is actually, um, from BURP suite.

21:59.100 --> 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.

22:06.820 --> 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.

22:14.180 --> 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.

22:22.900 --> 22:24.160
It didn't work with me.

22:24.160 --> 22:25.480
I don't know why.

22:25.480 --> 22:29.640
And so I built it myself and it worked.

22:29.820 --> 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.

22:42.860 --> 22:46.920
And, um, yeah, I can't stress enough.

22:46.920 --> 22:53.820
And so I followed this guy's instruction and then I forgot to restart my computer and it didn't work.

22:53.820 --> 22:56.560
And I stuck and I was like, what's going on?

22:56.560 --> 23:00.220
And I had to post the issue on his, uh, GitHub repo.

23:00.260 --> 23:03.020
And it turns out I just need to restart my computer.

23:03.020 --> 23:05.580
I just read the instructions more carefully.

23:05.580 --> 23:07.460
Problem solved.

23:08.040 --> 23:11.200
So any questions about this?

23:13.630 --> 23:20.390
I think I'm using 1.7.17 or 17.7, something like that.

23:22.530 --> 23:24.690
Yeah, the newer is the way I tested.

23:24.690 --> 23:29.610
It didn't work with, uh, the headless proxy and scanner, unfortunately.

23:30.210 --> 23:31.850
This is kind of a boring question

23:39.070 --> 23:39.630
.

23:40.370 --> 23:44.490
Yeah, I think that's a question you should talk to Port Swigger.

23:48.050 --> 23:53.570
Yeah, I, I practiced like 100 times.

23:55.210 --> 24:00.110
So yeah, so the Docker license is different than the BURP suite for a license.

24:00.110 --> 24:03.290
You need a separate license for Docker version or no?

24:03.290 --> 24:05.190
I checked the online.

24:05.190 --> 24:07.850
I don't think they have that model right now.

24:13.360 --> 24:14.200
Yeah.

24:19.040 --> 24:24.100
So yeah, license question, you should all talk to the company because I have no idea how they do it.

24:24.440 --> 24:28.900
The reason I don't know either yet, I, I'm going to talk about it in a bit.

24:30.200 --> 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.

24:44.180 --> 24:46.360
So basically that's what happened to me.

24:46.360 --> 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.

25:16.360 --> 25:20.520
I can't complain really.

25:20.520 --> 25:24.600
I thought it was better than I ever asked.

25:24.620 --> 25:29.120
So unfortunately, like I said, I'm here on my personal capacity.

25:29.280 --> 25:31.260
I couldn't show you a live demo.

25:31.280 --> 25:34.540
There's no way I'm going to show a live demo in DevCon anyway.

25:36.340 --> 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.

25:49.480 --> 25:53.920
So before I move on to that demo, I just want to talk about it.

25:53.920 --> 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.

26:11.860 --> 26:15.120
So that's another reason I didn't know.

26:15.320 --> 26:18.960
So, okay, I'm going to do the demo.

26:27.760 --> 26:29.840
I guess it's going to go through very fast.

26:29.840 --> 26:31.300
I can't pause it, it looks like.

26:31.300 --> 26:37.800
So this is, I'm showing you, I'm just trying to show that I made changes to the Git repo.

26:37.880 --> 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.

27:04.170 --> 27:08.950
So I made changes in the readme file and then I had to commit it.

27:29.760 --> 27:31.500
So now the code is committed.

27:31.660 --> 27:33.240
Git push made it happen.

27:35.160 --> 27:37.560
So I'm going to refresh the page.

27:38.240 --> 27:43.220
And this wasn't there, the DevCon demo online wasn't there, now it's there.

27:43.220 --> 27:48.240
So commit was successful, now I go to our CI server.

27:48.360 --> 27:50.780
So those are the steps that happened.

27:51.040 --> 27:53.160
I wish I could pause it.

27:53.520 --> 27:55.340
Maybe I could, yeah.

27:56.900 --> 28:02.640
So those are the steps that happened after the build was triggered.

28:02.640 --> 28:06.540
So I think this is okay to talk about it.

28:06.540 --> 28:08.820
We actually used CircleCI.

28:09.440 --> 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.

28:16.020 --> 28:19.760
So in this case, build a Docker image, in their Docker image.

28:20.360 --> 28:25.260
And then it pushed the image to our image registry.

28:44.640 --> 28:48.920
So this is where the integration happens in our environment.

28:48.920 --> 28:51.920
We're still trying to move it into one environment.

28:51.920 --> 29:01.640
But suffice it to say, once it gets into integration environment, it triggered a burp proxy, it started it up.

29:01.960 --> 29:08.140
All of this is automated, no humans are doing anything behind.

29:21.920 --> 29:24.320
Usually you're committed to your own branch.

29:24.320 --> 29:26.980
I mean, it depends on how your organization is set up.

29:26.980 --> 29:31.560
But unless you're doing it yourself, I would imagine you have to have your own branch.

29:31.560 --> 29:37.260
So I had my own branch, and it got pushed to the master because of that.

29:39.520 --> 29:42.540
Everything's done and I'm finished working on this project.

29:43.080 --> 29:47.660
I'm sure there will be maintenance, but right now it's pretty much done.

29:47.800 --> 29:49.860
So that's why it was committed to master.

30:01.670 --> 30:05.030
So this test took 23 minutes.

30:05.070 --> 30:08.590
It's relatively long, but I also had a test that took about 5 minutes.

30:08.590 --> 30:12.630
So this is another thing to consider when you want to do integration.

30:12.630 --> 30:17.290
How long it takes to actually do the test for your environment.

30:17.290 --> 30:25.170
If it's too long, you probably won't be able to integrate with the development pipeline.

30:26.930 --> 30:30.790
So that's what happened in Jenkins.

30:31.310 --> 30:38.650
All the reports were generated and they were actually posted into Jenkins.

30:38.650 --> 30:43.850
And then there's a stack message sent to me, so I know that a report is done.

30:44.930 --> 30:49.690
Because it's still kind of early for me, I'm still manually tuning the tool.

30:49.710 --> 30:54.770
So that way I can feel comfortable to hand it to everyone and just say, Hey, go ahead and take it.

30:55.310 --> 30:56.150
Everything's okay.

30:56.150 --> 30:57.810
There's very few false positives.

30:57.810 --> 31:03.010
Because with all the security testing tools, I'm sure you all know, it always has a false positive.

31:03.010 --> 31:06.890
And then a lot of things are environmental, you have to tune them off.

31:22.650 --> 31:25.430
That's in the plan, we haven't done it yet.

31:25.510 --> 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.

31:37.290 --> 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?

31:47.390 --> 31:48.610
Good question.

31:48.610 --> 31:53.030
So right now, it's an integration test into the UI.

31:54.050 --> 31:57.590
It's actually powered by the Selenium tests.

31:59.130 --> 32:02.370
So I have thought about the UI.

32:02.370 --> 32:05.850
I thought that I can probably integrate it with a REST API tool.

32:05.850 --> 32:07.470
So that's my next step.

32:08.730 --> 32:15.170
Maybe it's a basic question, but how did you do it?

32:15.590 --> 32:20.110
So you see that the step here, publish HTML report.

32:21.010 --> 32:24.670
Once this gets done, it produces a report.

32:25.470 --> 32:33.530
So when the report is produced in Jenkins, you can actually post it using code to post it into the UI.

32:34.530 --> 32:36.710
Using a webhook or something?

32:38.410 --> 32:40.890
Actually, it's not webhook.

32:41.330 --> 32:46.190
We use a... I don't know if I can talk about our environment.

32:46.190 --> 32:53.950
We use a specific kind of way to post things in Jenkins, but it's code.

32:53.950 --> 32:55.470
It's not webhook.

32:56.030 --> 32:57.650
It's custom code.

32:57.830 --> 32:59.750
It's not that custom.

32:59.750 --> 33:01.650
You can find sample code.

33:01.650 --> 33:06.650
So I think that part, I should be able to open source it once I go through all the hook.

33:06.650 --> 33:09.030
And I will post the sample code online.

33:09.030 --> 33:10.850
You should be able to see it and you can just use it.

33:10.850 --> 33:16.450
So theoretically, you can go all the way back to GitHub and then into the IDE of the development.

33:16.450 --> 33:18.810
Yeah, that's the idea.

33:18.810 --> 33:19.350
Yeah.

33:26.140 --> 33:30.480
So with Selenium, you know, it's a curator.

33:30.480 --> 33:36.940
It does all the function tests for the particular feature you're going to release.

33:37.120 --> 33:39.220
And Burp is just out of the box.

33:39.220 --> 33:40.760
I didn't do anything special.

33:40.760 --> 33:42.700
I haven't started tuning it yet.

33:42.780 --> 33:46.120
But I'm curious to see what I can find once I start tuning it.

33:46.120 --> 33:53.500
Yeah, so theoretically, you could replace Burp with a commercial, really available, endless, dynamic schema.

33:53.500 --> 33:54.560
That's what I'm thinking.

33:55.300 --> 33:56.560
Yeah, that's what I'm thinking.

33:56.560 --> 34:01.140
I hope the commercial tools, if there are any representatives here, they're listening.

34:01.140 --> 34:01.680
I listen.

34:01.680 --> 34:03.340
Yeah, because I don't have to do this.

34:03.340 --> 34:05.340
I can spend my time doing other things.

34:06.660 --> 34:09.440
I was wondering, are you getting pushbacks from the developers?

34:09.440 --> 34:13.420
Because I'm getting pushbacks from the developers saying anything over a few minutes.

34:14.160 --> 34:18.800
And they're concerned about, because they want to do this integration multiple times.

34:18.960 --> 34:25.600
And if you start putting this in sequential, eventually we're going to have multiple security tools running this.

34:25.600 --> 34:30.120
We've got to parallelize all of this and potentially run this on multiple build services.

34:30.320 --> 34:33.840
Yeah, so I can see that.

34:33.840 --> 34:39.120
So I did the integration phase, so it's a little bit later already.

34:39.120 --> 34:44.320
Usually QA, that's QA's group, and usually their tests take an hour or two anyway.

34:44.320 --> 34:45.660
So they don't mind.

34:45.660 --> 34:47.360
But I know what you're saying.

34:47.360 --> 34:57.860
So what I was thinking is, to make it happen within a dev environment, I might try out Zap.

34:57.860 --> 35:01.540
That's what I was thinking for what I'm going to do next.

35:02.500 --> 35:07.180
Remember that engineers develop their code and the tricks they build.

35:07.180 --> 35:12.180
And it goes through all kinds of tests, sometimes coverage and quality tests, all of those.

35:12.180 --> 35:13.520
You can add Zap there.

35:13.520 --> 35:15.320
That's my next step.

35:18.670 --> 35:21.030
Finding persistence between runs?

35:21.570 --> 35:25.230
Can you check the same findings between runs?

35:25.510 --> 35:32.450
Yeah, if the code is the same, the findings are the same.

35:32.450 --> 35:33.830
No difference at all.

35:33.830 --> 35:35.890
It works pretty well.

35:51.210 --> 35:57.230
Yeah, so that's the part where I said it works pretty amazingly when you use Selenium.

35:57.430 --> 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.

36:06.590 --> 36:12.890
And once it logs in, the tokens get carried out in the subsequent requests.

36:13.370 --> 36:15.090
So there you have it.

36:15.090 --> 36:16.870
You don't have to deal with the credentials.

36:29.560 --> 36:32.580
So that's the report out of the box.

36:33.060 --> 36:34.820
That's the findings I have.

36:34.820 --> 36:36.640
I would say it's pretty good.

36:37.080 --> 36:40.700
For how cheap Burp Suite is, I really can't complain.

36:42.300 --> 36:45.740
Yeah, and that's the end of the presentation.

36:50.770 --> 36:52.990
Thank you.

36:54.490 --> 36:57.830
Any other questions?

37:00.820 --> 37:05.640
Addressing false positives per system?

37:05.920 --> 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.

37:16.960 --> 37:20.020
There's a configuration file.

37:20.020 --> 37:25.940
You can add specific findings there as a filter, but you have to do it manually.

37:26.420 --> 37:30.360
You can do it, but it's kind of... there's a lot of work.

37:30.360 --> 37:36.020
Is that based on the finding type, or is it based on...

37:36.780 --> 37:37.860
That's finding type.

37:37.960 --> 37:40.100
Yeah, unfortunately.

37:40.100 --> 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?

37:50.700 --> 37:51.840
Right, yeah, yeah.

37:51.840 --> 37:58.800
Have you given any consideration to figuring out a way just to test what's changed to make it even faster?

37:58.800 --> 38:04.840
You mean, when you say test, do you mean in the CI server?

38:04.900 --> 38:08.300
Well, when you run the Burp DAS, kind of.

38:08.780 --> 38:14.480
Can you configure Burp so, say, it knows from a manifest or something?

38:14.500 --> 38:17.020
You know, those five changes ended up in the code.

38:18.880 --> 38:23.340
So, I... okay, so I know where the confusion comes from.

38:23.340 --> 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.

38:33.160 --> 38:35.420
The test is not for Burp.

38:35.420 --> 38:38.120
I used... I put the image down.

38:38.120 --> 38:40.340
So if I show you this diagram...

38:41.520 --> 38:48.920
So, what I did is I commit the code that triggered this entire process, and then the image got pushed here.

38:48.920 --> 38:54.160
And this part doesn't have anything to do with how I created the Burp image anymore.

38:54.160 --> 38:55.760
It just looks at the image, correct?

38:55.820 --> 38:57.000
Yeah, I just put the image...

38:58.560 --> 39:02.740
It doesn't know how the image was built, it just knows the image.

39:03.220 --> 39:05.420
What do you mean when you say it doesn't know how...

39:05.420 --> 39:07.100
So, like, if you have like a...

39:07.820 --> 39:14.000
You can have all kinds of rules, you know, manifest, YAML, all that stuff.

39:14.000 --> 39:19.220
But when you're testing on the dev side, does it know anything about that?

39:19.240 --> 39:21.510
Yeah, it... well, so...

39:22.340 --> 39:25.680
In this step, update deployment.

39:25.680 --> 39:28.420
If you're using some kind of orchestration...

39:29.600 --> 39:33.900
Yeah, the orchestration actually sends a request to your environment.

39:33.900 --> 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.

39:44.220 --> 39:50.580
So, if you make changes, and there's another environment that's using the image, it will get updated.

39:50.580 --> 39:55.380
But we don't have to worry about it, because all those are set up via the orchestration.

39:55.380 --> 39:59.640
Right, so you'll have the previous image and the new image, so...

39:59.640 --> 40:06.740
Yeah, yeah, yeah, the infrastructure code takes care of it.

40:07.060 --> 40:07.620
Yeah.

40:09.080 --> 40:09.760
Yeah.

40:13.960 --> 40:15.640
I'm sorry, what did you say?

40:15.640 --> 40:15.960
When you

40:25.780 --> 40:29.300
change, you get the newest image?

40:29.380 --> 40:30.020
Yeah.

40:32.200 --> 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.

40:45.400 --> 40:51.320
The orchestration part takes care of that, to pull the new image, and know when to pull the new image.

40:51.680 --> 40:53.920
It only pulls the new image if there are changes.

40:53.920 --> 40:57.140
If there are no changes, obviously it doesn't pull new images.

41:09.320 --> 41:16.220
Yes, but... so, well, my username is pinkgladiator on GitHub.

41:35.470 --> 41:42.690
So, actually, none of us, once it's set up, none of us does anything.

41:42.690 --> 41:48.470
So , Selenium sends all the requests to the website you are testing.

41:48.470 --> 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.

41:59.610 --> 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.

42:14.950 --> 42:20.630
So there are three types of tests you can do with this.

42:20.630 --> 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.

42:30.310 --> 42:32.410
Which of those three did you test?

42:33.150 --> 42:37.850
This is a test application outside of the container.

42:39.070 --> 42:42.510
So, basically, it's nothing fancy.

42:42.510 --> 42:48.530
I didn't try to... you're saying if I tried to escalate the privilege to get the root privilege?

42:48.530 --> 42:50.150
None of those, yeah.

42:56.300 --> 42:58.640
We have hack one for that.

42:58.640 --> 43:01.100
We have.

43:02.700 --> 43:04.460
Yeah, that would be good.

43:04.460 --> 43:05.820
Okay, sure.

43:06.040 --> 43:11.880
Yeah, those things, you can't find them via this kind of automated testing.

43:11.880 --> 43:14.240
Yeah, it's a lot more complicated.

43:14.940 --> 43:15.620
Yeah.

43:16.540 --> 43:19.860
That needs human involvement, that's why we always have jobs.

43:23.800 --> 43:26.220
Yeah, I think that's it.

43:26.220 --> 43:27.160
My time's up.

43:27.160 --> 43:28.060
Thank you.

