1 00:00:00,000 --> 00:00:02,940 I'd like to introduce you to our next speaker. 2 00:00:04,700 --> 00:00:10,800 She's a teacher of... she teaches developers about application security. 3 00:00:10,900 --> 00:00:14,520 She has learned over 20 programming languages. 4 00:00:14,900 --> 00:00:20,660 I told her, like, she's like a developer polyglot, right? 5 00:00:22,100 --> 00:00:28,380 She is a founder of Gold Hat Security and now teaches AppSec full time. 6 00:00:28,840 --> 00:00:33,440 And she's going to talk about vulnerabilities that hide from your tools. 7 00:00:33,900 --> 00:00:37,260 Give a round of applause to Jillian Ratliff. 8 00:00:43,520 --> 00:00:45,760 Hi, can you guys hear me okay? 9 00:00:45,760 --> 00:00:46,840 Is this one on? 10 00:00:47,260 --> 00:00:48,660 Okay, good. 11 00:00:48,760 --> 00:00:54,020 I can't... I don't see a volume button, but you can hear me okay in the back. 12 00:00:54,020 --> 00:00:54,520 All right. 13 00:00:54,520 --> 00:00:56,160 Well, thanks for coming. 14 00:00:56,160 --> 00:00:58,060 I'm really excited that you're here. 15 00:00:58,200 --> 00:01:03,880 And I'm also feeling a little vulnerable along the lines of the talk. 16 00:01:03,880 --> 00:01:12,140 So this is my first time speaking in DEF CON, and I'm a little nervous, but I'm here to help you and hopefully make your jobs easier. 17 00:01:12,140 --> 00:01:14,440 So thanks for coming. 18 00:01:14,660 --> 00:01:19,180 I'm going to start out with... oh, I'll introduce myself first. 19 00:01:19,180 --> 00:01:20,520 I'm going to start out with me. 20 00:01:20,520 --> 00:01:24,960 This is a friend of mine that I made in Bali and me, a baby elephant. 21 00:01:25,160 --> 00:01:28,560 I started my own company this year because I wanted to teach full time. 22 00:01:28,560 --> 00:01:31,120 So I teach application security to developers. 23 00:01:31,920 --> 00:01:36,480 And I have over a decade of AppSec experience now. 24 00:01:36,500 --> 00:01:38,040 Just by a little bit. 25 00:01:38,040 --> 00:01:40,320 And I love to travel and tell jokes. 26 00:01:40,320 --> 00:01:43,240 They are not always good jokes, but I will tell them anyway. 27 00:01:43,240 --> 00:01:46,640 So nobody brought tomatoes, I'm sure. 28 00:01:46,640 --> 00:01:48,620 So I'll give it a try. 29 00:01:48,620 --> 00:01:51,080 So first... sorry. 30 00:01:52,180 --> 00:01:53,460 All right. 31 00:01:53,460 --> 00:01:55,060 Just a quick history lesson. 32 00:01:55,060 --> 00:01:59,260 So we know kind of the history of where the tools that we use today came from. 33 00:01:59,440 --> 00:02:05,760 So back before I was born, there was the very first static analysis tool called Lint. 34 00:02:05,860 --> 00:02:09,480 Now, Lint was basically a syntax checker, right? 35 00:02:09,480 --> 00:02:16,620 So it didn't check for any security vulnerabilities like SQL injection or cross-site scripting because they didn't exist yet. 36 00:02:17,080 --> 00:02:21,200 So they came into existence in the late 90s. 37 00:02:21,400 --> 00:02:26,480 And then we started to have some dynamic testing tools. 38 00:02:26,480 --> 00:02:28,300 So Nessus came into existence. 39 00:02:28,820 --> 00:02:35,220 And I don't know if any of you remember back in the day when you had to use a modem to get connected to the Internet. 40 00:02:35,620 --> 00:02:39,400 Back then, websites were just pretty much static HTML. 41 00:02:39,400 --> 00:02:41,900 And then along came this little site called MySpace. 42 00:02:42,620 --> 00:02:50,220 Now, for those of you who are kids in this room, MySpace was like Facebook, only before Facebook. 43 00:02:50,220 --> 00:02:56,720 And it had all these fun features where you could customize your background and put custom JavaScript code. 44 00:02:56,720 --> 00:03:01,560 If you were the loneliest person in the world to ride a worm, make everybody your friend. 45 00:03:01,620 --> 00:03:09,420 So this... I'm just... I'm not blaming MySpace for the state of web application security today. 46 00:03:09,420 --> 00:03:16,760 But I did notice there is a proliferation of security tools that came up after this point in time. 47 00:03:16,760 --> 00:03:22,960 So we got Coverity, Fortify, Metasploit, one of my favorites, Burpsuite, another favorite. 48 00:03:22,960 --> 00:03:29,480 And then we have open source tools coming into existence to check to make sure that your dependencies are not vulnerable. 49 00:03:29,900 --> 00:03:31,780 So things like Black Duck. 50 00:03:32,060 --> 00:03:40,380 One note about this, most of the open source tools that you're going to use to scan your open source code are only going to find known vulnerabilities. 51 00:03:40,540 --> 00:03:43,020 They don't necessarily find the zero days. 52 00:03:43,020 --> 00:03:45,180 So just word of warning there. 53 00:03:46,280 --> 00:03:51,440 And then we've got some more tools, Acunetix, Checkmarks and Veracode, our sponsors. 54 00:03:51,500 --> 00:03:53,440 Made sure I got them on the slide. 55 00:03:54,320 --> 00:03:56,980 OWASP Zap came into existence. 56 00:03:57,280 --> 00:03:58,880 Whitesource, another sponsor. 57 00:03:58,880 --> 00:03:59,780 Thank you. 58 00:03:59,980 --> 00:04:01,140 And Snyk. 59 00:04:01,300 --> 00:04:02,540 I may be saying that wrong. 60 00:04:02,540 --> 00:04:05,000 That's one of those things I've never heard said out loud. 61 00:04:06,940 --> 00:04:15,500 Also of note, and I'm not going to talk a lot about this because I haven't actually used these tools, but there is in recent years something called IAST. 62 00:04:15,700 --> 00:04:18,200 The I stands for interactive. 63 00:04:18,200 --> 00:04:20,560 So it's interactive application security testing. 64 00:04:20,560 --> 00:04:21,960 It's another option. 65 00:04:22,340 --> 00:04:26,380 Since I have not actually used them myself, I can't speak to it much. 66 00:04:26,380 --> 00:04:30,480 And when I Googled IAST tools, Google was like, did you mean SAST? 67 00:04:30,640 --> 00:04:32,040 No, I did not. 68 00:04:32,040 --> 00:04:34,720 But thank you for the condescending suggestion. 69 00:04:34,760 --> 00:04:37,960 So anyway, so a brief history. 70 00:04:38,400 --> 00:04:43,160 Now, moving right along, I have a Venn diagram for you because I love Venn diagrams. 71 00:04:43,320 --> 00:04:45,760 So there's what they're good at finding. 72 00:04:45,760 --> 00:04:49,260 And I have some SAST and DAST vulnerabilities. 73 00:04:49,600 --> 00:04:53,180 So they're both pretty good at finding the OWASP top ten. 74 00:04:53,460 --> 00:04:57,560 And I like to remind people that it is the top ten. 75 00:04:57,560 --> 00:04:59,500 It's not all of the vulnerabilities. 76 00:04:59,500 --> 00:05:01,360 Just the top ones. 77 00:05:01,500 --> 00:05:03,980 So things like PCI compliance. 78 00:05:04,140 --> 00:05:06,620 Anybody deals with PCI at work? 79 00:05:06,800 --> 00:05:07,280 Yeah. 80 00:05:07,280 --> 00:05:11,020 So there's more than ten vulnerabilities is what I'm saying. 81 00:05:11,020 --> 00:05:18,220 So SAST tools are somewhat good at finding weak crypto. 82 00:05:18,240 --> 00:05:21,560 And I have an asterisk there because it's sort of. 83 00:05:21,560 --> 00:05:23,720 Like they look for the really obvious things. 84 00:05:23,720 --> 00:05:25,560 So are you using DES in your code? 85 00:05:25,560 --> 00:05:29,180 It's going to kick out an error message that you're using DES. 86 00:05:29,180 --> 00:05:33,280 But it's not going to find implementation flaws. 87 00:05:33,480 --> 00:05:37,320 And there was a pretty good talk earlier which talked a lot about that. 88 00:05:37,320 --> 00:05:38,600 So watch the recording. 89 00:05:38,600 --> 00:05:40,020 Or some of you were here. 90 00:05:42,360 --> 00:05:45,100 They're pretty good at finding hard-coded passwords. 91 00:05:45,100 --> 00:05:46,940 Or keys or things like that. 92 00:05:46,940 --> 00:05:48,840 Because you're scanning the source code. 93 00:05:49,560 --> 00:05:52,880 Things like memory leaks that might cause a denial of service. 94 00:05:53,780 --> 00:05:57,660 And then dynamic application security testing tools. 95 00:05:57,660 --> 00:06:00,940 Find things like poor session management. 96 00:06:01,240 --> 00:06:03,160 Missing security headers. 97 00:06:03,620 --> 00:06:05,240 Default passwords. 98 00:06:05,720 --> 00:06:08,260 And insecure server configurations. 99 00:06:08,280 --> 00:06:09,940 So there's a little bit of overlap. 100 00:06:09,940 --> 00:06:11,860 But obviously it's good to use both. 101 00:06:11,860 --> 00:06:12,320 Right? 102 00:06:12,320 --> 00:06:15,960 Now you're all here to hear about what they're not good at finding. 103 00:06:15,960 --> 00:06:16,700 Right? 104 00:06:16,700 --> 00:06:17,940 And I have a whole list. 105 00:06:17,940 --> 00:06:19,360 Not a complete list. 106 00:06:19,360 --> 00:06:21,440 But some highlights for you. 107 00:06:21,440 --> 00:06:24,820 The first one is business logic flaws. 108 00:06:24,820 --> 00:06:28,660 And this can be all sorts of different things. 109 00:06:28,800 --> 00:06:33,100 Uh, my favorite example, though, is just a poor password reset logic. 110 00:06:33,280 --> 00:06:37,900 So I, personally, I have a grudge against cognitive questions. 111 00:06:37,900 --> 00:06:40,160 You know, the, what street did you grow up on? 112 00:06:40,160 --> 00:06:40,940 That sort of thing. 113 00:06:40,940 --> 00:06:45,540 So weak password reset functionality is something that your tools just aren't going to find. 114 00:06:45,820 --> 00:06:46,400 Right? 115 00:06:46,400 --> 00:06:48,400 And, and many other things. 116 00:06:48,400 --> 00:06:57,280 You can have, uh, if your process for the call center to identify a customer is weak, then they might be vulnerable to social engineering. 117 00:06:57,280 --> 00:06:59,940 Things like that you want to keep in mind. 118 00:07:00,820 --> 00:07:03,900 So weak or reused passwords. 119 00:07:04,060 --> 00:07:11,520 Now, fun fact, 75% of internet users admit to reusing passwords across multiple accounts. 120 00:07:11,700 --> 00:07:15,200 Now, the other 25% don't admit to it. 121 00:07:15,260 --> 00:07:15,920 Right? 122 00:07:16,660 --> 00:07:22,980 So password reuse is a huge problem and that's not something that any one of your tools is going to find. 123 00:07:22,980 --> 00:07:26,700 But with all of the data breaches lately, credential stuffing is a thing . 124 00:07:26,800 --> 00:07:29,480 And something that you need to be concerned about. 125 00:07:29,480 --> 00:07:32,220 So just keep that in mind . 126 00:07:33,180 --> 00:07:36,060 Next up, uh, configuration whoopsies. 127 00:07:36,380 --> 00:07:45,380 There was a very recent data breach in the news in the last week or so that was caused by a web application firewall having too high of permissions. 128 00:07:45,540 --> 00:07:48,940 Now, I don't know of any tool that's going to find that. 129 00:07:48,940 --> 00:07:50,120 It might be out there. 130 00:07:50,140 --> 00:07:58,680 Um, but that's one of those things that it was just, it, not using the principle of least privilege led, led to a huge data breach. 131 00:07:58,800 --> 00:08:01,420 So are you paranoid yet? 132 00:08:01,600 --> 00:08:03,040 I have more. 133 00:08:03,200 --> 00:08:04,020 Okay. 134 00:08:04,880 --> 00:08:05,880 Alright. 135 00:08:06,060 --> 00:08:08,980 Next up, denial of service vulnerabilities. 136 00:08:08,980 --> 00:08:11,100 Now, with an asterisk. 137 00:08:11,100 --> 00:08:18,540 So there, there are some denial of service type of vulnerabilities that your static analysis and dynamic analysis tools will find. 138 00:08:18,540 --> 00:08:22,080 Dynamic analysis tools tend to find them accidentally. 139 00:08:22,420 --> 00:08:24,160 Has anybody experienced that? 140 00:08:24,360 --> 00:08:26,640 You run a scan and denial of service. 141 00:08:26,640 --> 00:08:27,100 Yeah. 142 00:08:27,100 --> 00:08:32,060 So, but that, that's not maybe the best methodology for finding these things. 143 00:08:32,060 --> 00:08:36,300 Uh, so there, there's all sorts of things that can go wrong. 144 00:08:36,300 --> 00:08:46,360 For example, if you have a developer that wrote a very poor SQL query that takes like 17 seconds to run, that's going to bring down your SQL server eventually. 145 00:08:46,560 --> 00:08:48,820 And then with repeated requests. 146 00:08:48,820 --> 00:08:58,740 So anytime you have a server response that takes too long and you can send repeated requests, you can bring down the SQL server and then anything tied to that SQL server will also come down. 147 00:08:58,740 --> 00:09:08,220 So that's not something that any tool is going to find, but if you have a good DBA to review all the SQL queries, that will help tremendously. 148 00:09:08,320 --> 00:09:13,800 So, uh, rogue developers is another one that keeps me awake at night. 149 00:09:13,820 --> 00:09:16,840 So, um, let's see. 150 00:09:17,400 --> 00:09:23,840 Oh, uh, so something that you want to consider is that insider threats may actually be coming from nation state actors. 151 00:09:24,140 --> 00:09:31,500 So I, a lot of times we think about rogue developers and oh, well, they're just mad at the company, right? 152 00:09:31,640 --> 00:09:42,800 Um, but in fact, if you have a big enough company with, uh, valuable enough data, there might be somebody with a Russian accent that applies for a job, say. 153 00:09:42,920 --> 00:09:45,700 Not going to pick on the Russians, right? 154 00:09:45,700 --> 00:09:47,240 Because I don't want to get hacked. 155 00:09:47,240 --> 00:09:51,220 Um, so if there's any Russians in here, I, you're, you're great. 156 00:09:51,220 --> 00:09:52,100 I promise. 157 00:09:52,380 --> 00:09:53,240 Okay. 158 00:09:53,240 --> 00:09:58,760 Anyway, um, so next up cryptography disasters. 159 00:09:59,260 --> 00:10:01,280 So a very good talk about that earlier. 160 00:10:01,280 --> 00:10:03,720 There's so many things that can go wrong with cryptography. 161 00:10:04,140 --> 00:10:09,960 So if, if you're not comfortable with cryptography, you definitely want to have somebody help you out with that. 162 00:10:10,360 --> 00:10:13,160 Uh, but basically never write your own crypto. 163 00:10:13,160 --> 00:10:16,860 That is rule number one of Crypto Club is never write your own crypto. 164 00:10:16,860 --> 00:10:20,740 And rule number two of Crypto Club is never write your own crypto. 165 00:10:20,800 --> 00:10:31,160 So, and even if you're using a standard encryption algorithm like AES, if you use ECB mode, for example, then your crypto is insecure. 166 00:10:31,160 --> 00:10:33,180 So lots of things can go wrong there. 167 00:10:33,180 --> 00:10:35,760 Tools may or may not necessarily find them. 168 00:10:36,240 --> 00:10:36,900 Right? 169 00:10:38,980 --> 00:10:42,400 And then good old layer eight vulnerabilities. 170 00:10:42,520 --> 00:10:48,320 Um, things like phishing, social engineering, or your standard ID10T error. 171 00:10:48,460 --> 00:10:59,100 Uh, these are all things that are very much, um, they, they, they can affect the application security of, they can affect the security of your application. 172 00:10:59,100 --> 00:11:00,840 That's what I was trying to say. 173 00:11:00,840 --> 00:11:06,200 Um, so, uh, just lots of things can go wrong there. 174 00:11:06,860 --> 00:11:09,800 And then secrets stored in weird places. 175 00:11:09,800 --> 00:11:16,940 So my favorite and most, most trendy example of this lately is a JWT payload. 176 00:11:16,940 --> 00:11:27,700 So you have a JWT, a JSON web token, and perhaps you have a developer that sees it in the developer tools, oh, oh look, it's obfuscated, it must be encrypted. 177 00:11:27,700 --> 00:11:28,480 It's not. 178 00:11:28,480 --> 00:11:32,520 It's base64 encoded and anything you put in there should not be a secret. 179 00:11:32,520 --> 00:11:39,640 So that is something that, uh, just have to do some manual testing to find, I guess. 180 00:11:39,720 --> 00:11:41,680 Uh, things like text files. 181 00:11:41,700 --> 00:11:47,700 So I have seen a text file with usernames and passwords in it that was publicly available on the internet. 182 00:11:47,860 --> 00:11:48,840 Not great. 183 00:11:48,840 --> 00:11:53,040 Uh, config files, sticky notes, still happens, et cetera. 184 00:11:53,120 --> 00:12:00,880 So, uh, false negatives, uh, when your code is written in other spoken languages. 185 00:12:00,880 --> 00:12:08,940 So this is something that may not seem obvious to most, but for static code analysis tools, some of the rules will look for variable names. 186 00:12:08,940 --> 00:12:17,240 So if you were looking for, say, a variable called password, but your coder is speaking Spanish, then it's, it's not going to find that. 187 00:12:17,240 --> 00:12:20,220 So that's something that I've actually had happen a lot. 188 00:12:20,220 --> 00:12:26,420 So you get the scan results back in and it says, uh, all these, it's highlighting all of these password variables. 189 00:12:26,420 --> 00:12:27,200 What do I need to do? 190 00:12:27,200 --> 00:12:28,900 Should I change the variable name? 191 00:12:28,900 --> 00:12:32,500 It's like, no, you should remove the password from your code. 192 00:12:33,300 --> 00:12:35,580 So, all right. 193 00:12:39,260 --> 00:12:43,260 Sensitive information and error messages, that's, uh, fairly self-explanatory. 194 00:12:43,320 --> 00:12:45,240 I don't have an example for that. 195 00:12:45,240 --> 00:12:46,380 You know what that means. 196 00:12:46,480 --> 00:12:52,360 So insecure APIs, there's still a lot that can go wrong with, uh, writing a new API. 197 00:12:52,360 --> 00:13:03,040 So, uh, it's most of the dynamic application security testing tools have a harder time testing APIs without, uh, complete documentation. 198 00:13:03,040 --> 00:13:07,640 So you can't just spider an API and figure out everything that's there. 199 00:13:08,000 --> 00:13:15,320 Um, and even though we've taught developers to tell people, oh, username and password, right? 200 00:13:15,320 --> 00:13:21,100 So when you have an invalid password, you give them an error message back, invalid username or password. 201 00:13:21,100 --> 00:13:22,940 So that's pretty standard practice nowadays. 202 00:13:23,020 --> 00:13:27,340 But let's say you write an API that checks if a username is taken. 203 00:13:27,340 --> 00:13:32,120 So now all of a sudden the attackers are able to enumerate usernames. 204 00:13:32,160 --> 00:13:34,320 So it's a way around that. 205 00:13:34,380 --> 00:13:36,520 Uh, it was just a very simple example I had. 206 00:13:36,860 --> 00:13:43,400 But, uh, next up third party integration flaws. 207 00:13:43,400 --> 00:13:54,400 So let's say, for example, you are integrating with an identity provider and the identif- the identity provider is configured to allow for open redirects. 208 00:13:54,400 --> 00:14:05,320 So what can happen in that case is an attacker can use phishing to have a, a user enter the username and password on the valid identity provider site. 209 00:14:05,320 --> 00:14:09,960 And then it redirects to the malicious site with a token, a valid token. 210 00:14:09,960 --> 00:14:12,500 So open redirects are dangerous there. 211 00:14:12,500 --> 00:14:16,200 There's many other things that can go wrong. 212 00:14:16,200 --> 00:14:17,980 Um, grab a drink of water. 213 00:14:17,980 --> 00:14:18,980 Hold on. 214 00:14:20,040 --> 00:14:25,690 So, you with me so far? 215 00:14:26,270 --> 00:14:27,710 Everybody still awake? 216 00:14:28,030 --> 00:14:28,630 Okay. 217 00:14:30,850 --> 00:14:31,810 Alright. 218 00:14:33,570 --> 00:14:35,490 So how to find them? 219 00:14:35,490 --> 00:14:39,830 There's the hard way, which I'm sure most of you are very familiar with by now. 220 00:14:40,130 --> 00:14:43,050 So, uh, AppSec pin testing. 221 00:14:44,370 --> 00:14:48,790 Uh, or just eyeballs on code, code review. 222 00:14:48,790 --> 00:14:54,610 And I had a very hard time finding a GIF that would appropriately represent code review. 223 00:14:54,610 --> 00:14:56,230 Uh, I hope you like this one. 224 00:14:59,070 --> 00:15:03,910 I spent a long time just reviewing code and that was my face most of the time. 225 00:15:04,090 --> 00:15:08,790 So, but I have some suggestions to make your life easier. 226 00:15:08,790 --> 00:15:13,950 So, the easier way, I call this the Lord Varus approach. 227 00:15:14,170 --> 00:15:18,430 Now, for those of you who have not seen Game of Thrones, it's okay, I will explain. 228 00:15:18,430 --> 00:15:24,130 So, Lord Varus was the master of information in, in Westeros. 229 00:15:24,130 --> 00:15:32,930 And his technique for gathering information was he had all of these spies around the city and around the country, really, that were children. 230 00:15:32,930 --> 00:15:35,590 Now, I'm not advocating for child labor. 231 00:15:35,690 --> 00:15:36,830 Please don't do that. 232 00:15:36,830 --> 00:15:42,990 But, uh, what you should do is just use the same approach to gather information within your own organization. 233 00:15:43,210 --> 00:15:53,850 So you can have an internal bug bounty and even if you're not ready for an external bug bounty, you can reward your employees to come to you with vulnerabilities. 234 00:15:54,050 --> 00:16:01,710 So, the idea here is just to, to make it as painless as possible to report security vulnerabilities to the security team. 235 00:16:01,710 --> 00:16:11,650 Now, a lot of us maybe, uh, have a reputation for being difficult to work with, highly opinionated, it's okay, it comes with knowing what you're talking about. 236 00:16:11,650 --> 00:16:17,970 But, uh, just the point here is that you want to reward people for coming to you and, and give them props. 237 00:16:18,710 --> 00:16:20,570 So, yeah. 238 00:16:20,910 --> 00:16:24,170 It's my, my favorite method for gathering information. 239 00:16:24,590 --> 00:16:25,950 No child labor, though. 240 00:16:25,950 --> 00:16:26,410 Right? 241 00:16:26,410 --> 00:16:27,070 Okay. 242 00:16:27,850 --> 00:16:37,770 Uh, next up is threat modeling and I'm not going to break down threat modeling because there is another talk tomorrow that you can come and see, uh, at, uh, 1330. 243 00:16:37,770 --> 00:16:47,010 So, highly recommend coming to see the introduction to threat modeling, but for those of you that are in here, I'm gonna assume that you're already familiar with the process, right? 244 00:16:47,450 --> 00:16:55,750 So, um, I have a tip for you as you're doing threat modeling that if you can really master this principle, it'll, it'll change your life. 245 00:16:55,830 --> 00:16:57,410 I hope. 246 00:16:57,470 --> 00:17:07,830 Um, so when you're doing threat modeling and you gather everybody in a room, say, and you're, you're asking questions about the architecture diagram and it's like this and that, um, this will change your life. 247 00:17:07,830 --> 00:17:10,590 The art of asking an open-ended question. 248 00:17:10,930 --> 00:17:11,530 Okay? 249 00:17:11,530 --> 00:17:15,510 So, it's very simple tweak, but it'll make a huge difference. 250 00:17:15,670 --> 00:17:18,330 So, instead of, is this connection encrypted? 251 00:17:18,650 --> 00:17:22,370 Every developer you talk to is gonna say yes to that question. 252 00:17:22,410 --> 00:17:23,470 Of course it is. 253 00:17:23,470 --> 00:17:24,630 Everything's encrypted. 254 00:17:24,690 --> 00:17:28,210 So, instead, ask, uh, how is this encrypted? 255 00:17:28,210 --> 00:17:30,310 And where do you store the encryption key? 256 00:17:30,450 --> 00:17:36,190 And if they don't immediately know the answer to that, then that's something that you wanna dig deeper into, right? 257 00:17:36,630 --> 00:17:41,610 So, that, that's, that's my big tip for, for threat modeling. 258 00:17:41,610 --> 00:17:45,610 So, there's stride and dread and all the other things that spell six letter words. 259 00:17:46,110 --> 00:17:48,910 Um, but, this, this is what you really wanna master. 260 00:17:48,910 --> 00:17:51,010 I have another example for you. 261 00:17:51,070 --> 00:17:54,670 So, instead of, do you have any sensitive data in this database? 262 00:17:55,570 --> 00:17:59,150 You ask, well, what kind of data is in this database? 263 00:17:59,810 --> 00:18:07,330 So, and then they have to answer this question and sometimes developers may not know what's sensitive and what is, what's not. 264 00:18:07,330 --> 00:18:14,090 So, instead of asking them to decide, just give, give them, just get the schema and review it yourself. 265 00:18:14,410 --> 00:18:16,450 That's probably the best method. 266 00:18:17,090 --> 00:18:20,730 So, I have another tip. 267 00:18:20,890 --> 00:18:25,010 Uh, just the, uh, what I call the full circle development lifecycle. 268 00:18:25,110 --> 00:18:28,250 So, using feedback from all of these methods. 269 00:18:28,250 --> 00:18:34,950 So, you have your tools and you've got pen testing and threat modeling and code review and maybe an internal bug bounty. 270 00:18:35,090 --> 00:18:42,850 Uh, so, what you wanna do is you wanna find the bugs and I know, how many of you have experienced a situation where you stop there? 271 00:18:42,850 --> 00:18:44,830 And that's, that's the only step. 272 00:18:44,830 --> 00:18:46,590 Is just finding the bugs. 273 00:18:47,870 --> 00:18:49,210 One person admits to it. 274 00:18:49,210 --> 00:18:50,110 You're brave, sir. 275 00:18:50,110 --> 00:18:50,670 Thank you. 276 00:18:51,410 --> 00:18:54,770 So, the next step is to fix the bug, right? 277 00:18:54,790 --> 00:18:56,830 Seems obvious, doesn't always happen. 278 00:18:57,010 --> 00:19:03,030 And then what you wanna do from there is just integrate that back into your automated test, right? 279 00:19:03,030 --> 00:19:07,230 So, write a new test case that has to do with that particular vulnerability. 280 00:19:08,370 --> 00:19:12,230 And then you write some new code, or the developers do. 281 00:19:12,590 --> 00:19:15,910 You deploy the new code and you find new bugs. 282 00:19:16,010 --> 00:19:17,250 Rinse and repeat. 283 00:19:19,570 --> 00:19:25,130 So, and then preventative care, of course. 284 00:19:25,370 --> 00:19:28,390 Just preventing vulnerabilities from getting there in the first place. 285 00:19:28,390 --> 00:19:30,150 Now, there's a few things that you can do. 286 00:19:30,330 --> 00:19:32,230 Uh, the number one is education. 287 00:19:32,230 --> 00:19:34,430 And so, that's why I love that you asked that question. 288 00:19:34,430 --> 00:19:36,590 How many of you are training your developers? 289 00:19:37,210 --> 00:19:39,690 So, it's, it's a really important thing to do. 290 00:19:39,690 --> 00:19:41,490 That's, that's why I do it. 291 00:19:41,490 --> 00:19:42,290 I'm very passionate. 292 00:19:42,290 --> 00:19:43,930 I might be a little bit biased. 293 00:19:44,030 --> 00:19:54,190 But I really think that if you train your developers in security, then they're going to have the knowledge to just keep from, you know, writing the vulnerabilities in the code in the first place. 294 00:19:54,710 --> 00:19:57,050 And, uh, let's see. 295 00:19:57,710 --> 00:20:02,310 So, the next recommendation is, uh, using secure default configurations. 296 00:20:02,310 --> 00:20:10,050 So, for those of you using containers and AWS, uh, just don't, don't let your developers shoot themselves in the foot. 297 00:20:10,050 --> 00:20:10,570 Right? 298 00:20:10,570 --> 00:20:17,570 So, just have secure defaults and a template so that, that is set up and it makes it easy for them. 299 00:20:17,570 --> 00:20:18,130 Right? 300 00:20:19,750 --> 00:20:22,390 Um, configuration management. 301 00:20:22,410 --> 00:20:36,410 So, with all of the tools that you can use to, to run scans, uh, and then I would really highly recommend setting up some automation to automatically fix what you can using microservice, micro-services. 302 00:20:36,750 --> 00:20:43,290 And, uh, this, this one's really pretty important with, uh, the nation state actors nowadays. 303 00:20:43,310 --> 00:20:46,550 Uh, but just a comprehensive background check for your employees. 304 00:20:46,550 --> 00:20:53,510 So, a lot of times it just, the background check makes sure that they don't have a criminal record, but there might be a little bit more to it. 305 00:20:53,510 --> 00:20:59,610 So, I don't know if you have a good rapport with your HR department, but I highly recommend that. 306 00:20:59,870 --> 00:21:04,870 And I have clearly been talking way too fast, cause I, I'm, I'm out of slides. 307 00:21:04,870 --> 00:21:06,750 Um, but I will take questions. 308 00:21:07,330 --> 00:21:13,490 So, does anybody have any questions or certainly there's probably things that I've missed, but yes. 309 00:21:27,730 --> 00:21:29,470 That is a fantastic question. 310 00:21:29,470 --> 00:21:35,230 So, for those that didn't hear the question was, how do you do a bug bounty without encouraging developers to write bugs? 311 00:21:36,570 --> 00:21:38,590 That, that's a great question. 312 00:21:38,630 --> 00:21:44,690 Um, you, I mean, you do have access to the check-in history to see who wrote what code. 313 00:21:45,470 --> 00:21:51,310 Um, but no, that's a fantastic question. 314 00:21:51,810 --> 00:21:55,330 Uh, well, peer review helps a lot too. 315 00:21:55,470 --> 00:22:07,490 So, it perhaps just changing the process so that when, when you are doing a peer review, the developer does a peer review and they find a bug , that's the only time that you can report a bug, but then there's a potential for hiding bugs. 316 00:22:07,490 --> 00:22:11,110 So, uh, it's a really excellent question. 317 00:22:11,110 --> 00:22:12,550 I will think about that. 318 00:22:13,350 --> 00:22:14,990 I'll get back to you. 319 00:22:18,840 --> 00:22:19,280 So... 320 00:22:22,140 --> 00:22:28,340 I have done that too. 321 00:22:28,420 --> 00:22:28,580 Yes. 322 00:22:28,580 --> 00:22:33,160 I've definitely looked at old code and I'm like, oh, oh, that's embarrassing. 323 00:22:33,320 --> 00:22:33,780 Yeah. 324 00:22:33,780 --> 00:22:37,300 So, uh, knowledge is just a, knowledge is power. 325 00:22:38,500 --> 00:22:40,580 So, I, but that's why you're here. 326 00:22:40,580 --> 00:22:41,700 And I'm glad that you're here. 327 00:22:41,700 --> 00:22:42,360 Yes. 328 00:22:42,840 --> 00:22:43,720 Okay. 329 00:22:52,290 --> 00:22:55,150 Oh, an internal education program for the developers. 330 00:22:55,150 --> 00:22:59,850 First step, uh, it, well, I, I, I've done that myself. 331 00:22:59,850 --> 00:23:02,770 So, the first step was creating about 350 slides. 332 00:23:03,070 --> 00:23:09,670 And then, uh, the next step is talking to the executives in charge of the developers and getting their buy-in. 333 00:23:09,670 --> 00:23:12,210 So, that's really the most important part there. 334 00:23:12,210 --> 00:23:15,770 Because if, if they don't think they have to go, they won't go. 335 00:23:15,770 --> 00:23:16,210 Right? 336 00:23:16,210 --> 00:23:17,430 It's not, it's not optional. 337 00:23:17,430 --> 00:23:18,590 You have to go to training. 338 00:23:18,710 --> 00:23:20,370 So, getting executive buy-in. 339 00:23:20,370 --> 00:23:24,790 Actually, no, that should be the first step before you waste your time on the 350 slides. 340 00:23:25,090 --> 00:23:26,730 Um, yeah. 341 00:23:31,170 --> 00:23:32,730 That, a great question. 342 00:23:32,730 --> 00:23:36,350 How do you evaluate competency, comp, competency. 343 00:23:36,350 --> 00:23:38,730 See, I'm still talking too fast because I'm nervous. 344 00:23:38,730 --> 00:23:40,690 Um, after training. 345 00:23:40,710 --> 00:23:48,950 Uh, so, what I've done in the past is have a quiz before and after to see the effectiveness of your training program. 346 00:23:48,990 --> 00:23:52,610 So, uh, yeah, just compare results. 347 00:23:52,950 --> 00:23:54,470 It'll, it'll go up. 348 00:23:54,610 --> 00:24:00,890 And then, uh, another thing that I would recommend for an internal training program is, is keep it in the developer's face all the time. 349 00:24:00,890 --> 00:24:02,830 So, it's not like an annual training. 350 00:24:02,830 --> 00:24:08,370 But to have something at least once a month so that it's in their face, they're always thinking about it. 351 00:24:08,370 --> 00:24:11,030 And they're always, uh, learning more about security. 352 00:24:11,410 --> 00:24:13,370 So, yeah. 353 00:24:13,370 --> 00:24:14,110 Yes? 354 00:24:20,480 --> 00:24:23,600 Uh, some of my favorite metrics to track for what? 355 00:24:24,960 --> 00:24:28,820 Uh, the number of vulnerabilities is probably the most important one. 356 00:24:28,980 --> 00:24:31,920 So, take all the data from all the tools and put them in the same place. 357 00:24:31,920 --> 00:24:34,220 And hopefully that number slowly goes down. 358 00:24:34,640 --> 00:24:41,320 So, that, that's probably the most effective way of tracking how effective your AppSec program is, I think. 359 00:24:41,820 --> 00:24:42,340 Yeah? 360 00:24:42,340 --> 00:24:44,040 Does that number always go down? 361 00:24:44,080 --> 00:24:44,620 No. 362 00:24:44,620 --> 00:24:45,900 Because the developers are writing more code. 363 00:24:45,900 --> 00:24:46,720 It does not. 364 00:24:46,720 --> 00:24:49,480 So, even if you did stop, there's more code. 365 00:24:49,480 --> 00:24:53,900 So, if 10% of the code has bugs, you're gonna get more and more bugs in the list. 366 00:24:53,900 --> 00:24:53,920 Yep. 367 00:24:53,920 --> 00:24:54,680 Absolutely. 368 00:24:54,680 --> 00:24:57,360 So, you could track vulnerability density as well. 369 00:24:57,940 --> 00:25:05,260 So, and, uh, at, at my last job, I actually had a competition between the development groups. 370 00:25:05,280 --> 00:25:08,460 So, the, it was just a scorecard that everybody knew where it was. 371 00:25:08,480 --> 00:25:14,520 And you'd take the vulnerability density and, uh, whoever was at the top of the list got a prize for the month. 372 00:25:14,520 --> 00:25:16,640 And they got really competitive about it. 373 00:25:16,640 --> 00:25:23,080 So, that's combining social engineering with AppSec to manipulate people into fixing the bugs. 374 00:25:23,980 --> 00:25:26,580 So, yeah. 375 00:25:27,160 --> 00:25:28,940 I like this Q&A session. 376 00:25:28,940 --> 00:25:31,300 I'm, I'm really, I talked so fast. 377 00:25:31,300 --> 00:25:32,000 Oh, my gosh. 378 00:25:32,000 --> 00:25:35,060 I'm gonna have to watch the recording and, and laugh at myself. 379 00:25:35,060 --> 00:25:38,100 But, um, yeah. 380 00:25:38,100 --> 00:25:39,180 Anything else? 381 00:25:52,480 --> 00:25:53,440 Definitely. 382 00:25:54,260 --> 00:25:59,460 It, well, yeah, you do have to kind of start with the basics. 383 00:25:59,820 --> 00:26:03,380 Um, so, OWASP top 10, as I say, are just the top 10. 384 00:26:03,380 --> 00:26:06,880 That's kind of the bare minimum for web developers. 385 00:26:06,880 --> 00:26:15,340 But I definitely would advocate for, for training in more in-depth and especially just whatever somebody needs to know to do their job. 386 00:26:15,520 --> 00:26:19,460 So, um, AWS is, is one that's being very widely used. 387 00:26:19,460 --> 00:26:21,540 And there's so many features. 388 00:26:21,540 --> 00:26:29,060 And there's so much to learn that, um, yeah, it's, it's still pretty easy to screw up even if you know what you're doing. 389 00:26:29,060 --> 00:26:33,280 So, I definitely advocate for, like, role-based training. 390 00:26:33,400 --> 00:26:35,080 And, yeah. 391 00:26:35,940 --> 00:26:37,280 That's a good question. 392 00:26:37,400 --> 00:26:39,020 I see two hands. 393 00:26:39,020 --> 00:26:40,260 Yeah, I saw you first. 394 00:27:04,060 --> 00:27:08,160 Oh, that's how to scale finding business logic flaws? 395 00:27:08,160 --> 00:27:09,280 Is that your question? 396 00:27:13,980 --> 00:27:14,940 Mm-hmm. 397 00:27:14,960 --> 00:27:17,960 Well, it, it's probably a slow process. 398 00:27:17,960 --> 00:27:24,480 But once you find one, then just, you know, write new automated test cases to test the new and existing code. 399 00:27:24,700 --> 00:27:29,360 Um, but I'm, I'm sorry, I'm not sure if I understood all of your question. 400 00:27:30,200 --> 00:27:36,510 Oh, to find them? 401 00:27:36,510 --> 00:27:38,230 Uh, learn the business. 402 00:27:38,670 --> 00:27:40,230 Like, learn the ins and outs of it. 403 00:27:40,230 --> 00:27:44,850 So, as a security person, you should know more about the business than, than your boss does. 404 00:27:46,370 --> 00:27:47,150 It is. 405 00:27:47,150 --> 00:27:53,670 It's very difficult to find, but the more you learn about the business and how it works, uh, the more likely it is that you'll, you'll find things. 406 00:27:54,210 --> 00:27:55,850 So , yeah. 407 00:28:02,460 --> 00:28:04,420 Oh, that's a great question. 408 00:28:04,480 --> 00:28:12,620 Um, I have seen, so, in design and story development, have, like, a review process where there's, there's, like, a questionnaire. 409 00:28:12,880 --> 00:28:15,940 So, when you write a story, there's also a security questionnaire. 410 00:28:16,060 --> 00:28:24,940 So, it, it's a fairly basic way of doing things, but you can scale things and, um, just by having them ask a few questions. 411 00:28:24,940 --> 00:28:27,540 Like, are you dealing with social security numbers in this story? 412 00:28:27,540 --> 00:28:28,020 No. 413 00:28:28,020 --> 00:28:29,180 Are you dealing with passwords? 414 00:28:29,180 --> 00:28:29,640 No. 415 00:28:29,640 --> 00:28:30,760 Are you dealing with cryptography? 416 00:28:30,760 --> 00:28:31,080 Yes. 417 00:28:31,080 --> 00:28:37,620 And so, the things that are kind of the low-hanging fruit will automatically get kicked up to the security team for a review. 418 00:28:37,660 --> 00:28:41,580 So, that way, you don't have to review thousands upon thousands of tickets. 419 00:28:42,460 --> 00:28:44,740 So, does that help? 420 00:28:45,180 --> 00:28:46,140 Okay. 421 00:29:00,520 --> 00:29:02,040 That is a great question. 422 00:29:02,040 --> 00:29:14,040 And if you're in an organization where you're working against reputation, uh, I think the best thing you can do is just, uh, have you read, uh, How to Win Friends and Influence People? 423 00:29:15,140 --> 00:29:16,080 Read it again. 424 00:29:16,080 --> 00:29:17,720 I read it every year. 425 00:29:17,720 --> 00:29:28,380 You know, uh, it's, it's a good review, but it's, it's hard when you're already working at a deficit, but to just try to change the, the perception of the security team. 426 00:29:28,800 --> 00:29:32,520 So, um, you know, do nice things for them. 427 00:29:32,660 --> 00:29:40,680 I see, and I, one recommendation is every time you have a meeting with a developer, just start it out with, I'm here to help. 428 00:29:40,960 --> 00:29:42,520 Let me know how I can help you. 429 00:29:42,540 --> 00:29:46,240 And then, um, just kind of live with that attitude, I guess. 430 00:29:46,240 --> 00:29:48,200 And it'll, it'll get there eventually. 431 00:29:48,540 --> 00:29:53,600 So, but I, I've dealt with that a lot of, especially when a brand new developer comes in. 432 00:29:53,980 --> 00:29:56,380 It's, oh no, you're the security team. 433 00:29:56,380 --> 00:29:58,020 You're going to tell me I'm doing things wrong. 434 00:29:58,320 --> 00:30:00,520 Um, but you'll win them over eventually. 435 00:30:02,800 --> 00:30:03,500 Patience. 436 00:30:03,500 --> 00:30:07,560 I know it's hard, but, yeah. 437 00:30:08,320 --> 00:30:10,540 Um, yeah. 438 00:30:10,600 --> 00:30:11,480 Sorry. 439 00:30:26,050 --> 00:30:27,530 Uh, both. 440 00:30:27,550 --> 00:30:28,070 Yeah. 441 00:30:28,070 --> 00:30:33,150 I think you have to understand the principles before you can really exploit them or fix them. 442 00:30:33,390 --> 00:30:34,970 But, yeah, for sure. 443 00:30:34,970 --> 00:30:38,150 Uh, so I love hands-on training, though. 444 00:30:38,170 --> 00:30:41,230 So, because that's the best way to learn by doing. 445 00:30:41,230 --> 00:30:42,890 That's how I've learned all of this. 446 00:30:42,890 --> 00:30:44,570 I didn't go to school for this. 447 00:30:45,170 --> 00:30:46,990 So, good question. 448 00:30:47,530 --> 00:30:49,110 That's a big bug. 449 00:30:56,370 --> 00:30:57,210 Okay. 450 00:30:58,010 --> 00:31:05,470 Well, I, I wanted to say thank you to Owen and Adarsh and Vivi for helping me with the writing process of this. 451 00:31:05,470 --> 00:31:06,950 And I'm so distracted by the bug. 452 00:31:06,950 --> 00:31:07,610 I'm sorry. 453 00:31:07,910 --> 00:31:09,950 Do we have any bug hunters in here? 454 00:31:13,190 --> 00:31:14,730 Five dollars. 455 00:31:16,250 --> 00:31:17,030 Yeah. 456 00:31:17,030 --> 00:31:22,750 And then, um, let's give a big round of applause for all the volunteers and the people who organized this. 457 00:31:28,340 --> 00:31:31,280 And I also want to thank you for being here. 458 00:31:31,340 --> 00:31:34,300 And, uh, asking such good questions. 459 00:31:34,300 --> 00:31:37,540 And, uh, for all of your hard work in what you do. 460 00:31:37,540 --> 00:31:38,900 So, AppSec is really important. 461 00:31:38,900 --> 00:31:41,340 I'm very passionate about this subject. 462 00:31:41,340 --> 00:31:45,160 And I'll be hanging out outside if you want to come talk to me later. 463 00:31:45,160 --> 00:31:47,400 Um, but, yeah. 464 00:31:47,400 --> 00:31:48,000 Thank you. 465 00:31:48,000 --> 00:31:48,980 Thank you for being here.