Back to skill

Security audit

Ai Security Audit

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent security-audit purpose, but it gives broad external lookup and root-level remediation instructions without enough consent, scoping, or rollback guidance.

Use this skill as a read-only audit aid unless you explicitly approve more. Confirm before sending endpoint details to OpenClaw, verify any CVE findings locally, and do not run the sudo, full-upgrade, service enablement, or broad filesystem inspection commands on production systems without change control, backups, a maintenance window, and secret redaction.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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 (3)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:276
Finding
Overprivileged System-Wide Host Reconnaissance<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 276–286 **Vulnerability Type**: Excessive privileged host inspection **Risk Level**: Medium ### Vulnerable Code ```bash # Check for unusual cron jobs crontab -l && sudo crontab -l && cat /etc/cron*/* # Check for unusual listening ports ss -tlnp # Check for recently modified files find / -mtime -7 -type f 2>/dev/null | grep -v proc | grep -v sys ``` ### Technical Analysis The Skill recommends enumerating the current user's scheduled tasks, root's crontab, system cron configuration, listening processes, and recently modified files across the entire filesystem. These checks are presented as incident-response steps when threat-actor association is reported. Although the commands are legitimate diagnostic tools, their scope exceeds what is ordinarily required to assess the exposure of an AI service. In particular: - `sudo crontab -l` crosses into root-level configuration. - `/etc/cron*/*` may contain credentials, internal endpoints, backup destinations, or operational scripts. - `ss -tlnp` exposes system-wide process and network-service details when run with sufficient permissions. - `find /` scans unrelated users, applications, and system areas rather than limiting inspection to the AI service. - Output may enter the agent conversation, terminal history, or audit logs, increasing exposure of sensitive operational information. The commands are documentation and are not executed automatically by the Skill. Exploitation requires a user or agent to follow the instructions in an environment where the requested permissions are available. ### Attack Path 1. An endpoint is reported as associated with a threat actor. 2. The Skill recommends the system-wide inspection commands. 3. The operator grants or already possesses `sudo` access and runs the commands. 4. Root cron configuration, service information, and filesystem metadata are printed. 5. Sensitive content is exposed to the terminal, agen ...[truncated 834 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require explicit operator consent before any privileged or system-wide inspection. 2. Default to service-scoped checks, such as inspecting only: - The AI service account's crontab. - The applicable systemd unit. - The service's deployment and configuration directories. - Sockets associated with the relevant process or port. 3. Do not display root cron contents by default. List filenames and metadata first, then inspect individual entries after approval. 4. Limit filesystem searches to known service paths, for example: ```bash find /opt/open-webui /etc/open-webui /var/lib/open-webui \ -xdev -mtime -7 -type f 2>/dev/null ``` 5. Exclude virtual, temporary, user, and mounted filesystems explicitly if a broader scan is justified. 6. Warn that cron files and service configuration may contain secrets. Redact tokens, passwords, URLs containing credentials, and private keys before returning output to an agent. 7. Prefer a dedicated incident-response procedure when compromise is suspected rather than embedding unrestricted host enumeration in a routine endpoint audit. ]]>

T06 · System Persistence

