Starting Point Getting Reverse Shell

I have my python3 server set up correctly as well as nc listening. As well as i edited the shell.ps1 details to my ip. But i cant get the reverse shell. I run the command and I see the [“GET /shell.ps1 HTTP/1.1” 200 -] so its clearly set up right.

New-Object : Exception calling “.ctor” with “2” argument(s): "No connection could be made because the target machine

actively refused it 10.10.14.135:443"

Image of the complete error: https://i.imgur.com/wb6DNge.png

If you used the powershell code provided by hackTheBox, make sure to replace the standard ip:port to your own ip:port. I had the same problem and this solved it for me.

yea i see that. i fixed it. it was something else. im stuck right now on getting privileged shell. i get

./psexec.py administrator@10.10.10.27
Traceback (most recent call last):
File “./psexec.py”, line 33, in
from impacket.krb5.keytab import Keytab
ImportError: No module named keytab

Are you sure nc is listening to the right port?

Type your comment> @MrBear said:

yea i see that. i fixed it. it was something else. im stuck right now on getting privileged shell. i get

./psexec.py administrator@10.10.10.27
Traceback (most recent call last):
File “./psexec.py”, line 33, in
from impacket.krb5.keytab import Keytab
ImportError: No module named keytab

You have to install keytab on your machine, as you can see python can’t import KeyTab module

Yea i solved it. Got root. Got flag. thanks.