1 00:00:00,000 --> 00:00:00,780 All right. 2 00:00:00,780 --> 00:00:05,560 You may have heard of mainframe pen testing and exploitation. 3 00:00:05,980 --> 00:00:07,520 Mainly from our next speaker. 4 00:00:08,260 --> 00:00:11,720 DEF CON, please give a welcome to the soldier of Fortran. 5 00:00:14,520 --> 00:00:15,400 Wow. 6 00:00:15,540 --> 00:00:16,400 That was awesome. 7 00:00:16,400 --> 00:00:17,520 The other room cheered for me. 8 00:00:17,520 --> 00:00:18,360 That was great. 9 00:00:19,320 --> 00:00:20,220 Morning, everybody. 10 00:00:20,220 --> 00:00:23,600 I really appreciate you all coming to a Sunday morning talk at DEF CON. 11 00:00:23,780 --> 00:00:25,360 Front row, I'm going to need your help. 12 00:00:25,360 --> 00:00:27,200 I can't see anybody else. 13 00:00:27,520 --> 00:00:31,700 And if my hand starts to drop and you can't hear me anymore, can you guys just be like, hey. 14 00:00:32,180 --> 00:00:32,620 Thank you. 15 00:00:32,620 --> 00:00:33,940 Thank you so much. 16 00:00:34,040 --> 00:00:34,700 All right. 17 00:00:34,700 --> 00:00:38,600 So for those who don't know, my name is Phil Young. 18 00:00:38,600 --> 00:00:42,100 I'm the director of ‑‑ I'm just waiting for them to calm down. 19 00:00:42,100 --> 00:00:43,580 I don't know what's going on over there. 20 00:00:44,520 --> 00:00:47,400 So I'm the director of mainframe pen testing at NetSpy. 21 00:00:47,620 --> 00:00:51,160 You might also know me by my other name, soldier of Fortran. 22 00:00:51,480 --> 00:00:55,700 I was a mainframe hacker, like a 90s hacker kid. 23 00:00:55,940 --> 00:01:00,860 I was a mainframe security enthusiast before I started doing this professionally. 24 00:01:01,460 --> 00:01:04,680 I'm a terrible karaoke singer. 25 00:01:05,340 --> 00:01:10,680 And just so folks know, I always felt like an outsider, even in this community. 26 00:01:10,680 --> 00:01:15,400 This is my third time speaking at DEF CON, and I still sometimes feel like an outsider. 27 00:01:15,400 --> 00:01:18,640 So if you feel like that, don't ‑‑ everybody feels like that. 28 00:01:18,720 --> 00:01:23,340 I've been doing professional mainframe pen testing for about ten years. 29 00:01:24,020 --> 00:01:26,740 This was supposed to be a co‑talk. 30 00:01:27,500 --> 00:01:30,540 But unfortunately, my co‑speaker is no longer with us. 31 00:01:31,460 --> 00:01:34,980 He had to go home to take care of his kid going to college. 32 00:01:34,980 --> 00:01:36,280 So he's not here. 33 00:01:38,080 --> 00:01:40,420 So ‑‑ but still going to talk about him. 34 00:01:40,420 --> 00:01:42,280 So he was a 90s hacker kid. 35 00:01:42,760 --> 00:01:44,480 He was also a mainframe security enthusiast. 36 00:01:44,480 --> 00:01:45,680 He loves show tunes. 37 00:01:45,680 --> 00:01:47,360 He's really good at reverse engineering things. 38 00:01:47,360 --> 00:01:50,360 Probably the best reverse engineer I know, especially when it comes to mainframes. 39 00:01:50,940 --> 00:01:52,120 Dude's a freaking genius. 40 00:01:52,600 --> 00:01:55,520 He's also been testing mainframes for ten years. 41 00:01:55,600 --> 00:02:00,200 Now, there's a third person in this photo who we didn't invite. 42 00:02:00,260 --> 00:02:04,620 But he's the OG mainframe hacker. 43 00:02:04,880 --> 00:02:07,820 And we want to make sure we shine a light on him as well. 44 00:02:08,100 --> 00:02:16,740 Before Chad and I came along, he was, like, the only mainframe hacker who was publicly talking about how to do, like, mainframe pen testing. 45 00:02:17,020 --> 00:02:17,360 Right? 46 00:02:17,360 --> 00:02:19,460 At mainframe conferences, not places like DEF CON. 47 00:02:19,460 --> 00:02:21,300 We're trying to get him to come to DEF CON for years. 48 00:02:21,560 --> 00:02:26,460 But I want to make sure we talked about him because he is the OG for mainframe hacking. 49 00:02:26,960 --> 00:02:32,900 Now, since Chad and I have been friends for the better part of ten years, I need help with my code. 50 00:02:32,900 --> 00:02:35,240 I'm a great coder, especially when it comes to assembly. 51 00:02:35,460 --> 00:02:43,600 And so I will oftentimes send my code to Chad so that he can help review the code because it doesn't work. 52 00:02:43,900 --> 00:02:44,420 Right? 53 00:02:44,580 --> 00:02:50,080 And every time I send him a piece of code, he puts me on blast on Twitter first. 54 00:02:50,380 --> 00:02:52,300 Then he fixes it. 55 00:02:52,740 --> 00:03:00,960 Speaking of Chad, since Chad couldn't be here, what I did was I told him, hey, send me, like, 10 to 15 photos of yourself. 56 00:03:01,540 --> 00:03:03,740 Not telling him what they're going to be for. 57 00:03:04,140 --> 00:03:10,480 And then I said, hey, I want you to give me quotes that I will put in the talk. 58 00:03:10,580 --> 00:03:12,020 So remember this slide. 59 00:03:12,100 --> 00:03:13,160 Look at the bottom. 60 00:03:13,160 --> 00:03:14,460 Yes, I did write that. 61 00:03:14,460 --> 00:03:15,820 I hope it's enough. 62 00:03:16,300 --> 00:03:16,800 Okay? 63 00:03:17,040 --> 00:03:27,980 Now, when I sent Chad the deck and I said, hey, I want you to put inspirational quotes or technical quotes, but I mistakenly told him, I will read off whatever you put verbatim. 64 00:03:28,860 --> 00:03:33,820 So the first thing he sends me with respect to this slide is he said, it was not enough. 65 00:03:34,180 --> 00:03:35,180 So thanks, Chad. 66 00:03:35,180 --> 00:03:36,340 I appreciate you. 67 00:03:36,800 --> 00:03:37,600 This is not so bad. 68 00:03:37,600 --> 00:03:40,580 I can actually see a bunch more of you than I thought. 69 00:03:40,580 --> 00:03:42,240 So we're going to try this out. 70 00:03:42,480 --> 00:03:49,320 Who here can tell me where the main frame is in this picture? 71 00:03:51,700 --> 00:03:52,480 Don't be shy. 72 00:03:52,480 --> 00:03:53,580 You can just yell it out. 73 00:03:55,360 --> 00:03:58,040 The system... someone said system in the back. 74 00:03:58,040 --> 00:03:59,820 Can you be a little more specific? 75 00:04:03,620 --> 00:04:04,440 Where the tapes are. 76 00:04:04,440 --> 00:04:04,920 No. 77 00:04:07,220 --> 00:04:08,220 This guy put his hand up. 78 00:04:08,220 --> 00:04:08,700 Yes. 79 00:04:12,010 --> 00:04:16,190 The red box in the corner that says 360 on it, that's the main frame. 80 00:04:16,190 --> 00:04:18,110 That is the main frame. 81 00:04:18,110 --> 00:04:23,290 The reason it's called a main frame is because it holds all the CPUs and memory. 82 00:04:23,450 --> 00:04:30,730 It is the main frame, that's where the word comes from, where you host all the CPU, all that stuff. 83 00:04:30,730 --> 00:04:32,650 The rest of this is just IO. 84 00:04:32,890 --> 00:04:38,330 You've got your terminal, you've got your card reader, you've got a dude pressing buttons for some reason. 85 00:04:38,950 --> 00:04:41,450 But everything in that one thing, that's the main frame. 86 00:04:41,450 --> 00:04:46,750 Now, today, in a modern data center, this is what the main frame looks like. 87 00:04:46,790 --> 00:04:48,210 It's exactly the same. 88 00:04:48,210 --> 00:04:53,090 The only difference is, this is the main frame. 89 00:04:53,510 --> 00:05:06,830 And now this one box, I promise you right now, there is a box exactly like this in some bank or some airline's data center, and it is processing thousands of transactions a minute right now. 90 00:05:06,830 --> 00:05:11,930 And it's doing it flawlessly, and it's the workhorse of the enterprise. 91 00:05:12,570 --> 00:05:15,910 And lots of enterprises still rely on this platform. 92 00:05:15,910 --> 00:05:25,650 You have no idea how many articles come out, main frame's dead, main frame's going away, this company's moving off the main frame, this other company's moving off the main frame. 93 00:05:25,650 --> 00:05:32,970 There's so many announcements, this company's moving off the main frame, there's never announcements, we successfully moved off the main frame. 94 00:05:33,190 --> 00:05:34,610 They never do. 95 00:05:34,850 --> 00:05:38,550 Some CIO comes in, starts the process, they got about halfway, and that CIO quits. 96 00:05:38,670 --> 00:05:40,190 That's usually the steps. 97 00:05:40,310 --> 00:05:43,750 But so many companies rely on this platform today. 98 00:05:44,210 --> 00:05:46,430 You've got airlines rely on it. 99 00:05:46,430 --> 00:05:50,370 I mean, if you flew on any of the major airlines, a main frame was processing your transactions. 100 00:05:50,530 --> 00:05:56,050 Every time you use your credit card or debit card, main frames are involved in some capacity. 101 00:05:56,410 --> 00:06:01,950 Auto manufacturers, obviously banks, but even companies like UPS use main frames. 102 00:06:02,230 --> 00:06:08,790 If it's older than, say, like, it's like a 50 year old plus company, guaranteed they're using a main frame. 103 00:06:09,090 --> 00:06:18,070 Before we get too far into the talk, I need to talk about some terminology that's important for you all. 104 00:06:18,450 --> 00:06:23,830 So, you know, RACF is what's called an external security manager. 105 00:06:23,830 --> 00:06:26,310 So there's actually three of them. 106 00:06:26,410 --> 00:06:28,890 RACF, top secret, and ACF2. 107 00:06:29,010 --> 00:06:35,210 Now, it's called external security manager even though it runs on the main frame as part of the operating system. 108 00:06:35,590 --> 00:06:40,290 But think of it like Active Directory if you could replace Active Directory with something else. 109 00:06:40,350 --> 00:06:40,550 Right? 110 00:06:40,550 --> 00:06:41,830 Better or worse. 111 00:06:41,850 --> 00:06:43,630 It's the same concept, right? 112 00:06:43,630 --> 00:06:48,550 So the reason is the operating system itself doesn't really care. 113 00:06:48,550 --> 00:06:51,450 It just asks what's called the SAF router. 114 00:06:51,450 --> 00:06:52,570 And it says, hey, is this okay? 115 00:06:52,570 --> 00:06:54,570 And the router knows which product to route it to. 116 00:06:54,570 --> 00:06:56,550 You can only run one at a time. 117 00:06:56,690 --> 00:06:58,030 So that's RACF. 118 00:06:58,070 --> 00:07:02,970 Now, RACF controls sort of all the security permissions on the main frame. 119 00:07:03,630 --> 00:07:08,570 In RACF, there are user attributes called special and operations. 120 00:07:08,870 --> 00:07:19,930 Special and operations allows you to edit any file, to change any file, to give yourself whatever permissions you want in the RACF. 121 00:07:19,930 --> 00:07:24,970 If you have system special but not operations, you can give yourself operations. 122 00:07:25,390 --> 00:07:25,870 Right? 123 00:07:25,870 --> 00:07:32,030 If you have operations but not special, you can download the RACF database and crack all the passwords. 124 00:07:32,030 --> 00:07:32,270 Right? 125 00:07:32,270 --> 00:07:36,150 So either or gives you complete control over the system. 126 00:07:36,190 --> 00:07:47,930 APF libraries are ‑‑ imagine if you had a folder where you could put set UID ‑‑ any program you put in there was automatically set UID. 127 00:07:48,190 --> 00:07:54,350 Very similar concept, but you can get into essentially ring zero so long as you put your binaries in there. 128 00:07:54,350 --> 00:07:56,970 That is the control that mainframes use. 129 00:07:57,090 --> 00:08:05,150 Basically, when you put a program in that folder, it is allowed to run in a supervisor state with the CPU. 130 00:08:05,150 --> 00:08:06,230 That's what it means . 131 00:08:06,230 --> 00:08:08,670 That's how they control how programs can run. 132 00:08:08,970 --> 00:08:12,890 Key zero is ‑‑ this is all terminology you know. 133 00:08:12,890 --> 00:08:17,850 Key zero is the ‑‑ every page of memory has a key. 134 00:08:18,350 --> 00:08:26,350 Key zero, if your process is running in key zero, you can edit any page of memory you want. 135 00:08:26,450 --> 00:08:29,710 Otherwise, the only other time that works is if your keys match. 136 00:08:29,710 --> 00:08:29,850 Right? 137 00:08:29,850 --> 00:08:35,070 So if I'm in key eight and the memory space is in key eight, then I'm allowed to edit that region of memory. 138 00:08:35,070 --> 00:08:36,430 But if not, I can't. 139 00:08:37,390 --> 00:08:44,630 Now, we would like to think that, you know , there are myths about mainframes, right? 140 00:08:44,630 --> 00:08:53,030 But when it comes to these myths, this is a slide that Chad gave a talk on ten years ago. 141 00:08:53,450 --> 00:08:57,390 And even today, we keep hearing about these myths. 142 00:08:57,390 --> 00:08:57,570 Right? 143 00:08:57,570 --> 00:08:58,870 It is crazy. 144 00:09:00,010 --> 00:09:00,250 Okay. 145 00:09:00,250 --> 00:09:04,970 So there's really four main attack paths on the mainframe. 146 00:09:05,150 --> 00:09:08,410 You get your network attacks, right? 147 00:09:09,170 --> 00:09:10,950 Normal network type attacks, right? 148 00:09:10,950 --> 00:09:12,650 Nmap works fine, all these things. 149 00:09:12,650 --> 00:09:14,830 On top of that, though, we have SNA networks. 150 00:09:14,830 --> 00:09:18,590 That's a completely different type of network that runs. 151 00:09:19,090 --> 00:09:20,870 We have the file system, right? 152 00:09:20,870 --> 00:09:27,810 You would be surprised sometimes on pen test, I go in and I see ‑‑ I have, like, write access to 30,000 data sets. 153 00:09:28,190 --> 00:09:33,450 Or read access to, like, sensitive company information, like, 110,000 data sets. 154 00:09:33,450 --> 00:09:34,530 It is crazy. 155 00:09:35,190 --> 00:09:36,450 External security manager. 156 00:09:36,450 --> 00:09:37,590 That's the other attack path. 157 00:09:37,590 --> 00:09:41,250 That's where we go in and we look at, oh, do I have access to this? 158 00:09:41,250 --> 00:09:41,970 Do I have access to that? 159 00:09:41,970 --> 00:09:48,070 And in fact, some of the things we're going to talk about today are because of misconfigurations in the external security manager. 160 00:09:48,390 --> 00:09:52,690 And lastly, what this bulk of this talk is about is ZOS Unix. 161 00:09:53,110 --> 00:10:06,910 And the reason we want to talk ‑‑ we wanted to talk about ZOS Unix was because we really ‑‑ we used to joke that, like, Unix was the gateway drug to mainframe hacking because it's so familiar, right? 162 00:10:06,910 --> 00:10:10,790 It is such a familiar thing to you, especially if you use Linux. 163 00:10:10,790 --> 00:10:12,870 In fact, I have a pretty good view of the audience. 164 00:10:12,870 --> 00:10:15,590 Can I have a show of hands who's familiar with Linux? 165 00:10:16,070 --> 00:10:16,510 Right? 166 00:10:16,510 --> 00:10:18,030 Like, most of the audience, right? 167 00:10:18,030 --> 00:10:19,050 So that's good. 168 00:10:19,090 --> 00:10:23,130 Because it's very similar, but also a little bit different. 169 00:10:23,210 --> 00:10:23,870 Right? 170 00:10:24,510 --> 00:10:26,990 So it's based on system V, right? 171 00:10:26,990 --> 00:10:28,110 Or system V. 172 00:10:28,650 --> 00:10:34,030 And it really didn't get built out until mid‑90s, right? 173 00:10:34,030 --> 00:10:38,090 So the IBM operating system is called ZOS, right? 174 00:10:38,090 --> 00:10:39,550 So it runs ZOS. 175 00:10:39,550 --> 00:10:42,430 And inside ZOS, you run Linux. 176 00:10:42,430 --> 00:10:43,970 Or you run Unix, sorry. 177 00:10:44,750 --> 00:10:46,610 It was developed in 1994. 178 00:10:46,790 --> 00:10:49,230 It wasn't really a core part of the operating system. 179 00:10:49,230 --> 00:10:54,190 It was based on, those kind of things. 180 00:10:54,550 --> 00:11:00,950 And in 96, it obtained POSIX compliant, and it took over running TCPIP for ZOS. 181 00:11:00,950 --> 00:11:03,430 Prior to that, it was all jobs and stuff. 182 00:11:03,430 --> 00:11:08,470 But instead, they just built the TCPIP implementation on Unix. 183 00:11:08,490 --> 00:11:12,930 They rebranded it in 98 to Unix system services. 184 00:11:13,210 --> 00:11:15,490 And it continued to grow a little bit more. 185 00:11:15,530 --> 00:11:20,370 And then today, they rebranded it again to ZOS Unix. 186 00:11:20,430 --> 00:11:23,330 And for those curious, Linux was released in 91. 187 00:11:23,410 --> 00:11:25,210 So just a little timeline. 188 00:11:25,530 --> 00:11:29,430 Now, when it comes to Unix, again, it's like Linux. 189 00:11:29,470 --> 00:11:31,030 It's a little bit different. 190 00:11:31,210 --> 00:11:33,010 You only get two shells. 191 00:11:33,450 --> 00:11:35,350 BINSH, which sucks. 192 00:11:36,030 --> 00:11:37,930 BINTCSH, which sucks a little less. 193 00:11:37,930 --> 00:11:39,310 They're both not great. 194 00:11:39,630 --> 00:11:41,370 But that's all we get. 195 00:11:43,330 --> 00:11:44,490 Everyone here knows Linux. 196 00:11:44,490 --> 00:11:48,230 I'm not gonna explain how file systems work in POSIX environments. 197 00:11:48,310 --> 00:11:50,470 You get file permissions, right? 198 00:11:50,470 --> 00:11:51,410 Regular file permissions. 199 00:11:51,410 --> 00:11:52,910 But here's where it gets a little funky. 200 00:11:53,470 --> 00:11:58,870 You can also have other permissions that you put into your ESM, right? 201 00:11:58,870 --> 00:11:59,710 Like RACF. 202 00:12:00,070 --> 00:12:05,290 So you can have, say, I have read access to this file according to the file system. 203 00:12:05,290 --> 00:12:07,550 But when I try to read it, RACF says no. 204 00:12:07,650 --> 00:12:09,630 That folder is only for admins. 205 00:12:09,970 --> 00:12:10,610 Right? 206 00:12:10,690 --> 00:12:14,790 Where that gets challenging is sometimes you can mix those up and not do a great job. 207 00:12:15,950 --> 00:12:17,370 You access the Unix environment. 208 00:12:17,370 --> 00:12:19,450 There's a whole bunch of ways to access the Unix environment. 209 00:12:19,750 --> 00:12:24,130 You access it through the OMVS command in TSO. 210 00:12:24,250 --> 00:12:27,890 So there's other talks about hacking in TSO. 211 00:12:27,890 --> 00:12:30,590 But you just type OMVS and you get a Unix prompt. 212 00:12:31,570 --> 00:12:34,590 SSH sessions, which is what we're gonna use for this talk, right? 213 00:12:34,590 --> 00:12:39,370 Because we're trying to demonstrate how you can do all of this in Unix. 214 00:12:39,790 --> 00:12:48,290 Or you can use JCL, you can use BPX bash, you can use REC scripts, you can call it from C programs. 215 00:12:48,290 --> 00:12:49,270 There's all kinds of things you can do. 216 00:12:49,270 --> 00:12:50,730 Assembly programs. 217 00:12:50,870 --> 00:12:50,930 Right? 218 00:12:50,930 --> 00:12:57,490 I know Chad wrote a module for Metasploit that spawns a Unix shell using assembly. 219 00:12:57,490 --> 00:12:59,490 So you can call it all kinds of ways. 220 00:12:59,490 --> 00:13:07,470 What's interesting is you can also access datasets from within Unix using this super funky command, right? 221 00:13:07,470 --> 00:13:15,570 So you do, like, slash slash, then the name of the dataset you want to interact with, and then you pipe it to... that's where you're copying it to. 222 00:13:15,790 --> 00:13:18,930 It's frustrating because only a handful of commands support it, and it's not clear. 223 00:13:18,930 --> 00:13:21,230 So, like, I know copy works. 224 00:13:21,390 --> 00:13:25,510 I know cat works, because a client I was on wouldn't let you copy a dataset. 225 00:13:25,670 --> 00:13:29,290 So I just catted it and piped it out, like, redirected the output. 226 00:13:30,090 --> 00:13:32,710 Grep does not support it for some reason. 227 00:13:32,710 --> 00:13:35,890 So it just sort of, like, depends on what IBM wanted to do. 228 00:13:37,050 --> 00:13:41,430 Now, again, if you're familiar with Linux, this should all be very familiar. 229 00:13:41,790 --> 00:13:42,230 Right? 230 00:13:42,810 --> 00:13:44,530 It's close enough. 231 00:13:44,810 --> 00:13:44,970 Right? 232 00:13:44,970 --> 00:13:47,790 You've got normal commands. 233 00:13:47,790 --> 00:13:49,550 You've got your normal stuff going on here. 234 00:13:49,550 --> 00:13:50,930 You can cat files. 235 00:13:51,290 --> 00:13:57,270 The fact that it's positive compliant means you can do all the normal things you can do in a Unix environment. 236 00:13:57,350 --> 00:13:57,930 Right? 237 00:13:57,930 --> 00:14:02,250 It's not some crazy thing going on. 238 00:14:03,130 --> 00:14:03,790 Okay. 239 00:14:03,790 --> 00:14:06,490 So here's the next Chad quote. 240 00:14:07,890 --> 00:14:09,810 I can see it on my screen here. 241 00:14:09,810 --> 00:14:10,130 I don't... 242 00:14:11,210 --> 00:14:13,230 Ask me about Vegas fill. 243 00:14:13,690 --> 00:14:14,390 That's it. 244 00:14:14,390 --> 00:14:16,270 So I'm not going to leave time for questions, just so you know. 245 00:14:16,270 --> 00:14:18,130 So don't... so good luck. 246 00:14:18,270 --> 00:14:18,910 All right. 247 00:14:19,530 --> 00:14:27,110 When we made this talk, you know, we wanted it to sort of walk you through step by step how we do a pen test. 248 00:14:27,110 --> 00:14:27,470 Right? 249 00:14:27,570 --> 00:14:32,990 Because there's lots of tools and stuff that exist now that we didn't have, like, ten years ago. 250 00:14:33,350 --> 00:14:36,190 And it's important to understand how we start... 251 00:14:36,190 --> 00:14:38,890 Jumping in straight to the end sucks. 252 00:14:39,550 --> 00:14:42,750 So there's a whole bunch of tools that exist today. 253 00:14:43,250 --> 00:14:46,490 These didn't exist ten years ago because Chad and I wrote them. 254 00:14:46,630 --> 00:14:48,990 So you have a tool called enum. 255 00:14:48,990 --> 00:14:50,390 That's a Rex script. 256 00:14:50,670 --> 00:14:53,950 So for those who don't know, Rex is a scripting language. 257 00:14:54,370 --> 00:14:54,670 If you... 258 00:14:54,670 --> 00:14:55,290 Actually, quick question. 259 00:14:55,290 --> 00:14:57,090 Who here ever used an Amiga? 260 00:14:58,170 --> 00:14:58,970 Yeah! 261 00:14:59,270 --> 00:15:00,750 That's way more than I thought. 262 00:15:00,750 --> 00:15:02,470 Amiga came with Rex. 263 00:15:02,910 --> 00:15:04,950 Rex is a scripting language. 264 00:15:04,950 --> 00:15:08,110 It was created by IBM as a 10% project. 265 00:15:08,110 --> 00:15:11,730 But anyways, Rex runs in Unix natively. 266 00:15:11,850 --> 00:15:14,490 And so we write a bunch of our scripts in Rex. 267 00:15:14,710 --> 00:15:18,770 We also have another script called OVS enum. 268 00:15:18,930 --> 00:15:21,890 And that script is based on Linium. 269 00:15:21,890 --> 00:15:23,270 I'll get into that script in a bit . 270 00:15:23,270 --> 00:15:27,270 We also have a couple of Java tools called File Traversal and Zoss Hog. 271 00:15:27,270 --> 00:15:29,970 Those allow us to map out the file system. 272 00:15:29,970 --> 00:15:31,210 Do we have read access? 273 00:15:31,210 --> 00:15:32,970 Are there passwords in them? 274 00:15:33,290 --> 00:15:37,970 And then we have another tool called Port Scan, which we'll talk about when we get to egress. 275 00:15:38,610 --> 00:15:42,310 All of this is freely available on my GitHub. 276 00:15:42,410 --> 00:15:47,350 So if you wanted to test them out or play with them, they're freely available. 277 00:15:47,670 --> 00:15:48,230 Right? 278 00:15:49,310 --> 00:15:53,970 And if you have a keen eye, you may have saw there was a file called all.jcl. 279 00:15:55,650 --> 00:16:01,210 Getting things onto the mainframe during a pentest can be very challenging sometimes. 280 00:16:02,310 --> 00:16:04,170 If you have to upload one file, it's a pain. 281 00:16:04,170 --> 00:16:06,510 If you have to upload multiple files, it's a bigger pain. 282 00:16:06,530 --> 00:16:09,750 Companies, for some reason, try to limit your ability to upload. 283 00:16:09,910 --> 00:16:11,390 There's always a way around it. 284 00:16:11,390 --> 00:16:11,450 Right? 285 00:16:11,450 --> 00:16:12,810 There's always a way around it. 286 00:16:12,810 --> 00:16:19,190 So what we do is we package everything up, all of those scripts into one JCL, and then it just runs by itself. 287 00:16:19,570 --> 00:16:20,950 It adds all those programs. 288 00:16:20,950 --> 00:16:24,510 Now, how do we get it to the mainframe? 289 00:16:25,010 --> 00:16:26,910 You can just use SCP. 290 00:16:27,570 --> 00:16:33,490 Problem is, SCP only supports binary file transfer. 291 00:16:34,750 --> 00:16:36,810 And I'm sure as you're reading the slide, you're kind of seeing why. 292 00:16:36,810 --> 00:16:39,170 Does anybody want to guess why that's a problem? 293 00:16:40,690 --> 00:16:40,950 Okay. 294 00:16:40,950 --> 00:16:41,110 Yes. 295 00:16:41,110 --> 00:16:41,510 A hand up. 296 00:16:41,510 --> 00:16:45,630 You don't have to yell because there's like... yes, character encoding. 297 00:16:45,630 --> 00:16:49,990 So code pages are files written in ASCII or UTF-8. 298 00:16:50,510 --> 00:16:52,470 The mainframe speaks EBCDIC. 299 00:16:52,750 --> 00:16:54,830 So we have to convert it to EBCDIC. 300 00:16:55,070 --> 00:16:57,810 So that's what we do, and then we upload it, and it's all good. 301 00:16:58,190 --> 00:17:05,330 For the purposes of this talk, whenever you see the blue prompt, that's when we're in Linux. 302 00:17:05,330 --> 00:17:06,950 So we're doing something to prep. 303 00:17:06,950 --> 00:17:08,110 That's our staging. 304 00:17:08,670 --> 00:17:13,010 If you see this prompt, that means we're on the mainframe. 305 00:17:13,010 --> 00:17:13,570 Okay? 306 00:17:13,810 --> 00:17:15,590 Now, let's take a look at enum. 307 00:17:15,590 --> 00:17:17,270 So this is that enum rec script. 308 00:17:17,470 --> 00:17:21,710 So what this script does is it pulls information from memory. 309 00:17:21,790 --> 00:17:28,570 So it does a really good job of accessing things from memory, because we have read access to a lot of memory space. 310 00:17:28,570 --> 00:17:34,530 And it dumps information out about the operating system, about the current running environment. 311 00:17:34,850 --> 00:17:36,930 And it's been built... like, it wasn't just me. 312 00:17:36,930 --> 00:17:40,510 There's other people that helped JTAY and other people who have helped build this. 313 00:17:40,990 --> 00:17:43,870 Some things in memory are not documented. 314 00:17:44,150 --> 00:17:46,330 And so we sort of reverse engineer those. 315 00:17:46,330 --> 00:17:50,390 And what's interesting about this program is sometimes you're limited. 316 00:17:50,390 --> 00:17:52,750 You can't list these things. 317 00:17:52,750 --> 00:17:54,990 But it exists in memory if you know where to look. 318 00:17:54,990 --> 00:17:56,050 So that's what this rec script does. 319 00:17:56,050 --> 00:17:59,050 I use it on every single pentest. 320 00:17:59,250 --> 00:18:04,030 The next script we have is based on linenum. 321 00:18:04,270 --> 00:18:05,050 Okay? 322 00:18:05,050 --> 00:18:07,530 But I had to rewrite it for TCSH. 323 00:18:07,690 --> 00:18:13,550 And then what we did is we added a whole bunch of mainframey type stuff to it. 324 00:18:13,750 --> 00:18:15,930 So you'll see us running it here in a second. 325 00:18:16,290 --> 00:18:20,570 And if you're wondering why it's going to be on VS said here, you can come talk to me after. 326 00:18:20,930 --> 00:18:22,130 But we're going to run it. 327 00:18:22,150 --> 00:18:23,890 We're going to tell it to send it to a report. 328 00:18:23,890 --> 00:18:28,150 And what's going to happen is it's going to go through and dump all kinds of information, right? 329 00:18:28,150 --> 00:18:29,910 And you'll see some more mainframey stuff. 330 00:18:29,910 --> 00:18:35,670 So the stuff that's going to be in all caps here in a second, that's a list user command from RACF, right? 331 00:18:35,670 --> 00:18:37,110 So it dumps all kinds of information. 332 00:18:37,110 --> 00:18:38,830 And then we comb through it later. 333 00:18:39,670 --> 00:18:42,470 The other thing we always test for is egress busting. 334 00:18:42,650 --> 00:18:53,190 You would be surprised how often we're able to go directly from the mainframe behind, like, I have to go through, like, two VPNs sometimes to even touch the mainframe. 335 00:18:53,970 --> 00:18:58,730 But we're able to go from the mainframe directly to AWS or some other cloud provider, right? 336 00:18:58,730 --> 00:19:01,310 It is crazy how often that works. 337 00:19:01,530 --> 00:19:05,110 And so, in fact, one of my clients, we did the test. 338 00:19:05,190 --> 00:19:11,810 I wrote it up saying, hey, you have, like, thousands of ports, like, are allowed to no egress filtering out to this AWS host. 339 00:19:11,910 --> 00:19:16,590 And they go, we haven't used that ISP for ten years. 340 00:19:16,630 --> 00:19:19,210 We have no idea how this is routing, right? 341 00:19:19,210 --> 00:19:21,890 So anyway, it's not really that hard. 342 00:19:21,890 --> 00:19:23,490 We use a Java program. 343 00:19:23,490 --> 00:19:27,450 The reason it's in Java is most mainframes come with Java, right? 344 00:19:27,450 --> 00:19:28,570 By default. 345 00:19:28,690 --> 00:19:32,170 Also, it allows us to control the time out of the packets. 346 00:19:32,510 --> 00:19:35,130 And then we just do a port scan, essentially a SYN scan. 347 00:19:35,170 --> 00:19:40,250 And then on the Linux box, we run a tool called egress tester, which is a fork of egress buster. 348 00:19:40,530 --> 00:19:42,070 And you can see all the open ports. 349 00:19:43,450 --> 00:19:43,790 Okay. 350 00:19:43,790 --> 00:19:45,250 Next picture of Chad. 351 00:19:47,070 --> 00:19:51,830 He wanted me to say that I sent him this hat after I told him after he told me he bought a boat. 352 00:19:51,830 --> 00:19:52,770 That's a true story, actually. 353 00:19:52,770 --> 00:19:54,710 He bought a boat and I was like, you know what he needs? 354 00:19:54,970 --> 00:19:56,530 Is a dumb hat with hair. 355 00:19:56,530 --> 00:19:58,010 Because he does not have hair. 356 00:19:58,710 --> 00:19:59,050 Okay. 357 00:19:59,050 --> 00:20:00,150 Let's talk about some analysis. 358 00:20:00,150 --> 00:20:03,490 Now that we've done the enumeration, we've gone through the enumeration. 359 00:20:03,490 --> 00:20:05,130 Let's look at some of the output. 360 00:20:05,250 --> 00:20:07,850 This is from enum.rex, okay? 361 00:20:07,850 --> 00:20:18,110 And the important bits that we pull out of that are the location of the RACF datasets and the fact that and what hashing algorithm they're using. 362 00:20:18,190 --> 00:20:18,530 Okay? 363 00:20:18,590 --> 00:20:24,810 RACF uses either DES for the hashing algorithm or KDF AES. 364 00:20:25,250 --> 00:20:30,530 John the Ripper and Hashcat both support cracking RACF databases. 365 00:20:30,550 --> 00:20:38,210 And if you have read access to either of those two datasets, it's trivial, especially since we know that KDF AES encryption is not enabled. 366 00:20:38,450 --> 00:20:42,470 It's trivial for us to crack every single password in that database. 367 00:20:42,610 --> 00:20:52,810 I think Chad was telling me a story where he downloaded the database, cracked it, and maybe in an afternoon, like two, three hours, had every single password for every single user. 368 00:20:52,930 --> 00:20:56,730 So if you do run a main frame, please make sure you turn on KDF AES. 369 00:20:57,490 --> 00:21:02,230 Now, when we look at the output, we see there's a bunch of stuff here, right? 370 00:21:02,990 --> 00:21:05,270 We can suit a route without a password. 371 00:21:05,790 --> 00:21:07,990 And we'll talk about that in detail. 372 00:21:08,390 --> 00:21:13,210 Files that should not be world readable, like someone obviously CH modded some stuff 777. 373 00:21:14,090 --> 00:21:18,010 We can mount datasets, right? 374 00:21:18,010 --> 00:21:23,050 Which you can normally do, but this one gives us more access than we should have. 375 00:21:23,050 --> 00:21:27,570 And this last one is we can issue the EXT ATTR plus A command. 376 00:21:28,670 --> 00:21:33,190 Now, the other tool we ran that gave some interesting output was ZossHog. 377 00:21:33,250 --> 00:21:40,690 ZossHog is based on TruffleHog, and it uses Regex to find secrets inside files in Unix. 378 00:21:40,690 --> 00:21:43,370 And when we ran it, obviously we found a password. 379 00:21:44,830 --> 00:21:45,230 All right. 380 00:21:45,230 --> 00:21:46,490 Here's the next one. 381 00:21:46,490 --> 00:21:47,850 God, I hate this one. 382 00:21:50,560 --> 00:21:54,140 Ask Phil to pronounce Java and then wiki. 383 00:21:55,160 --> 00:21:56,440 Java wiki. 384 00:21:57,480 --> 00:21:59,320 I don't think I say it incorrectly. 385 00:22:00,080 --> 00:22:00,340 All right. 386 00:22:00,340 --> 00:22:01,520 Next is privilege escalation. 387 00:22:01,520 --> 00:22:04,000 So now that we know what's wrong, right? 388 00:22:04,000 --> 00:22:06,060 We know there's some vulnerabilities on the system. 389 00:22:06,120 --> 00:22:08,260 We definitely have to demonstrate impact. 390 00:22:08,620 --> 00:22:10,860 Especially when it comes to mainframe hacking. 391 00:22:11,180 --> 00:22:12,940 You have to show impact. 392 00:22:12,940 --> 00:22:20,420 Because every not every time, I would say 99% of the time, my findings are an uphill battle with the mainframers, okay? 393 00:22:20,420 --> 00:22:21,680 I get so much pushback. 394 00:22:21,680 --> 00:22:24,900 You have to show, like, no, actually this setting is very dangerous. 395 00:22:24,900 --> 00:22:25,820 Look what I did. 396 00:22:25,820 --> 00:22:26,420 Okay? 397 00:22:26,420 --> 00:22:28,400 So let's talk about privilege escalation. 398 00:22:28,620 --> 00:22:30,880 Obviously the first one is the super easiest one. 399 00:22:30,880 --> 00:22:32,820 We found stored credentials, okay? 400 00:22:32,820 --> 00:22:34,360 So this could be lateral movement. 401 00:22:34,660 --> 00:22:36,320 Nine times out of ten it's not. 402 00:22:36,360 --> 00:22:40,440 And I would love to say this is a rare thing that I've only found once. 403 00:22:40,440 --> 00:22:43,760 No, I've found this multiple times, okay? 404 00:22:43,860 --> 00:22:46,760 So do not store password in files. 405 00:22:46,880 --> 00:22:50,080 Obviously if you have to, make sure the permissions are correct. 406 00:22:50,140 --> 00:22:51,600 And make sure you test those permissions. 407 00:22:51,600 --> 00:22:57,880 Because maybe your ESM is overriding those permissions and everyone has read access to it. 408 00:22:58,700 --> 00:22:59,920 So this is an example. 409 00:22:59,920 --> 00:23:02,800 This is an actual example from a client. 410 00:23:02,880 --> 00:23:04,660 Obviously not I rewrote it. 411 00:23:04,660 --> 00:23:05,900 It's not their work. 412 00:23:05,900 --> 00:23:07,180 But it's very similar. 413 00:23:07,240 --> 00:23:09,800 And we found a script like this in the user's home folder. 414 00:23:10,080 --> 00:23:12,280 And it was chmod 7777. 415 00:23:12,420 --> 00:23:14,940 Obviously because it wasn't working until someone did that, right? 416 00:23:14,940 --> 00:23:16,380 And then all of a sudden it started working. 417 00:23:16,880 --> 00:23:18,880 And had user credentials in it. 418 00:23:19,200 --> 00:23:21,860 And so super, super easy hack, right? 419 00:23:21,860 --> 00:23:23,740 Because mainframe hacking is not hard. 420 00:23:23,740 --> 00:23:24,760 It's not that hard. 421 00:23:25,260 --> 00:23:29,980 We just SSH in with the username and password, right? 422 00:23:29,980 --> 00:23:32,360 Like this is not rocket science, right? 423 00:23:32,360 --> 00:23:36,300 We type their username, we type their password, and then we get in. 424 00:23:36,440 --> 00:23:39,880 And the first thing you do once you connect is you make sure you know who you are, right? 425 00:23:39,880 --> 00:23:41,340 So I'm logged in as me. 426 00:23:42,060 --> 00:23:44,140 And then we have some fun. 427 00:23:44,420 --> 00:23:48,280 And then the next thing we do is we run the command list user. 428 00:23:48,420 --> 00:23:48,860 Okay? 429 00:23:48,860 --> 00:23:51,020 Because that actually tells us what we can do. 430 00:23:51,020 --> 00:23:53,200 And if you'll notice, this user has special in operation. 431 00:23:53,200 --> 00:23:54,380 So at this point, it's game over. 432 00:23:54,380 --> 00:23:56,120 We can kind of do anything we want. 433 00:23:56,220 --> 00:24:00,620 And the pen test turns from a pen test to now an assessment because we can read everything. 434 00:24:01,440 --> 00:24:02,420 Oh, great. 435 00:24:02,640 --> 00:24:04,480 This one's finally one not about me. 436 00:24:04,480 --> 00:24:15,520 He wanted me to tell you that Mark from that, like, intro, drove his Aston Martin into a washed out area of a road and had to climb out the window and be rescued from the roof. 437 00:24:15,660 --> 00:24:20,840 I asked him for, like, technical quotes or inspirational quotes, and this is what he gave me. 438 00:24:22,040 --> 00:24:22,600 Okay. 439 00:24:22,600 --> 00:24:29,780 The next one we're going to talk about is this one at the bottom because I know none of you know what extattr plus a does. 440 00:24:29,780 --> 00:24:35,220 That is a only on the main frame command, and it's very important to understand. 441 00:24:35,460 --> 00:24:39,500 So we're only talking about APF authorized programs. 442 00:24:39,500 --> 00:24:42,660 So APF authorized programs are allowed to get into supervisor state. 443 00:24:42,820 --> 00:24:44,360 That's what they're allowed to do. 444 00:24:44,360 --> 00:24:44,820 Right? 445 00:24:44,820 --> 00:24:46,540 And that comes with a bunch of different things. 446 00:24:47,560 --> 00:24:53,980 On the regular mainframe side, you have to put them in an APF authorized program library, otherwise known as a folder. 447 00:24:54,560 --> 00:25:01,100 On Unix, you can actually assign programs the extra attribute A. 448 00:25:01,220 --> 00:25:03,640 That makes it APF authorized. 449 00:25:03,900 --> 00:25:04,140 Right? 450 00:25:04,140 --> 00:25:05,340 That's all that does. 451 00:25:05,780 --> 00:25:06,060 Okay? 452 00:25:06,060 --> 00:25:10,080 So the access to control that is BPX.file. 453 00:25:10,080 --> 00:25:14,200 I know it says extra, but it's fileattr.APF. 454 00:25:14,220 --> 00:25:16,660 So read access to that profile. 455 00:25:16,660 --> 00:25:18,800 Interact F lets you issue this command. 456 00:25:19,920 --> 00:25:22,180 Most people should not have access to do that. 457 00:25:22,380 --> 00:25:24,420 Now, why is it important to get APF authorized? 458 00:25:24,420 --> 00:25:30,980 I'm going to walk you through what happens when you log into the mainframe and why getting APF authorized and all that stuff is important. 459 00:25:30,980 --> 00:25:32,660 Because it's the thing I didn't understand. 460 00:25:32,940 --> 00:25:44,020 So when you log in, the first thing the operating system does after you log in is RACF copies a bunch of user information about you into memory. 461 00:25:44,620 --> 00:25:44,740 Right ? 462 00:25:44,740 --> 00:25:46,940 And it refers to that memory region. 463 00:25:46,940 --> 00:25:51,160 Think of this like your ID in Linux, right? 464 00:25:51,160 --> 00:25:53,900 And if you can change your ID to something else. 465 00:25:53,900 --> 00:25:54,420 Right? 466 00:25:54,420 --> 00:25:55,300 Similar concept. 467 00:25:55,300 --> 00:25:56,520 So it sits in memory. 468 00:25:56,520 --> 00:26:01,900 Problem is that memory region is locked under key zero. 469 00:26:02,220 --> 00:26:06,900 And user processes only run under key eight. 470 00:26:06,900 --> 00:26:09,880 So we cannot change this region of memory. 471 00:26:09,880 --> 00:26:13,220 If we could, we could take over the mainframe. 472 00:26:13,220 --> 00:26:13,840 Right? 473 00:26:13,840 --> 00:26:22,700 If there's a way for us to change our key to key zero, then what we do is we just replace this. 474 00:26:22,700 --> 00:26:23,640 It's called the ACE. 475 00:26:24,160 --> 00:26:30,760 We replace our ACE with whatever user we want that exists on the system. 476 00:26:30,840 --> 00:26:33,220 And now we can become someone else. 477 00:26:33,220 --> 00:26:34,860 Preferably an admin. 478 00:26:35,340 --> 00:26:38,160 But how do we change our key to key zero? 479 00:26:38,160 --> 00:26:41,820 Well, luckily, there's an assembly macro called mode set. 480 00:26:42,360 --> 00:26:45,180 And we just change it to key zero. 481 00:26:46,200 --> 00:26:54,860 And then once we do that, to issue that macro, you must be APF authorized to issue that. 482 00:26:54,860 --> 00:26:55,140 Right? 483 00:26:55,140 --> 00:27:01,700 So in Unix, if we use that EXT ATTR command, we can make it APF authorized. 484 00:27:01,700 --> 00:27:03,740 Now, what does that look like technically? 485 00:27:03,740 --> 00:27:05,340 What does it look like in practice? 486 00:27:05,340 --> 00:27:07,320 So here is what it looks like in assembly. 487 00:27:07,320 --> 00:27:08,600 Any questions? 488 00:27:10,120 --> 00:27:11,060 We can move on? 489 00:27:11,060 --> 00:27:11,660 Great. 490 00:27:11,840 --> 00:27:14,200 So really, this is the command here. 491 00:27:14,200 --> 00:27:15,120 Oh, that's great. 492 00:27:15,640 --> 00:27:17,940 The boxes on my laptop worked. 493 00:27:17,940 --> 00:27:20,100 So this is their laptop problem. 494 00:27:20,320 --> 00:27:22,420 So mode set key zero. 495 00:27:22,840 --> 00:27:24,040 That's the command. 496 00:27:24,040 --> 00:27:27,440 If the program will abend if it's not APF authorized here. 497 00:27:27,440 --> 00:27:28,620 So that means crash. 498 00:27:28,780 --> 00:27:29,020 Right? 499 00:27:29,020 --> 00:27:30,800 So once it gets past that, you're golden. 500 00:27:30,860 --> 00:27:34,160 The next thing we do is we issue what's called a rack route. 501 00:27:34,160 --> 00:27:37,360 So this is going to build that new ACE for us. 502 00:27:38,140 --> 00:27:49,000 And if you'll see there where it says user ID equals user LEN, well, that's actually down here where we have the user ID that we want to assume the identity of. 503 00:27:49,440 --> 00:27:49,700 Okay? 504 00:27:49,700 --> 00:27:51,680 So all we do is we write this program up. 505 00:27:52,220 --> 00:27:58,000 Then we put it into a file in Unix. 506 00:27:58,500 --> 00:28:02,080 So if you've ever used the assembler on Linux, it's the same thing. 507 00:28:02,080 --> 00:28:02,280 Right? 508 00:28:02,280 --> 00:28:03,820 Very similar commands. 509 00:28:04,240 --> 00:28:05,500 Then we link it. 510 00:28:05,500 --> 00:28:05,740 Right? 511 00:28:05,740 --> 00:28:06,940 Because we have to link it. 512 00:28:07,240 --> 00:28:09,840 And then we make it APF authorized. 513 00:28:10,280 --> 00:28:10,760 Okay? 514 00:28:10,760 --> 00:28:11,480 So that's it. 515 00:28:11,480 --> 00:28:13,100 That's all the steps you have to take. 516 00:28:13,500 --> 00:28:16,560 And then here's a demo that we put together. 517 00:28:17,040 --> 00:28:20,900 It's going to show Chad taking over my account. 518 00:28:21,220 --> 00:28:21,640 Right? 519 00:28:21,640 --> 00:28:23,160 So he's trying to access a file. 520 00:28:23,300 --> 00:28:25,200 He's unable to access that file. 521 00:28:31,070 --> 00:28:33,650 He's going to run his APF authorized program. 522 00:28:33,650 --> 00:28:36,330 And now you can see he's become Phil. 523 00:28:36,350 --> 00:28:36,650 Right? 524 00:28:36,650 --> 00:28:38,150 He's become my user ID. 525 00:28:38,250 --> 00:28:41,750 And now he's able to cat that file. 526 00:28:42,770 --> 00:28:45,610 It's a file I wrote for him especially. 527 00:28:45,830 --> 00:28:47,970 Because he is the coolest. 528 00:28:47,970 --> 00:28:48,750 I did not write that. 529 00:28:48,750 --> 00:28:50,510 This is 100% Chad demo. 530 00:28:50,570 --> 00:28:51,150 All right. 531 00:28:51,150 --> 00:28:52,890 Next picture of Chad. 532 00:28:54,430 --> 00:28:58,470 Take Phil to a karaoke bar and get him to do regulate. 533 00:28:58,470 --> 00:28:59,890 You won't be disappointed. 534 00:28:59,910 --> 00:29:01,350 You will be disappointed. 535 00:29:01,350 --> 00:29:02,330 I promise. 536 00:29:02,930 --> 00:29:03,450 Okay. 537 00:29:03,450 --> 00:29:04,350 Let's look at the next one. 538 00:29:04,350 --> 00:29:05,090 Sudo root. 539 00:29:05,090 --> 00:29:06,630 I know it says sudo root. 540 00:29:06,710 --> 00:29:11,110 There's not really a concept of root users on the mainframe. 541 00:29:11,110 --> 00:29:11,530 Okay? 542 00:29:11,690 --> 00:29:16,350 So on the mainframe we actually call it super user or UID zero. 543 00:29:16,350 --> 00:29:16,890 Okay? 544 00:29:16,890 --> 00:29:26,890 The problem is, you know, on Linux, if you get, you know, root like UID zero, it's game over for that box. 545 00:29:26,890 --> 00:29:27,110 Right? 546 00:29:27,110 --> 00:29:28,250 You can do anything you want. 547 00:29:28,250 --> 00:29:30,090 You can change anything you want. 548 00:29:30,430 --> 00:29:31,790 World's your oyster. 549 00:29:31,790 --> 00:29:33,910 That's not really true on the mainframe. 550 00:29:34,050 --> 00:29:39,330 Yes, you have UID zero in Unix, but that doesn't convey anything outside of Unix. 551 00:29:39,330 --> 00:29:50,950 When you log in that address space we talked about earlier in key zero, even though you sue up to root, it doesn't change your actual user and address space in the rest of the mainframe. 552 00:29:52,250 --> 00:29:53,210 So here's an example. 553 00:29:53,210 --> 00:29:54,610 So here I am. 554 00:29:56,110 --> 00:29:57,970 My user ID is Phil. 555 00:29:58,150 --> 00:29:59,510 I type the sue command. 556 00:29:59,510 --> 00:30:00,930 Notice I don't have to write a password. 557 00:30:00,970 --> 00:30:02,310 So I type the sue command. 558 00:30:03,010 --> 00:30:04,970 Now I'm a different user. 559 00:30:05,870 --> 00:30:06,570 Theoretically. 560 00:30:06,570 --> 00:30:07,170 Right? 561 00:30:08,090 --> 00:30:12,370 But when I do the command LU, I'm still me. 562 00:30:13,830 --> 00:30:14,810 That's fine. 563 00:30:14,810 --> 00:30:16,210 There's a billion ways around this. 564 00:30:16,210 --> 00:30:17,810 This is just one dumb example. 565 00:30:17,910 --> 00:30:21,270 I'm sure if you're creative enough, you can find a thousand different ways to do this. 566 00:30:21,270 --> 00:30:25,470 But the easiest thing for us is just to add an SSH key for an admin. 567 00:30:25,930 --> 00:30:27,390 So and that's really easy. 568 00:30:27,390 --> 00:30:29,330 So we pick Mark, of course. 569 00:30:29,570 --> 00:30:32,150 And we make the .SSH folder for him. 570 00:30:32,530 --> 00:30:34,490 We then make the authorized key file for him. 571 00:30:34,490 --> 00:30:36,770 Make sure the permissions are good on that file. 572 00:30:36,850 --> 00:30:39,270 And then we put our public key in there. 573 00:30:39,330 --> 00:30:39,810 Right? 574 00:30:39,810 --> 00:30:41,150 And that's what it looks like. 575 00:30:41,370 --> 00:30:42,070 Everything's fine. 576 00:30:42,070 --> 00:30:43,090 Everything's good. 577 00:30:43,430 --> 00:30:46,610 And then we just SSH in as them. 578 00:30:46,610 --> 00:30:47,010 Right? 579 00:30:47,010 --> 00:30:50,110 With our private key that we generated ourselves. 580 00:30:50,790 --> 00:30:52,270 And then we're logged in as Mark. 581 00:30:52,290 --> 00:30:55,990 And if you look at Mark, Mark is special operations. 582 00:30:56,030 --> 00:30:56,630 So it's game over again. 583 00:30:56,630 --> 00:31:03,190 I don't know if you're noticing a trend, but our two goals is either to get special operations or APF authorized. 584 00:31:03,190 --> 00:31:04,710 Those are the two things. 585 00:31:05,230 --> 00:31:05,490 All right. 586 00:31:05,490 --> 00:31:06,330 Next one. 587 00:31:08,390 --> 00:31:11,570 The lucky among you might get to play crafts with Phil later. 588 00:31:11,570 --> 00:31:13,190 Damn, I'm sad I'm missing that. 589 00:31:13,190 --> 00:31:13,990 Oh, thanks, Chad. 590 00:31:14,810 --> 00:31:15,130 Okay. 591 00:31:15,130 --> 00:31:15,830 Next. 592 00:31:16,030 --> 00:31:17,290 This mount one. 593 00:31:17,410 --> 00:31:17,610 Okay. 594 00:31:17,610 --> 00:31:27,450 When you look at the mount points, if you've ever mounted an ISO in Linux, it's very similar. 595 00:31:27,670 --> 00:31:28,070 Right? 596 00:31:28,070 --> 00:31:31,770 Think of it almost like volumes in a container. 597 00:31:31,770 --> 00:31:32,290 Right? 598 00:31:32,290 --> 00:31:35,950 So you take every the whole file system is based on data sets. 599 00:31:36,010 --> 00:31:36,150 Right? 600 00:31:36,150 --> 00:31:41,350 And you mount those data sets into a location on the file system. 601 00:31:41,350 --> 00:31:42,050 That's all it is. 602 00:31:42,150 --> 00:31:48,810 Now, if we have update access to either of these two profiles, right? 603 00:31:48,810 --> 00:32:03,730 Superuser.filesys.user mount or superuser.filesys.mount, what that means is we can mount a data set and preserve the APF bit and the set UID bits. 604 00:32:03,730 --> 00:32:08,570 If we have read access to either of those profiles, then those bits are ignored. 605 00:32:09,110 --> 00:32:15,330 But so and as you saw in our output, we definitely did have access to superuser.filesys.user mount. 606 00:32:15,430 --> 00:32:21,310 So what we do is we create a payload on a mainframe we own. 607 00:32:21,310 --> 00:32:21,450 Right? 608 00:32:21,450 --> 00:32:23,070 I have a mainframe at work. 609 00:32:23,070 --> 00:32:24,870 Chad has his own mainframe at his work. 610 00:32:24,870 --> 00:32:29,150 So we create a data set that we that's going to be malicious. 611 00:32:30,010 --> 00:32:36,990 Then we create our programs, the ones you just saw, we can make them APF authorized in our own system, right? 612 00:32:36,990 --> 00:32:38,490 We can craft this payload. 613 00:32:38,770 --> 00:32:48,990 We unmount it, we package it up with some JCL, we transfer it to the target mainframe, and then we receive it and do all those things, and then we run our tools. 614 00:32:49,250 --> 00:32:52,010 So this is the JCL to mount that data set. 615 00:32:52,270 --> 00:32:54,650 It's very familiar to, like, the mount command, right? 616 00:32:54,650 --> 00:33:01,790 So we have, you know, we're going to mount the hack of the planet, and then we have a mount point that goes to slash temp slash hack the planet. 617 00:33:02,390 --> 00:33:17,470 And then when we look at the output, you can see here, this one maintained the set UID bit, so now we can suit a route, get UID zero, bypass without having to do any of that fancy stuff, having access to BPX, that super user. 618 00:33:17,990 --> 00:33:21,250 And you notice these programs here that are APF authorized. 619 00:33:21,250 --> 00:33:27,930 Even though we don't have the ability to do that on the target mainframe, because we could mount a file system, we could do that. 620 00:33:27,930 --> 00:33:37,990 Now, from here, the demos are exactly the same as the other two demos, we can either modify people's home folders or because we're APF authorized, become any user we want to become. 621 00:33:40,570 --> 00:33:41,530 Great. 622 00:33:42,090 --> 00:33:47,530 He wanted to tell you that he grew up on a farm and the tractors all ran on COBOL. 623 00:33:47,530 --> 00:33:52,710 I highly doubt that, but all right, let's talk about buffer overflows on the mainframe. 624 00:33:54,410 --> 00:33:59,570 You know that slide earlier with Ralph, and it said you can't do buffer overflows on the mainframe? 625 00:34:00,210 --> 00:34:15,170 That's a myth that has been debunked multiple times, and I gave a talk last year at SHARE, SHARE being the mainframe industry conference, where someone in the audience was like telling me you can't do what you're telling us you can do. 626 00:34:15,170 --> 00:34:19,230 And I'm like, guy, the whole talk is about mainframe buffer overflows, and I'm teaching you how to do it. 627 00:34:19,430 --> 00:34:21,230 And he still wouldn't believe, right? 628 00:34:21,230 --> 00:34:24,550 So there's still this myth that you can't overflow buffers on the mainframe. 629 00:34:24,550 --> 00:34:25,870 It is so false. 630 00:34:25,870 --> 00:34:30,730 Anyways, lots of programs in Unix are written in C. 631 00:34:30,730 --> 00:34:33,730 C is not a memory safe programming language. 632 00:34:33,930 --> 00:34:49,150 And so if you have a C program, and there's a buffer overflowable variable, and it's APF authorized, now we can execute APF authorized code because of this program, right? 633 00:34:49,150 --> 00:34:51,790 How do we find APF authorized programs? 634 00:34:52,050 --> 00:34:54,550 Oh, boy, this red box is way off. 635 00:34:55,170 --> 00:34:57,830 So how do we find them? 636 00:34:58,250 --> 00:35:00,210 We use the dash EXTA. 637 00:35:00,210 --> 00:35:01,570 This is a find command. 638 00:35:01,590 --> 00:35:04,770 And you use find and then dash EXTA, that's extra attribute A. 639 00:35:04,770 --> 00:35:10,530 That will show us all the APF authorized programs that exist on that LPAR. 640 00:35:10,530 --> 00:35:11,830 This is just one screenshot. 641 00:35:11,830 --> 00:35:13,130 It kept going forever. 642 00:35:13,130 --> 00:35:14,630 Am I saying that all these are vulnerable? 643 00:35:14,630 --> 00:35:15,650 Probably not. 644 00:35:15,790 --> 00:35:18,070 A whole bunch of them are probably not vulnerable at all. 645 00:35:18,270 --> 00:35:23,230 But I know researchers who have found vulnerable programs that were APF authorized. 646 00:35:24,150 --> 00:35:27,530 Unfortunately, we have like 10 minutes left. 647 00:35:27,810 --> 00:35:36,130 Getting into the complexities of writing a ZOS buffer overflow would take hours of content to get you to understand it. 648 00:35:36,250 --> 00:35:43,530 Fortunately for everyone here, there is hours of content available to you to learn this on your own. 649 00:35:43,530 --> 00:35:54,650 Jake LaBelle gave a great talk at DEF CON 30 on how to find and exploit ZOS buffer overflows and explain the memory layout and all that stuff. 650 00:35:54,650 --> 00:35:55,490 Don't take a picture yet. 651 00:35:55,490 --> 00:35:57,490 There's like two more things to go through. 652 00:35:58,810 --> 00:36:00,030 Chad gave a talk. 653 00:36:00,030 --> 00:36:04,710 In fact, if he was here on stage, this would have been our 10‑year anniversary giving co‑talks. 654 00:36:05,130 --> 00:36:07,370 We gave a talk 10 years ago. 655 00:36:07,730 --> 00:36:13,330 And part of that talk, he explained how he could do buffer overflows in ZOS Unix. 656 00:36:14,090 --> 00:36:20,570 And Jake and I, DEF CON 30, we taught a class on mainframe buffer overflows. 657 00:36:20,570 --> 00:36:23,010 And that class is freely available. 658 00:36:23,490 --> 00:36:25,050 There's a Docker container. 659 00:36:25,050 --> 00:36:35,310 You run it and it walks you through step by step how to do a mainframe buffer overflow so that you can generate something that looks like this. 660 00:36:35,710 --> 00:36:35,950 Okay? 661 00:36:35,950 --> 00:36:36,790 Did anyone get their picture? 662 00:36:36,790 --> 00:36:37,910 I saw some people trying to take pictures. 663 00:36:37,910 --> 00:36:38,830 You want me to go back? 664 00:36:39,170 --> 00:36:39,730 Everyone's good? 665 00:36:39,730 --> 00:36:40,310 All right. 666 00:36:40,590 --> 00:36:46,910 So this is doing, like, the stuff we were talking about earlier, right? 667 00:36:46,910 --> 00:36:48,070 The rack routes and all that. 668 00:36:48,070 --> 00:36:52,590 So this is machine code that we're going to use to overflow the buffer. 669 00:36:52,590 --> 00:36:53,790 So that's shell code. 670 00:36:53,790 --> 00:36:56,230 We don't call it shell code, but it's shell code. 671 00:36:57,910 --> 00:36:58,370 All right. 672 00:36:58,370 --> 00:36:58,850 Here we go. 673 00:36:58,850 --> 00:36:59,970 Here's the next one. 674 00:37:01,450 --> 00:37:06,790 You want me to say that Phil and I had a tradition of going to piano bar after every evil mainframe training. 675 00:37:07,010 --> 00:37:08,950 Ask him about the fish bowls. 676 00:37:09,470 --> 00:37:10,150 Be my guest. 677 00:37:10,150 --> 00:37:11,070 It's fine. 678 00:37:11,390 --> 00:37:11,570 Okay. 679 00:37:11,570 --> 00:37:14,570 Let's talk about some honorable mentions that I see on pentests. 680 00:37:14,730 --> 00:37:26,390 So remember how we mentioned that you can enhance your security by letting the ESM have, like, more security on top of the file system, right? 681 00:37:26,650 --> 00:37:45,590 I have been on systems where that was done improperly, and while it looked like I didn't have read access to some folders or files, I could read every single file on the entire ZOS Unix because it was not done ‑‑ it was not secured properly. 682 00:37:46,290 --> 00:37:47,650 This one's fun. 683 00:37:47,650 --> 00:37:51,230 There was a shell script in bin that was world writeable. 684 00:37:51,230 --> 00:37:56,710 It was in slash et cetera slash profile. 685 00:37:56,710 --> 00:37:58,770 So every time someone logged in, it ran. 686 00:37:58,850 --> 00:38:06,230 So I just modified it a little bit, and then when a user that was special logged in, it then made my account special. 687 00:38:07,710 --> 00:38:12,150 This one is not really an exploit or anything like that, but this happened too many times, I want to let you know about it. 688 00:38:12,350 --> 00:38:25,150 Please don't make your logs that go to the sim world readable or writeable, because I've been on, like, two or three mainframes now where the staging folder in Unix and the files in that folder are world writeable. 689 00:38:25,490 --> 00:38:26,590 So please don't do that. 690 00:38:27,550 --> 00:38:37,890 Last one is I was pentesting a mainframe, I couldn't access much in ZOS Unix, but they had a web app that had an LFI vulnerability, a local file included, and then I could read a whole bunch of files. 691 00:38:38,070 --> 00:38:41,430 So I was like, I could see where they were, but I couldn't read them, but the web app could . 692 00:38:42,710 --> 00:38:47,430 Now, I would be remiss if I didn't tell you how to prevent and detect these, right? 693 00:38:47,430 --> 00:38:51,690 I hate watching talks at DEF CON, it's like, oh, my God, that's terrible, what do we do about it? 694 00:38:51,970 --> 00:38:52,870 Too bad. 695 00:38:53,330 --> 00:38:54,210 That's not what I'm here for. 696 00:38:54,210 --> 00:38:55,230 That is what I'm here for. 697 00:38:55,230 --> 00:38:58,490 I'm going to tell you how you prevent it and how you detect it. 698 00:38:59,150 --> 00:39:01,390 So first prevention, right? 699 00:39:01,690 --> 00:39:03,510 Review your file permissions. 700 00:39:03,650 --> 00:39:07,370 You can just run a find command to find everything that's been chmod 7777. 701 00:39:08,210 --> 00:39:12,330 Every single pentest I do, I have file permission findings. 702 00:39:12,470 --> 00:39:13,930 Please check your file permissions. 703 00:39:15,150 --> 00:39:18,950 Review and control access to these profiles in your ESM. 704 00:39:18,950 --> 00:39:28,270 They are the same profiles, doesn't matter if you're on ACF2, top secret, RECF, make sure access to these profiles is limited. 705 00:39:28,270 --> 00:39:35,610 In fact, I would argue no one needs to have this access unless it's a break glass account, right? 706 00:39:36,790 --> 00:39:38,690 Test your file permissions. 707 00:39:38,690 --> 00:39:45,710 Even though the file permissions look correct, there might be something in your ESM that's overriding those permissions. 708 00:39:46,950 --> 00:39:48,850 Okay, now let's talk about detection. 709 00:39:49,950 --> 00:39:54,790 Monitor, we put, we say log, monitor your SMF messages. 710 00:39:54,790 --> 00:39:58,210 SMF is the logging facility for ZOS. 711 00:39:59,870 --> 00:40:02,250 Someone who's using BPX.superuser. 712 00:40:02,250 --> 00:40:07,550 So every time you type sue, the operating system goes and says, hey, does this user have BPX.superuser? 713 00:40:07,790 --> 00:40:09,190 And then it says yes. 714 00:40:09,190 --> 00:40:10,190 Or it says no. 715 00:40:10,630 --> 00:40:12,810 If it says yes, you should probably be monitoring for that. 716 00:40:12,810 --> 00:40:13,570 Who's using it? 717 00:40:13,570 --> 00:40:14,750 Why are they using it? 718 00:40:14,750 --> 00:40:18,250 Same with the BPX.fileATTR.APF. 719 00:40:18,310 --> 00:40:19,650 No one should really have that. 720 00:40:19,650 --> 00:40:23,010 That should be something that you're installing updates or patches. 721 00:40:23,010 --> 00:40:25,550 But no one should just have that as a blanket access, right? 722 00:40:25,610 --> 00:40:31,350 If someone is using it, it should be traceable back to a request or a ticket of some sort. 723 00:40:31,470 --> 00:40:37,270 And then obviously the mount commands, again, users shouldn't be mounting things as a superuser. 724 00:40:37,270 --> 00:40:40,570 That should be all done by the operating system during startup, right? 725 00:40:41,390 --> 00:40:43,490 No one should really have that access. 726 00:40:43,650 --> 00:40:45,810 Unless it's like a break glass situation. 727 00:40:47,530 --> 00:40:51,310 Detect large number of unauthorized attempts to access files. 728 00:40:51,310 --> 00:40:57,490 You'll understand, like, it will log every failure when I run my OBS enum script. 729 00:40:57,490 --> 00:41:00,370 It's looking for files and it'll tell you, like, access denied, access denied. 730 00:41:00,790 --> 00:41:02,730 Those all get logged somewhere, right? 731 00:41:02,730 --> 00:41:07,230 No one has ever come to me after a pen test and be like, hey, did you try to access, like, 30,000 files? 732 00:41:07,390 --> 00:41:07,890 Never. 733 00:41:07,890 --> 00:41:09,530 Because no one's monitoring it. 734 00:41:10,490 --> 00:41:21,650 Detect multiple, obviously, look, if you're trying to see someone do connections out to AWS on your, like, firewalls and whatnot from the mainframe, that's probably a good indicator of compromise, right? 735 00:41:21,650 --> 00:41:22,730 Something to check for. 736 00:41:22,730 --> 00:41:26,910 Because the mainframe should have very well understood and well-known patterns of connectivity. 737 00:41:26,910 --> 00:41:29,210 There should be nothing exciting happening there. 738 00:41:30,050 --> 00:41:33,310 And then we're going to talk about the Unix file system auditing. 739 00:41:33,310 --> 00:41:37,310 This is, like, very unique to ZOS Unix. 740 00:41:37,390 --> 00:41:49,130 So when we run ZOS Unix and we issue LS with a capital W, we get this new column here, right? 741 00:41:49,130 --> 00:41:52,970 And this column is the audit column, right? 742 00:41:52,970 --> 00:41:54,750 That's what's happening here. 743 00:41:54,750 --> 00:41:56,590 So let's take a closer look. 744 00:41:57,290 --> 00:41:59,470 It's split up into two parts. 745 00:41:59,470 --> 00:42:02,130 The first part is user controlled. 746 00:42:02,130 --> 00:42:11,070 So if you have read, write, execute access to that file, you can modify those settings. 747 00:42:11,170 --> 00:42:14,650 The other three are admin controlled. 748 00:42:14,810 --> 00:42:20,350 So if an admin wants to set so you could set it as, like, hey, I don't want any audit records for this file. 749 00:42:20,350 --> 00:42:26,430 But your admin could set something that says, hey, I want to know anytime someone changes that file, right? 750 00:42:26,430 --> 00:42:29,510 And you as the user, you cannot change it back. 751 00:42:29,510 --> 00:42:30,930 This is the default. 752 00:42:30,930 --> 00:42:33,030 So FFF, F for fail. 753 00:42:33,330 --> 00:42:34,890 And then no admin control. 754 00:42:34,890 --> 00:42:38,210 This is the default for every file created in ZOS Unix. 755 00:42:38,210 --> 00:42:40,590 If you list any file, that's the default. 756 00:42:41,850 --> 00:42:47,110 And the way it's broken down is very Unix-y, read, write, execute. 757 00:42:47,110 --> 00:42:52,490 So if I try to read the file and it fails, it's going to write an SMF record. 758 00:42:52,510 --> 00:42:55,030 If I try to write the file and it fails, it's going to write. 759 00:42:55,030 --> 00:42:56,970 And if I try to execute, it's going to do that. 760 00:42:57,270 --> 00:43:02,270 Now, much like you can CH modify, you can CH audit a file. 761 00:43:02,810 --> 00:43:04,690 And so use the CH audit command. 762 00:43:04,690 --> 00:43:08,490 And what we're going to do is say I want success and failures. 763 00:43:09,050 --> 00:43:13,650 And now when we run that same command, you can see now they say all. 764 00:43:14,150 --> 00:43:20,210 So now I have all anytime someone accesses that file, anytime someone writes that file. 765 00:43:20,210 --> 00:43:22,510 Now, this is a little extreme. 766 00:43:22,710 --> 00:43:33,170 Don't do this for every file, but you should know what files are critical to your mainframe and you should know, hey, if someone makes a change to this file, we want to know about it, right? 767 00:43:33,170 --> 00:43:34,350 Things in slash et cetera. 768 00:43:34,350 --> 00:43:37,770 Probably a good idea to know who's mucking around in slash et cetera, right? 769 00:43:38,770 --> 00:43:39,430 Okay. 770 00:43:39,470 --> 00:43:43,310 So with that, we're nearing the end of the presentation. 771 00:43:43,770 --> 00:43:50,610 I have to do some shout outs to, you know, because I'm up here because of the efforts of a lot of other people. 772 00:43:50,790 --> 00:43:53,510 So first I want to say thank you to DEF CON for having me come here. 773 00:43:53,510 --> 00:43:54,990 I really appreciate you all. 774 00:43:55,430 --> 00:44:02,510 The mainframe hacker community, when Chad and I started doing this, the mainframe hacker community was two people. 775 00:44:02,550 --> 00:44:03,630 Chad and I. 776 00:44:03,750 --> 00:44:04,330 Okay? 777 00:44:04,930 --> 00:44:07,490 Over time, that has grown. 778 00:44:07,490 --> 00:44:10,230 The second ‑‑ the third member was Henry, Wizard of ZOS. 779 00:44:10,230 --> 00:44:14,890 And over time that has grown, so now there's like a good two dozen of us. 780 00:44:15,050 --> 00:44:18,950 And we chat and we all know each other and we share ideas and whatnot. 781 00:44:18,950 --> 00:44:21,130 So I have huge thanks for them. 782 00:44:21,230 --> 00:44:28,710 The MotionX Discord, if you're not a mainframe person and you're like, oh, man, this is interesting, go watch MotionX's videos. 783 00:44:28,970 --> 00:44:29,970 Go to the Discord. 784 00:44:29,970 --> 00:44:31,430 It's super welcoming. 785 00:44:31,730 --> 00:44:35,270 It's not very ‑‑ do not go to mainframe forums. 786 00:44:35,270 --> 00:44:37,250 It is the most adversarial place on earth. 787 00:44:37,430 --> 00:44:38,690 Go to the MotionX Discord. 788 00:44:38,690 --> 00:44:39,650 It's super chill. 789 00:44:39,650 --> 00:44:40,870 Everyone's there to help. 790 00:44:41,190 --> 00:44:46,750 The mainframe cybersecurity community, I went to share, share made the mainframe industry conference. 791 00:44:47,230 --> 00:44:51,850 And I was so nervous the first time because I thought they hated me and all these things. 792 00:44:52,010 --> 00:44:55,570 In fact, a major vendor threatened to pull out if I spoke at that conference kind of thing. 793 00:44:55,570 --> 00:45:01,010 But the mainframe cybersecurity community at that conference is the most welcoming and amazing community there. 794 00:45:01,010 --> 00:45:02,490 So huge shout out to them. 795 00:45:02,650 --> 00:45:08,090 And I do want to thank my co‑speaker, Chad, for like, you know, helping me out with this talk. 796 00:45:08,090 --> 00:45:10,050 And I really ‑‑ I do really wish he was here. 797 00:45:10,650 --> 00:45:19,170 If you want to contact, if you want to reach out to me in any capacity, I'm always interested if people have ideas or questions. 798 00:45:19,170 --> 00:45:21,430 I will take any pull request within reason. 799 00:45:21,590 --> 00:45:25,030 So if you want to look at my code, it's not good, but it works. 800 00:45:25,110 --> 00:45:25,310 Right? 801 00:45:25,310 --> 00:45:30,130 So if you want to take a look and reach out to me, that's totally fine. 802 00:45:30,410 --> 00:45:34,490 And I'm going to leave the talk with the last quote from Chad. 803 00:45:34,750 --> 00:45:39,950 So remember when I said there were two members to the mainframe hacker society and then Wizard of Zos joined us? 804 00:45:39,950 --> 00:45:41,910 That's Wizard of Zos in the middle there. 805 00:45:43,730 --> 00:45:45,210 It's a tight‑knit group of people. 806 00:45:45,210 --> 00:45:46,230 So this is what he wrote for me. 807 00:45:46,230 --> 00:45:47,530 I'm going to try to get through it. 808 00:45:48,270 --> 00:45:49,590 Because it's a little long. 809 00:45:49,590 --> 00:45:50,670 And I love it. 810 00:45:50,830 --> 00:45:54,650 So dear Phil, in all seriousness, I am really sad I couldn't be here. 811 00:45:55,010 --> 00:46:00,290 Even though I know that you absolutely kicked ass and you do not need me here to do so. 812 00:46:00,490 --> 00:46:03,290 You've been one of my best friends and partners in crime for a decade. 813 00:46:03,290 --> 00:46:08,490 I would not be here where I am without your friendship and knowledge and willingness to put up with my shit. 814 00:46:08,730 --> 00:46:13,070 I cannot wait to see what the next decade of hacking the Gibson with you brings. 815 00:46:13,630 --> 00:46:16,150 And with that, I want to thank everyone for being here. 816 00:46:16,330 --> 00:46:18,350 And that's the end of my talk. 817 00:46:19,430 --> 00:46:19,970 Yeah! 818 00:46:19,970 --> 00:46:21,110 I heard that!