1 00:00:00,000 --> 00:00:04,420 Okay, so I'm Luke Jennings, and I'm a security consultant from the UK, 2 00:00:04,520 --> 00:00:08,140 and this talk's basically about abusing Windows access tokens. 3 00:00:08,740 --> 00:00:11,120 It's nothing completely new. 4 00:00:11,200 --> 00:00:13,560 I mean, it's an issue that's been known about for some time, 5 00:00:13,660 --> 00:00:17,100 but I think it's something that hasn't really been taken seriously before, 6 00:00:17,220 --> 00:00:20,140 and I'm kind of just going to show that it is a very serious issue, 7 00:00:20,200 --> 00:00:22,640 and I've kind of written a tool to kind of demonstrate that, 8 00:00:22,760 --> 00:00:26,760 because I'm a penetration tester, so from my perspective, 9 00:00:27,000 --> 00:00:29,300 it's very useful, and it's been useful on client tests. 10 00:00:30,760 --> 00:00:33,060 So the issue is that, really, 11 00:00:34,100 --> 00:00:37,780 vendors have been improving the security of their software for many years now, 12 00:00:37,840 --> 00:00:40,960 and post-exploitation has become a lot more important because of that. 13 00:00:43,320 --> 00:00:45,300 Microsoft are probably one of the best examples of that, 14 00:00:45,320 --> 00:00:50,260 because they've gone from a position where they were notoriously poor in their security, 15 00:00:52,000 --> 00:00:56,060 but since the Trustworthy Computing Initiative, they've got much, much better, 16 00:00:56,180 --> 00:00:59,860 and now it's a case of where the number of systems you're going to be able to, 17 00:00:59,860 --> 00:01:02,100 to compromise on a test is going to be much fewer, 18 00:01:02,200 --> 00:01:05,600 so you really need to make the most of what you have if you're trying to prove something. 19 00:01:08,640 --> 00:01:12,620 So post-exploitation has been addressed to some extent with other things. 20 00:01:12,700 --> 00:01:14,460 Now, MetaSupply is a great example of that, 21 00:01:14,560 --> 00:01:17,960 with the, particularly for Windows, with the meterpreter payloads. 22 00:01:18,060 --> 00:01:21,220 I don't know if many of you use that very often, but that's excellent. 23 00:01:21,380 --> 00:01:23,000 And then there's passive XPayloads as well, 24 00:01:24,460 --> 00:01:27,820 and they're very useful on tests, particularly when, you know, proxy, 25 00:01:28,840 --> 00:01:29,840 proxy servers are being used. 26 00:01:29,840 --> 00:01:31,140 They're being used for web access externally. 27 00:01:32,480 --> 00:01:34,480 But from a penetration tester's perspective, 28 00:01:34,640 --> 00:01:36,600 not much has been done with Windows access tokens. 29 00:01:38,000 --> 00:01:39,980 Now, they're kind of integral to the, 30 00:01:40,140 --> 00:01:44,260 to how single sign-on works in an active directory environment. 31 00:01:45,140 --> 00:01:47,600 If you think you log on to a desktop, 32 00:01:48,780 --> 00:01:53,640 and you then decide to access your remote file server on the same domain, 33 00:01:53,960 --> 00:01:57,440 you're not requested for your username and password again. 34 00:01:57,660 --> 00:01:59,640 It's just, the connection just goes through, 35 00:01:59,640 --> 00:02:01,240 and that's because the tokens that are involved, 36 00:02:02,000 --> 00:02:03,480 they cache your credentials. 37 00:02:03,960 --> 00:02:06,220 So, in the Kerberos sense, it'd be a ticket-granting ticket. 38 00:02:06,380 --> 00:02:09,640 When it's NTLM authentication, it'd be the NTLM hashes, 39 00:02:09,800 --> 00:02:13,340 and they enable the authentication to just go transparently through. 40 00:02:14,900 --> 00:02:19,580 And, I mean, the other issue is that, on kind of penetration tests, 41 00:02:19,680 --> 00:02:22,700 I found it very difficult to convince clients of the importance 42 00:02:22,700 --> 00:02:27,220 of keeping their administrators' desktops and other systems just as secure as their servers. 43 00:02:27,400 --> 00:02:29,620 I mean, classically, you might talk about, you know, 44 00:02:29,620 --> 00:02:32,980 about installing key loggers and how that could be used to compromise other servers, 45 00:02:33,100 --> 00:02:35,780 but Windows access tokens is another way of doing it, 46 00:02:35,860 --> 00:02:39,000 and it's more powerful in some respects, which I'll be showing you later. 47 00:02:40,840 --> 00:02:42,940 So, just to give a quick overview of them, 48 00:02:42,980 --> 00:02:45,360 they're not particularly well understood, I've found. 49 00:02:45,760 --> 00:02:48,780 I mean, their counterpart on Unix systems is obviously user IDs, 50 00:02:50,480 --> 00:02:53,020 and it's kind of integral to how you learn Unix. 51 00:02:53,100 --> 00:02:54,320 You know, whenever you run an LS command, 52 00:02:54,440 --> 00:02:57,240 you'll see the user IDs that files are owned by. 53 00:02:57,400 --> 00:02:59,200 You'll see the current, 54 00:02:59,620 --> 00:03:00,220 the permissions that are set, 55 00:03:00,340 --> 00:03:02,220 but Windows is kind of hidden from you, 56 00:03:02,260 --> 00:03:03,980 and unless you kind of go looking into it, 57 00:03:04,000 --> 00:03:04,720 you don't see it normally, 58 00:03:04,920 --> 00:03:07,520 and they're inherently more complex as well, 59 00:03:07,640 --> 00:03:11,200 so it just leads to people not having kind of some misconceptions about them sometimes. 60 00:03:12,320 --> 00:03:15,420 But processes essentially have a primary token associated with them, 61 00:03:15,500 --> 00:03:16,820 and that determines their privileges. 62 00:03:17,660 --> 00:03:21,200 So, whenever a process tries to perform some sort of task, 63 00:03:21,680 --> 00:03:24,660 the operating system consults the token to see if that's allowed. 64 00:03:26,040 --> 00:03:28,980 But Windows has been a multi-threaded operating system. 65 00:03:28,980 --> 00:03:30,920 It also allows other tokens to be used, 66 00:03:31,020 --> 00:03:34,040 and threads can then temporarily impersonate those tokens. 67 00:03:34,340 --> 00:03:36,800 And a good example of that is in a client server application, 68 00:03:37,200 --> 00:03:38,680 perhaps an FTP server. 69 00:03:39,020 --> 00:03:41,020 If a client connects through Windows authentication, 70 00:03:41,520 --> 00:03:44,940 the FTP server process will be running as a service account, 71 00:03:45,180 --> 00:03:50,300 but then the Windows authentication that occurs creates a new token, 72 00:03:50,400 --> 00:03:53,680 and then the thread that's serving their request can temporarily impersonate that, 73 00:03:53,820 --> 00:03:58,420 and then everything that it does from then on will be under the context of their privileges. 74 00:03:59,960 --> 00:04:02,660 And tokens essentially have four different security levels. 75 00:04:03,200 --> 00:04:06,000 We're only really going to be concerned here with impersonation and delegation, 76 00:04:06,380 --> 00:04:08,280 because they're the interesting ones, 77 00:04:08,440 --> 00:04:11,520 and basically a delegation level token is one that stores credentials, 78 00:04:11,780 --> 00:04:14,260 so it can be used to access external systems. 79 00:04:15,040 --> 00:04:18,000 An impersonation token is only valid on the local system. 80 00:04:18,060 --> 00:04:20,920 It doesn't have the necessary credentials to access a remote system. 81 00:04:21,680 --> 00:04:24,120 And basically, normally an interactive login, 82 00:04:24,260 --> 00:04:26,640 so if you log in at the console of your desktop, 83 00:04:26,780 --> 00:04:28,440 or by terminal services or something, 84 00:04:28,980 --> 00:04:31,820 that will result in delegation tokens being created, 85 00:04:31,960 --> 00:04:34,060 and then that's why when you access a remote file server, 86 00:04:34,300 --> 00:04:36,680 for example, you don't need to enter your username and password again. 87 00:04:37,580 --> 00:04:40,520 But non-interactive logons, going back to the client server example, 88 00:04:40,900 --> 00:04:43,400 they normally only result in impersonation level tokens, 89 00:04:44,020 --> 00:04:46,820 but under some circumstances that's not the case, 90 00:04:46,840 --> 00:04:50,620 and you'll get delegation tokens if you've trusted a computer for delegation. 91 00:04:50,780 --> 00:04:56,360 Say, EFS is an excellent example because if you want a remote EFS server, 92 00:04:56,580 --> 00:04:58,220 the server needs the... 93 00:04:58,980 --> 00:05:01,580 a password to actually decrypt the file, 94 00:05:01,760 --> 00:05:05,540 so in order to do that, it needs the delegation tokens to be present. 95 00:05:09,120 --> 00:05:10,720 So, how do you go about abusing them? 96 00:05:10,780 --> 00:05:12,940 Well, basically, if you compromise a system, 97 00:05:13,100 --> 00:05:14,420 there are going to be some tokens present. 98 00:05:15,120 --> 00:05:17,620 Depending on who's logged onto the system, what's going on dictates 99 00:05:17,620 --> 00:05:19,780 what ones are going to be there and what the privileges are, 100 00:05:19,900 --> 00:05:20,960 what you might be able to do with them. 101 00:05:21,940 --> 00:05:23,460 So, as a consequence of that, 102 00:05:24,340 --> 00:05:26,760 they can lead to privilege escalation of some sort. 103 00:05:26,920 --> 00:05:28,340 There's two primary types, and... 104 00:05:28,980 --> 00:05:31,540 one I've kind of called domain privilege escalation. 105 00:05:31,580 --> 00:05:34,520 That's the idea of compromising one server, 106 00:05:34,700 --> 00:05:36,580 finding a delegation token present, 107 00:05:36,640 --> 00:05:39,340 and using it to access another server. 108 00:05:40,520 --> 00:05:42,320 A good example of that is 109 00:05:42,960 --> 00:05:45,780 if you're trying to get into a database server, 110 00:05:45,960 --> 00:05:47,080 and that's very well protected, 111 00:05:47,320 --> 00:05:51,400 but then you find the administrator's desktop is insecure, 112 00:05:51,560 --> 00:05:53,340 and then you take his token, 113 00:05:53,540 --> 00:05:56,900 and you can then use it to access the database server. 114 00:05:56,980 --> 00:05:58,080 That would be a good example of that. 115 00:05:58,980 --> 00:06:01,200 Local privilege escalation is less common, 116 00:06:01,400 --> 00:06:03,640 but under some circumstances, it can be performed. 117 00:06:04,140 --> 00:06:05,780 So, if you're not running the system, 118 00:06:06,380 --> 00:06:08,840 a good example of this is with SQL Server, 119 00:06:08,940 --> 00:06:09,560 and that's something... 120 00:06:09,560 --> 00:06:12,000 I know Dave Litchfield had a paper on, 121 00:06:12,060 --> 00:06:14,280 I think, databasesecurity.com some time ago, 122 00:06:14,960 --> 00:06:17,120 a brief paper just dictating this, the theory of this, 123 00:06:17,220 --> 00:06:19,740 and the idea is if SQL Server's been configured 124 00:06:19,740 --> 00:06:21,160 to run as a low-privileged service account, 125 00:06:21,420 --> 00:06:22,520 and you compromise it, 126 00:06:23,520 --> 00:06:26,300 then if an administrator actually connects to that server 127 00:06:27,200 --> 00:06:28,240 via Windows authentication, 128 00:06:28,980 --> 00:06:31,740 I don't know, Enterprise Manager or Query Analyzer or something, 129 00:06:32,860 --> 00:06:34,120 that will create a new token 130 00:06:34,120 --> 00:06:36,720 that will be within the SQL Server process space, 131 00:06:36,940 --> 00:06:38,600 so then you can actually use that token 132 00:06:38,600 --> 00:06:40,340 and impersonate it 133 00:06:40,340 --> 00:06:42,140 and start executing commands as an administrator 134 00:06:42,140 --> 00:06:43,700 and escalate your privileges locally. 135 00:06:46,080 --> 00:06:49,500 So, if we have a tool to kind of demonstrate these issues, 136 00:06:49,720 --> 00:06:51,180 from a penetration tester's perspective, 137 00:06:51,660 --> 00:06:53,040 the first thing we'd want it to do 138 00:06:53,040 --> 00:06:54,760 is to be able to enumerate tokens at present 139 00:06:54,760 --> 00:06:55,660 and show us what's there. 140 00:06:57,140 --> 00:06:58,200 And after that, 141 00:06:58,200 --> 00:07:00,820 you'd want to perform common post-exploitation tasks. 142 00:07:02,300 --> 00:07:03,400 Now, a common example, 143 00:07:03,480 --> 00:07:04,460 you might want to execute processes, 144 00:07:04,740 --> 00:07:06,300 create a new command.exe, 145 00:07:06,340 --> 00:07:07,740 run it as a different user, for example, 146 00:07:07,800 --> 00:07:08,920 with a token that you've found. 147 00:07:09,380 --> 00:07:10,900 You might want to force remote connections, 148 00:07:11,180 --> 00:07:13,260 the idea being that if you can force 149 00:07:13,260 --> 00:07:14,340 a kind of NTLM authentication, 150 00:07:15,140 --> 00:07:17,500 you can set up a sniffer 151 00:07:17,920 --> 00:07:20,660 and use the challenge response hashes 152 00:07:20,660 --> 00:07:22,880 that you've captured to try and crack them, 153 00:07:23,040 --> 00:07:25,020 and then you might have the underlying passwords as a result. 154 00:07:25,320 --> 00:07:27,460 You might want to perform some sort of user management, 155 00:07:27,460 --> 00:07:30,640 trying to add users to other hosts or to groups. 156 00:07:32,660 --> 00:07:34,380 So, I've basically written a tool, 157 00:07:34,580 --> 00:07:35,580 which I call Incognito. 158 00:07:36,140 --> 00:07:38,400 I just call it that because it allows you 159 00:07:38,400 --> 00:07:39,420 to assume someone else's identity, 160 00:07:39,900 --> 00:07:42,340 rather than go for something generic like a token dump. 161 00:07:43,640 --> 00:07:45,840 But the functionality that's present at the moment, 162 00:07:45,960 --> 00:07:48,340 and it is an ongoing project for me, 163 00:07:48,380 --> 00:07:49,600 it's something that I will add to, 164 00:07:49,660 --> 00:07:52,760 but currently it has the ability to list tokens 165 00:07:53,500 --> 00:07:54,880 that are present on a system, 166 00:07:55,080 --> 00:07:56,580 and you can do that by username, 167 00:07:56,580 --> 00:07:58,320 or you can do it by group. 168 00:07:58,540 --> 00:08:00,340 For example, if you'd like to, 169 00:08:01,040 --> 00:08:03,020 if you're looking for a token 170 00:08:03,020 --> 00:08:04,340 that belongs to a particular group 171 00:08:04,340 --> 00:08:07,040 and there's maybe 100 users that's a member of that group, 172 00:08:07,260 --> 00:08:10,960 rather than look out for 100 different users, 173 00:08:11,100 --> 00:08:11,980 you can just look for that group. 174 00:08:13,100 --> 00:08:14,500 It can force remote connections, 175 00:08:14,680 --> 00:08:17,280 so you can try and snarf the challenge response hashes. 176 00:08:17,520 --> 00:08:20,380 You can create new processes with a token of your choice. 177 00:08:21,380 --> 00:08:23,300 You can perform common user management tasks. 178 00:08:23,960 --> 00:08:25,840 And additionally, you can use it remotely 179 00:08:25,840 --> 00:08:28,560 if any of you have used PWD, 180 00:08:28,600 --> 00:08:29,180 I'm sure you have, 181 00:08:29,260 --> 00:08:30,560 if you've used the remote option for it. 182 00:08:30,820 --> 00:08:32,340 It's a similar concept. 183 00:08:32,400 --> 00:08:33,800 It communicates via named pipes 184 00:08:33,800 --> 00:08:34,920 and installs a service, 185 00:08:35,140 --> 00:08:37,420 which it then cleans up after it's executed. 186 00:08:40,240 --> 00:08:42,640 So how does it go about enumerating tokens? 187 00:08:42,920 --> 00:08:45,660 Well, basically you can use the underlying, 188 00:08:45,800 --> 00:08:50,060 the low-level API calls that Windows presents, 189 00:08:50,140 --> 00:08:52,260 and it uses NTE query system information. 190 00:08:52,920 --> 00:08:55,160 Now that's something that many other security tools 191 00:08:55,160 --> 00:08:55,720 have used before, 192 00:08:55,840 --> 00:08:58,580 this uses it to actually enumerate 193 00:08:58,580 --> 00:09:00,780 all the handles on the system. 194 00:09:01,040 --> 00:09:03,620 And then it combines that with another low-level API 195 00:09:03,620 --> 00:09:04,800 called NTE query object. 196 00:09:05,200 --> 00:09:06,220 And by doing that, 197 00:09:06,300 --> 00:09:08,640 it can actually determine which handles point to tokens 198 00:09:08,640 --> 00:09:10,660 and which just point to something else. 199 00:09:11,060 --> 00:09:13,400 So it filters out process handles 200 00:09:13,400 --> 00:09:16,200 and file handles, socket handles, et cetera, 201 00:09:17,740 --> 00:09:20,380 and just leaves you with a short list of the token handles. 202 00:09:20,980 --> 00:09:22,720 And then you can use other API calls 203 00:09:22,720 --> 00:09:24,380 to actually get information about those tokens, 204 00:09:24,380 --> 00:09:25,980 find out what the privilege levels are, 205 00:09:26,080 --> 00:09:27,460 find out what the usernames 206 00:09:27,460 --> 00:09:28,980 and groups associated with them are, 207 00:09:29,080 --> 00:09:32,260 and whatever other information you'd like to get. 208 00:09:34,400 --> 00:09:35,960 So I'll be showing you a demo later, 209 00:09:36,100 --> 00:09:37,200 but this is just a screenshot here. 210 00:09:38,420 --> 00:09:40,500 I executed this on my laptop some time ago, 211 00:09:40,700 --> 00:09:42,120 just kind of demonstrating the basic issue. 212 00:09:42,400 --> 00:09:43,220 You can see that it's listed 213 00:09:43,220 --> 00:09:44,640 some delegation tokens being available. 214 00:09:45,160 --> 00:09:46,720 If you notice, the Luke J user there, 215 00:09:46,780 --> 00:09:49,060 that was just because I was logged in at the console. 216 00:09:50,340 --> 00:09:52,040 And some of the other ones that are available 217 00:09:52,040 --> 00:09:52,920 are just kind of, 218 00:09:52,920 --> 00:09:55,900 they're always there as in the standard service accounts 219 00:09:55,900 --> 00:09:56,540 that Windows has, 220 00:09:56,660 --> 00:09:59,380 and you see local service, network service, system, et cetera. 221 00:10:01,840 --> 00:10:05,860 And so processes can also be created using it. 222 00:10:05,980 --> 00:10:08,000 Now, if you create a process on Windows normally, 223 00:10:08,220 --> 00:10:10,340 you'd use the create process API call, 224 00:10:10,460 --> 00:10:11,420 but the trouble with that is, 225 00:10:11,580 --> 00:10:14,240 even if the thread is executing 226 00:10:14,240 --> 00:10:16,060 whilst impersonating a different token 227 00:10:16,060 --> 00:10:18,600 that's not the same as the primary process token, 228 00:10:18,840 --> 00:10:20,420 it will still create the child process 229 00:10:20,420 --> 00:10:22,180 using the primary process token. 230 00:10:22,920 --> 00:10:24,520 So for the purpose of this tool, 231 00:10:24,660 --> 00:10:27,500 you need to have the create process as user API call. 232 00:10:27,720 --> 00:10:31,280 That actually allows you to specify another token, 233 00:10:31,440 --> 00:10:34,560 and as such, you can manipulate them in that sense. 234 00:10:35,680 --> 00:10:37,600 And doing so, as I mentioned before, 235 00:10:37,740 --> 00:10:40,420 you might want to create yourself a new command.exe process, 236 00:10:40,540 --> 00:10:42,920 so you've got a command prompt running as another user. 237 00:10:44,540 --> 00:10:46,020 But it's not limited to that. 238 00:10:46,080 --> 00:10:46,680 That's just an example. 239 00:10:46,780 --> 00:10:49,320 Maybe you want to create an active directory process 240 00:10:49,320 --> 00:10:52,280 to manage users and run that as a different token. 241 00:10:52,280 --> 00:10:53,560 You've found them on the system. 242 00:10:56,080 --> 00:10:57,980 Again, that's just a quick screenshot 243 00:10:57,980 --> 00:11:00,060 just showing how I've got a command.exe up. 244 00:11:00,360 --> 00:11:02,700 I'll show you all this properly later, though. 245 00:11:05,400 --> 00:11:07,780 You can also, as I said before, 246 00:11:07,840 --> 00:11:11,700 if you use the WNET add connection API call, 247 00:11:11,860 --> 00:11:13,300 you can actually force connections. 248 00:11:13,500 --> 00:11:16,540 Now, if you do that to a server that's not in the same domain, 249 00:11:16,620 --> 00:11:19,100 like if you make it connect to your own server 250 00:11:20,460 --> 00:11:21,800 that's not part of a domain, 251 00:11:22,280 --> 00:11:23,240 it won't use Kerberos authentication. 252 00:11:23,680 --> 00:11:26,060 It will use the downgrade to use an NTLM authentication. 253 00:11:26,680 --> 00:11:28,900 And consequently, if you run, say, 254 00:11:29,000 --> 00:11:31,080 the Metasploit SMB sniffer module or something 255 00:11:31,080 --> 00:11:32,300 called use-cane-enable, 256 00:11:32,460 --> 00:11:35,160 you get access to the hashes. 257 00:11:35,480 --> 00:11:40,480 And ideally, you might get it to downgrade it to use Landman 258 00:11:40,480 --> 00:11:42,100 and then use a static challenge, 259 00:11:42,200 --> 00:11:44,860 and you could use rainbow tables to crack it much quicker. 260 00:11:47,520 --> 00:11:49,280 Finally, the user management. 261 00:11:49,500 --> 00:11:51,840 It's just the idea of adding users to the host. 262 00:11:52,280 --> 00:11:53,920 All the kind of net commands are available, 263 00:11:54,040 --> 00:11:55,340 obviously, as API calls as well, 264 00:11:55,480 --> 00:11:59,740 and so using them is possible to try and add users 265 00:11:59,740 --> 00:12:02,700 or modify group memberships on remote hosts, 266 00:12:02,760 --> 00:12:04,300 not just the one you've actually compromised, 267 00:12:04,500 --> 00:12:07,440 but if you just take the token on the system you've compromised 268 00:12:07,440 --> 00:12:09,660 and then use it to try and add a user to another host, 269 00:12:09,720 --> 00:12:12,580 such as the main controller or a database server 270 00:12:13,100 --> 00:12:16,060 or whatever your final target is. 271 00:12:18,100 --> 00:12:21,020 So I'll just get on to showing you a demo of it now. 272 00:12:21,540 --> 00:12:23,020 I've basically got a setup here 273 00:12:23,020 --> 00:12:28,660 where I have a Windows 2003 Enterprise Edition 274 00:12:29,380 --> 00:12:32,140 Service Pack 1 box running as a domain controller, 275 00:12:32,380 --> 00:12:35,880 and then I have a Windows 2000 Service Pack 4 box 276 00:12:35,880 --> 00:12:37,740 running as a domain member. 277 00:12:38,080 --> 00:12:39,560 So for the purposes of this, 278 00:12:39,740 --> 00:12:41,460 I'm actually going to assume that 279 00:12:43,180 --> 00:12:45,320 we've compromised the Windows 2000 box 280 00:12:45,320 --> 00:12:47,220 and would like to see what we can do from there 281 00:12:47,220 --> 00:12:48,780 with tokens that are present on the system. 282 00:12:50,480 --> 00:12:51,800 So I'll kind of assume 283 00:12:51,800 --> 00:12:53,600 that we have the local administrator password 284 00:12:53,600 --> 00:12:55,700 for the box, for example. 285 00:12:56,940 --> 00:12:59,000 Just bear with me while I set this up quickly. 286 00:13:28,400 --> 00:13:29,460 Okay, that's good. 287 00:13:33,640 --> 00:13:35,140 I hope you can all see that. 288 00:13:38,480 --> 00:13:40,560 Is there anyone having major difficulty seeing that? 289 00:13:43,060 --> 00:13:44,680 Okay, I'll try and make it a bit bigger. 290 00:13:51,560 --> 00:13:53,780 Is that better? 291 00:13:54,080 --> 00:13:54,760 Okay. 292 00:13:56,340 --> 00:13:57,700 Sorry? 293 00:13:58,200 --> 00:14:00,860 If you like. 294 00:14:10,660 --> 00:14:13,180 Yeah, we'll see. 295 00:14:13,180 --> 00:14:13,400 . 296 00:14:17,800 --> 00:14:20,240 Okay, so I've run this on the Windows 2000 box, 297 00:14:20,340 --> 00:14:20,940 and you can see at the moment 298 00:14:21,800 --> 00:14:23,540 the only delegation token that's available 299 00:14:24,070 --> 00:14:25,960 besides system is load-proof SQL. 300 00:14:26,000 --> 00:14:27,900 That's actually part of a SQL Server account, 301 00:14:28,060 --> 00:14:29,380 which I'll be coming to later. 302 00:14:30,260 --> 00:14:31,880 But I haven't logged in as a user yet, 303 00:14:31,960 --> 00:14:37,240 so I'm going to log in to the server now 304 00:14:37,240 --> 00:14:38,840 as the domain administrator. 305 00:14:49,420 --> 00:14:49,880 . 306 00:14:53,600 --> 00:14:54,880 Now, if I run this again, 307 00:14:56,960 --> 00:14:59,300 you can see that as a delegation token that's available, 308 00:15:00,000 --> 00:15:01,580 it's the company administrator. 309 00:15:01,760 --> 00:15:04,020 That's actually the domain administrator token. 310 00:15:04,580 --> 00:15:07,400 I could do the same to list by group, 311 00:15:07,480 --> 00:15:10,600 and you should see that domain admins will be listed. 312 00:15:11,460 --> 00:15:13,020 Okay, so you've got domain admins, 313 00:15:13,180 --> 00:15:14,520 enterprise admins, and so forth. 314 00:15:15,200 --> 00:15:17,800 So that means that I should be able to actually 315 00:15:20,300 --> 00:15:22,000 access remote servers with it. 316 00:15:22,060 --> 00:15:25,460 So, for example, I've created a new process, 317 00:15:25,660 --> 00:15:26,760 a command.exe process. 318 00:15:45,900 --> 00:15:46,340 . 319 00:15:48,020 --> 00:15:49,560 Right, so that should be running 320 00:15:49,560 --> 00:15:50,760 as the domain administrator now. 321 00:15:50,860 --> 00:15:51,720 So just to prove it, 322 00:15:51,760 --> 00:15:54,300 I'll connect to the actual domain controller itself. 323 00:16:00,440 --> 00:16:00,880 . 324 00:16:12,480 --> 00:16:12,920 . 325 00:16:17,040 --> 00:16:17,520 . 326 00:16:22,420 --> 00:16:25,240 Okay, so you can see I've got kind of access 327 00:16:25,240 --> 00:16:26,960 to the domain controller as a result of that. 328 00:16:27,480 --> 00:16:29,060 But additionally, 329 00:16:31,800 --> 00:16:33,960 that should be able to actually perform 330 00:16:33,960 --> 00:16:35,660 some user management tasks, 331 00:16:35,760 --> 00:16:39,820 like add a new domain administrator automatically. 332 00:16:40,600 --> 00:16:41,080 . 333 00:16:41,080 --> 00:16:42,940 . 334 00:16:59,400 --> 00:17:00,340 What's happened? 335 00:17:00,620 --> 00:17:01,280 . 336 00:17:02,080 --> 00:17:04,040 . 337 00:17:04,040 --> 00:17:06,320 . 338 00:17:15,200 --> 00:17:15,720 . 339 00:17:17,920 --> 00:17:18,440 . 340 00:17:18,440 --> 00:17:18,480 . 341 00:17:18,480 --> 00:17:18,620 . 342 00:17:18,620 --> 00:17:18,660 . 343 00:17:19,840 --> 00:17:20,360 . 344 00:17:20,360 --> 00:17:21,020 . 345 00:17:21,020 --> 00:17:21,040 . 346 00:17:30,380 --> 00:17:30,900 . 347 00:17:30,900 --> 00:17:30,940 . 348 00:17:30,940 --> 00:17:31,060 . 349 00:17:31,060 --> 00:17:31,440 . 350 00:17:39,880 --> 00:17:46,360 Okay, so there we can see we've added a new user to the domain controller, now if I just 351 00:17:46,360 --> 00:18:02,880 add it to the domain admins group. Now if I show you the actual domain controller itself. 352 00:18:39,340 --> 00:18:42,300 What happened before? 353 00:18:47,780 --> 00:18:48,660 You're not getting a signal. 354 00:18:54,520 --> 00:18:54,960 Okay. 355 00:19:00,700 --> 00:19:01,140 Okay. 356 00:19:02,960 --> 00:19:03,400 Okay. 357 00:19:17,060 --> 00:19:18,840 I think we're going to have to give up on this demo. 358 00:19:41,840 --> 00:19:44,800 Is that better? 359 00:19:45,100 --> 00:19:46,500 Okay. 360 00:19:48,840 --> 00:19:49,420 Sorry about all this. 361 00:19:55,980 --> 00:19:56,320 Okay. 362 00:19:59,480 --> 00:20:04,960 Okay, you can see that we've added a new domain administrator there that's been successfully added as a result, just compromising that token. 363 00:20:14,260 --> 00:20:18,820 I think given the amount of time that's gone, I'm going to skip the next part of the demo and just move on with the talk. 364 00:20:18,820 --> 00:20:20,600 So, get to the more important things. 365 00:20:29,440 --> 00:20:30,720 Okay, so you might be thinking at this stage. 366 00:20:34,660 --> 00:20:35,760 This hasn't moved on either. 367 00:20:37,900 --> 00:20:38,760 Ah, there we go. 368 00:20:39,680 --> 00:20:46,420 Okay, you might be thinking at this stage, okay, this is maybe serious, but if I'm not logged on at the moment, you know, my account's safe. 369 00:20:47,020 --> 00:20:48,800 It's only when I'm logged on that I'm safe. 370 00:20:48,800 --> 00:20:49,360 It's only when I'm logged on that it's an issue. 371 00:20:50,320 --> 00:20:53,040 But when I was testing all this, I found that that's not always true. 372 00:20:54,840 --> 00:20:59,480 You'd expect that when you log off, all the tokens should be cleaned up completely and they wouldn't be present anymore. 373 00:21:00,080 --> 00:21:10,540 But I found that on unpatched systems, and I don't know the exact hotfix that did this, but I couldn't find any information about it, so I presume it was something that was either silently patched. 374 00:21:10,540 --> 00:21:11,960 Maybe that was unintentional. 375 00:21:11,960 --> 00:21:13,580 It was just the consequence of some other change. 376 00:21:13,700 --> 00:21:14,180 I don't know. 377 00:21:14,500 --> 00:21:18,780 But tokens, once you've logged off, they're still reported. 378 00:21:18,780 --> 00:21:22,280 But as impersonation tokens, they're not reported as being delegation tokens. 379 00:21:22,500 --> 00:21:26,900 But if you actually try to use them, it appears that they can still be used to access remote systems. 380 00:21:30,820 --> 00:21:45,000 So, yeah, if you use that, then you can basically take a system that someone's logged into some time ago, logged off, and if the server hasn't been rebooted yet, the token is still there and you can still actually use it. 381 00:21:45,680 --> 00:21:46,560 Now, I kind of... 382 00:21:46,560 --> 00:21:47,960 I've given the example on the slide there. 383 00:21:48,020 --> 00:21:48,260 Okay. 384 00:21:48,780 --> 00:21:58,400 So if you logged into some kind of insecure box a month ago, that's maybe not strictly true because if it's, you know, in a Kerberos environment, the ticket-granting ticket will eventually time out. 385 00:21:59,180 --> 00:22:03,880 But you still might be able to force a connection to a remote server and snarf NTLM hashes. 386 00:22:04,820 --> 00:22:10,520 But you might not be able to use the other features of the token if it's been in excess of the timeout. 387 00:22:12,520 --> 00:22:12,920 So... 388 00:22:15,940 --> 00:22:18,200 I'm going to skip the demo of that again to move on. 389 00:22:18,200 --> 00:22:20,840 But just hopefully, trust me that that's true. 390 00:22:24,500 --> 00:22:37,060 The other issue is that whilst developing this, I thought being a fan of the Metasport project and having used it a lot myself before, it's been very useful in penetration tests. 391 00:22:37,480 --> 00:22:47,660 I thought the Meterpreter itself is very useful and people have already, you know, put functionality into it such as the kind of functionality of PWDump has been embedded in another module. 392 00:22:47,660 --> 00:22:48,780 The hash dump. 393 00:22:48,900 --> 00:22:50,600 So you can use that from within a Meterpreter session. 394 00:22:53,840 --> 00:23:03,960 However, if I thought, you know, if you could put incognito's functionality within the Meterpreter session, then you'd be in a very powerful situation because the Meterpreter just runs as a thread. 395 00:23:04,380 --> 00:23:10,800 So you could actually get the Meterpreter thread to then impersonate a token that you'd like to use. 396 00:23:11,140 --> 00:23:17,480 And as a consequence, all the existing functionality of the Meterpreter would then be running as that. 397 00:23:17,480 --> 00:23:24,620 So kind of you'd get all this extra functionality, if you will, for free in a sense just by impersonating another token. 398 00:23:25,180 --> 00:23:30,360 And so it kind of would be a powerful combination of the two tools. 399 00:23:31,020 --> 00:23:33,200 So I kind of, I wrote an extension for that. 400 00:23:33,300 --> 00:23:39,420 Now, if you check the CDs, I've got the code for incognito is on the CD, but the Metasport code isn't. 401 00:23:39,420 --> 00:23:44,740 But I hope to at some point send that to the Metasport developers and get it integrated. 402 00:23:44,840 --> 00:23:46,680 So just kind of... 403 00:23:47,480 --> 00:23:49,640 Keep checking the SVN repository. 404 00:23:51,440 --> 00:23:53,760 But the other point with that is that if you... 405 00:23:54,340 --> 00:23:58,520 This is probably more aimed at a system administrator that wants to just run a big test of the network. 406 00:24:00,260 --> 00:24:01,760 But the Meterpreter... 407 00:24:01,760 --> 00:24:06,680 Well, the Metasport has gone a lot down the route of automated exploitation in kind of recent times. 408 00:24:07,560 --> 00:24:15,500 And because you can actually configure the Meterpreter through Ruby scripts and get them to automatically run as soon as a Meterpreter instance is created, 409 00:24:15,500 --> 00:24:21,900 technically you could configure Metasploit to sweep a network, compromise every box it can, 410 00:24:22,140 --> 00:24:30,720 and then load up the incognito module within the Meterpreter session and try some of the kind of brute force type approaches like I showed you before of adding users to hosts. 411 00:24:30,860 --> 00:24:36,280 And just perhaps say try and compromise every system possible and then try and create yourself a new domain administrator. 412 00:24:36,360 --> 00:24:45,180 And if you found that there was a domain admin logged on to any of those hosts, then after you've run that, you'll find that there's a new domain administrator. 413 00:24:45,180 --> 00:24:45,480 Okay. 414 00:24:45,500 --> 00:24:49,160 With a password of your choosing ready on the network. 415 00:24:49,600 --> 00:24:55,600 So obviously that would be a good case for a system administrator to be able to justify some more budget for security. 416 00:24:59,220 --> 00:25:05,360 And I'm not sure if I'm going to be able to demo this as a result of some of the issues we've been having, unfortunately. 417 00:25:08,200 --> 00:25:12,240 But you'll just be able to try it out for yourself once the code comes out. 418 00:25:17,080 --> 00:25:24,620 Now, one of the other issues I thought about with this is that what I've done is very useful if you compromise a system. 419 00:25:24,740 --> 00:25:30,100 You just want to try and see what you can do with it that's in addition to what you might normally be able to do. 420 00:25:30,180 --> 00:25:32,720 But often a penetration test is very focused. 421 00:25:33,040 --> 00:25:41,700 You know, it might be that it's a very large environment, but a company's just interested in, you know, for that penetration test, they want to know the security of their database servers. 422 00:25:41,700 --> 00:25:43,300 For example, they're running a SQL server. 423 00:25:44,200 --> 00:25:47,920 Now, you might try and attack them and find that they're really well protected. 424 00:25:48,200 --> 00:25:49,280 You know, they've taken lots of measures. 425 00:25:49,440 --> 00:25:51,440 They've got, they're fully patched, strong passwords. 426 00:25:53,200 --> 00:25:57,200 They're using, I don't know, host-based intrusion prevention systems, whatever you like. 427 00:25:57,340 --> 00:26:00,340 And you might fail with your standard kind of penetration attempts. 428 00:26:00,480 --> 00:26:04,140 But then you might think, okay, so maybe I can find some tokens somewhere else. 429 00:26:04,200 --> 00:26:10,940 But it's not really going to be very feasible to just start hunting the network and compromising any system you can 430 00:26:10,940 --> 00:26:15,000 and in the hope that you'll find some sort of token somewhere that's going to allow you access. 431 00:26:15,620 --> 00:26:17,480 That's just not going to happen normally. 432 00:26:18,020 --> 00:26:20,680 So what would be really great is if you could actually kind of sweep the network, 433 00:26:20,760 --> 00:26:22,940 try and look for systems that might have those tokens first, 434 00:26:23,500 --> 00:26:26,280 and give yourself a little short list of extra systems to compromise. 435 00:26:26,700 --> 00:26:32,460 And then if you're successful, you'll have found a token on another system and then be able to get access to them that way. 436 00:26:33,200 --> 00:26:35,340 So it'd be a precision strike, if you will. 437 00:26:36,980 --> 00:26:40,920 And, you know, going back to the example of a database server with, you know, looking for a data, 438 00:26:40,940 --> 00:26:42,300 a database administrator's desktop, 439 00:26:42,680 --> 00:26:46,360 you'd want to be sweeping the network trying to find out what desktop he's logged into 440 00:26:46,360 --> 00:26:48,120 and then you'd want to try and access that. 441 00:26:50,120 --> 00:26:55,920 So I kind of looked into that and found that there's a fairly simple way to go about that. 442 00:26:56,140 --> 00:27:01,460 It's not perfect, but it's a lot better than just the brute force approach. 443 00:27:02,300 --> 00:27:07,520 And I kind of wrote another sort of supplementary tool to go along with the incognito. 444 00:27:08,920 --> 00:27:10,920 And it actually makes use of an API call called, 445 00:27:10,940 --> 00:27:12,500 Network Station User Enum. 446 00:27:13,660 --> 00:27:16,460 And it's designed to enumerate all the currently logged on users. 447 00:27:18,480 --> 00:27:20,280 But, as I mentioned, it's not perfect. 448 00:27:20,400 --> 00:27:23,980 The problem is it will still list users that have logged off, 449 00:27:24,560 --> 00:27:29,060 you know, until the reboot happens, then they'll be there. 450 00:27:29,160 --> 00:27:31,000 So if it's a system that's not rebooted very often, 451 00:27:31,040 --> 00:27:33,520 you might have a lot of users reported, 452 00:27:34,020 --> 00:27:36,400 of which many of the tokens might not be available. 453 00:27:36,740 --> 00:27:40,120 The plus side is that what I spoke about before on unpatched systems 454 00:27:40,120 --> 00:27:41,460 with the tokens still hanging around, 455 00:27:42,720 --> 00:27:44,940 you're actually going to be able to find those systems. 456 00:27:45,280 --> 00:27:46,940 So it depends how you look at it. 457 00:27:47,480 --> 00:27:51,480 There may be some false positives, but there's uses with that as well. 458 00:27:52,960 --> 00:27:55,560 Now, in order to use that API call, 459 00:27:55,720 --> 00:27:58,200 you only need a standard domain user account. 460 00:27:58,700 --> 00:28:01,700 So on a pen test, it's kind of reasonable to assume that 461 00:28:01,700 --> 00:28:03,780 if you're doing an internal pen test, 462 00:28:03,900 --> 00:28:06,900 you're going to maybe compromise at least one user account 463 00:28:06,900 --> 00:28:08,740 through a weak password or whatever. 464 00:28:08,740 --> 00:28:11,880 Or even it might be feasible to kind of suggest 465 00:28:11,880 --> 00:28:14,980 that you're given a domain user account to start the test with, 466 00:28:15,060 --> 00:28:17,620 because if you're testing from the perspective of an internal employee, 467 00:28:17,820 --> 00:28:19,140 they're probably going to have an account already. 468 00:28:20,320 --> 00:28:21,760 So, you know, it's quite likely 469 00:28:21,760 --> 00:28:23,040 you're going to be able to use this functionality. 470 00:28:29,140 --> 00:28:30,960 So I'll just quickly demo this now. 471 00:28:51,200 --> 00:28:51,600 . 472 00:28:53,460 --> 00:28:57,000 Okay, so what I've used there, the account is called user. 473 00:28:57,060 --> 00:28:58,660 That's just a domain user account, 474 00:28:58,800 --> 00:29:01,100 standard low-privileged domain user account here. 475 00:29:01,660 --> 00:29:05,280 And I've rebooted the Windows 2000 server since the last demo, 476 00:29:05,360 --> 00:29:06,880 so there's no one logged onto it, 477 00:29:06,920 --> 00:29:08,320 and the only thing that's come up is the server. 478 00:29:08,740 --> 00:29:10,600 The SQL server account that's running there. 479 00:29:12,280 --> 00:29:13,420 But if I log on now, 480 00:29:14,820 --> 00:29:16,360 there's domain admin, for example. 481 00:29:21,020 --> 00:29:22,580 You'll find that now you can actually see 482 00:29:22,580 --> 00:29:24,380 that the domain admin is logged on there. 483 00:29:24,900 --> 00:29:26,880 Now, I've only looked at one host here, 484 00:29:26,960 --> 00:29:29,960 but you can just give it a file with a list of IPs or system names 485 00:29:29,960 --> 00:29:32,300 and let it sweep a network and then just grep through, 486 00:29:32,400 --> 00:29:34,040 looking for any accounts you're interested in. 487 00:29:34,260 --> 00:29:37,360 And in that sense, you might find some other systems 488 00:29:37,360 --> 00:29:38,560 and you've got a short list of something, 489 00:29:38,740 --> 00:29:39,000 something to attack. 490 00:29:39,940 --> 00:29:42,880 And consequently, you might be quite efficiently 491 00:29:42,880 --> 00:29:45,720 be able to locate that system, 492 00:29:45,820 --> 00:29:48,240 penetrate it if it's of a weaker level of security, 493 00:29:48,580 --> 00:29:49,820 and then use the token to access 494 00:29:50,900 --> 00:29:53,380 whatever sensitive system you're really interested in. 495 00:29:59,020 --> 00:30:01,640 Okay, so just a basic methodology for using that. 496 00:30:02,060 --> 00:30:05,460 If you want to conduct targeted penetration testing, 497 00:30:05,540 --> 00:30:07,860 then you just need to decide on your targets, 498 00:30:08,740 --> 00:30:11,600 so, again, a good example is critical database servers. 499 00:30:12,180 --> 00:30:14,080 Conduct your conventional penetration testing, 500 00:30:14,200 --> 00:30:16,400 but if that fails, then you want to make sure 501 00:30:16,400 --> 00:30:17,820 you've done your enumeration well 502 00:30:17,820 --> 00:30:20,420 and ideally located what users can access it. 503 00:30:20,540 --> 00:30:23,880 So, perhaps you've, you know, got null sessions 504 00:30:23,880 --> 00:30:28,260 and enumerated the fact that three different user accounts 505 00:30:28,260 --> 00:30:29,880 that you found out from the wiki 506 00:30:29,880 --> 00:30:31,940 are actually the database administrators for that, 507 00:30:32,000 --> 00:30:32,720 and then you think, okay, 508 00:30:32,840 --> 00:30:34,360 they're the accounts I'm looking for, 509 00:30:34,520 --> 00:30:36,480 and then you just use... 510 00:30:37,760 --> 00:30:38,720 find something else. 511 00:30:38,740 --> 00:30:39,920 And then use that one token, as I just showed you, 512 00:30:40,000 --> 00:30:40,320 and... 513 00:30:41,500 --> 00:30:43,080 I'm very sorry, I just realized that 514 00:30:43,600 --> 00:30:44,640 I didn't show the slides. 515 00:30:45,480 --> 00:30:46,060 Never mind. 516 00:30:49,040 --> 00:30:50,580 Yes, so you do use those tokens, 517 00:30:50,820 --> 00:30:52,260 try and penetrate them, and if you can, 518 00:30:53,520 --> 00:30:55,100 then you've just got yourself access 519 00:30:55,100 --> 00:30:56,180 to those database servers. 520 00:31:09,260 --> 00:31:11,000 Okay, so finally, a word on defense. 521 00:31:11,280 --> 00:31:13,720 I mean, this is a kind of feature of the operating system, 522 00:31:13,780 --> 00:31:15,560 so it's not something you just patch, 523 00:31:15,720 --> 00:31:18,300 but there is kind of standard advice you could follow 524 00:31:18,300 --> 00:31:20,460 that if you take into account any security policies, 525 00:31:20,640 --> 00:31:22,360 you really minimize the risk that this poses. 526 00:31:23,200 --> 00:31:25,920 And the first of the issues is limiting the use 527 00:31:25,920 --> 00:31:26,680 of privileged accounts, 528 00:31:27,940 --> 00:31:29,680 particularly using run-outs is a good example. 529 00:31:29,880 --> 00:31:32,120 So, you know, that's fairly standard security advice, 530 00:31:32,300 --> 00:31:34,340 but, I mean, I found most people... 531 00:31:34,700 --> 00:31:37,240 a lot of clients I've dealt with, they never use it. 532 00:31:37,240 --> 00:31:40,420 But if you do, then it's very useful 533 00:31:40,420 --> 00:31:41,920 because it's just minimizing that window 534 00:31:41,920 --> 00:31:43,840 that an attacker has to find the correct token. 535 00:31:44,180 --> 00:31:47,040 And additionally, I found that even on the unpatched systems, 536 00:31:47,200 --> 00:31:48,460 where if you normally log in, 537 00:31:49,080 --> 00:31:51,380 once you've logged out, the token still remains, 538 00:31:52,000 --> 00:31:54,160 even on those systems, if you use run-outs, 539 00:31:54,220 --> 00:31:57,260 once you close the process, that's still cleaned up properly. 540 00:31:57,480 --> 00:31:58,960 So that's an additional bonus 541 00:31:58,960 --> 00:32:00,860 for any unpatched systems out there. 542 00:32:02,020 --> 00:32:05,080 There's also an active directory option called 543 00:32:05,080 --> 00:32:07,220 account is sensitive and cannot be delegated. 544 00:32:08,440 --> 00:32:11,140 Unfortunately, that doesn't work for interactive log-ons, 545 00:32:11,180 --> 00:32:13,640 but it does work for non-interactive log-ons 546 00:32:13,640 --> 00:32:14,860 where delegation's being used. 547 00:32:15,100 --> 00:32:16,680 So if you've got highly privileged accounts, 548 00:32:17,080 --> 00:32:19,520 you just want to make sure that you don't fall victim 549 00:32:19,520 --> 00:32:23,300 to a delegation-level attack 550 00:32:23,300 --> 00:32:24,980 when it's a non-interactive log-on, 551 00:32:25,000 --> 00:32:26,480 like an EFS server, 552 00:32:26,680 --> 00:32:29,120 then if you check that, that minimizes the risk. 553 00:32:30,260 --> 00:32:33,880 Obviously, you lose the ability to access remote EFS servers 554 00:32:33,880 --> 00:32:36,940 or use any other form of kind of delegated authentication 555 00:32:37,240 --> 00:32:37,900 if you do that, 556 00:32:37,980 --> 00:32:39,600 but it's a kind of small price to pay 557 00:32:39,600 --> 00:32:40,920 if it's going to protect you. 558 00:32:42,440 --> 00:32:44,720 But probably the biggest piece of advice 559 00:32:44,720 --> 00:32:47,160 is to just not rely on only securing 560 00:32:47,160 --> 00:32:49,420 what you consider your real sensitive servers. 561 00:32:49,560 --> 00:32:51,480 There are many other ways of getting into systems, 562 00:32:51,580 --> 00:32:53,400 and in particular, 563 00:32:53,580 --> 00:32:55,540 you've got to think about your administrator's desktops. 564 00:32:55,840 --> 00:32:58,240 You can't just have them on a kind of roll-out 565 00:32:58,240 --> 00:33:00,320 that's unattended, 566 00:33:00,320 --> 00:33:03,320 where there's no real patch management plan involved 567 00:33:03,320 --> 00:33:04,800 like there might be with your servers. 568 00:33:05,860 --> 00:33:07,220 You've got to really think about 569 00:33:07,240 --> 00:33:07,960 everything. 570 00:33:09,080 --> 00:33:11,540 And sometimes people you've found before 571 00:33:11,540 --> 00:33:13,100 that local administrative passwords 572 00:33:13,100 --> 00:33:13,860 might be set the same. 573 00:33:13,940 --> 00:33:14,740 You might be aware of that 574 00:33:15,980 --> 00:33:18,040 and as such haven't set those the same 575 00:33:18,040 --> 00:33:19,080 and think that that means you're secure, 576 00:33:19,220 --> 00:33:22,680 but obviously the ability to take tokens 577 00:33:22,680 --> 00:33:25,560 and use them means that you can still 578 00:33:25,560 --> 00:33:26,440 access other servers, 579 00:33:26,520 --> 00:33:27,480 so you've got to think about that. 580 00:33:28,220 --> 00:33:29,700 But another thing is to really kind of 581 00:33:29,700 --> 00:33:31,140 change your way of thinking about this. 582 00:33:31,240 --> 00:33:34,040 It's easy to think about security 583 00:33:34,040 --> 00:33:35,920 in the sense of either account-based security 584 00:33:35,920 --> 00:33:37,380 or system-based security. 585 00:33:37,540 --> 00:33:38,360 With accounts you think, 586 00:33:38,460 --> 00:33:39,880 this is a sensitive account 587 00:33:39,880 --> 00:33:41,460 and as such I'm going to protect it well 588 00:33:41,460 --> 00:33:42,600 by using a strong password, 589 00:33:42,820 --> 00:33:44,660 or this is a sensitive system 590 00:33:44,660 --> 00:33:45,740 so I'm going to protect it well 591 00:33:45,740 --> 00:33:47,160 by patching it well 592 00:33:47,160 --> 00:33:49,380 and configuring other policies 593 00:33:49,380 --> 00:33:50,200 and hardening it. 594 00:33:51,760 --> 00:33:53,920 But really you need to think of them in combination 595 00:33:54,440 --> 00:33:56,700 because a resource is only as secure 596 00:33:57,700 --> 00:33:59,480 as the weakest system 597 00:33:59,480 --> 00:34:01,220 that any account has access to it 598 00:34:01,220 --> 00:34:03,500 is currently kind of logged into and using. 599 00:34:03,900 --> 00:34:05,560 And the more systems you log into 600 00:34:05,560 --> 00:34:06,360 and the weaker ones, 601 00:34:06,420 --> 00:34:08,560 the more you expand your risk in that sense. 602 00:34:08,700 --> 00:34:09,580 You've got to think about that. 603 00:34:09,720 --> 00:34:12,780 And so really you need to kind of have policies 604 00:34:12,780 --> 00:34:17,140 governing what security requirements 605 00:34:17,140 --> 00:34:18,580 the system has to be able to meet 606 00:34:18,580 --> 00:34:20,720 if you're going to use a particular account 607 00:34:20,720 --> 00:34:21,480 to log into it. 608 00:34:22,400 --> 00:34:23,360 And then additionally, 609 00:34:23,880 --> 00:34:25,960 you just want to try and separate your privileges. 610 00:34:26,140 --> 00:34:28,440 Again, that's fairly standard security advice. 611 00:34:28,820 --> 00:34:30,380 Use separate administrative accounts 612 00:34:30,380 --> 00:34:31,940 for different things where possible, 613 00:34:32,420 --> 00:34:33,960 particularly development and test systems. 614 00:34:34,140 --> 00:34:34,920 If you do that, 615 00:34:35,560 --> 00:34:36,880 if a weaker system is penetrated, 616 00:34:37,080 --> 00:34:38,360 they might take the token 617 00:34:38,360 --> 00:34:39,820 but it might not get them access to, 618 00:34:39,900 --> 00:34:42,980 it won't get them access to the things they really want. 619 00:34:43,220 --> 00:34:46,320 So that's really all that can be done. 620 00:34:47,980 --> 00:34:49,760 So yeah, as I said, there's no real patch 621 00:34:49,760 --> 00:34:51,280 but follow the right kind of advice 622 00:34:51,280 --> 00:34:53,280 and you can minimize your risk. 623 00:34:53,420 --> 00:34:55,160 But if you don't take it into account at all, 624 00:34:55,260 --> 00:34:59,040 you could be exposed a lot more greatly than you imagine. 625 00:35:00,260 --> 00:35:02,820 Okay, so that pretty much concludes the presentation. 626 00:35:03,060 --> 00:35:04,840 I'm sorry about all the technical difficulties 627 00:35:04,840 --> 00:35:05,440 we had. 628 00:35:05,660 --> 00:35:07,420 I particularly wish I could have demonstrated 629 00:35:07,920 --> 00:35:10,100 the Metasploit action for you 630 00:35:10,100 --> 00:35:11,240 but I just had to wait for the code. 631 00:35:11,520 --> 00:35:12,520 But that's it. 632 00:35:12,600 --> 00:35:13,220 Thanks very much.