Saturday, August 22, 2020

Thousand Ways To Backdoor A Windows Domain (Forest)

When the Kerberos elevation of privilege (CVE-2014-6324 / MS14-068) vulnerability has been made public, the remediation paragraph of the following blog post made some waves:
http://blogs.technet.com/b/srd/archive/2014/11/18/additional-information-about-cve-2014-6324.aspx

"The only way a domain compromise can be remediated with a high level of certainty is a complete rebuild of the domain."

Personally, I agree with this, but .... But whether this is the real solution, I'm not sure. And the same applies to compromised computers. When it has been identified that malware was able to run on the computer (e.g. scheduled scan found the malware), there is no easy way to determine with 100% certainty that there is no rootkit on the computer. Thus rebuilding the computer might be a good thing to consider. For paranoids, use new hardware ;)

But rebuilding a single workstation and rebuilding a whole domain is not on the same complexity level. Rebuilding a domain can take weeks or months (or years, which will never happen, as the business will close before that).

There are countless documented methods to backdoor a computer, but I have never seen a post where someone collects all the methods to backdoor a domain. In the following, I will refer to domain admin, but in reality, I mean Domain Admins, Enterprise Admins, and Schema Admins.


Ways to backdoor a domain

So here you go, an incomplete list to backdoor a domain:

  • Create a new domain admin user. Easy to do, easy to detect, easy to remediate
  • Dump password hashes. The attacker can either crack those or just pass-the-hash. Since KB2871997, pass-the-hash might be trickier (https://technet.microsoft.com/library/security/2871997), but not impossible. Easy to do, hard to detect, hard to remediate - just think about service user passwords. And during remediation, consider all passwords compromised, even strong ones.
  • Logon scripts - modify the logon scripts and add something malicious in it. Almost anything detailed in this post can be added :D
  • Use an already available account, and add domain admin privileges to that. Reset its password. Mess with current group memberships - e.g. http://www.exploit-db.com/papers/17167/
  • Backdoor any workstation where domain admins login. While remediating workstations, don't forget to clean the roaming profile. The type of backdoor can use different forms: malware, local admin, password (hidden admin with 500 RID), sticky keys, etc.
  • Backdoor any domain controller server. For advanced attacks, see Skeleton keys 
  • Backdoor files on network shares which are commonly used by domain admins by adding malware to commonly used executables - Backdoor factory
  • Change ownership/permissions on AD partitions - if you have particular details on how to do this specifically, please comment
  • Create a new domain user. Hide admin privileges with SID history. Easy to do, hard to detect, easy to remediate - check Mimikatz experimental for addsid
  • Golden tickets - easy to do, hard to detect, medium remediation
  • Silver tickets - easy to do, hard to detect, medium/hard remediation
  • Backdoor workstations/servers via group policy
    • HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ RunOnce,
    • scheduled tasks (run task 2 years later),
    • sticky-keys with debug
  • Backdoor patch management tool, see slides here
[Update 2017.01.10]


Other tricks

The following list does not fit in the previous "instant admin" tips, but still, it can make the attackers life easier if their primary foothold has been disabled:

  • Backdoor recent backups - and when the backdoor is needed, destroy the files, so the files will be restored from the backdoored backup
  • Backdoor the Exchange server - get a copy of emails
  • Backdoor workstation/server golden image
  • Change permission of logon scripts to allow modification later
  • Place malicious symlinks to file shares, collect hashes via SMB auth tries on specified IP address, grab password hashes later
  • Backdoor remote admin management e.g. HP iLO - e.g. create new user or steal current password
  • Backdoor files e.g. on shares to use in SMB relay
  • Backdoor source code of in-house-developed software
  • Use any type of sniffed or reused passwords in new attacks, e.g. network admin, firewall admin, VPN admin, AV admin, etc.
  • Change the content of the proxy pac file (change browser configuration if necessary), including special exception(s) for a chosen domain(s)  to use proxy on malicious IP. Redirect the traffic, enforce authentication, grab password hashes, ???, profit.
  • Create high privileged users in applications running with high privileges, e.g. MSSQL, Tomcat, and own the machine, impersonate users, grab their credentials, etc. The typical pentest path made easy.
  • Remove patches from servers, change patch policy not to install those patches.
  • Steal Windows root/intermediate CA keys
  • Weaken AD security by changing group policy (e.g. re-enabling LM-hashes)
Update [2015-09-27]: I found this great presentation from Jakob Heidelberg. It mentions (at least) the following techniques, it is worth to check these:
  • Microsoft Local Administrator Password Solution
  • Enroll virtual smart card certificates for domain admins

Forensics

If you have been chosen to remediate a network where attackers gained domain admin privileges, well, you have a lot of things to look for :)

