Skip to content

Process Tracking

Heisenbug edited this page Mar 5, 2026 · 1 revision

Home · Start Here · Reference Map

At a glance

  • How suspicious long-running processes are flagged.
  • How to use csf.pignore without blinding detection.
  • What this feature can and cannot detect reliably.

Related guide: Security-Features-Guide

Quick reference

Setting Purpose
PT_LIMIT Minimum seconds a process must run before tracking checks it
PT_SKIP_HTTP Skip scripts running directly or through CGI in Apache (reduces false positives)
PT_USERPROC Enable user process tracking
PT_USERMEM Memory limit per user process before alert
PT_USERTIME CPU time limit per user process before alert
File Purpose
/etc/csf/csf.pignore Whitelist for users, executables, and command lines
/usr/local/csf/tpl/processtracking.txt Email template for process tracking alerts

How it works

Process tracking examines user and nobody processes for suspicious executables or open network ports. Its purpose is to identify potential exploit processes running on the server, even if they are obfuscated to appear as system services.

If a suspicious process is found, an alert email is sent. It is then the administrator's responsibility to investigate further — the feature takes no automatic action beyond alerting. Processes (PIDs) are only reported once unless LFD is restarted.

Key files

csf.pignore format

Whitelist entries use the following formats:

exe:/full/path/to/file
user:username
cmd:command line

Important notes on format:

  • The command line as reported in /proc has the trailing null character removed and all other occurrences replaced with a space. Use space separators for command line arguments, not null characters.
  • Command line ignores should be used very carefully — any process can change what it reports to the OS.
  • Never list paths to perl or php — this prevents detection of suspicious web scripts.

For more information on executable vs. command line reporting:

man proc
man lsof

Safe workflow

  1. Enable process tracking with a conservative PT_LIMIT (e.g., 60 seconds).
  2. Keep PT_SKIP_HTTP enabled initially to reduce noise.
  3. Reload: csf -ra
  4. Review alerts in /var/log/lfd.log for one to two days.
  5. Add confirmed false positives to csf.pignore using the most specific format (exe: preferred over user:).
  6. Optionally lower PT_LIMIT or disable PT_SKIP_HTTP for deeper coverage once baseline noise is managed.

Detection limitations

  • Root processes are ignored — this feature will not detect a root compromise. Use established IDS tools (e.g., AIDE, OSSEC) for that.
  • Cannot distinguish intent — the feature flags suspicious patterns but cannot tell malicious from legitimate; that judgement is the administrator's job.
  • Obfuscation — processes can alter their reported command line; exe: matching is more reliable than cmd: matching.

Common pitfalls

  • False positives are expected — this is by design; the feature is intentionally sensitive. Validate before ignoring.
  • Over-broad csf.pignore entries — whitelisting user:nobody or binaries like perl/php creates dangerous blind spots.
  • Disabling PT_SKIP_HTTP without raising PT_LIMIT — will generate heavy alert volume from normal web traffic.
  • Not restarting LFD after investigation — processes are only reported once per PID per LFD session.

See also: Script Email Alerts

Last reviewed: 2026-02-27


← Previous: Script Email Alerts · Next: Directory Watching

Clone this wiki locally