LinPEAS Showed No Cron Jobs. pspy Found One Running as Root.

The automated enumeration said there was nothing interesting in cron. There was — a root-owned job calling a world-writable script every five minutes. The scan just couldn't see it.

On a low-priv shell, a standard enumeration script's cron section came back essentially empty: no entries worth a second look. Dropping pspy64 and watching for a few minutes surfaced a root process spawning on a five-minute boundary, running a script that a low-priv user could write to. That one gap was the whole privesc path.

What the scripts checked

Typical enumeration tooling reads the cron sources it has permission to read:

cat /etc/crontab
ls -la /etc/cron.d/
crontab -l

All three came back clean or empty. No suspicious lines, nothing flagged. The conclusion looked reasonable: cron isn't the way in here.

Why that conclusion was wrong

Each of those commands has a blind spot, and all three were in play at once:

Reading cron's configuration only tells you what you have permission to read. A job owned by a more privileged user is invisible to that approach by design — the absence of output is not evidence of absence.

What pspy looked at instead

pspy doesn't read cron's configuration at all. It watches the kernel's process creation events directly — polling /proc for new PIDs, and using inotify to catch filesystem activity — and prints the command line of every process that gets forked and exec'd on the box, by any user:

./pspy64 -pf -i 1000

A few minutes in, the five-minute mark rolled over and a line appeared showing UID=0 executing a backup helper script in a directory with loose permissions. No cron file was read to get that line — it came from watching execution itself, which requires no special access to see.

That's the structural difference: configuration tells you what's declared, and only to whoever is allowed to read the declaration. Process monitoring tells you what actually runs, regardless of who declared it or whether you're allowed to read their config.

Other places the same gap shows up

Takeaway

A privesc script that reports no cron findings has told you "nothing in the cron files I could read looked interesting" — not "there is no scheduled task on this box." Those are different claims, and the gap between them is exactly where root-owned, low-priv-writable jobs live. Run the config-based check first since it's fast and free, but let something like pspy watch actual process creation for a few minutes — across at least one five-minute boundary, since that's cron's most common interval — before concluding cron is a dead end.

Related: Restricted shell escape techniques, Hashcat picked the wrong bcrypt mode.

© PacketUtils. Tools run in your browser. Review every command before using it in production.HomeAboutContactPrivacy PolicyGitHub