I can recommend two tools which can help you during your investigation:

Lessons learned

But guess what, not all of these problems are solved by rebuilding the AD. One has to rebuild all the computers from scratch as well. Which seems quite impossible. When someone is creating a new AD, it is impossible not to migrate some configuration/data/files from the old domain. And whenever this happens, there is a risk that the new AD will be backdoored as well.

Ok, we are doomed, but what can we do? I recommend proper log analysis, analyze trends, and detect strange patterns in your network. Better spend money on these, than on the domain rebuild. And when you find something, do a proper incident response. And good luck!

Ps: Thanks to Andrew, EQ, and Tileo for adding new ideas to this post.

Check out the host backdooring post as well! :)

Related news


  1. Hacking Tools Windows
  2. Hack Tools For Pc
  3. Hacker Tools Free
  4. Hack Tools For Ubuntu
  5. Hacking Apps
  6. Hacker Tools 2019
  7. Hacking Tools Usb
  8. Bluetooth Hacking Tools Kali
  9. Github Hacking Tools
  10. Pentest Tools For Ubuntu
  11. Tools 4 Hack
  12. Hackers Toolbox
  13. Hacking Tools Pc
  14. Hacker Tools Online
  15. Android Hack Tools Github
  16. Wifi Hacker Tools For Windows
  17. Hacker Tools 2019
  18. Pentest Tools Android
  19. Hack Tools For Windows
  20. Hacking Tools Usb
  21. Game Hacking
  22. Tools Used For Hacking
  23. Hacking Tools Pc
  24. Hacker Tools Hardware
  25. Hacker Tools 2019
  26. Pentest Tools Bluekeep
  27. Hacker Tools Free
  28. Wifi Hacker Tools For Windows
  29. What Are Hacking Tools
  30. Ethical Hacker Tools
  31. Hack Tools Online
  32. How To Make Hacking Tools
  33. Pentest Tools Windows
  34. Hacking Tools
  35. Hacker Tools Hardware
  36. Hacker Tools Hardware
  37. Hacker Hardware Tools
  38. Kik Hack Tools
  39. Tools Used For Hacking
  40. Github Hacking Tools
  41. Hacking Apps
  42. Pentest Tools Bluekeep
  43. Hacker Tools For Pc
  44. Best Hacking Tools 2020
  45. Hacking Tools Free Download
  46. Pentest Tools Tcp Port Scanner
  47. Hacker Tools Hardware
  48. Free Pentest Tools For Windows
  49. Pentest Tools For Mac
  50. Game Hacking
  51. Pentest Tools Open Source
  52. Hack Tools For Ubuntu
  53. Pentest Tools Framework

XDR: The Next Level Of Prevention, Detection And Response [New Guide]

One new security technology we keep hearing about is Extended Detection and Response (XDR). This new technology merges multiple prevention and detection technologies on a single platform to better understand threat signals so that you don't need to purchase, integrate, and manage various control and integration technologies. Think of XDR as prepackaged EDR, NTA, UEBA (and perhaps other

via The Hacker News

