Linux Enumeration
Useful links: https://blog.g0tmi1k.com/2011/08/basic-linux-privilege-escalation/
Users
Gather user context information:
id
uid=1000(student) gid=1000(student) groups=1000(student)Enumerate users:
cat /etc/passwdHostname
We can discover the hostname with the aptly-named hostname command:
hostname
debianOperating System Version and Architecture
Extract the name of the operating system, its version and architecture:
cat /etc/issue
Debian GNU/Linux 9 \n \l
cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
...
uname -a
Linux debian 4.9.0-6-686 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) i686 GNU/LinuxRunning Processes and Services
List system processes (including those run by privileged users):
Networking Information
List the TCP/IP configuration of every network adapter:
Display network routing tables:
Display active network connections and listening ports:
Scheduled Tasks
List scheduled tasks:
These tasks should be inspected carefully for insecure file permissions as most jobs in this particular file will run as root:
Installed Applications and Patch Levels
List applications installed (by dpkg):
Readable / Writable Files and Directories
Searching for every directory writable by the current user on the target system:
Unmounted Disks
List all mounted filesystems. In addition, the /etc/fstab file lists all drives that will be mounted at boot time:
View all available disks:
Device Drivers and Kernel Modules
Enumerate the loaded kernel modules:
Find out more about the specific module.
Binaries that AutoElevate
If a binary has the SUID bit set and the file is owned by root, any local user will be able to execute that binary with elevated privileges.
Search for SUID-marked binaries:
Last updated
Was this helpful?