Essential Commands for Linux Machine Enumeration
- aldern00b
- Nov 14, 2023
- 2 min read
Here's some basic enumeration commands to run while enumerating
hostnamereturn the hostname of the target machine
uname -aprint system information giving us additional detail about the kernel used by the system.
/proc/versionprovides information about the target system processes.
/etc/issueusually contains some information about the operating system but can easily be customized or changed.
ps
ps -A <--View all running processes
ps axjf <-- View process treesee the running processes on a Linux system.
envwill show environmental variables.
sudo -llist all commands your user can run using sudo
ls -laplease remember to always use the ls command with the -la parameter.
idprovide a general overview of the user’s privilege level and group memberships.
cat /etc/passwd
cat /etc/passwd | grep home <-- just show users with a home folder.easy way to discover users on the system.
historyShows command line history, may have stored information such as passwords or usernames.
ifconfiggive us information about the network interfaces of the system.
ip routecommand to see which network routes exist.
netstat <-- check for existing interfaces and network routes
netstat -a <-- shows all listening ports and established connections.
netstat -at or netstat -au <-- can also be used to list TCP or UDP protocols respectively.
netstat -l <-- list ports in “listening” mode. These ports are open and ready to accept incoming connections. This can be used with the “t” option to list only ports that are listening using the TCP protocol
netstat -s <-- list network usage statistics by protocol. This can also be used with the -t or -u options to limit the output to a specific protocol.
netstat -tp <-- list connections with the service name and PID information. This can also be used with the -l option to list listening port
netstat -i <-- Shows interface statistics.
netstat -ano < --which could be broken down as follows
-a: Display all sockets
-n: Do not resolve names
-o: Display timersfind
find -type f 2>/dev/null <-- redirect errors to /dev/null
find / -perm -u=s -type f 2>/dev/null <-- Find files with the SUID bit, which allows us to run the file with a higher privilege level than the current user.


Comments