Related links


  1. Hacking Tools Kit
  2. Hack App
  3. Pentest Tools Subdomain
  4. Hacker Tools Software
  5. Hack Tools Pc
  6. Hacker Tools Linux
  7. Hacker Tools Online
  8. Pentest Tools Website Vulnerability
  9. New Hack Tools
  10. How To Make Hacking Tools
  11. Blackhat Hacker Tools
  12. Pentest Tools Find Subdomains
  13. Hack Rom Tools
  14. Pentest Automation Tools
  15. Hacking Tools And Software
  16. Pentest Tools Framework
  17. Hacking Tools Online
  18. Hack Tools Mac
  19. Underground Hacker Sites
  20. Hacker Tools
  21. Growth Hacker Tools
  22. Tools For Hacker
  23. Pentest Tools Android
  24. Hacker Techniques Tools And Incident Handling
  25. Pentest Tools Website Vulnerability
  26. Hack Tools For Ubuntu
  27. Nsa Hacker Tools
  28. Pentest Tools For Windows
  29. Computer Hacker
  30. Hacker Tools Github
  31. Ethical Hacker Tools
  32. Pentest Tools For Android
  33. Pentest Tools Find Subdomains
  34. Growth Hacker Tools
  35. Hacking Tools Windows 10
  36. Hak5 Tools
  37. Hacking Tools For Windows Free Download
  38. Pentest Tools Github
  39. Hacker Tools Software
  40. Pentest Tools Online
  41. Hacker Tools Github
  42. Pentest Tools For Windows
  43. Hacking Tools For Windows Free Download
  44. New Hack Tools
  45. Hacker Tool Kit
  46. Hack Tools Pc
  47. Pentest Tools Free
  48. Hacking Tools
  49. Beginner Hacker Tools
  50. Pentest Tools Website Vulnerability
  51. Hacking Tools Name
  52. Hacking Tools
  53. Ethical Hacker Tools
  54. Pentest Tools Tcp Port Scanner
  55. Physical Pentest Tools
  56. Free Pentest Tools For Windows
  57. Hacking Tools Pc
  58. Best Pentesting Tools 2018
  59. Hak5 Tools
  60. Blackhat Hacker Tools
  61. Underground Hacker Sites
  62. Pentest Tools Free
  63. Hacking Tools Software
  64. Hacking Tools For Windows Free Download
  65. Free Pentest Tools For Windows
  66. Pentest Reporting Tools
  67. Hack Rom Tools
  68. New Hacker Tools
  69. Pentest Tools Download
  70. World No 1 Hacker Software
  71. Hacker Tools Apk
  72. Pentest Tools Subdomain
  73. Game Hacking
  74. Hacking Apps
  75. Best Hacking Tools 2019
  76. Hacking Tools Hardware
  77. Hacker Tools Github
  78. Hacker Tools Free
  79. Bluetooth Hacking Tools Kali
  80. Bluetooth Hacking Tools Kali
  81. Pentest Tools
  82. Tools Used For Hacking
  83. Hack Tools 2019
  84. Hack Tools Online
  85. Hack Tools
  86. Hacker Tools Free
  87. Computer Hacker
  88. Hacking Tools For Kali Linux
  89. Github Hacking Tools
  90. Computer Hacker
  91. Top Pentest Tools
  92. Hack Tools For Pc
  93. Hacker Tools Hardware
  94. Pentest Tools Apk
  95. Termux Hacking Tools 2019
  96. Pentest Tools Linux
  97. Hacker Tools Free
  98. Pentest Tools
  99. Hacking Tools 2019
  100. Hack Tool Apk No Root
  101. Hacker Techniques Tools And Incident Handling
  102. Pentest Tools Online
  103. Hacking Tools Software
  104. Hack Tools Pc
  105. World No 1 Hacker Software
  106. World No 1 Hacker Software
  107. Hacker Tools Software
  108. Hacker Tools Windows
  109. Hacker Tools Apk Download
  110. Hacker Tools For Mac
  111. Hack Tools
  112. Hacker
  113. Hacker
  114. Hacking Tools For Windows Free Download
  115. Hacker Tools For Pc
  116. Pentest Tools Online
  117. New Hacker Tools
  118. Hacking Tools Name
  119. Hacking Tools Mac
  120. Pentest Tools For Ubuntu
  121. Hacking Tools Pc
  122. Hacking Tools 2019
  123. Hacking Tools For Windows
  124. Hacking Tools Download
  125. Hack Tool Apk No Root
  126. Pentest Tools Subdomain
  127. Hacking Tools 2019
  128. Hack Tool Apk
  129. Hacking Tools Usb
  130. Pentest Tools Port Scanner
  131. Hacking Tools For Pc
  132. New Hack Tools
  133. Hacking Tools Windows 10
  134. Tools Used For Hacking
  135. Hacking Tools Usb
  136. Hack Website Online Tool
  137. Hacking Tools Online
  138. Pentest Tools
  139. Hacking Tools For Beginners
  140. Pentest Tools For Windows
  141. Underground Hacker Sites
  142. Hacker Tools 2020
  143. Game Hacking
  144. Hackers Toolbox
  145. Hacking Tools Name
  146. Hacking Tools Pc
  147. Pentest Tools Github
  148. Pentest Tools Port Scanner
  149. Hacking Tools Github
  150. World No 1 Hacker Software
  151. Hacking Tools For Kali Linux
  152. Hacks And Tools
  153. Pentest Tools Android
  154. Kik Hack Tools
  155. Pentest Tools For Ubuntu
  156. Hacking Tools For Kali Linux
  157. Pentest Tools Online
  158. Hack Tools 2019
  159. Pentest Automation Tools
  160. Hacking Tools Usb
  161. Kik Hack Tools
  162. Pentest Tools Website
  163. Hack Tools 2019
  164. Hacking Tools For Kali Linux
  165. What Is Hacking Tools
  166. Hacking Tools And Software
  167. Hacker Techniques Tools And Incident Handling
  168. Hack Tools
  169. Pentest Reporting Tools