Back to skill

Security audit

Incident Responder

Security checks for vulnerabilities and agentic risk

Overview

This incident-response playbook is mostly purpose-aligned, but it includes powerful system-wide collection and containment commands that could expose sensitive data or disrupt a host if run without careful review.

Install only if you are comfortable giving the agent incident-response playbook authority. Treat the destructive commands as operator-reviewed snippets, not safe automation: confirm the host, incident scope, account/IP targets, evidence location, retention policy, and rollback plan before running them, and secure evidence directories with restrictive permissions and encryption.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:217
Finding

Overly Broad Privileged Collection of System-Wide Forensic Data

Content
View full analysis
"$CASEDIR/crontab.txt" 2>/dev/null for user in $(cut -d: -f1 /etc/passwd); do crontab -u "$user" -l >> "$CASEDIR/crontab-all.txt" 2>/dev/null done ``` ```bash MEMDUMP="/evidence/mem-$(hostname)-$(date +%s).dump" CASEDIR="$HOME/App/domains/argus/evidence/ir-$(date +%Y%m%d-%H%M%S)" mkdir -p "$CASEDIR" echo "=== Memory Forensics ===" # Capture memory echo "--- Memory Dump ---" if [ -f /dev/fmem ]; then sudo dd if=/dev/fmem of="$MEMDUMP" bs=1M 2>&1 echo "Memory dump: $MEMDUMP" else echo " /dev/fmem not available — install fmem kernel module" echo " Alternative: sudo dd if=/dev/mem of=$MEMDUMP bs=1M" fi ``` ### Technical Analysis The playbook enumerates scheduled tasks for every account in `/etc/passwd` and provides commands for acquiring complete physical memory through `/dev/fmem` or `/dev/mem`. These operations are relevant to incident response, but their default scope exceeds least privilege when the affected users, processes, or systems have not first been identified. System-wide cron collection can expose command arguments, internal paths, service configuration, and embedded credentials. A physical-memory image can contain authentication tokens, private application data, cryptographic material, credentials, and information belonging to unrelated users or workloads. The playbook states that root access is required for forensic acquisition, but it does not enforce an authorization gate, incident scope, affected-user allowlist, or separate privileged acquisition procedure. Suppression of errors during cron enumeration also makes it difficult to review which accounts were accessed successfully. The `crontab` commands only read scheduled tasks; they do not ...[truncated 1627 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:176
Finding

Sensitive Forensic Evidence Created Without Enforced Restrictive Permissions

Content
View full analysis
"$CASEDIR/uname.txt" cat /etc/os-release > "$CASEDIR/os-release.txt" uptime > "$CASEDIR/uptime.txt" # Network connections echo "--- Network Connections ---" ss -tunap > "$CASEDIR/netstat-connections.txt" ss -tunap | grep ESTAB | wc -l > "$CASEDIR/active-connections-count.txt" # Listening ports echo "--- Listening Ports ---" ss -tlnp > "$CASEDIR/listening-ports.txt" # Process list echo "--- Process Tree ---" ps auxf > "$CASEDIR/process-tree.txt" # Current users echo "--- Active Sessions ---" who > "$CASEDIR/active-sessions.txt" w >> "$CASEDIR/active-sessions.txt" # Recent logins echo "--- Recent Logins ---" last -20 > "$CASEDIR/recent-logins.txt" # Failed logins echo "--- Failed Logins ---" lastb -20 > "$CASEDIR/failed-logins.txt" 2>/dev/null || echo " (lastb not available)" # Cron jobs echo "--- Cron Jobs ---" crontab -l > "$CASEDIR/crontab.txt" 2>/dev/null for user in $(cut -d: -f1 /etc/passwd); do crontab -u "$user" -l >> "$CASEDIR/crontab-all.txt" 2>/dev/null done ``` ```bash MEMDUMP="/evidence/mem-$(hostname)-$(date +%s).dump" CASEDIR="$HOME/App/domains/argus/evidence/ir-$(date +%Y%m%d-%H%M%S)" mkdir -p "$CASEDIR" # Capture memory if [ -f /dev/fmem ]; then sudo dd if=/dev/fmem of="$MEMDUMP" bs=1M 2>&1 fi ``` ### Technical Analysis The workflows create evidence directories with `mkdir -p` and evidence files through ordinary shell redirection or `dd`, but they do not establish a restrictive `umask` or explicitly set directory and file permissions. Consequently, effective permissions ...[truncated 2237 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (32)

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 62)May include surrounding context.

