Original URL: https://www.theregister.com/2002/04/01/winnt_2k_debug_process_gives/

Win-NT, 2K debug process gives up control

Got root?

By Thomas C Greene

Posted in Software, 1st April 2002 14:22 GMT

A security hole in Win-NT and 2K could enable an attacker to take control by exploiting a flaw in the debugging subsystem (SMSS). Radim "EliCZ" Picha has demonstrated that it's possible for an unprivileged user to execute debug processes in the System context.

At issue is an exploitable LPC (Local Procedure Call) port, to which any user or process has access. By exploiting the LPC flaw, an attacker can bypass the CSRSS (Client Server Runtime Subsystem) and avoid the normal privilege restrictions for debug commands.

According to a recent posting to the BugTraq mailing list, an attacker would cause SMSS.exe to duplicate a handle to the target, which can be any running process. He connects to the debug LPC, requests CreateProcess SsApi with the target's client ID, receives the duplicated handle, and owns the box. At this point the attacker can execute external programs in the System account.

A working exploit called DebPloit with source code is located here, so you can verify the vulnerability.

MS hasn't managed to patch it yet, but has managed to complain that the exploit was released without its approval. In the mean time, the author of the BugTraq post also provides a hotfix which he says will make the LPC port available only to processes running in the System account. Both items are mirrored here as well.

We haven't verified either of these files, so check them out thoroughly before mucking about with critical systems. ®