LinEnum
Table of Contents
LinEnum
Description
LinEnum is a basic, yet powerful, Bash script designed to quickly gather a wide range of system, kernel, user, and network information from a Linux host where an attacker has achieved initial, low-level access. It is considered a classic tool in the Post Exploitation toolkit, helping to transform a limited shell into a highly privileged session.
How LinEnum Works
Like LinPEAS, LinEnum's core strength is its reliance only on native Bash commands, ensuring maximum compatibility across various Linux distributions without needing to install external dependencies. When executed, it systematically runs over 65 checks, including:
- Kernel and OS Information: Displays the kernel version (
uname -a) and distribution details, which is crucial for identifying unpatched vulnerabilities that can be targeted by kernel exploits. - User and Group Details: Lists user accounts, group memberships, and privileged access (e.g., who has recently used
sudo). - Network Configuration: Checks network interfaces, routing tables, and active network connections (
netstat) to identify potential internal targets for Lateral Movement. - File System Enumeration: Searches for common weak spots, such as:
- Files with the SUID/SGID bits set (exploitable binaries).
- Insecure file permissions on sensitive files (like
/etc/sudoersor/etc/passwd). - Files containing known sensitive keywords (like "password" or "key") in common configuration directories.
- Service and Application Checks: Scans for installed software and running services that might be misconfigured or exploitable.
LinEnum vs. LinPEAS
LinEnum is a historical predecessor to the more modern, feature-rich LinPEAS. While both perform the same function, LinPEAS typically includes:
- A larger database of checks.
- More advanced coloring and output filtering to prioritize critical findings.
- More aggressive and comprehensive searches for credentials and web application misconfigurations.
LinEnum remains valuable for older, restricted Linux environments where installing or running more complex scripts might be challenging.