md
→ Check auth logs for unusual access
  → Review outbound connections to known-bad IPs
  → Check cron/at for persistence
  → Audit ~/.ssh/authorized_keys

Phase 4 — CONTAINMENT
  → Block suspect IPs at firewall

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 219)May include surrounding context.

md
# Cron jobs
echo "--- Cron Jobs ---"
crontab -l > "$CASEDIR/crontab.txt" 2>/dev/null
for user in $(cut -d: -f1 /etc/passwd); do
  crontab -u "$user" -l >> "$CASEDIR/crontab-all.txt" 2>/dev/null
done

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · SKILL.md (reported line 276)May include surrounding context.

md
echo ""
echo "--- Sudo Usage ---"
grep "sudo" "$AUTH_LOG" | grep "COMMAND" | \
  tail -30 | tee "$CASEDIR/sudo-commands.txt"

# SSH key additions
echo ""

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · SKILL.md (reported line 720)May include surrounding context.

md
| Symptom | Likely Cause | Fix |
|---------|-------------|-----|
| lastb empty | wtmp/btmp not enabled | `sudo touch /var/log/btmp && sudo chmod 600 /var/log/btmp` |
| tshark permission denied | Not in wireshark group | `sudo usermod -aG wireshark $USER` |
| Volatility module fails | Wrong profile | `volatility3 -f dump imageinfo` |
| Memory dump fails | /dev/fmem not loaded | `sudo modprobe fmem` or install fmem |

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 26)May include surrounding context.

md
- **CVE-MCP** available for threat intelligence during incidents
- **aynops** available for network-level evidence collection
- `curl`, `jq`, `grep`, `awk` on PATH
- Root/sudo access for forensic acquisition (volatility, tcpdump, disk imaging)

## Infrastructure

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 720)May include surrounding context.

md
- **CVE-MCP** available for threat intelligence during incidents
- **aynops** available for network-level evidence collection
- `curl`, `jq`, `grep`, `awk` on PATH
- Root/sudo access for forensic acquisition (volatility, tcpdump, disk imaging)

## Infrastructure

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 721)May include surrounding context.

md
- **CVE-MCP** available for threat intelligence during incidents
- **aynops** available for network-level evidence collection
- `curl`, `jq`, `grep`, `awk` on PATH
- Root/sudo access for forensic acquisition (volatility, tcpdump, disk imaging)

## Infrastructure

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 723)May include surrounding context.

md
- **CVE-MCP** available for threat intelligence during incidents
- **aynops** available for network-level evidence collection
- `curl`, `jq`, `grep`, `awk` on PATH
- Root/sudo access for forensic acquisition (volatility, tcpdump, disk imaging)

## Infrastructure

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 724)May include surrounding context.

md
- **CVE-MCP** available for threat intelligence during incidents
- **aynops** available for network-level evidence collection
- `curl`, `jq`, `grep`, `awk` on PATH
- Root/sudo access for forensic acquisition (volatility, tcpdump, disk imaging)

## Infrastructure

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 218)May include surrounding context.

md
# Cron jobs
echo "--- Cron Jobs ---"
crontab -l > "$CASEDIR/crontab.txt" 2>/dev/null
for user in $(cut -d: -f1 /etc/passwd); do
  crontab -u "$user" -l >> "$CASEDIR/crontab-all.txt" 2>/dev/null
done

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 220)May include surrounding context.

