Active Directory Pentesting: Troubleshooting Tool Issues

Notes on encoding, dependency, and runtime issues encountered while using tools in an Active Directory environment.

1. Garbled Output in wmiexec

1
2
3
4
5
# Run this on the target host first
chcp
# Assume it returns 936
# Then run wmiexec with the encoding option
python wmiexec.py -codec cp936 -hashes :2b2ddd54e1f78fab85e7c662f672f30e MAIN/[email protected]

2. Unable to Install VMware Tools

I ran into this while setting up an Active Directory environment. My vulnerable Windows Server 2012 R2 machine wouldn’t install VMware Tools, which made transferring files and copying and pasting a real pain. The Chinese tutorials I found online all had problems.

https://netwoven.com/cloud-infrastructure-management/windows-server-2012-r2-error-required-kb2919355/

This article explains what to do. Things will go wrong if you don’t follow the steps in order, though there are still a few minor issues. The solution is below.

What you need to download

#Windows8.1-KB2919442-x64 is available at this URL; download this one too

https://www.microsoft.com/en-us/download/details.aspx?id=42162

Windows patch download: Windows8.1-KB2919355-x64 is available at https://www.microsoft.com/en-us/download/details.aspx?id=42335. Download all of the files.

  1. Run Windows Update and install everything, including optional updates
  2. Run clearcompressionflag.exe (downloaded with the servicing stack fix). It runs in the background, so wait a minute before installing the fix
  3. Manually download and install the patches in this order
  4. Windows8.1-KB2932046-x64
  5. Windows8.1-KB2934018-x64
  6. Windows8.1-KB2937592-x64
  7. Windows8.1-KB2938439-x64
  8. Windows8.1-KB2959977-x64
  9. Windows8.1-KB2919442-x64
  10. Windows8.1-KB2919355-x64

Restart whenever prompted after installing them.

Then install VMware Tools.

https://packages.vmware.com/tools/releases/

Pick whichever version you like and download its ISO file, like this one.

Add a new CD/DVD drive and mount the ISO. You’ll then see a drive like this under Computer.

Open it.

Run the installer, keep clicking Next, and you’re done.