{"id":479,"date":"2011-09-11T16:28:06","date_gmt":"2011-09-11T16:28:06","guid":{"rendered":"http:\/\/pentestmonkey.net\/?p=479"},"modified":"2011-11-11T17:30:22","modified_gmt":"2011-11-11T17:30:22","slug":"from-local-admin-to-domain-admin","status":"publish","type":"post","link":"https:\/\/pentestmonkey.net\/uncategorized\/from-local-admin-to-domain-admin","title":{"rendered":"Post-Exploitation in Windows: From Local Admin To Domain Admin (efficiently)"},"content":{"rendered":"

There are some excellent tools and techniques available to pentesters trying to convert their local admin rights into domain admin rights. \u00a0This page seeks to provide a reminder of some of the most common and useful techniques as well as rating their effectiveness to suggest which ones to try first.<\/p>\n

The premise of all the techniques is to obtain access to as many domain accounts as possible using the credentials stored on the domain member you’ve compromised.<\/p>\n

Tools are briefly discussed for each technique. \u00a0This page is really about the techniques, though, not the tools. \u00a0While tools will change, I suspect these techniques will be with us for some considerable time yet.<\/p>\n

I’ve tried to rate each technique in order of how much effort it is for the pentester. \u00a0Some technqiues give almost instant results and are therefore worth trying first. \u00a0Others require password cracking and are a last resort really if nothing else works.<\/p>\n

Very Quick: Duplicate Access Tokens (Incognito)<\/h3>\n

Incognito<\/a>, either as a standalone tool, or via metasploit’s meterpreter<\/a> will scan through all the running processes on the box and list you the delegation tokens it finds. \u00a0Without doing any analysis yourself you can try creating a domain admin account with each token. \u00a0If it succeeds without any effort on your part, so much the better.<\/p>\n

If you don’t succeed in getting a domain admin account straight away, you may still be able to abuse the privileges of a normal domain user (e.g. to list domain accounts and group memberships). \u00a0Perhaps try the techniques below before trying too hard…<\/p>\n

Quick: Dump LSA Secrets (lsadump)<\/h3>\n

If any Windows services are running under a domain account, then the passwords for those accounts must be stored locally in a reversible format. \u00a0LSAdump2<\/a>, LSASecretsDump<\/a>, pwdumpx<\/a>, gsecdump or Cain & Abel<\/a> can recover these.<\/p>\n

You might have to stare at the output of lsadump and the list of services in<\/p>\n

After you’ve correlated plain text passwords from the “_SC_<service name>” sections of LSAdump with the domain usernames from services.msc using the short “service name”, you should a list of domain accounts and cleartext passwords.<\/p>\n

Investigate your new found accounts and see if you’re domain admin yet.<\/p>\n

Quick: Dump SAM-Style Hashes for Access Tokens (WCE)<\/h3>\n

Windows Credentials Editor<\/a>\u00a0(a more mature version of the now\u00a0obsolete\u00a0Pass The Hash Toolkit<\/a>) recovers the SAM-style password hash for each\u00a0process\u00a0from LSASS – including domain accounts. \u00a0Initially, this has a similar effect to Incognito. \u00a0But has a couple of advantages:<\/p>\n