start	end	text
0	7460	Let's start a little bit early. Okay. Uh, me here again. Uh, to introduce to you our next
7460	14000	speaker. Uh, Joe Shotman. He's an application security professional with experience in pen
14000	19460	testing, purple team exercises, instant response, threat hunting, dev ops, web application
19460	27440	development, you name it. Um, he's uh, currently working as a security analyst and BBNT. And
27440	33940	he's going to talk about purple team strategies, uh, for application security. Give him a
33940	41500	round of applause please.
41500	45620	It's like the title says, I, I'm here to talk about purple team strategies. I do a lot of
45620	50800	that at work. And I searched really hard to find a word that would mean increasing purple.
50800	55680	And there is actually one, but it's a really terrible word. So it's kind of a clunky title.
55680	60680	But I got rid of that. About me, my name's Joe Shotman. You can reach me on Twitter at
60680	64800	Joe Shotman or a couple other ones if you want to find them. I'm a senior security analyst
64800	70100	focused on application security. I've done pretty much everything at some point in both IT
70100	74280	and security. So when we started doing purple team engagements at work, that's why I got
74280	81080	pulled in. I am pretty enterprising. So I work with many, many, many applications, many,
81080	86280	many servers. Users are measured in the tens of thousands to millions of customers. So not
86280	90020	everything I say may be directly applicable to what you're doing, especially if you're in
90020	94280	more of a consulting role than working with a company. But hopefully you've got a couple
94280	99600	takeaways that you can get away from this. The obligatory disclaimer, I'm not speaking
99600	104840	on behalf of BB&T, Truist, which is the company that we're about to become, or any other
104840	111840	entity. All opinions expressed are my own. So if you have absolutely no idea who this person
111840	115960	is, why he's screaming at you on the slide, this is Eugene Hoots. He is the lead singer of a
115960	122400	band known, best known for a song called Start Wearing Purple. And given my natural
122400	126840	tendencies, I would make a slide deck that is absolutely plain black and white text. And
126840	130800	people get really, really bored. I've been advised to add more cats. But in this case, I've
130800	135540	decided to add more Eugene. And the band, if you're not familiar, is Gogo Berdello. It's
135540	140140	kind of a mix of punk and various ethnic musics from mostly Eastern Europe, but other
140140	147040	places as well. So the agenda of what I'm going to tell you, I'm going to give a brief
147040	151360	introduction on Purple Teams for people who are not familiar with it. I'm going to talk a
151360	154400	little bit about DAST, if you're not familiar with that. That's one of the really standard
154400	158420	types of testing that's done on applications. Then I'm going to talk about the problems of
158420	164000	applying the Purple Team strategies to DAST testing. And it's not just DAST, you can also
164000	167480	apply it to more manual testing as well. And then some general strategies about bringing
167480	170840	together both the offensive and defensive teams to work together better on application
170840	176720	security. And I will send a copy of the slides to the village and they can stick it up on the
176720	185280	website. So if you want a copy, you'll be able to download it. So Purple Team in a nutshell. So
185760	190940	the core of it is you want both the offensive and defensive teams working together. And a big
190940	195440	part of this I have found is that the corporations or the powers that be need to realign
195440	203860	the incentives and goals of the teams. So very often they find themselves working in
203860	209900	opposition. So the Red Team's upper management may have a goal of finding lots of bad
209900	215360	things. And the Blue Team's management may be incentivized to close a lot of tickets. That
215360	219700	doesn't necessarily increase security. So it's bringing together the goals for both of the
219700	224640	sides so that they're working together. So that you've got a holistic solution to security. Not
224640	230180	just one side trying to defend and one side trying to attack. Because we really want to avoid
230180	235300	this. And having been on the Blue Team side, very often the experience is you're getting
235300	238400	punched in the face. Especially when you're talking about not just AppSec but the full
238400	243000	domain experience. So the Red Team gets in. That's pretty easy to do. They start pivoting
243000	246740	around. They get domain admin. They grab a bunch of credentials. They start getting
246740	251840	sensitive systems. And all of a sudden their boss is getting an email saying that, hey, why
251840	257240	didn't you stop the Red Team? And when test after test happens like that, it really damages
257240	266960	morale. So by bringing the teams together to align better, it reduces this conflict. So a
266960	272760	little bit more definition of purple stuff. So it's about finding, confirming and closing
272760	278640	gaps. So you want to find both your visibility and operational gaps. It's about trying to
278640	284960	speed up the time to detection. So as far left as you can push on the attack matrix or the
284960	290620	cyber kill chain, the better off you are. It's especially looking for pivoting. Again,
290620	294120	especially in large companies, you have to assume that they're going to get in. So you're
294120	297500	really trying to find when they start trying to go from that initial breach location to
297500	302640	others. And it's about going through, like, living off the land is one of the big terms in
302640	306820	Red Teaming right now. Finding everything that's on systems that doesn't need to be there
306820	310840	and getting them off. So it's that much harder. And the Blue Team and Red Teams both have
310840	315700	visibility into how that interop operates. So getting them talking to each other can help
315700	320220	with that. And it's just increasing the educational and situation awareness of both
320220	324500	sides. So the Blue Team knows where a lot of bodies are buried. They see the vulnerable
324500	329680	systems. They know where real world attackers are probing to try to get in. The offensive
330320	334220	security team doesn't necessarily know that. So getting the information sharing, going from
334220	337920	the Blue Team to the Red Team, it's not just the Red Team telling the Blue Team what to do.
337920	343940	It's both sides working together. And it's delivering better return on investment. So you
343940	348320	can have a very expensive test from a top-name company that finds next to nothing. And if
348320	352900	your only goal is to say that we had a top-tier company come and do a risk assessment as part
352900	357580	of your PCI compliance or what have you, that's fine. But I'm lucky enough to work for an
357580	362100	organization that truly cares about increasing security. We want to not be in that next
362720	369440	headline, similar to the recent events. So we try very hard to actually deliver goals and
369440	377760	objectives in our testing. And as part of that, also getting the Blue Team up to speed, big
377760	383720	help. So finding vulnerabilities doesn't actually make you more secure. I can sit and test and
383720	389180	test and test and I can find RCE after RCE. It doesn't matter. That in and of itself doesn't
389180	393440	make the company more secure. The hard work is taking that information and getting it
393440	397100	remediated, whether it's at the code level or if you're doing soft patching with WAFs,
397100	400860	whatever it is. Getting the things actually closed, that's what makes the company actually
400860	406780	secure. As we get faster and faster and more complex as DevOps and infrastructure as a
406780	411380	service and everything as a service gets bigger and bigger, not everything that we have in
411380	416700	production will actually be tested by the point it gets there. We're doing deployments, we as
416700	422300	industry, not we as my company, we're in some cases doing deployments of new code dozens of
422300	426700	times a day. There's no way you can do a thorough security test on that. And so to get
426700	431100	defensive posture working, you have to have a defensive team that knows how to spot actual
431100	435060	issues, go through the logs, go through the alerts, do the threat hunting and find things
435060	440540	that are in things that you never got a chance to test or that you might have missed. Every
440540	444800	single test you have, where you succeed in your engagement objectives, whatever it was,
444800	449000	whether it was getting data or just getting access to a system, every time you don't sit
449000	453180	down with a blue team afterwards and make them better as a blue team, you've missed a big
453180	461240	opportunity. Like I said, it damages the morale and it doesn't actually close those gaps. So
461240	466600	like this background, purple is a spectrum. You do not have to do everything to have a purple
466600	473600	team. You do not have to have everything work into your system, into your SDLC. You can take
473700	477300	a few things from this and make yourself better. So don't say, there's no way I can accomplish
477300	481520	all of this, or there's, in purple teaming in general, there's no way most people can
481520	489400	accomplish everything, but take what works best for your environment. So a brief walkthrough
489400	493200	of a simulated purple team engagement using Eugene, who is also a member of the band,
493200	498880	and Sergei. Sergei here is playing our red team and he's used the zero date and he communicates
498880	504100	to the blue team and says, I've used the zero day, I got access to these three boxes, were
504100	510940	you able to see it? Eugene playing our blue team here's response and he did not see that
510940	515160	attack initially. So he's done research on the, what happened and figure out rules he
515160	519660	can add to the sim, so now they've got visibility. But then he also says, I've seen something
519660	524660	similar to this, where we're able to bypass the IDS IPS system by using this type of encoding.
524660	528400	Have you given that a try? So you get this circle going back and forth where now the
528400	534340	red team takes that information that the blue team provided, tries it again, and it
534340	539360	turns out that Eugene has enabled a detection for this and now by working together, they've
539360	544960	not only patched the initial issue, well not patched, they have created an alert that will
544960	549160	help detect this initial issue, but also validated an additional form of the attack that the
549160	553780	red team was not aware of and didn't test initially. So that's the core concept of going
553780	561990	purple. So you work together and then everyone gets the big bow at the end of the show. So
561990	569790	DAST in a nutshell is, how many people are familiar with DAST as a term? So it's dynamic
569790	575290	application security testing, it is the very basic type of test that most companies do, and
575290	582750	it's low cost, reasonably good results. And basically you're taking, it's a black box test,
582750	587870	you've got a number of tools, OWASP is the open source dominant one, Burp Suite Pro is used
587870	592130	by many people, and there's options from everyone from HP to IBM to many other smaller
592130	597570	companies that just focus on these tools. And basically you throw a lot of garbage, you're
597570	601590	fuzzing the applications and throwing things that are cross site scripting at it, you're
601590	605610	throwing things that are SQL injection, and you're looking at what comes back and trying to
605610	610190	guess whether the attack was successful. There's also other forms of passive fingerprinting
610190	614370	you can do as part of this, so it will do things like look at the cookie settings and is there a
614370	621830	session cookie coming back without the secure and HTTP only flags. On a moderately large site,
621830	625330	these tests can generate anywhere from tens of thousands to hundreds of thousands of
625330	632690	requests. It is very noisy, it fills up the logs with junk. And it's easy to spot, so when you
632690	636690	start as a blue team analyst, you'll see people running Burp scans, and it's just page after
636690	641350	page after page of malicious activity coming from this one IP again, again and again and
641350	649230	again, unless you're blocking it. So why DAST needs improvement? So DAST tests typically go
649230	654190	one to two days, depending on the size of the application. They're mostly, if not entirely,
654190	660190	automated. And they're testing for a single issue at a time. So they're saying, does this
660190	665210	type of cross site scripting attack work here? Yes or no? Does this type of attack here work
665210	670510	here? Yes or no? It's going attack by attack, variable by variable. Attackers, on the other
670510	675970	hand, they have as long as they want. So if you're a high value target, they can spend weeks,
675970	680690	months, years, hypothetically, figuring out how to get into your applications. They're combining
680690	685490	both automated and manual testing. So again, they've got the economic incentive in some cases
685490	689850	to go after these applications very hard. And so they can spend time digging through obscuring
689850	694190	codings that your developers might have used on a variable that your automated tool doesn't know
694190	702310	to decode as a base 64 variable twice. Put attack code in there and get successful SQL injection
702310	706930	and your DAS tool's not going to find that. And then they work, they chain vulnerabilities
706930	711170	together to make something that's actionable. So very often you're not going to find a single
711170	715830	issue that you can get root with, that you can get shell with. It's figuring out how you can
715830	720550	combine a cookie attack to get access to the administrator page, to get access to a SQL
720550	725610	injection, where you can drop a file on the system which gets you a web shell. So no DAS tool can
725610	730790	do that, but the attackers do. And so part of what I try to push for is figure out the ways that
730790	735930	we can do the DAS test, which are still reasonably fast, reasonably inexpensive, yet get better
735930	743350	results. So, you know, everyone says test smarter, not harder. So an example, Durbuster, people
743350	748970	use Durbuster here. It's a, one of the dominant tools for going through and guessing common
748970	752390	file names and directory names to find things that aren't linked to from the main site when you
752390	756830	go through and spider it. You can get as a standalone tool that's been deprecated, but
756830	761350	there's a version that's almost identical that's integrated into Zap. And there's many other tools
761350	772630	that do the same functionality. But you can also do smarter. So if you're working with the blue
772630	777190	team, they can look at the file system, tell you every single file that exists there. They can
777190	780770	look at the web logs and go through and tell you not just every file that exists, but every path
780770	784990	that exists, because in some cases you may be doing mappings that are not going directly to a
784990	789130	file. They can also go through and pull out every get variable and every post variable, things that
789130	794950	may not be obvious to you. Especially in complex applications where there's multiple roles, you
794950	801650	might be doing a DAS test or even manual test on two or three out of seven or ten different roles.
801650	806230	They may not think to give you the highest level access or one that has access to certain
806230	810170	administrative functions. So this will get you access, get you a listing of everything that you
810170	816550	need to go through and test as part of your DAST. But I'm not just advocating for gray box
816550	821670	testing. So taking that information and feeding it to the tools, that more falls under gray box
821670	827330	testing than purple team testing. I'm pushing further beyond that and I want to increase the
827330	833690	amount of collaboration between the blue teams and red team. And it's all about trying to speed
833690	838070	up the teams, make them more effective, cut down on the advantage the other team has because
838070	842130	they've got time, you've got the insider knowledge. So let's take as much advantage of it as we
842130	850690	can. So I've got five main ways it's hard to make DASTS purple. Or the five main pain points.
851150	855050	This shot I loved, it was labeled my favorite picture I've taken of Eugene by a guy who's taken
855050	863530	quite a few photos of him. So the first big problem, like I said, is extremely noisy. So it's
863530	868410	very common when you're doing a test like this that you've got your IDS rules, your WAF rules,
868410	873050	it's either bypassed or silent. So things that would normally be telling the blue team that
873050	879870	something's going on aren't going off at all. So ways to combat this at the end, re-enable just
879870	884110	those, re-enable the rules, take just the things that were successful, just the things that you
884110	888330	want to make sure that get alerted on, replay those attacks. You can do this manually, you can
888330	892850	do it with curl exports and many tools. You can do it with Selenium. I love the idea of getting
892850	896910	Selenium rules out to the blue team because not only can they replay the test with it, but they
896910	902430	can give it to the devs and say, make sure that when you revise the code it can pass this test.
902610	906670	And obviously in that case they can write a code, write code that just passes that specific
906670	910410	test, but hopefully you've got development going on through developers so that they actually fix
910410	918230	the problem once they understand it. It's often tested in non-production environments. So we
918230	923290	try to avoid outages as much as possible. We've got a lot of tests to, a lot of applications that
923290	928950	we need to test. So almost all of our testing we do in test environments, either UAT, SIT, or a
928950	935810	special test environment that's been stood up just for this particular test. Many sims charge by
935810	940390	the volume that you input, so often the test systems aren't sending any information whatsoever
940390	945550	to the sims. Or you may not have a WAF in front of your test environment, so you're not getting a
945550	951050	full example of what an attacker would be doing. So very similar to the previous one, when you
951050	956690	have something that works, take it, rerun it in the production environment. So if it's a
956690	960150	dangerous exploit, you want to be really careful, make sure that you've got the proper sign off on
960150	965370	this, and or you do neuter it in some way. So all you want to do is make sure that your WAF
965370	969730	triggers on it, or your IDS IPS triggers on it, don't even send it to an actual server in
969730	973890	production, stand up a box that just sits there and listens on port 80, send it bad stuff, make
973890	983220	sure that the WAF triggers, make sure that the IDS IPS triggers. So a large part of why I started
983220	988540	speaking, I kept having people in our SOC come to us and say, are we vulnerable to the one equals
988540	995060	one attack? Because very often they're junior analysts, it's their first job in InfoSec. And as
995060	999780	an industry, we don't do a great job of treating the tier one SOC analysts very, very well. They
999780	1003620	don't get the great training, they're kind of thrown into an expensive environment with lots and
1003620	1007580	lots of tools that send alerts all the time. And they don't have a context to understand one
1007580	1013840	equals one as part of a SQL injection attack. But going deeper than that, what's the most
1013840	1018660	dangerous type of response on a SQL injection attack if you see an alert for it? 500, 400, or
1018660	1028500	200? Why? So a 200 indicates that it was successful, 500 generally, not always, means that
1028500	1034520	the attack caused a problem at the code level and the server stopped executing it. This is
1034520	1038920	information that I know as a developer because I've spent a lot of time with SQL, I've spent a
1038920	1044180	lot of time generating inadvertent 500s. The people working in our SOC don't have that
1044180	1050080	experience and we weren't giving them training. So we're unaware that a 200 alert on SQL
1050080	1053740	injection is something that needs a lot of investigation. Whereas a 500 that there's a
1053740	1060800	couple thousand of, unless there's that corresponding 200, probably not important. So
1060800	1065260	another problem is the app test team may actually be testing the infrastructure rather than the
1065260	1071200	actual environment. So an example of this, if you're testing for a remote file inclusion, if
1071200	1077000	there's a firewall rule on that local box that prevents outgoing requests, you're not going to
1077000	1081420	get a successful result using a DAS tool for the remote file inclusion. It doesn't mean the
1081420	1086480	application isn't vulnerable, it just means that as currently configured, that server is not
1086480	1091340	vulnerable. And I want to find everything, not just rely on the firewall to block it. So if I'm
1091340	1095900	working with the blue team, if they say, if they know that I did a test at 2pm, they look at the
1095900	1100460	logs and they see these outgoing firewall drops, they can tell me, hey, there was something
1100460	1106060	going on, unusual outgoing requests. So again, it's not just us telling them things, it's them
1106060	1114480	telling us things. The blue team may not receive the results. Some companies are very siloed as
1114480	1120720	far as who gets what information. And so getting the reports, especially the really actual
1120720	1124420	things, into the hands of the blue team so they can learn what they need to be looking for,
1124420	1129320	really important. Because developers cut and paste and reuse code. So if you found that
1129320	1133720	vulnerability in application A, it may also be in application B and C that you haven't received
1133720	1137740	authorization to test yet. But letting them know, if they understand that there's a similar
1137740	1144840	code base, they can start looking ahead of time. And part of the pushback you'll get with
1144840	1148300	management on this is if you give out all this information on vulnerabilities, if there's an
1148300	1154360	insider threat, you're handing them a bunch of things. You need different controls for that if
1154360	1163700	you're relying on the blue team not being evil. You've got bigger problems. So some of the
1163720	1170080	stepping up collaboration. So as possible, if you can before testing, have everyone sit
1170080	1174700	together and talk about things. The blue team knows what the current high risk applications
1174700	1179260	are. Again, they know where the bodies are buried. They see where the traffic is coming.
1179260	1184740	They may know something moves millions of dollars a day in transactions versus something else
1184740	1189020	that looks very similar to it may only move a couple thousand. So they have better
1189020	1192880	information often the times than the red team does. They know what's going on in the real
1192880	1197520	world. What may need to be investigated. They know the topology of the network. So they can
1197520	1201500	say, you need to connect in this fashion to bypass the WAF. Because again, you want to be
1201500	1205140	testing the application, not just your security infrastructure. They know where the
1205140	1208660	coverage gaps are. So they can tell you ahead of time, look, I know you're going to find
1208660	1212060	this. Let's do something really fast. We can show management there's a gap. Let's get this
1212060	1216420	fixed. So you don't have to spend two days doing a test when in fact you could just do a
1216420	1220420	proof of concept that works in five minutes. And they also know the compensating controls
1220420	1225320	that you may need to bypass. Again, things like that outgoing firewall rule to make sure
1225320	1229640	they get the effective test. The red team can say, we're going to do this as our testing
1229640	1234000	strategy. The blue team may have feedback on whether that's a good strategy or not. And they
1234000	1238020	can explain the techniques, tools and procedures, TTPs that they'll be using to bypass
1238540	1242640	defenses. Because the defenders need to be learning about how real world attackers do
1242640	1248740	encodings to get past WAFs and that sort of thing. During the testing, if you're talking back
1248740	1253000	and forth during the test, if the blue team comes to you and says, hey, is this a true or
1253000	1256600	false positive? You can give them feedback right then so they start learning and
1256600	1260180	understanding. You can give them indicators of what they should be finding as a result of your
1260180	1266220	test. And you can feed them information about what is and what isn't working. And giving them
1266220	1271720	the context of this looks bad, but it really isn't. Or this doesn't look bad, but here's why
1271720	1275520	it's dangerous. The blue team can be providing information about what's going on as far as
1275520	1280520	things like the firewall, antivirus, other things like that. And there may be other
1280520	1284560	environmental factors. So a lot of test systems are under provisioned. So you may be spiking
1284560	1289420	the CPU to oblivion and getting a lot of dropped packets as a result. And that can throw off
1289420	1295520	some of the DAS tools. After testing, the application security team can go, they can give
1295520	1300080	feedback on what they thought worked and didn't. They can redo that testing if it needs to be
1300080	1304740	done in the production environment. Or sometimes just take the meaningful logs that they
1304740	1308880	generated. Things that actually worked and feed it into the sim so that the sim has examples of
1308880	1315040	things that are bad if you're doing machine learning. You can do a blue team read, oriented
1315040	1318820	read through. You don't have to go through the entire test, but every week or two you can sit
1318820	1322880	down and say, here are the tests we did the past week or two. Here's what's meaningful. Here's
1322880	1328180	what you should have spotted or that we think is impactful to the company. You can give it,
1328180	1332660	you can give help doing the threat hunting. So if they get really excited and think that they've
1332660	1336560	seen something similar to what you just did, you may give feedback on whether something's a
1336560	1341740	true positive or false positive. And set up a learning environment for your blue team. That
1341740	1346560	people learn how to hack apps because that's what gets them really engaged in understanding and
1346560	1350960	excited. And it also starts to give them a path out of that junior role. So eventually you can
1350960	1355040	keep that domain knowledge that they've accumulated about your company and move into a more
1355040	1360840	advanced position. The blue team can validate the findings. Who here has ever been really
1360840	1368180	confident about a false, about a, what turned out to be a false positive? I've had stuff that was
1368180	1372800	sure it was a true exploit and the blue team pushed back and said, no, it's not. Here's why.
1372900	1376760	And so that schooling coming back from the blue team, especially the app team is willing to
1376760	1382120	listen is really important. They can give sign off on the report so that it goes to the
1382120	1386360	management as the blue team and red team worked together to generate this. Here's what we've
1386360	1391480	taken. Here's the steps we've taken as a result. And they can go and if there is an
1391480	1398060	instrumentation gap, start getting those plugged right away. Wrapping up, I wanted to say
1398060	1403040	thanks to Erez, Leora and Joe, as well as the other volunteers. This is my first time speaking at
1403040	1407360	Vegas, so I'm very excited to have been accepted here. And I know they did a ton of work to pull
1407360	1418230	this together as quickly as they did. So big hand for them. We got to get the next speaker up. So
1418230	1421690	if you want, tweet at me questions or catch me in the hallway. And thank you for your time.
