Good afternoon. Thank you for coming. My name is Cesar Cerrudo. I'm going to present Token Kidnappings Revenge. This is kind of follow-up of research I did before that was called Token Kidnapping. All the issues I found in previous research were fixed and these are all new issues. The objectives of this talk are first to demonstrate that while Windows operating system are getting more secure with every new version, there are still some issues that are very easy to find. Just scratching the surface you can find some issues. This allows to bypass protection, et cetera, as we are going to see. Another objective is to try to show you how I found these issues with the tools, with the techniques I used so you can learn, so you can do it at home or work. It's an important thing for me as a takeaway for you if you can learn something today. I'm going to be fast. I have a lot of demonstrations. So in the past, think about Windows 2000 and before. All the Windows services use to run under the local system account, which is the most powerful medal of Comworks operating systems. So if service was compromised, then all the system was compromised. And then with Windows 2010 and all the apps you will have to awesome three and XP, Microsoft introduced a couple of new user accounts called network service and local service. This account has restricted privileges. They have fewer privileges than the local system account. So in theory they started to run some system services under this account to prevent when one of these services was exploited, that doesn't mean that all the system was going to be compromised. Then with Windows Vista, Windows 2008 and Windows 7, there were a lot of new protections for Windows services. They improved a lot from the previous operating system version, but we are going to see that this protection can be easily bypassed by some issues. Let's see some theory first about what is impersonation and what are tokens. Impersonation is, we can say, is when a thread can act as it's running under another user account as the process that's on the thread. For instance, we have a process that is running on a network service. So we have a thread that is running under the network service account. So that process can impersonate. So when a thread starts to impersonate, it can start acting as it were another user. So when this thread starts to access resources such as file system or registry, all the ACL checks are performed against the impersonated user and not the user that the process is running under. And there are many different ways of doing this. There are very few different APIs to impersonate. Here we have a few like impersonate VIN clients, impersonate on user and RPC impersonate clients. So when you call one of these API's and a client connected to your service then if you can impersonate, you start impersonating. In order to be able to impersonate the account that the process is running under has to have to impersonate a client after inheritance. authentication privileges. This privilege is not assigned to all users, only to accounts such as network service, local service and accounts used to run services on Windows. Also IIS, Internet Information Services, worker processes, the processes that are used to run web applications, those have impersonation privileges too. And also we have Windows management instrumentation processes, which also has impersonation. And they run on the network service, local service and local system account. So when a threat starts to impersonate, it will get impersonation, an associated impersonation token. Oh. Well, a token is a Windows object that has information about the security context of a threat. And the token is used for a threat or a process. It includes information such as the identity of the user and the privileges associated with the user. There are two kinds of tokens. We have primary tokens and impersonation tokens. The primary ones are those that are assigned to processes during process creation. And then the impersonation tokens are those that are argued when a threat impersonates. There are different levels of impersonation. We have security anonymous, identity impersonation and delegation. We will focus on the impersonation level which is when a threat can act like it's another user. On Windows XP, most Windows functions in 2003, the serv deles원드 the network service, local service, local system or user accounts. And all the services on this Windows version are neutral. These are unreal, you can use the can impersonate. There was a weakness I found in my previous search that if there were two processes, two service processes running under the same account, they could access each other and get a token, impersonation token from the other process and elevate privileges. So what Microsoft did was adding a protection to special processes and services to avoid them to access each other and get token and elevate privileges. So they protected mostly processes that impersonate the system account. So for instance, they protected the service that ran RPC. And they also protected Windows management instrumentation processes. We also impersonated the system account. On Windows Vista 2008 and Windows 7, one of the new protections that were added by Microsoft is called per service SID. This is a really good protection. But basically what they do is just put a special ACL in the process object. So for instance, we have a service that is running on the network service account. So they remove the network service account from the ACL of the process. And they put a special ACL in the process and they insert a unique SID on the ACL. This means that the other processes that are running on the network service account won't be able to access these processes because they don't have permissions. Basically this is almost the same protection they added to fix the issues on Windows XP and 2003. I found a couple of weaknesses on Windows Vista 2008 and 2003. One of the weaknesses is functionality. So let me explain. It was in 2008 that while the regular thread were properly protected by an ACL, like the same as the process, the thread from thread pools were special kind of thread, managed by pools on Windows, is a functionality provided to automatically managed thread. They had a default ACL. So other process running on the same account could access these thread pools and manipulate them and eliminate the ACL. So they have privileges or do another things from another process different that the process that was attacking. Another issue was like and I think I already said that Windows management instrumentation processes that runs on the network service local service system account they were not protected by a proper ACL and these services these processes impersonate the system account so any other process running under the same account can access these processes and steal the token and elevate privileges. So the fix that Microsoft did was properly protect the thread from the thread pools with a proper ACL and also the same for the Windows management instrumentation processes. So when I when Windows 7 was available I think was the release candidate I decided to take a look at it to see if I could find some low hanging fruit just like I said scratching the surface to see if there was something easy to find with simple tools. I will show you the tools, for instance we have process explorer tool. This tool allows you to run all the processes on a Windows system. You can see here the process names, the process IDs in this column, description of the process, here you can see the user name that the process is running under, you can see if DEP is enabled, the integrity level of the process, etc. And when you select one process you can see information related to the process. Here you can we can see all the handles the process has opened, we can see the token handles, the thread handles, registry key handles, setting for file handles, etc. Also we can see the information related to the process like the security, we can see the permissions, the ACL of the process, the privileges assigned to the account that the process is running under, we can see the thread, it's a lot of information. For instance if you double click over a service, in this case it's SBC host process which is a hosting process that is hosting many services inside, we can see here all the services, we can see the permissions, we can stop and start the services. This tool is really easy to use. And very powerful. So I started to play with this tool, looking around, permissions, processes, on the handles, etc. And I couldn't find anything in a couple of minutes. So I think I was checking if the protections Microsoft added to fix the issues I found before were okay. And everything was fine, so I thought that it was pretty secure. Then I remembered that I had found a little issue on Windows 2008. But it's a minor issue. The issue is about on telephony service, we can see here, this is another SBC host process that is hosting five services and one of them is the telephony service, TAPI service. The issue is that it's a little bit complicated. But inside this process, there is a process handle from another process. You can see here the process ID is 1308. I don't know if you can see there. This one is process ID 976. And this service runs under the network service account. You can see it here. Network service account. But the other process that this process has the handle inside that process was, let me see, 976. We can go to process 976. And this process runs under the system account. So this is weird because there is a process running under a low privileges account having a handle, a process handle for a privileges process. So I took a look about Windows debugger. To see what were the access of that handle. So we can attach the process on Windows debugger and take a look at the handles. And you can see here the handle value in EXA notation. This is the handle from the process itself. And this is the handle from the process that is running under the system account. And we can see here that it has granted access, duplicate handle granted access. That means that from this process I can access any handle from the other process, duplicate them and do whatever I want. I can do almost anything with the other process. And this is clearly an issue because I am accessing from a process running under the network service account to a process running under the system account which is the most powerful account on Windows. So I could duplicate, for instance, the primary token which will be a system token and use it to elevate privileges. It's pretty simple. But in order to exploit this issue, first you have to find an issue on the telephone service itself. Because this will be a post exploitation issue that I could use to elevate privileges. But first I have to find an issue on... on the telephone service. So that was the only I was getting when looking at Windows 7. So I started to focus on the telephone service. So I decided to use the... There is another tool called Process Monitor. It allows you to monitor all system activity on the Windows operating system. And it allows you to filter by many options. You can filter by process ID to display activity to a specific process, by process name, by path of the object that is being accessed, etc. You have a lot of options. This is also a very powerful tool. And you can monitor at the same time registry access, file access, network access. So what I did was set a filter to monitor only the telephone service and run the tool. And after running the tool, I had to interact in some way to the service. So the service will perform some action that will be captured by the tool. So what I did was starting the... I stopped and started the service. And you can see there in the background the tool is capturing activity. So I stopped the service. Then I started again. And... A lot of activities was being captured. So when looking at the capture, there were a lot of things. So I started to look around. And there was something that got my attention. That was one registry key that I haven't seen before. It's a registry key on HKEY local machine key. And the subkey is called tracing slash TAPI SRV. I don't know if you can see it there. So I went to registry editor to look at this registry key. And I thought about checking permissions on the key. And when I checked the permission, I found a surprise there. I found that the local service, network service, and user account had a special permission. So I went to see what were those special permissions. And I found out that all these accounts could set value, has the permission of set value in this registry key. So this is another issue because any user can set any value in this registry key that is then read by a privileged process such as the telephony service. So I think it was a way to maybe exploit in something and then elevate the privileges with the previous issue. So I started to look around at the registry values. And also the registry subkeys. And I could see very, you can see here, very similar names to processes in Windows. So I thought it was a functionality that was used by many processes in Windows. I didn't know what was allowed. I was just playing with the tools. So then I started to look at the values of the subkeys. And I found one interesting value called file directory that has a data value of directory, Windows directory. So I looked at the directory and it was empty. You can see there, there is nothing there. Then I continued looking at the values. And I found another more interesting value that was almost self-describing. The value is named enable file tracing. And it was a tracing, remember, tracing subkey. So I said, okay, let's set this value to one to see what happened. So I set the value to one. And in the background, a process monitor was still running. So I set the value to one. And returning to see on process monitor, it saw something was happening. And I couldn't find something interesting. Here at the end, you can see a file being created in the directory that was specified in the registry. So when I saw this, I started to think that this was exploitable. Maybe the guys that know about Windows local exploitation know how to exploit it already. So I could get a file created in any directory I want. So it was clearly an issue because any user could do that, could change that registry key. You can see there the file that was created. It's TAPI SRV log. So after this, I started to research more. What was this tracing functionality? I noticed that it was a functionality used by some services and processes to save information related with the bug, with errors. I don't know. Maybe Microsoft used this information for customer support. I don't know. But basically, in those files that it's created, it saved the bug information. And error information. So the way to exploit it is pretty simple. NamePy, you remember one of the APIs used for impersonation I mentioned at the beginning. It's called impersonate NamePy client. What you can do is build a simple program that creates a NamePy client. NamePy, lessen on the pipe and wait for connections. When it gets a connection, it will impersonate the process that is connecting to the pipe. So I saw the issue was very easy to exploit. But I have to confirm if the process will try to access the pipe. So I said in the file directory value, slash localhost, slash pipe, slash x, which will be a NamePy. And after setting the value, I went to process monitor and I found that the telephony service was trying to access the NamePy. You can see there it is trying to access the NamePy. So this was clearly exploitable and pretty easy to exploit. Just the only need for an attacker to exploit this is to be able to impersonate. If you can impersonate, then you can elevate first privileges to network service account, which is the TAPI service account. And from the TAPI service account, you can access the other process that is running under the system account. Because the process is handled with duplicate handle privileges. So basically, you can go from... Any user with impersonation privileges to local system account. But using... Changing the registry value for the telephony service will be a two-stage attack. So I decided to look at the other registry keys. And I found one familiar for me, which is IPHLPSVC, which reminds me of the IP helper service. So I went to process explorer trying to... To see if it was the same name as the IP helper. So I looked for the IP helper and I found it. You can see there the IP helper service is hosted in a SVC host process. And the process runs under the system account. So this is the best candidate for exploitation. I only need to write a value to... To the subkey of... Of this service. Put in a name pipe there. And they wait for the connection of this service. And impersonate the system account. And elevate privileges. You can see there I changed the value. Enabled file tracing. And then process monitor. Sorry. You can see here the file is being created after I changed the value. When I enabled the tracing functionality. When doing a more in depth research, I started to debug a little. And I found out that this... The processes that use this tracing functionality, they will be monitoring all the time for the registry. So if there is any change to the registry key, they will read it instantly. There is a special API used to monitor it. To monitor changes on registry. And they use it. So the exploit is pretty simple. What you have to do is just set a name pipe. Create it. Lesson on it. Change the registry value to the name pipe. Enable file tracing. And you get the impersonation token from the system account. And elevate privileges. I will show you an exploit now. I have... I run netcat locally. And then I have... Accessing an internet information service 7.5. Which I have a .net command shell there. I can run any command. And you can see the version is 6.1. It's Windows 2008 release 2. And you can see the web application. The worker process of internet information services is running under this special account. Call it default app pool. That was introduced on Windows 2000 release 2. Microsoft decided to change that the services... The web application on internet information services don't run anymore by default under the network service account. So now, by default, they run under this special account. Which has the same privileges as the network service account. It can impersonate. Which is cool. So I have uploaded this command shell to the service. To the server. Then I also uploaded the exploit. The exploit is called chimichurri. So I put the path of the exploit. The remote IP and the port number. I run the exploit. And I get a reverse shell on my host. And you can see here. It's a reverse shell running under the system account. So it's pretty easy to exploit. You just need to be able to upload some stuff to some internet information server. And you can get... You can root the system. Let's see the... Some code. Well, this exploit is called chimichurri. Which is an Argentinian source. Used for churrasco. It was an idea of Federico Kirchman. San Federico. For the nice name. So basically, this exploit, what it does is creating the pipe. You can see here. The name of the pipe. With the file name that is created by the service. When tracing functionality is enabled. So we set this value. On the registry. On the registry value. And then enable file tracing. And we get this file. The name pipe. Try to be accessed. So here the name pipe is created. Here we can listen on the pipe. And when we get the connection. We impersonate. And with the impersonation. We open the thread token. And we run a reverse shell. The trigger of the vulnerability is here. This is the trigger of the vulnerability. So we set the file. The tracing file name. File tracing name. To this value. And then we enable file tracing. And that's it. It's a pretty simple exploit. So after finding this issue. After finding this issue. I decided to continue looking at the telephone service. Because it was very easy to find this issue. And I started to look. And so there were really more easy to find. So I found that with the dialer application. Which you can dial and call. By using the modem. You can interact with the telephone service. It uses the service to make the telephone connection. To handle the modem, etc. So I run the dialer application. While monitoring the activity with process monitor. And a lot of activity was captured. So looking at the capture. I found another interesting key. Registry key. Which I haven't seen before. So it got my attention. It's on H key. Local machine. Software. Microsoft. Windows. Current version. Telephony. So I went to this. To reach. To see what was this registry about. With registry editor. And again. The first thing I did was checking the permissions. And I found another issue there. When checking the permissions. You can see there. That network service account. Has full control over the key. Why this is an issue? Because. You may think. It is okay. Because the process running under the network account. So the process should have permission. To manipulate this key. But the issue is. That this breaks the per server. Per SID protection. Because. Any other service. Or process. Running under this account. Will be able to manipulate this registry key. Which then will be read. By the telephone. Is service. Which is a different service. So we are. By this permission issue. We are breaking the per. Service SID protection. But in order to exploit this. I had to find. Some way to do it. So I started to. To look at the. Different sub keys. And there were a lot of sub keys. Until I found. Another. An interesting. Sub key. With some. Interesting. Values. You can see there. Provided file name. Zero. Provided file name. One. Provided. Many. String values. There. That. Has. A data value. What is. Seem to be. A file. A file name. With extension. TSP. And. Looking at. The. Process. Monitor. I found. That the service. Was trying to access. This. This. Files. And. To my surprise. These. Files. Were loaded. As a. DLL. You can see there. That this file. Are loaded. DLL. Load image. Operation. So. The. Issue. Started. To become. Very easy. To exploit. So. Any. Service. Could. Change. This. Registry. Value. Any. Any. So. To. Check. If. It. Was. Really. A. DLL. So. What. I. Did. Was. Open. It. With. Notepad. And. Check. For. The. Headers. You. Can. See. MF. At. The. Beginning. And. This. Program. Can. Run. In. Those. Mode. So. It's. Actually. A. Real. DLL. So. It. Easy. To. Exploit. I. Mean. Just. Changing. A. Registry. Value. Because. In. This. Case. This. All. This. File. Were. Loaded. As. DLL. Because. The. Dialer. Application. Was. Interacted. With. A. Service. Was. Interacting. With. A. Service. You. Can. See. There. Also. The. Other. File. Names. Are. Also. Loaded. As. DLLs. So. What. I. Did. Was. Going. To. MSDN. Looking. For. Information. About. The. Telephony. Service. To. Find. Out. How. I. Could. From. My. Exploit. I. Could. Interact. With. A. Service. To. Get. The. DLL. Loaded. So. I. Started. To. Look. Around. The. Documentation. Until. I. Found. A. Really. Interesting. API. That. Was. Almost. Self. Describing. The. API. Is. Named. Line. Add. Provider. And. You. Can. See. In. Description. Is. This. Function. Install. A. New. Telephony. Service. Provider. Name. Almost. Similar. As. The. Registry. Value. Name. And. Can. See. The. Description. Is. Pointer. To. A. Non. Terminated. String. Containing. The. Path. Of. The. Service. Provider. To. Call. The. API. Line. Add. Provider. And. We. Pass. As. A. First. Parameter. Toto. TSP. So. I. Build. This. Application. And. Started. To. Run. Test. To. See. What. Was. What. And. On. Process. Monitor. I. Could. See. That. The. Telephone. Service. Was. Trying. To. Find. The. File. On. All. The. Registry. Path. Of. The. System. You. Couldn. Find. Because. It. Didn't. Exist. But. I. Find. Now. That. This. API. Really. Worked. And. It. Will. Get. Me. The. DLL. Directory. Loaded. I. Had. To. Confirm. It. Will. Running. Under. The. Network. Service. And. Account. So. What. I. Did. Was. I. Created. A. Windows. Task. Set. The. Task. To. Run. Under. The. Network. Service. Account. So. I. Was. Trying. To. Load. The. File. You. Can. See. Here. Again. It. Tried. To. Find. The. File. On. The. Registered. System. Path. So. I. Could. Find. Now. Finally. That. Was. Issue. And. Was. Very. Easy. To. Exploit. Just. Call. The. API. Pass. A. DLL. And. You. Get. It. Loaded. Inside. The. Telephone. Service. And. From. There. The. DLL. Code. Can. Manipulate. The. Handle. Of. The. Process. Running. Under. System. Account. And. Elevated. System. So. One. Last. Try. I. Have. To. Do. Was. Try. To. Run. The. The. The. The. Program. As. A. Local. Service. Account. Because. It. Was. Clearly. That. Network. Service. Account. Will. Work. Because. The. Registry. Permission. Was. Full. Control. For. Network. Service. Account. Because. In. This. Case. Any. User. Running. Under. The. Network. Service. Or. Any. Process. Running. Under. Network. Service. Or. Local. Service. Account. Could. Get. A. Dll. Loaded. Inside. The. Tablet. And. Test. Program. I. Noticed. Something. If. You. Remember. In. Order. To. Elevate. Privileges. From. The. Telephone. Service. To. Local. System. Account. We. Need. To. Have. The. Process. Handle. With. Duplicate. Privileges. Inside. The. Tablet. Service. And. In. The. Test. I. Did. Sometimes. That. Process. Handle. Wasn't. There. And. That. Was. The. Case. Sometimes. The. Exploit. Wouldn't. Work. Because. I. Be. Trapped. Inside. That. Service. Without. Elevating. Privileges. So. I. Have. To. Find. Out. Why. Sometimes. The. Process. Was. A. Process. Handle. Was. There. Or. Not. So. When. Running. The. Dialer. Application. I. Notice. That. Also. The. Telephone. Service. Get. A. Handle. Of. The. Dialer. Process. So. I. Look. At. Again. With. The. Windows. Debugger. Any. Process. That. Uses. Telephone. In. Service. Functionality. Will. Get. A. Process. Handle. With. Duplicate. Handle. Access. Inside. The. Telephone. Service. So. What. I. To. Do. Now. Is. To. Find. Out. What. Was. The. Service. That. Was. Running. Under. The. System. Account. And. Accessing. The. Functionality. Of. The. Telephone. Service. So. I. Get. The. PID. Of. The. Process. And. Started. To. Look. It. Was. A. SBC. You. Can. See. Here. It. Was. A. SBC. Host. Process. Hosting. A. Lot. Of. Services. So. The. Option. Will. Be. Stop. One. That. Was. Really. Suspicious. To. Be. The. Guilty. Because. The. Name. Was. A. Remote. Access. Connection. Manager. So. I. Said. Okay. Access. Remote. Connection. Should. Use. Maybe. Telephone. Service. The. Process. Handled. From. The. Process. Not. From. The. Process. Running. Under. System. Account. So. I. Found. Out. What. Was. The. Service. That. Was. Running. Under. System. Account. That. Interacting. With. Telephone. Service. The. Next. Step. Was. To. Check. If. Any. User. Could. Run. This. Service. Because. If. The. Service. Wasn't. Running. If. I. Want. To. Exploit. The. Telephone. Service. I. Won't. Be. Able. To. Get. This. Process. Handled. Duplicated. So. What. I. Did. Was. Checking. The. Permissions. On. The. Service. On. The. Rasmus. Service. And. I. Found. Out. That. Any. User. Can. Run. The. Rasmus. Service. So. If. The. Service. Not. Running. Then. You. Can. Run. It. And. Then. Exploit. And. Elevate. Privileges. You. Be. Had. The. Handle. Inside. The. Telephony. Service. I. Take. Also. It. Was. My. Initial. Test. Was. On. Windows. 7. By. I. Did. The. Same. Thing. Test. On. The. On. The. Registry. Permission. Issues. Wasn't. Present. On. Windows. 2003. So. There. Were. No. Issues. Related. With. The. Permissions. But. The. Surprise. Was. That. The. Telephony. Service. On. Windows. 2003. On. Windows. XP. Runs. Under. The. System. Account. So. If. I'm. Local. System. Account. On. Network. Service. Account. I. Just. Call. The. API. And. Get. The. DLL. Under. System. Account. It's. More. Easy. To. Exploit. On. Windows. 2003. And. XP. You. Can. See. Here. The. Telephony. Service. Running. Under. System. Account. On. Windows. 2003. You. So. No. Issues. With. Registry. Permissions. So. While. I. Researching. The. Issues. I. Noticed. Something. Strange. On. Registry. Access. Some. Processes. Trying. To. Access. Some. Different. Sub. Keys. With. Similar. Name. On. Their. Different. Keys. Also. So. I. Started. To. Look. Around. I. Have. Few. Time. I. Test. Again. The. Fix. On. For. Windows. Management. Instrumentation. Process. On. See. Here. And. The. In. Charge. Of. Running. This. Windows. Management. Instrumentation. Process. Is. The. Decon. Launch. Process. So. I. Started. To. Monitor. This. Process. The. Decon. Launch. Process. And. Launched. The. Windows. Management. Instrumentation. Process. With. A. Test. Script. And. You. Can. See. Here. That. The. Windows. Management. Instrumentation. Is. Running. Under. The. Network. Service. Account. So. I. Tried. To. Find. A. Way. To. Modify. This. ACL. To. Able. To. Exploit. It. So. I. Continue. Research. In. This. By. Looking. At. The. Process. In. This. Is. Which. Is. Com. Launcher. Process. Is. In. Charge. Of. Launching. The. Windows. Management. Instrumentation. Process. With. Which. Are. These. So. I. Was. Monitoring. The. Activity. Related. With. Five. Twenty. Classes. This. Is. The. Classes. Sub. Key. For. The. Network. Service. Account. The. S. One. Five. Twenty. S. Id. Is. The. S. Id. Of. The. Network. Service. Not. Wrong. So. The. Process. Continued. With. Activity. And. Later. It. Tried. To. Access. The. Same. Sub. Key. As. Before. But. In. Another. Different. Key. In. This. Case. The. Key. Is. H. Key. Classes. Root. So. I. Try. To. Access. The. Key. In. That. Key. And. Find. It. And. Then. After. Finding. It. Will. Use. The. Values. To. Use. These. Values. So. I. Found. That. This. Was. Probably. An. Issue. Because. The. Sub. Key. Under. H. Key. User. This. Key. Can. Be. Manipulated. By. The. User. Administrators. And. System. Account. And. Cannot. Be. Modified. By. Other. Users. So. There. Is. Probably. An. Issue. Here. Because. Users. Can. Modify. The. User. Sub. Key. And. This. Sub. Key. That. Would. Been. Read. Windows. Problems. Check. As. You. Can. See. Windows. Media. Plus. Share. Sometimes. Has. Some. Problems. Okay. We'll. Continue. With. This. So. There. Was. The. Problem. Here. Was. That. We. Have. Two. Different. Keys. One. Controlled. By. Administrators. And. One. Controlled. By. Users. And. These. Two. Different. Keys. Are. Accessed. By. A. Privileged. Process. And. Try. To. Read. Value. From. Them. So. I. Thought. What. About. If. I. Create. Those. Values. That. Are. Not. Present. There. And. Maybe. The. Process. Will. Read. The. Values. I. Create. And. Use. Them. And. Maybe. I. Can. Elevate. Privileges. And. Modify. The. Actions. Or. Do. Something. So. I. Started. To. To. Make. Some. Test. Creating. The. Values. That. Were. Not. Existing. On. The. Network. Service. User. For. The. Value. And. Discretion. Of. MC. MCDN. I. Found. It. I. Said. That. It. Contrast. The. Behavior. The. Security. Behavior. Of. Com. Servers. So. I. Say. Okay. And. The. Value. That. Was. Being. Used. Was. Number. Two. That. Was. Secure. Com. Server. So. Okay. I. Say. Maybe. This. Value. Is. Used. To. Secure. The. Process. So. Let's. Try. To. Set. The. Value. To. Zero. So. I. Did. That. Create. The. Value. Set. It. To. Zero. Run. The. Test. Program. And. I. Got. The. Windows. Management. Instrumentation. Process. Running. Without. Protections. And. Exploiting. It. Will. Easy. Because. I. Already. Have. The. Exploit. That. I. Did. For. My. Previous. Research. So. The. Only. Change. I. Have. To. Do. To. Exploit. Was. Creating. A. Registry. Value. The. Form. Exploit. Was. Churrasco. This. Is. Churrasquito. Which. Is. A. Churrasco. The. Only. Modification. I. Have. To. Do. Was. Just. One. Five. Classes. App. I. D. And. Then. Set. The. App. I. D. Flags. Value. To. Zero. So. When. I. Set. This. Value. To. Zero. Then. I. Call. Windows. Management. Service. Six. By. Before. It. Runs. Under. The. Network. Service. Account. So. You. Only. Need. To. Upload. A. Command. Shell. Or. An. S. A. Sp. Dot. Net. Exploit. And. Run. In. Team. Has. A. A. I. My. Name. In. So, I run Netcat locally, so I already uploaded a command shell, this is IIS 6, so I can run any command there, and you can see that by default it runs under the network service account. This is Windows 2003, fully patched, and IIS is, this application is running on the network service account. So, I run churrasquito, set the remote IP and port number, and I get the remote shell running under the system account. Like I said, it's almost the same exploit, churrasco, with a little modification, just creating a registry value, and that's it to bypass the fix that Microsoft introduced for my previous research. So, we should be ending. So, the threat scenarios, basically, are web hosting companies, where they allow you to upload your stuff, and you can run web applications, so you can compromise them for $5 or $4.99. In companies, it works like this. Developers can also upload codes for testing, production. They are not administrators, but they can upload codes, so they could also compromise servers. SQL Server administrators, which are not Windows administration, they can also run programs, and SQL Server account can impersonate, so they can also compromise the server. And finally, like we already saw, on process protection scenarios, some of these issues will allow you to bypass the protection. First, you can exploit some service, and you will be kind of trapped there, because you don't have enough privileges, and you cannot access other processes. By exploiting the issue, you will be able to elevate your system and escape from the protections. So, about fixes, Microsoft will be fixing the registry key issue, and another local elevation of privileges that I didn't speak about today, because any user can elevate privileges on Windows 2008, 2000, no, Vista and 7. Also, Microsoft is releasing an advisory stating the issues related to impersonation with the network service and local service account. So our final conclusion is that Microsoft has improved a lot, but some protection can be easily bypassed sometimes with simple issues like the one I showed. And like you saw, finding these issues are not difficult, just making click around using public available tools. You just need to look and observe and find the issues. So we are out of time. Thank you for coming. We have questions. In the question and answer room, if you want. Thank you.