md
echo "--- Cron Jobs ---"
crontab -l > "$CASEDIR/crontab.txt" 2>/dev/null
for user in $(cut -d: -f1 /etc/passwd); do
  crontab -u "$user" -l >> "$CASEDIR/crontab-all.txt" 2>/dev/null
done

# Loaded kernel modules

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 272)May include surrounding context.

md
grep "new user" "$AUTH_LOG" | \
  tee "$CASEDIR/new-users.txt"

# Sudo usage
echo ""
echo "--- Sudo Usage ---"
grep "sudo" "$AUTH_LOG" | grep "COMMAND" | \

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 274)May include surrounding context.

md
grep "new user" "$AUTH_LOG" | \
  tee "$CASEDIR/new-users.txt"

# Sudo usage
echo ""
echo "--- Sudo Usage ---"
grep "sudo" "$AUTH_LOG" | grep "COMMAND" | \

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 420)May include surrounding context.

md
grep "new user" "$AUTH_LOG" | \
  tee "$CASEDIR/new-users.txt"

# Sudo usage
echo ""
echo "--- Sudo Usage ---"
grep "sudo" "$AUTH_LOG" | grep "COMMAND" | \

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
90% confidence
Finding

The memory-forensics workflow includes 'sudo dd if=/dev/fmem', a privileged raw memory acquisition command. In context this is legitimate IR activity, but it is still dangerous because it requires high privilege, can fail unpredictably, and may expose highly sensitive material from memory if run on the wrong host or stored insecurely.

Content

Scanner excerpt · SKILL.md (reported line 299)May include surrounding context.

md
# Capture memory
echo "--- Memory Dump ---"
if [ -f /dev/fmem ]; then
  sudo dd if=/dev/fmem of="$MEMDUMP" bs=1M 2>&1
  echo "Memory dump: $MEMDUMP"
else
  echo "  /dev/fmem not available — install fmem kernel module"

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
87% confidence
Finding

The alternative command 'sudo dd if=/dev/mem' is another privileged raw memory read path with substantial risk. It can capture secrets, keys, and unrelated sensitive data, and in some environments direct /dev/mem access may be unstable or prohibited, increasing operational and confidentiality risk.

Content

Scanner excerpt · SKILL.md (reported line 303)May include surrounding context.

md
echo "Memory dump: $MEMDUMP"
else
  echo "  /dev/fmem not available — install fmem kernel module"
  echo "  Alternative: sudo dd if=/dev/mem of=$MEMDUMP bs=1M"
fi

# If volatility is available, analyze

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The PCAP analysis workflow transmits destination IPs extracted from captured traffic to a local AynOps reputation service via HTTP POST. Even though the endpoint is localhost, this still forwards potentially sensitive incident data to another service boundary and could leak internal or confidential indicators if that service logs, proxies, or forwards requests.

Content

Scanner excerpt · SKILL.md (reported line 389)May include surrounding context.

md
echo ""
echo "--- Known-Bad IP Check ---"
while IFS= read -r ip; do
  result=$(curl -s -X POST "http://localhost:8765/aynops/reputation" \
    -H "Content-Type: application/json" \
    -d "{\"ip\": \"$ip\"}" 2>/dev/null)
  score=$(echo "$result" | jq -r '.abuse_score // 0')

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The containment helpers expose highly destructive administrative actions—iptables policy changes, session termination, and account locking—without any built-in confirmation, validation, rollback, or least-privilege safeguards. Because this is an incident-response skill likely to be used under stress, the context makes accidental misuse more likely and the operational blast radius larger.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
99% confidence
Finding

The block_ip helper immediately appends iptables DROP rules with sudo, altering host firewall state. In incident response this may be useful, but without validation or confirmation it can block the wrong address, disrupt business traffic, or interfere with remote administrative access.

Content

Scanner excerpt · SKILL.md (reported line 465)May include surrounding context.

