🥷
Red
  • 🟥Overview
  • 📚Education
    • 🧐Guides
    • 🏋️Training
    • 📕Books
    • 🥳Conventions
    • 📰News
    • 🗝️Physical Tools
    • 🗣️Podcasts
    • 📹YT Channels
  • Setup
    • ctf setup
    • Exploitation Frameworks
    • Learning Offense
    • rando
  • ⭕Attacker Lifecycle
    • Steps
      • Engagement
      • 🔬Recon
        • OSINT
        • Active Recon / footprinting
      • 👀Initial Access
        • Exploit
          • SMB
        • Internal Recon
        • Linux Custom Enum Script
        • enumerate Script
        • Windows Privilege Escalation
      • 🧞Privilege Escalation
        • Ways To Privelege Escalate
      • Data Exfil
        • Data Exfil 1
      • Reporting
  • Bug Bounty
    • Bug Bounty Sites
    • OWASP Top 10
      • Injection
      • Broken Authentication
      • Sensitive Data Exposure
      • XML External Entities (XXE)
      • Broken Access Control
      • Security Misconfigurations
      • Cross-Site Scripting (XSS)
      • Insecure Deserialization
      • Using Components with Known Vulnerabilities
      • Insufficient Logging and Monitoring
Powered by GitBook
On this page
  1. Attacker Lifecycle
  2. Steps
  3. Initial Access

Linux Custom Enum Script

#!/bin/bash

echo "Current user:"
whoami

echo "Contents of current directory:"
ls -la

echo "Command history:"
history

echo "System information:"
uname -a

echo "Checking for known kernel exploits (Last Resort):"
# Add your kernel exploit checking command here

echo "Checking sudo privileges (If you have credentials):"
sudo -l

echo "Searching for files with specific name and setuid permissions:"
find / -type f -name "*WHATEVER*" -perm -4000 -ls 2>/dev/null

echo "Searching for files with 'flag' in the name:"
find / -type f -name "*flag*" -exec ls -l {} + 2>/dev/null

echo "Contents of system-wide crontab:"
cat /etc/crontab

echo "Contents of user's crontab:"
crontab -e

echo "Checking system path:"
echo $PATH

echo "Contents of NFS exports (if applicable):"
cat /etc/exports

echo "Checking file capabilities:"
getcap -r / 2>/dev/null

# Add any additional Linux enumerating commands below:

# Example:
# echo "Checking system users:"
# cat /etc/passwd

# Example:
# echo "Checking system services:"
# systemctl list-units --type=service

# Example:
# echo "Checking open network ports:"
# netstat -tuln

# Note: Be cautious when running enumeration commands as some of them may require elevated privileges or may take a long time to execute.
PreviousInternal ReconNextenumerate Script

Last updated 2 years ago

⭕
👀