Linux Privilege Escalation Tips

  • ip a
  • Search for users/strings by file: grep -rli "dora" . 2>/dev/null
  • uname -a and kernel version (traitor)
  • id, sudo -l, sudo version (sudo -v)
  • SUID / SGID: find / -type f -perm -u=s 2>/dev/null
  • Capabilities: getcap -r / 2>/dev/null
  • Available subdomains (/etc/nginx/sites-enabled/)
  • List /opt
  • Other users' or the current user's .bash_history
  • Listening ports (ss -tulnp | grep listen)
  • Linpeas
  • Cron jobs (ls -laR /etc/cron*) or crontab
  • Search for backups with find
  • View running processes (pspy)
  • Check browsers (firefox)
  • Extract users from /etc/shadow
  • Environment variables