md
block_ip() {
  IP="$1"
  echo "Blocking $IP at iptables..."
  sudo iptables -A INPUT -s "$IP" -j DROP
  sudo iptables -A OUTPUT -d "$IP" -j DROP
  echo "$IP blocked: $(date)" >> "$CASEDIR/blocked-ips.txt"
}

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
99% confidence
Finding

This second sudo iptables invocation expands the same blocking action to outbound traffic, increasing the likelihood of accidental service interruption. In a containment workflow, bi-directional blocking without guardrails can amplify damage from mistakes or bad indicators.

Content

Scanner excerpt · SKILL.md (reported line 466)May include surrounding context.

md
IP="$1"
  echo "Blocking $IP at iptables..."
  sudo iptables -A INPUT -s "$IP" -j DROP
  sudo iptables -A OUTPUT -d "$IP" -j DROP
  echo "$IP blocked: $(date)" >> "$CASEDIR/blocked-ips.txt"
}

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
98% confidence
Finding

The 'sudo ss -K dst' command forcibly kills connections to a specified IP. In the intended IR context this is a containment action, but it can interrupt legitimate sessions, sever responder access, or impact production traffic if the indicator is incorrect or too broad.

Content

Scanner excerpt · SKILL.md (reported line 474)May include surrounding context.

md
kill_connections_to_ip() {
  IP="$1"
  echo "Killing connections to $IP..."
  sudo ss -K dst "$IP"
  echo "Connections to $IP terminated: $(date)" >> "$CASEDIR/terminated-connections.txt"
}

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
99% confidence
Finding

The revoke_user helper uses sudo pkill to terminate all processes for a user, which is highly disruptive and may stop legitimate services or destroy volatile evidence. In an incident context, a mistaken username or premature execution can cause broad operational harm.

Content

Scanner excerpt · SKILL.md (reported line 482)May include surrounding context.

md
revoke_user() {
  USER="$1"
  echo "Revoking sessions for $USER..."
  sudo pkill -KILL -u "$USER"
  sudo passwd -l "$USER"
  echo "User $USER locked: $(date)" >> "$CASEDIR/locked-accounts.txt"
}

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
99% confidence
Finding

The same helper also locks the account with 'sudo passwd -l', modifying authentication state immediately. This is a legitimate containment tool, but without workflow gates it risks locking service accounts or critical admins during an active incident, worsening outage conditions.

Content

Scanner excerpt · SKILL.md (reported line 483)May include surrounding context.

md
USER="$1"
  echo "Revoking sessions for $USER..."
  sudo pkill -KILL -u "$USER"
  sudo passwd -l "$USER"
  echo "User $USER locked: $(date)" >> "$CASEDIR/locked-accounts.txt"
}

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
99% confidence
Finding

Setting the default INPUT policy to DROP with sudo is a host-wide network control change. In the absence of safety checks, it can isolate the system from responders and production dependencies, turning a containment action into an accidental denial of service.

Content

Scanner excerpt · SKILL.md (reported line 490)May include surrounding context.

md
# Quarantine system
quarantine_system() {
  echo "Quarantining system — dropping all non-loopback traffic..."
  sudo iptables -P INPUT DROP
  sudo iptables -P FORWARD DROP
  sudo iptables -P OUTPUT DROP
  sudo iptables -A INPUT -i lo -j ACCEPT

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
99% confidence
Finding

Setting FORWARD to DROP continues the quarantine sequence and may disrupt routed or containerized traffic on the host. In shared environments this can have a wider blast radius than expected.

Content

Scanner excerpt · SKILL.md (reported line 491)May include surrounding context.

md
quarantine_system() {
  echo "Quarantining system — dropping all non-loopback traffic..."
  sudo iptables -P INPUT DROP
  sudo iptables -P FORWARD DROP
  sudo iptables -P OUTPUT DROP
  sudo iptables -A INPUT -i lo -j ACCEPT
  sudo iptables -A OUTPUT -o lo -j ACCEPT