Running Processes and Service Inspection on Linux
Process enumeration identifies what is running, who owns it, and what it is doing. Privileged processes running as root, services with writable binaries, and internal applications expose attack surface that static file inspection alone misses. This is also where you identify what the host's actual purpose is — web server, database, CI/CD runner — which informs where to look next.
Full Process List
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.1 16956 1084 ? Ss 08:01 0:01 /sbin/init root 312 0.0 0.2 28352 2048 ? Ss 08:01 0:00 /usr/sbin/sshd -D www-data 847 0.0 0.5 198432 5432 ? S 08:02 0:00 /usr/sbin/apache2 -k start root 921 0.0 0.1 14632 1024 ? Ss 08:02 0:00 /usr/sbin/cron -f mysql 1024 0.2 3.1 621344 31872 ? Ssl 08:02 0:14 /usr/sbin/mysqld jenkins 1201 1.2 8.4 2134244 85432 ? Ssl 08:02 1:02 java -jar /opt/jenkins/jenkins.war
Focus on:
Processes running as root that are not standard OS services
Application processes — their user, binary path, and arguments
Processes running from non-standard paths like
/opt,/tmp, or/homeJava processes — their
-jarargument reveals the application
The COMMAND column with ps auxww shows full arguments including any credentials passed on the command line.
Process Arguments — Credential Exposure
Some applications accept passwords as command-line arguments. These are visible to all users via ps:
Database connections, backup scripts, and deployment tools are common offenders.
Process Tree
The process tree shows parent-child relationships. Unexpected parent processes — a web server spawning a shell, or a service with an unusual child — indicate something worth investigating or confirm your own shell's ancestry.
Watching Processes Over Time
Static ps misses short-lived processes like cron jobs and scripts that execute and exit. Monitor process creation over a short window:
Or capture new processes with pspy if you can transfer it to the target. pspy monitors process creation without root by reading from /proc:
Short-lived root processes that appear on a schedule are almost always cron jobs. Their command line reveals scripts or binaries being executed as root — feed these into Cron Job Privilege Escalation.
Systemd Services
Running services with their status. Look for custom or non-standard service names — anything not part of the base OS install is worth inspecting.
Shows the full unit file for a service. The ExecStart, ExecStop, User, and WorkingDirectory fields tell you what binary runs, as whom, and from where. If the binary or its directory is writable, that is a privilege escalation path. See Systemd Unit and Timer Privilege Escalation.
Checks write permissions on all service unit files at once.
Systemd Timers
Timers are the systemd equivalent of cron. They trigger services on a schedule. Check the ACTIVATES column to identify which service each timer calls, then inspect that service unit.
Service Binary Permissions
For each interesting service, check whether the binary it runs is writable:
Or check all running service binaries at once:
Binaries not owned by root that run as root are direct privilege escalation paths. See Systemd Unit and Timer Privilege Escalation.
Open Files and Network Connections Per Process
Shows all files, sockets, and pipes a specific process has open. Useful for identifying what files an interesting process is reading or writing, and what network connections it maintains.
All open files and connections for a specific user — useful for mapping what a service account is doing.
Was this helpful?
Your feedback helps improve this page.