Warning
Location
SKILL.md:268
Finding
Persistent System Services Enabled Without an Explicit Approval Boundary<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 268–293 **Vulnerability Type**: Persistent root-level service installation and enablement **Risk Level**: Medium ### Vulnerable Code ```bash # Enable auditd sudo apt install auditd -y sudo systemctl enable --now auditd # Log all authentication events sudo auditctl -w /var/log/auth.log -p rwa -k auth_monitor ``` ```bash sudo apt install fail2ban -y sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local # Set bantime = 3600, maxretry = 3 in jail.local sudo systemctl enable --now fail2ban ``` ### Technical Analysis The Skill instructs the operator to install packages as root and use `systemctl enable --now`, which both starts the services immediately and registers them to start after future reboots. This creates a cross-session configuration change that outlives the audit. `auditd` and `fail2ban` are legitimate defensive services, and no evidence indicates that they are being used as backdoors. Nevertheless, enabling persistent services is not necessary merely to assess whether an AI endpoint is exposed. The instructions also use unattended package installation and do not establish an explicit confirmation, change-control, compatibility, or rollback boundary. The `auditctl` rule additionally changes host auditing behavior. Depending on the distribution and configuration, it can increase log volume and may not persist after reboot unless placed in the appropriate audit rules configuration. Copying the default fail2ban configuration and enabling the service before showing a validated jail configuration can also result in ineffective or environment-incompatible protection. ### Attack Path 1. Threat-intelligence output reports an association with an APT group. 2. The operator follows the remediation block without independently validating the finding or host policy. 3. Administrative package installation is approved. 4. `auditd` and `fail2ban` are installed, started, and enabled across r ...[truncated 1087 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Separate read-only assessment from state-changing remediation. 2. Require explicit confirmation before each package installation, service enablement, or configuration change. 3. Explain that `systemctl enable --now` creates a persistent change and provide rollback commands: ```bash sudo systemctl disable --now auditd sudo systemctl disable --now fail2ban ``` 4. Do not use unattended `-y` installation in general-purpose instructions. Allow the operator to review package-manager actions. 5. Validate the operating system, init system, existing logging stack, and organizational policy before installation. 6. Back up existing fail2ban and audit configurations before modification. 7. Provide a complete, service-specific fail2ban jail and validate it before enabling the daemon. 8. Prefer temporary or read-only verification first, such as checking whether equivalent monitoring already exists. 9. Document expected log volume, firewall effects, persistence behavior, and package-removal steps. 10. Treat threat-intelligence association as a lead requiring validation, not sufficient authorization for automatic host modification. ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:238
Finding
Unnecessarily Broad Unattended Operating-System Upgrade and Restart<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 238–243 **Vulnerability Type**: Excessive privileged system modification **Risk Level**: Medium ### Vulnerable Code ```bash # Update all system packages sudo apt update && sudo apt full-upgrade -y # Check for restart-required services sudo needrestart -r a ``` ### Technical Analysis The Skill recommends an unattended full operating-system upgrade and automatic restart handling as a general response to CVE associations. `apt full-upgrade` may install, replace, or remove packages to resolve dependencies, while `-y` bypasses interactive review. `needrestart -r a` can automatically restart affected services. This action is substantially broader than determining whether a particular installed component is vulnerable and patching that component. A CVE associated with an IP address does not by itself establish that the vulnerable package or version is installed on the audited host. Because the commands run with `sudo`, they modify the entire operating system rather than only the AI service. The Skill does not require a backup, maintenance window, package transaction review, staging test, or rollback plan before recommending the change. ### Attack Path 1. A threat-intelligence result lists one or more CVEs for the endpoint's infrastructure. 2. The operator assumes the CVEs apply directly to the current host without verifying installed package versions. 3. The operator runs the recommended commands with administrative privileges. 4. The package manager performs a full dependency-resolving system upgrade without interactive approval. 5. `needrestart` automatically restarts affected services. 6. Production services may experience downtime, dependency incompatibility, or changed behavior. No external attacker directly gains code execution through these instructions. The security concern is that an unvalidated finding can induce excessive root-level changes and availability impact. ### Impact ...[truncated 498 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Verify that each reported CVE applies to an installed component and version before recommending remediation. 2. Use package-specific upgrades instead of `full-upgrade` whenever possible. 3. Remove `-y` so the operator can review package additions, removals, and dependency changes. 4. Review the proposed transaction before applying it: ```bash sudo apt update apt list --upgradable sudo apt upgrade --dry-run ``` 5. Schedule changes during an approved maintenance window. 6. Create a VM snapshot, filesystem backup, or tested rollback point first. 7. Inventory affected services and restart them selectively instead of using automatic restart mode. 8. Test upgrades in staging where the host supports production workloads. 9. Explicitly warn that IP-level CVE association is not proof that the local system is vulnerable. 10. Keep endpoint assessment read-only by default and present patching as a separately approved remediation phase. ]]>
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (28)

Missing User Warnings

High
Confidence
98% confidence
Finding
The skill instructs collection of sensitive endpoint metadata such as public IP, hosting provider, ASN, deployment timing, and authentication status for use with an external threat-intelligence service, but it does not warn the user that this data may be transmitted or disclose the privacy implications. Exposing this information to a third party can reveal security posture and infrastructure inventory.

Credential Access

High
Category
Privilege Escalation
Content
4. Enable credential rotation policy — rotate every 90 days minimum
5. Search for hardcoded credentials in config files:
   ```bash
   grep -r "password\|secret\|api_key\|token" ./config/ --include="*.json" --include="*.env" --include="*.yaml"
   ```

### NET-01: Restrict Port Exposure (always recommend)
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Chaining Abuse

High
Category
Tool Misuse
Content
| CVE Range | Component | Action |
|---|---|---|
| CVE-2024-6387, CVE-2023-38408 | OpenSSH | `sudo apt update && sudo apt upgrade openssh-server` |
| CVE-2023-48795, CVE-2025-26465 | SSH protocol | Disable weak algorithms in `/etc/ssh/sshd_config` |
| CVE-2023-44487 | HTTP/2 (Rapid Reset) | Update nginx/apache, enable rate limiting |
| CVE-2022-* Apache series | Apache httpd | `sudo apt upgrade apache2` |
Confidence
75% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Chaining Abuse

High
Category
Tool Misuse
Content
| CVE Range | Component | Action |
|---|---|---|
| CVE-2024-6387, CVE-2023-38408 | OpenSSH | `sudo apt update && sudo apt upgrade openssh-server` |
| CVE-2023-48795, CVE-2025-26465 | SSH protocol | Disable weak algorithms in `/etc/ssh/sshd_config` |
| CVE-2023-44487 | HTTP/2 (Rapid Reset) | Update nginx/apache, enable rate limiting |
| CVE-2022-* Apache series | Apache httpd | `sudo apt upgrade apache2` |
Confidence
75% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Chaining Abuse

