Back to skill

Security audit

Procmon

Security checks for vulnerabilities and agentic risk

Overview

ProcMon is mostly a local process-monitoring tool, but its log command can append data outside the intended log folder because it uses the process name directly as a file path.

Review this before installing if an agent may run procmon log with untrusted process names. The process and port inspection behavior fits the tool, but the log command should ideally validate names and refuse symlinks before writing. Avoid names containing slashes, dot-dot path components, or other pathname characters until that is fixed.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:220
Finding

User-Controlled Log Path Permits Path Traversal and Symlink-Directed Writes

Content
View full analysis
/dev/null | awk -v pat="$name" 'NR>1 && $6 ~ pat') echo "[$ts] process=$name matches=$count" >> "$logfile" if [[ $count -gt 0 ]]; then echo "$entries" >> "$logfile" ``` ### Technical Analysis The `log` command accepts a process name from the command line and inserts it directly into a filesystem path: ```bash local logfile="$LOG_DIR/${name}.log" ``` Although shell quoting prevents command substitution and shell metacharacter injection, it does not prevent path traversal. The value is not checked for path separators, `..` components, absolute-path behavior, or other unsafe pathname content. A crafted process name can therefore cause the resolved log destination to leave `~/.procmon`, subject to the automatically appended `.log` suffix. The subsequent `>>` redirections also follow symbolic links. If an attacker can create or replace a predictable entry such as `~/.procmon/node.log` with a symlink, invoking `procmon log node` appends data to the symlink target. The code does not verify that the destination is a regular file, that it is not a symbolic link, or that its canonical path remains inside the intended log directory. ### Attack Path A path-traversal exploitation path is: 1. An attacker influences the argument passed to `procmon log`, such as by supplying a name containing `../` path components. 2. ProcMon constructs `"$HOME/.procmon/${name}.log"` without validating or canonicalizing the name. 3. Filesystem path resol ...[truncated 1616 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The log command appends process metadata to $HOME/.procmon/<name>.log, which is a file write affecting local user data. While the help text names the command, the code does not provide any pre-write disclosure or confirmation before persisting process details to disk.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.