Starting up with SMB , let's see what we have:
I download the file UserInfo.exe.zip
I unzip the file and I found a .NET windows executable , I open it up on DNSpy, I find a key and an encrypted text which should be the password :
I copied the whole code and pasted it in Visual Studio , and then I changed the return
call to :
Executing the C# program will now provide us with the password:
Now to figure out where the password is being used:
It's being used to login to LDAP with the username ldap
and the password nvEfEK16^1aM4$e7AclUf8x$tRWxPWO1%lmz
, Using a tool known as ldapdomaindump
I am able to dump all user information , and computer information as well as group information:
Visiting output/
I am able to find the following files:
Or instead an alternative , A tool known as JXplorer:
Checking on the information of the user support
, I get the following:
On Info
key the value is Ironside47pleasure40Watchful
, which I doubt must be the password , we can also get such information from the dumped json files by reading them and grepping cn=support
With the password I suppose we got from info
key , I try to login with evil-winrm
as the user support
, luckily , I got access:
The flag is in C:\Users\support\Desktop\user.txt
Now to check for support's privileges:
Seeing what groups the user support is in:
The user support has privileges to add a workstation to the domain, I did a little bit of article readings , and I ended up at my favourite all on one cheatsheets ired.team
For this to fully work , we first need to import a module known as Powermad, which can be found here
After downloading Powermad.ps1
I uploaded it to the directory I created in C:\Temp\
and then I imported it with the command:
The commands above will create a new Computer Object, Now to get the SID of the new Computer Object:
The SID is S-1-5-21-1677581083-3380853377-188903654-5101
Now we create a new raw security descriptor:
Now we apply the security descriptor bytes to dc
:
With the new Computer Object created, I shall use it to create a ticket for user administrator
and use it to login :) , let's give it a run:
And now we have Administrator
Access!
The machine is overall amazingly well made! A full AD machine with a bit of code reviewing , debugging not to forget Computer Object TakeOver with Kerberos.