High
Category
Tool Misuse
Content
| CVE Range | Component | Action |
|---|---|---|
| CVE-2024-6387, CVE-2023-38408 | OpenSSH | `sudo apt update && sudo apt upgrade openssh-server` |
| CVE-2023-48795, CVE-2025-26465 | SSH protocol | Disable weak algorithms in `/etc/ssh/sshd_config` |
| CVE-2023-44487 | HTTP/2 (Rapid Reset) | Update nginx/apache, enable rate limiting |
| CVE-2022-* Apache series | Apache httpd | `sudo apt upgrade apache2` |
Confidence
75% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The trigger list includes broad natural-language phrases such as 'security audit' and 'check my endpoint', which can cause the skill to activate in contexts the user did not intend. Because this skill collects sensitive infrastructure details and directs use of an external intelligence source, accidental invocation increases privacy and data-handling risk.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
**Using firewall (ufw):**
```bash
# Block public access to port 18789
sudo ufw deny 18789

# Allow only specific trusted IPs
sudo ufw allow from <your-office-ip> to any port 18789
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
**Using firewall (ufw):**
```bash
# Block public access to port 18789
sudo ufw deny 18789

# Allow only specific trusted IPs
sudo ufw allow from <your-office-ip> to any port 18789
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
**Using firewall (ufw):**
```bash
# Block public access to port 18789
sudo ufw deny 18789

# Allow only specific trusted IPs
sudo ufw allow from <your-office-ip> to any port 18789
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
**Using firewall (ufw):**
```bash
# Block public access to port 18789
sudo ufw deny 18789

# Allow only specific trusted IPs
sudo ufw allow from <your-office-ip> to any port 18789
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
**Using firewall (ufw):**
```bash
# Block public access to port 18789
sudo ufw deny 18789

# Allow only specific trusted IPs
sudo ufw allow from <your-office-ip> to any port 18789
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
**Using firewall (ufw):**
```bash
# Block public access to port 18789
sudo ufw deny 18789

# Allow only specific trusted IPs
sudo ufw allow from <your-office-ip> to any port 18789
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
**Using firewall (ufw):**
```bash
# Block public access to port 18789
sudo ufw deny 18789

# Allow only specific trusted IPs
sudo ufw allow from <your-office-ip> to any port 18789
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
**Using firewall (ufw):**
```bash
# Block public access to port 18789
sudo ufw deny 18789

# Allow only specific trusted IPs
sudo ufw allow from <your-office-ip> to any port 18789
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
**Using firewall (ufw):**
```bash
# Block public access to port 18789
sudo ufw deny 18789

# Allow only specific trusted IPs
sudo ufw allow from <your-office-ip> to any port 18789
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
**Using firewall (ufw):**
```bash
# Block public access to port 18789
sudo ufw deny 18789

# Allow only specific trusted IPs
sudo ufw allow from <your-office-ip> to any port 18789
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
**Using firewall (ufw):**
```bash
# Block public access to port 18789
sudo ufw deny 18789

# Allow only specific trusted IPs
sudo ufw allow from <your-office-ip> to any port 18789
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
**Using firewall (ufw):**
```bash
# Block public access to port 18789
sudo ufw deny 18789

# Allow only specific trusted IPs
sudo ufw allow from <your-office-ip> to any port 18789
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
sudo ufw deny 18789

# Allow only specific trusted IPs
sudo ufw allow from <your-office-ip> to any port 18789
sudo ufw allow from <vpn-subnet> to any port 18789

sudo ufw reload
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
sudo ufw deny 18789

# Allow only specific trusted IPs
sudo ufw allow from <your-office-ip> to any port 18789
sudo ufw allow from <vpn-subnet> to any port 18789

sudo ufw reload
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
sudo ufw deny 18789

# Allow only specific trusted IPs
sudo ufw allow from <your-office-ip> to any port 18789
sudo ufw allow from <vpn-subnet> to any port 18789

sudo ufw reload
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
sudo ufw deny 18789

# Allow only specific trusted IPs
sudo ufw allow from <your-office-ip> to any port 18789
sudo ufw allow from <vpn-subnet> to any port 18789

sudo ufw reload
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
sudo ufw deny 18789

# Allow only specific trusted IPs
sudo ufw allow from <your-office-ip> to any port 18789
sudo ufw allow from <vpn-subnet> to any port 18789

sudo ufw reload
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Session Persistence

Medium
Category
Rogue Agent
Content
```bash
   # Enable auditd
   sudo apt install auditd -y
   sudo systemctl enable --now auditd

   # Log all authentication events
   sudo auditctl -w /var/log/auth.log -p rwa -k auth_monitor
Confidence
80% 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.

Static analysis

No suspicious patterns detected.