1 00:00:00,000 --> 00:00:03,520 Okay, if everyone's ready, we'll get started with the first live demo of the day. 2 00:00:04,240 --> 00:00:07,920 I'm going to hand over very, very shortly to Dave, who's going to be introducing his 3 00:00:07,920 --> 00:00:12,420 presentation, Winning a SANS 504 CTF Without Winning a SANS 504. 4 00:00:12,840 --> 00:00:15,680 Without further ado, Dave just done his shot, so now he can take over. 5 00:00:15,780 --> 00:00:16,140 Thanks. 6 00:00:16,300 --> 00:00:16,880 Thank you very much. 7 00:00:17,380 --> 00:00:18,000 Good morning. 8 00:00:18,400 --> 00:00:18,760 Welcome. 9 00:00:19,420 --> 00:00:20,920 So, I am Big Dave. 10 00:00:21,520 --> 00:00:25,300 I'm not the biggest Dave, but I am one of the many Big Daves that exist within this 11 00:00:25,300 --> 00:00:25,480 world. 12 00:00:25,520 --> 00:00:26,460 Everyone knows a Dave, right? 13 00:00:29,260 --> 00:00:33,760 So, W, first thing you should do when you log on to a Linux terminal, W, who else is 14 00:00:33,760 --> 00:00:34,180 on with me? 15 00:00:34,260 --> 00:00:35,720 So, this is me, Big Dave. 16 00:00:36,360 --> 00:00:37,620 That's my personal account everywhere. 17 00:00:38,080 --> 00:00:40,840 If you want to reach out to me, ask me questions after this, that's the place to do it. 18 00:00:40,940 --> 00:00:44,880 It is personal, so you will just see random bullshit, random sketches I do and other stuff. 19 00:00:45,680 --> 00:00:46,780 I'm a security researcher. 20 00:00:47,520 --> 00:00:49,060 I work for a company in San Jose. 21 00:00:49,580 --> 00:00:54,340 My job is to look at attackers, how they're doing stuff inside the network. 22 00:00:54,440 --> 00:00:56,220 So, not the traditional IOCs, like what? 23 00:00:56,700 --> 00:00:57,920 How have they popped a box? 24 00:00:58,060 --> 00:00:59,080 More behavioral than that. 25 00:00:59,320 --> 00:01:04,220 I worked for an engineering support company in the UK, working with the MOD, nuclear power, 26 00:01:04,420 --> 00:01:05,080 that sort of thing. 27 00:01:05,120 --> 00:01:05,820 Very big company. 28 00:01:06,140 --> 00:01:08,020 Got to work with a lot of interesting adversaries. 29 00:01:08,560 --> 00:01:12,720 It was through working with those guys that I uncovered some of the techniques and some 30 00:01:12,720 --> 00:01:13,760 of the stuff I'm going to talk about today. 31 00:01:15,160 --> 00:01:18,920 I also worked as a network engineer before that, so it's pretty standard. 32 00:01:19,200 --> 00:01:21,040 But the weirdest part is I have a BA in drama. 33 00:01:22,720 --> 00:01:24,900 So, that's relevant for this field, right? 34 00:01:27,120 --> 00:01:32,220 So, the background to this talk, I spent a long time when I was working with my previous 35 00:01:32,220 --> 00:01:35,440 company in the trenches of the spam reporting folder. 36 00:01:35,660 --> 00:01:40,780 People just send us emails every day, and I was doing this day in, day out, just ridiculous 37 00:01:40,780 --> 00:01:44,880 volumes of email saying, this is spam, this is malicious, this is advertising, this is fine, 38 00:01:44,960 --> 00:01:46,800 you can click on these links and you can't click on these ones. 39 00:01:48,000 --> 00:01:54,380 Through that, we had to think of novel ways to also beat the enterprise filters, so how can we 40 00:01:54,380 --> 00:01:56,060 get past the anti-spoofing? 41 00:01:56,060 --> 00:01:58,400 How can we send emails that look like other people? 42 00:01:58,700 --> 00:02:02,240 How can we get files through these devices as well? 43 00:02:03,340 --> 00:02:07,700 I worked, obviously, as part of the blue team in that, I was a SOC analyst, so we went 44 00:02:07,700 --> 00:02:12,880 up against everyone from Nigerian scammers who would say, do you want your share of 45 00:02:12,880 --> 00:02:17,360 85,000 Nigerian dollars? 46 00:02:18,500 --> 00:02:22,340 But we also ran investigations which deal with a more serious side, and it's the one 47 00:02:22,340 --> 00:02:25,960 that people know a lot about and they hear a lot about now, the sort of, the CFO fish. 48 00:02:25,960 --> 00:02:31,060 Somebody pretends to be your CFO, they send it to your financial controllers, it usually 49 00:02:31,060 --> 00:02:31,860 looks really bad. 50 00:02:32,740 --> 00:02:35,860 There are a couple of cases, though, where that isn't the case. 51 00:02:36,860 --> 00:02:38,840 But let's give you a background of what I'm talking about today. 52 00:02:39,200 --> 00:02:39,960 The SANS 504. 53 00:02:40,300 --> 00:02:45,360 The SANS 504, it's run by SANS, it's the hacker tools, techniques, exploits, and incident 54 00:02:45,360 --> 00:02:49,420 handling course, so it's the sort of basic stuff for the SOC. 55 00:02:49,780 --> 00:02:54,860 Five-day course covers the basics of incident response, processes of incident response, good 56 00:02:54,860 --> 00:02:55,840 practice for incidents. 57 00:02:55,960 --> 00:02:56,140 Incident response. 58 00:02:56,460 --> 00:02:57,660 And pen testing as well. 59 00:02:57,920 --> 00:03:01,780 It's a lot heavier on the pen testing, actually, than incident response, which is a bit weird 60 00:03:01,780 --> 00:03:04,740 given that it is more of an incident response course, but fair enough. 61 00:03:05,340 --> 00:03:08,140 On the Saturday, they run a CTF. 62 00:03:08,320 --> 00:03:15,060 The CTF is a small network of plannable machines that you have to get two flags, put them together, 63 00:03:15,080 --> 00:03:16,140 and come up with a phrase that pays. 64 00:03:16,760 --> 00:03:19,020 And then you win the CTF and you get a coin. 65 00:03:19,580 --> 00:03:21,160 You get your 504 challenge coin. 66 00:03:22,460 --> 00:03:25,920 I didn't win the CTF, but I have a 504 challenge coin. 67 00:03:26,760 --> 00:03:27,780 And I'll come on to that. 68 00:03:28,620 --> 00:03:31,540 So my SANS was in London, 2015 spring. 69 00:03:32,200 --> 00:03:33,480 It was taught by Kevin Fiscus. 70 00:03:35,280 --> 00:03:37,180 Please feel free to at him on Twitter. 71 00:03:37,280 --> 00:03:38,400 I asked him before the talk. 72 00:03:38,440 --> 00:03:38,740 It's fine. 73 00:03:39,560 --> 00:03:44,220 It was two days of me being very serious and five days of me being very devious. 74 00:03:46,040 --> 00:03:49,440 So on the first couple of days, Kevin said that at the end of the week, we're going to 75 00:03:49,440 --> 00:03:50,340 be doing the CTF. 76 00:03:50,700 --> 00:03:55,640 And he said in front of the class, hey, I encourage social engineering. 77 00:03:55,960 --> 00:03:58,820 Because I've never been socially engineered to give up the phrase that pays. 78 00:03:59,540 --> 00:04:03,720 And so whilst the rest of the class went off and went, oh, I'm going to produce a letter 79 00:04:03,720 --> 00:04:09,240 that says I have a share of $20 million if you give me a hint to the CTF, or someone 80 00:04:09,240 --> 00:04:13,140 went and got a picture of his Jeep from Facebook and said, oh, we're going to craft something 81 00:04:13,140 --> 00:04:13,960 from the DMV. 82 00:04:14,020 --> 00:04:15,040 It's going to say he's been caught speeding. 83 00:04:15,260 --> 00:04:18,200 And then if he gives us a hint to the CTF, then we'll let him off his fine. 84 00:04:19,680 --> 00:04:21,140 And I took it way too seriously. 85 00:04:24,120 --> 00:04:24,840 So the challenge. 86 00:04:24,960 --> 00:04:25,920 The CTF was set up. 87 00:04:25,960 --> 00:04:28,100 Encourage us to socially engineer to get the phrase that pays. 88 00:04:28,340 --> 00:04:31,860 He showed us bad examples of previous phishing and said he found them hilarious. 89 00:04:32,440 --> 00:04:33,900 I definitely took it too seriously. 90 00:04:34,040 --> 00:04:38,080 I was advised not to do this by my peers who said, you shouldn't fuck with your CTF, 91 00:04:38,100 --> 00:04:39,160 with your SANS instructor. 92 00:04:39,460 --> 00:04:40,840 They will kick you off the course. 93 00:04:42,280 --> 00:04:43,080 So the target. 94 00:04:43,220 --> 00:04:45,480 He said he'd never been socially engineered by a student. 95 00:04:45,640 --> 00:04:46,600 He's a security professional. 96 00:04:46,720 --> 00:04:47,600 He works in incident response. 97 00:04:47,960 --> 00:04:49,020 He's incredibly smart. 98 00:04:49,560 --> 00:04:52,960 And he was aware that he was opening himself up for incoming attacks. 99 00:04:53,560 --> 00:04:53,960 Okay. 100 00:04:56,180 --> 00:04:57,220 So the patsy. 101 00:04:58,320 --> 00:05:04,520 There was another SANS instructor that week giving a presentation where, importantly, 102 00:05:04,700 --> 00:05:09,040 there was free beer at the back where I stood for the entire talk. 103 00:05:10,320 --> 00:05:12,120 Getting beautifully rat assed. 104 00:05:12,780 --> 00:05:13,880 They gave a presentation. 105 00:05:14,120 --> 00:05:15,880 The presentation was on memory forensics. 106 00:05:16,040 --> 00:05:16,780 It was great. 107 00:05:16,880 --> 00:05:17,800 They were showing off a new tool. 108 00:05:18,860 --> 00:05:20,160 The tool worked really well. 109 00:05:20,420 --> 00:05:23,580 It did some new interesting stuff with not messing around. 110 00:05:23,580 --> 00:05:26,420 It worked with memory space when grabbing the memory dump. 111 00:05:28,020 --> 00:05:28,740 It's fantastic. 112 00:05:29,180 --> 00:05:31,840 It's better than other things I've used to do this before. 113 00:05:32,220 --> 00:05:33,360 But it gave me an idea. 114 00:05:33,760 --> 00:05:39,680 Because, more importantly, in the memory dump was an example of the SANS 504 CTF that 115 00:05:39,680 --> 00:05:40,380 they run on the Sunday. 116 00:05:40,480 --> 00:05:48,380 Just showing the meterpreter shell from the network list, so, oh, look, here's an open 117 00:05:48,380 --> 00:05:49,720 TCP on 4444. 118 00:05:50,440 --> 00:05:51,500 And it gave me an idea. 119 00:05:52,420 --> 00:05:53,020 The plan. 120 00:05:53,020 --> 00:05:53,920 Well, what did I know? 121 00:05:54,400 --> 00:05:55,900 I knew the instructors knew each other. 122 00:05:55,940 --> 00:05:57,120 They worked for SANS. 123 00:05:57,300 --> 00:05:58,140 I'd seen them talking. 124 00:05:59,160 --> 00:06:02,400 I knew that they were going to give a presentation. 125 00:06:02,980 --> 00:06:04,240 So I thought I'd go along to that. 126 00:06:04,280 --> 00:06:04,780 It sounded interesting. 127 00:06:04,960 --> 00:06:05,480 There was free beer. 128 00:06:06,500 --> 00:06:09,240 And I knew about some interesting e-mail tricks. 129 00:06:09,400 --> 00:06:16,600 Now, I guarantee almost everyone in this room when they were 10 or 11, maybe even younger 130 00:06:16,600 --> 00:06:22,300 or older, in the 90s, let's say, found an open mail relay on the Internet and sent an 131 00:06:22,300 --> 00:06:23,000 e-mail to their friends. 132 00:06:23,020 --> 00:06:29,000 As Bill Gates at Microsoft.com, hey, there's a new update to Windows. 133 00:06:29,020 --> 00:06:30,180 Please click on this link. 134 00:06:30,380 --> 00:06:32,480 We're not going to sub-7 your machine at all. 135 00:06:34,880 --> 00:06:35,820 So the execution. 136 00:06:37,200 --> 00:06:41,620 From a high level, I crafted an e-mail in the style of the Patsy and I sent it from 137 00:06:41,620 --> 00:06:41,960 the Patsy. 138 00:06:42,280 --> 00:06:44,180 I found a hosting provider with Open SMTP. 139 00:06:44,400 --> 00:06:45,340 That's about it. 140 00:06:46,420 --> 00:06:47,860 There's a touch more to it. 141 00:06:48,600 --> 00:06:49,560 A study in pink. 142 00:06:49,620 --> 00:06:50,680 I love this site. 143 00:06:51,460 --> 00:06:52,300 Alwaysdata.com. 144 00:06:53,020 --> 00:06:56,420 The best thing about this site is that you can start for free. 145 00:06:57,220 --> 00:06:59,220 There is no sign-up fee. 146 00:06:59,300 --> 00:07:00,840 There's no, like, 30-day trial. 147 00:07:01,020 --> 00:07:03,600 They will give you a really basic account for absolutely nothing. 148 00:07:04,400 --> 00:07:07,080 You also don't have to fill in any correct information. 149 00:07:07,300 --> 00:07:09,560 So that's Butts at Guerrilla Mail. 150 00:07:10,760 --> 00:07:12,540 I think my name's Jimmy Riddle. 151 00:07:13,040 --> 00:07:17,240 I live at 1 France 77 in the city of Spain. 152 00:07:17,720 --> 00:07:21,960 The only thing that has to be correct is the country has to match where you're signing 153 00:07:21,960 --> 00:07:22,380 up from. 154 00:07:22,380 --> 00:07:23,820 So it looks at your GOIP. 155 00:07:24,140 --> 00:07:26,760 That's the only thing that needs to be correct in that form. 156 00:07:26,820 --> 00:07:29,020 It takes no credit card details, nothing else. 157 00:07:29,400 --> 00:07:31,000 You can lie through your back teeth. 158 00:07:33,680 --> 00:07:35,740 And it has a handy Roundcube webmail interface. 159 00:07:35,840 --> 00:07:42,260 If you don't want to type out those bothersome SMTP commands on the shell, you can just 160 00:07:42,260 --> 00:07:42,720 go and do it. 161 00:07:43,540 --> 00:07:46,360 You can just do it from their Roundcube interface. 162 00:07:47,300 --> 00:07:49,480 So there's my e-mail address. 163 00:07:49,740 --> 00:07:51,060 Buttsnatch at Alwaysdata.com. 164 00:07:51,140 --> 00:07:52,060 And I can edit that identity. 165 00:07:52,200 --> 00:07:52,360 So there's my e-mail address. 166 00:07:53,320 --> 00:07:55,180 And I can put in anything I want. 167 00:07:55,800 --> 00:08:00,840 So here I've just changed it to say the e-mail is actually just say it's from Recon at DEF CON. 168 00:08:01,700 --> 00:08:02,880 Reply to, send it back here. 169 00:08:02,920 --> 00:08:04,520 I want to get my e-mail right. 170 00:08:07,300 --> 00:08:08,140 And here's the rub. 171 00:08:08,240 --> 00:08:09,300 It's a really old trick. 172 00:08:09,700 --> 00:08:11,280 We call this envelope spoofing. 173 00:08:12,480 --> 00:08:16,720 So when you send the e-mail, at the very top you have your SMTP headers and you have 174 00:08:16,720 --> 00:08:17,660 the from address. 175 00:08:17,820 --> 00:08:21,480 You have the to address, the receipt to. 176 00:08:21,480 --> 00:08:25,440 But a lot of that actually gets stripped these days by the edge e-mail systems. 177 00:08:25,760 --> 00:08:31,140 So you can rarely, unless you're intercepting the traffic from the edge to the exchange 178 00:08:31,140 --> 00:08:34,560 server, you won't ever see the original from address because it gets cut. 179 00:08:35,580 --> 00:08:37,020 You will, however, see the envelope. 180 00:08:37,260 --> 00:08:39,340 Now the envelope is actually part of the data of the e-mail. 181 00:08:39,380 --> 00:08:40,960 So this is all outside of the protocol. 182 00:08:41,760 --> 00:08:44,880 And the data of the e-mail is the important bit to the application. 183 00:08:45,800 --> 00:08:49,580 So when the application receives the e-mail, it doesn't look at the original sender because 184 00:08:49,580 --> 00:08:50,520 it's usually been stripped. 185 00:08:50,660 --> 00:08:51,460 It looks at the e-mail. 186 00:08:51,480 --> 00:08:55,000 It looks to the envelope to give you the sender and to make the e-mail look like it 187 00:08:55,000 --> 00:08:55,900 came from that person. 188 00:08:56,160 --> 00:09:00,420 So there's some other interesting things that happen when that goes ahead inside most of 189 00:09:00,420 --> 00:09:00,880 the applications. 190 00:09:01,140 --> 00:09:06,840 If you can nail the e-mail address to somebody within someone else's address book, Outlook, 191 00:09:07,040 --> 00:09:13,360 Gmail, Mail for Mac, any modern e-mail application will pull in contact details, presence information, 192 00:09:14,500 --> 00:09:19,180 signatures, everything that makes that e-mail look legitimately as if it has come from that 193 00:09:19,180 --> 00:09:19,580 person. 194 00:09:19,720 --> 00:09:21,460 So all you've got to do is send. 195 00:09:21,460 --> 00:09:25,880 All you've got to do is mail their e-mail address and possibly how they talk and how 196 00:09:25,880 --> 00:09:26,780 they act as well. 197 00:09:31,500 --> 00:09:34,440 If it's dumb and it works, is it really dumb? 198 00:09:35,120 --> 00:09:36,540 So this is a bit of a case study. 199 00:09:38,020 --> 00:09:42,680 Facebook and Google both lost about $100 million to a scammer. 200 00:09:42,700 --> 00:09:48,000 Now the guy's been arrested since and it was absolutely huge. 201 00:09:48,680 --> 00:09:49,780 Two tech giants. 202 00:09:49,780 --> 00:09:54,360 The company's insurance came to a well-known type of scam in which the attacker tricks 203 00:09:54,360 --> 00:09:56,000 the victim by innocent looking e-mails. 204 00:09:56,920 --> 00:10:00,860 So there's not been many details given out on how this was done. 205 00:10:01,040 --> 00:10:02,920 They said it was financial fraud. 206 00:10:03,080 --> 00:10:05,440 It's a well-known technique, et cetera, et cetera. 207 00:10:06,000 --> 00:10:07,800 So I want to shed some light on what happened. 208 00:10:09,740 --> 00:10:14,840 During the time of this attack, the common method to do this type of CFO fraud was to 209 00:10:14,840 --> 00:10:19,720 pretend to be the CFO, to say, please authorize this payment to this company because they are 210 00:10:19,780 --> 00:10:20,100 our supplier. 211 00:10:21,060 --> 00:10:23,020 It failed 99% of the time. 212 00:10:23,080 --> 00:10:29,260 There are some big cases, like 70,000 pounds was given to some company in Taiwan through 213 00:10:29,260 --> 00:10:30,080 this sort of fraud. 214 00:10:30,660 --> 00:10:35,640 But in this case, they went for the supplier, classic target supply chain, right? 215 00:10:36,080 --> 00:10:37,500 They targeted the supply chain. 216 00:10:37,640 --> 00:10:40,860 They infected them with an old-school Java rat. 217 00:10:41,780 --> 00:10:46,640 From that, they then sat on that supplier's e-mail and they watched outbound e-mail. 218 00:10:47,280 --> 00:10:48,780 Not only did they scrape... 219 00:10:49,840 --> 00:10:56,060 E-mail addresses to send to, e-mail addresses to send from, they also scraped headed paper, 220 00:10:56,960 --> 00:11:00,800 physical signatures that were transmitted across e-mail because they were in the wire. 221 00:11:04,000 --> 00:11:09,240 So the e-mail came out of the supplier, it got snuffed by the attacker, and then it 222 00:11:09,240 --> 00:11:10,300 got sent on to the target. 223 00:11:11,180 --> 00:11:16,400 Now this was interesting because they then waited for a very large invoice to go across 224 00:11:16,400 --> 00:11:17,200 to the attacker. 225 00:11:17,540 --> 00:11:19,760 At which point, they would... 226 00:11:19,760 --> 00:11:25,220 Then send a follow-up e-mail, oh, by the way, sorry to interrupt, we are currently 227 00:11:25,220 --> 00:11:25,740 under audit. 228 00:11:26,400 --> 00:11:27,980 All our bank accounts have been frozen. 229 00:11:28,420 --> 00:11:34,140 Can you please change the bank accounts to these new ones because they're not under audit 230 00:11:34,140 --> 00:11:36,140 and we can take the payment and it'll be sorted out afterwards. 231 00:11:36,440 --> 00:11:40,660 If you know much about financial auditing, that wouldn't happen. 232 00:11:40,980 --> 00:11:42,160 That's just insanity. 233 00:11:42,500 --> 00:11:48,040 But the reply in due diligence says, hey, can you send us this with headed paper with 234 00:11:48,040 --> 00:11:49,740 the signature of your... 235 00:11:49,740 --> 00:11:50,660 Or financial controllers? 236 00:11:51,080 --> 00:11:53,020 Of course, the attacker has already stolen all that. 237 00:11:53,400 --> 00:11:57,620 So they send another one and the payment gets authorized to some Swiss bank account 238 00:11:57,620 --> 00:12:00,980 and they walk out the door with Facebook and Google with $100 million. 239 00:12:02,080 --> 00:12:06,300 These are smart people working in big tech companies and these guys can get duped. 240 00:12:07,700 --> 00:12:12,480 What I always say to people when they say, oh, well, we bought the best firewalls, we 241 00:12:12,480 --> 00:12:19,040 bought the best e-mail routing, we bought the best AV, it's like, I don't care if someone 242 00:12:19,040 --> 00:12:22,680 wants to get you, they will get you. 243 00:12:23,160 --> 00:12:26,260 Doesn't matter if you are Facebook, Google, or a SANS instructor. 244 00:12:26,500 --> 00:12:31,820 If somebody is really out to target you and to send you malicious content, they will do 245 00:12:31,820 --> 00:12:32,800 it every single time. 246 00:12:33,140 --> 00:12:37,300 And I have a nice heavy coin in my pocket that proves that to my SANS instructor. 247 00:12:38,480 --> 00:12:39,540 So what do you need to know? 248 00:12:39,560 --> 00:12:40,740 Well, you need to know their e-mail address. 249 00:12:41,740 --> 00:12:43,300 How did I get this from a security professional? 250 00:12:43,460 --> 00:12:45,480 They were a very private person at the time. 251 00:12:45,560 --> 00:12:47,760 All they gave out in their talk was their Twitter handle. 252 00:12:48,000 --> 00:12:49,020 And this was before Twitter. 253 00:12:49,040 --> 00:12:52,000 Twitter let you embed the link to your website. 254 00:12:53,200 --> 00:12:53,780 The hook. 255 00:12:54,380 --> 00:12:57,960 I mean, this was pretty easy based on the content being presented. 256 00:12:58,180 --> 00:13:01,220 I've already said they were showing off the SANS 504 memory dumps and the capture the 257 00:13:01,220 --> 00:13:02,740 flag in the presentation. 258 00:13:03,420 --> 00:13:05,520 But I needed something to make it a little more believable. 259 00:13:08,400 --> 00:13:10,180 So I need a handle, man. 260 00:13:10,320 --> 00:13:11,860 I'm not anything if I don't have a handle. 261 00:13:12,640 --> 00:13:16,200 So the context, the recon was carried out a few years ago. 262 00:13:16,240 --> 00:13:19,020 Like I say, it was before putting your website on Twitter was actually kind of a thing. 263 00:13:19,040 --> 00:13:19,300 It was kind of common. 264 00:13:19,860 --> 00:13:22,880 The security professional didn't advertise their e-mail address, just their Twitter handle. 265 00:13:24,240 --> 00:13:28,920 There is a lovely piece of SANS 504 advice, and I've spoken to a couple of instructors 266 00:13:28,920 --> 00:13:30,020 around here this week. 267 00:13:30,320 --> 00:13:33,740 At the beginning of the week, they say, if you own a website, put your own e-mail address 268 00:13:33,740 --> 00:13:36,920 in the admin field because if it ever gets hacked, you want to be e-mailed, right? 269 00:13:36,960 --> 00:13:37,520 You want to be notified. 270 00:13:38,640 --> 00:13:44,200 Whilst great advice for notification of breach, it's actually brilliant for finding out people's 271 00:13:44,200 --> 00:13:46,260 personal e-mail addresses because sometimes they are not. 272 00:13:46,960 --> 00:13:47,880 They don't scrub it. 273 00:13:47,920 --> 00:13:49,020 They don't put something odd in there. 274 00:13:49,020 --> 00:13:50,840 They don't put a guerrilla address. 275 00:13:51,020 --> 00:13:54,360 They just put something that is very personal to them, so I took a shot in the dark. 276 00:13:55,040 --> 00:13:59,840 I knew the professional's Twitter handle, so I started going through all of the common 277 00:14:00,960 --> 00:14:06,320 TLDs to see if that was registered to them as a TLD, and I got the hit. 278 00:14:07,980 --> 00:14:13,240 This is from a couple of years back before it was all scrubbed by domains by proxy, but 279 00:14:13,240 --> 00:14:17,440 basically it was a, I believe it was a dot, this one was a dot com. 280 00:14:17,780 --> 00:14:21,220 It was really easy to get this one, and it had their personal e-mail address, their 281 00:14:21,220 --> 00:14:24,360 g-mail address, which wasn't anywhere else in there. 282 00:14:24,500 --> 00:14:26,720 I mean, it's easy recon. 283 00:14:26,840 --> 00:14:27,940 It's Whois data. 284 00:14:29,860 --> 00:14:33,440 Coming soon to a Whois near you, though, a lot of this data is going to go because 285 00:14:33,440 --> 00:14:35,820 of GDPR, so have fun with that. 286 00:14:36,540 --> 00:14:40,720 When that happens, we're going to be in an interesting place of finding out this sort 287 00:14:40,720 --> 00:14:41,120 of information. 288 00:14:41,300 --> 00:14:44,700 We're going to have to revert to older social engineering techniques to try and get this 289 00:14:44,700 --> 00:14:45,200 stuff as well. 290 00:14:46,920 --> 00:14:47,420 Like, don't worry. 291 00:14:47,440 --> 00:14:47,940 Don't worry at Wendy's. 292 00:14:47,980 --> 00:14:49,660 No one's going to believe you unless you have proof. 293 00:14:51,600 --> 00:14:58,880 The reason I say this is I could send an e-mail to Kevin from his colleague, and I could make 294 00:14:58,880 --> 00:15:04,440 up any cock and bull story about, hey, you dropped your USB key and it's got the phrase 295 00:15:04,440 --> 00:15:09,180 that pays, or I need to know it because I'm going to be teaching the course next week 296 00:15:09,180 --> 00:15:15,180 and I need to make sure I'm pre-warned, but I've got a degree in drama. 297 00:15:15,860 --> 00:15:17,240 I'm good at making stuff up. 298 00:15:17,240 --> 00:15:18,500 I'm getting good at playing pretend. 299 00:15:19,840 --> 00:15:22,140 I spent three years studying playing pretend. 300 00:15:22,240 --> 00:15:25,980 I actually spent six months of that building a puppet, which is great. 301 00:15:26,960 --> 00:15:30,340 I ruined a hoodie like that because the head was made of foam and I had to shave it down 302 00:15:30,340 --> 00:15:33,460 with a Dremel, and it just sticks into any fabric. 303 00:15:33,540 --> 00:15:34,180 It's awful stuff. 304 00:15:34,820 --> 00:15:35,560 But it's great. 305 00:15:35,640 --> 00:15:39,540 A little Japanese man sat on the floor telling a story, trying to play a shamisen, terrible. 306 00:15:40,960 --> 00:15:46,540 So I sat in on the presentation given by the SANS instructor, and not only did I watch 307 00:15:46,540 --> 00:15:49,080 the presentation and enjoy the content and go, hey, that's a cool tool. 308 00:15:49,180 --> 00:15:50,440 I'm going to go and add it to my tool chain. 309 00:15:52,040 --> 00:15:53,420 I took note of how they spoke. 310 00:15:54,600 --> 00:15:56,540 I took note of the phrases they used. 311 00:15:56,580 --> 00:16:00,200 I took note of the way they would leave gaps or go on non sequiturs. 312 00:16:01,480 --> 00:16:10,840 And so when I sat in the gym that evening on a bike, I sat there crafting an email in 313 00:16:10,840 --> 00:16:11,160 my head. 314 00:16:13,120 --> 00:16:16,520 And when I got back to my hotel, I wrote an email that looked like it was from the 315 00:16:16,540 --> 00:16:17,220 SANS instructor. 316 00:16:17,220 --> 00:16:17,580 It was from his colleague. 317 00:16:17,920 --> 00:16:21,020 And as I said earlier, what makes an accurate email? 318 00:16:21,300 --> 00:16:23,600 Well, modern email programs do the heavy lifting for me. 319 00:16:24,160 --> 00:16:29,280 All these applications here add contact information to spoofed emails, so if you want to spoof 320 00:16:29,280 --> 00:16:33,960 the envelope, these applications will make it look much more legitimate for you. 321 00:16:35,340 --> 00:16:38,620 Like I say, they read it from the envelope, not the original SMTP mail from. 322 00:16:41,380 --> 00:16:44,540 Yeah, worth noting actually, a lot of these mail applications make it really difficult 323 00:16:44,540 --> 00:16:45,440 to view the source now. 324 00:16:45,440 --> 00:16:48,460 Well, not really difficult, they just hide it behind a few menus. 325 00:16:49,100 --> 00:16:53,220 Exchange, for example, well, Outlook and Exchange hid it behind a couple of menus and lots of 326 00:16:53,220 --> 00:16:54,380 people now ask where it is. 327 00:16:55,440 --> 00:16:58,040 Gmail, it's reasonably easy, you can do View Original. 328 00:17:00,220 --> 00:17:04,780 Office.com Outlook is actually quite difficult to find the menu item to give you the source. 329 00:17:05,120 --> 00:17:10,080 So it's hard to start, for normal people, it's hard to start looking at this information, 330 00:17:10,360 --> 00:17:12,180 especially if you're viewing it on a mobile as well. 331 00:17:12,300 --> 00:17:13,020 I mean, forget it. 332 00:17:14,220 --> 00:17:14,660 Yeah. 333 00:17:14,660 --> 00:17:15,000 Yeah. 334 00:17:15,440 --> 00:17:15,800 But I'll try. 335 00:17:15,800 --> 00:17:20,040 So when I deducted the email, I made it look like it was from his colleague. 336 00:17:20,220 --> 00:17:22,780 I wrote it to look like it was from his colleague. 337 00:17:22,900 --> 00:17:29,520 I spoofed the email address, but I was nearly sure it was their email address and it turns 338 00:17:29,520 --> 00:17:30,400 out I was right. 339 00:17:32,480 --> 00:17:34,060 Not always as it seemed. 340 00:17:34,200 --> 00:17:35,640 There's a third player in the room. 341 00:17:38,240 --> 00:17:41,160 So yeah, I forgot that was the last slide, my bad. 342 00:17:41,460 --> 00:17:44,960 But yeah, the next day I sent him this email. 343 00:17:45,020 --> 00:17:45,420 It was a fraud. 344 00:17:45,420 --> 00:17:49,360 I send it to him at, I think it's about half past 12 at night. 345 00:17:50,100 --> 00:17:50,780 We're in London. 346 00:17:50,820 --> 00:17:51,880 I know the pub's closed at 11. 347 00:17:52,280 --> 00:17:52,800 It's fine. 348 00:17:52,940 --> 00:17:54,540 I know that they're instructors and they're friends. 349 00:17:54,620 --> 00:17:55,300 They're going to be out drinking. 350 00:17:56,060 --> 00:17:58,720 So unless there's something else going on between them that I don't know about, 351 00:17:58,900 --> 00:18:00,580 I know they're probably not going to be together, 352 00:18:00,660 --> 00:18:01,980 and he might have had a couple of beers with him. 353 00:18:02,240 --> 00:18:04,860 So I send him an email at half past 12 at night. 354 00:18:06,820 --> 00:18:11,880 And I wake up the next day, check my account, open it up. 355 00:18:12,460 --> 00:18:14,680 My heart's racing, butterflies in my stomach. 356 00:18:15,520 --> 00:18:18,140 And there it is, the phrase that pays. 357 00:18:18,680 --> 00:18:20,160 Now, I'm not going to tell you the phrase that pays 358 00:18:20,160 --> 00:18:23,300 because I've spoken to other people who've won the CCF and it hasn't changed. 359 00:18:26,860 --> 00:18:30,340 So I had that, and I was like, well, I mean, I guess I could be right. 360 00:18:30,400 --> 00:18:31,980 He could be tricking me. 361 00:18:32,000 --> 00:18:32,340 He might know. 362 00:18:32,680 --> 00:18:36,920 So I basically ran all the way to my SANS course. 363 00:18:37,020 --> 00:18:39,980 I was skipping like a giddy schoolgirl. 364 00:18:40,060 --> 00:18:40,840 I was so excited. 365 00:18:41,980 --> 00:18:42,900 This was Wednesday. 366 00:18:43,940 --> 00:18:45,020 The CCF's on Saturday. 367 00:18:45,420 --> 00:18:48,260 I walked in, and he was talking to one of the SANS adjudicators. 368 00:18:48,280 --> 00:18:50,100 Now, these guys are taking the course, but they don't pay. 369 00:18:50,460 --> 00:18:53,960 They're there to field questions, help people, to be a T-boy. 370 00:18:55,160 --> 00:18:56,360 They wear a little apron. 371 00:18:56,620 --> 00:18:57,620 I think that's really cute. 372 00:18:58,980 --> 00:18:59,700 So I went in. 373 00:18:59,740 --> 00:19:02,420 He was talking to the SANS adjudicator. 374 00:19:02,580 --> 00:19:06,120 He's going, so last night, my colleague sent me an email, 375 00:19:06,220 --> 00:19:08,780 and apparently one of my students is trying to socially engineer them 376 00:19:09,160 --> 00:19:10,300 for the phrase that pays. 377 00:19:12,360 --> 00:19:13,120 And I had him. 378 00:19:13,220 --> 00:19:14,400 I knew I had him. 379 00:19:14,400 --> 00:19:16,760 And because he was so bought into this idea 380 00:19:17,840 --> 00:19:19,760 that they had sent him the email, 381 00:19:19,800 --> 00:19:22,780 it looked perfect that he was so bought in 382 00:19:22,780 --> 00:19:25,580 that he was telling a story of how one of his students 383 00:19:25,580 --> 00:19:28,340 had the balls to go and target another SANS instructor 384 00:19:29,340 --> 00:19:30,460 for the phrase that pays. 385 00:19:30,640 --> 00:19:31,980 So I just sidled up to him and just went, 386 00:19:33,420 --> 00:19:34,500 here's the phrase that pays. 387 00:19:35,200 --> 00:19:36,840 Oh, fuck you. 388 00:19:40,880 --> 00:19:41,980 And that was it. 389 00:19:42,060 --> 00:19:43,560 I confirmed knowledge. 390 00:19:44,400 --> 00:19:48,140 So at the end of the week, at the Saturday CTF, 391 00:19:50,020 --> 00:19:51,380 unfortunately, my team didn't win. 392 00:19:51,460 --> 00:19:53,420 We were about a minute behind the winners. 393 00:19:53,480 --> 00:19:54,660 We had both halves of the flag. 394 00:19:56,280 --> 00:19:58,440 We'd pop the vulnerable kernel on the Linux machine 395 00:19:58,440 --> 00:20:01,180 to get the second half, which is one of the more tricky bits. 396 00:20:01,760 --> 00:20:02,380 So there you go. 397 00:20:03,860 --> 00:20:05,420 We had both halves of the stream. 398 00:20:05,540 --> 00:20:08,200 All we had to do was put them together and decode it. 399 00:20:08,940 --> 00:20:10,160 As we were getting to that point, we were like, 400 00:20:10,200 --> 00:20:12,000 hey, what about that tool we learned about at the beginning of the week? 401 00:20:12,020 --> 00:20:12,340 That'd be great. 402 00:20:12,400 --> 00:20:12,800 Let's use that. 403 00:20:13,460 --> 00:20:14,200 Put them together. 404 00:20:14,400 --> 00:20:15,320 We'll make it one part of it. 405 00:20:15,420 --> 00:20:17,020 And then some guy went, we got it. 406 00:20:17,140 --> 00:20:18,520 I was like, ah, shit. 407 00:20:18,800 --> 00:20:20,060 Because I'd like to have won, right? 408 00:20:20,640 --> 00:20:21,940 I was still in the same competition. 409 00:20:22,140 --> 00:20:25,180 I knew the winning answer, but we were all in the same competition. 410 00:20:27,040 --> 00:20:28,660 So Kevin was like, congratulations. 411 00:20:28,900 --> 00:20:29,460 How'd you do it? 412 00:20:29,860 --> 00:20:30,620 Let's go through it. 413 00:20:30,780 --> 00:20:32,080 And they gave all their details. 414 00:20:32,380 --> 00:20:33,220 And I'm like, yeah, we did that. 415 00:20:33,340 --> 00:20:33,780 We did that. 416 00:20:34,280 --> 00:20:35,520 Oh, yeah, we found that. 417 00:20:35,600 --> 00:20:36,380 Yeah, that's great. 418 00:20:36,820 --> 00:20:37,380 Well done. 419 00:20:38,060 --> 00:20:38,820 Okay, okay. 420 00:20:39,020 --> 00:20:41,160 I'm not going to ask you for the phrase that pays. 421 00:20:41,860 --> 00:20:42,880 I'm going to ask you. 422 00:20:44,880 --> 00:20:47,320 And he made me stand up in front of everyone and explain myself 423 00:20:47,780 --> 00:20:49,840 and how I got the phrase that pays. 424 00:20:50,500 --> 00:20:53,760 And that is how you walk away from a SANS 504 CTF, 425 00:20:54,580 --> 00:21:01,220 capture the flag with a coin without winning the SANS 504 CTF. 426 00:21:02,260 --> 00:21:03,400 Does anyone got any questions? 427 00:21:04,260 --> 00:21:05,140 Thank you.