T05 · Unauthorized Access and Privilege Escalation
- Location
procedures/04-self-audit.md:27- Finding
Periodic Self-Audit Exceeds Least-Privilege Boundaries
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This security-audit skill is mostly purpose-aligned, but it asks agents to automatically inspect sensitive local state, store audit history, and use a configurable LLM scan endpoint without enough scoping.
Review this skill before installing globally. It is not clearly malicious, but only use it where automatic audits may inspect shell history, limited environment data, SSH and agent-config directory metadata, and where scan targets may be sent to the configured LLM endpoint. Prefer disabling persistent memory recording, using a local-only validated LM Studio URL, and avoiding the --install path unless the scanner dependency is pinned and trusted.
procedures/04-self-audit.md:27Periodic Self-Audit Exceeds Least-Privilege Boundaries
procedures/04-self-audit.md:132Unbounded Persistence of Security Events in Agent Memory
scripts/scan-skill-scanner.sh:125Unpinned Third-Party Scanner Installation
scripts/scan-skill-scanner.sh:25Unvalidated Configurable LLM Endpoint Enables Internal Requests and Potential Source Disclosure
YARA rule matched cryptocurrency mining indicators (stratum protocol, mining pools, miner binaries, or cryptojacking scripts).
`eval(` | Dynamic execution |
| `new Function(` | Function constructor |
| `setAttribute(...onload` | Event handlers |
| `document.cookie` | Cookie access |
| `localStorage.setItem` | Storage access |
| `XMLHttpRequest` | Network requests |
| `fetch(` to external domain | External fetch |
| `setTimeout(string` | String in setTimeout |
| `<iframe>` | Iframe injection |
| `crypto miner` | CoinHive, CryptoLoot |
### 4. Phishing Patterns (High)
**What to look for:**
| Pattern | Description |
|---------|--------------|
| `<input type="password">` | Password input |
| `<form action="http://` | HTTP form (insecure) |
| Fake login | "Enter your credentials" without HTTPS |
| Too good to be true | "Free iPhone", "You won" |
| Urgency | "Act now", "Limited time" |
| Authority fake | "Bank", "Government", "CEO" |
### 5. Output Injection (High)
**What to look for:**
| Pattern | Description |
|---------|--------------|
| `<script>` | Script injection |
| `javascript:` | JS protocol |
| `onerror
A security skill that claims to perform SSRF, prompt-injection, and shell-injection analysis but actually delegates to other scanners and optional environment setup creates a trust-boundary problem. Operators may approve it as a passive analyzer while it performs active operations such as pip installation or localhost service interaction, which increases operational risk.
A security skill that claims to perform SSRF, prompt-injection, and shell-injection analysis but actually delegates to other scanners and optional environment setup creates a trust-boundary problem. Operators may approve it as a passive analyzer while it performs active operations such as pip installation or localhost service interaction, which increases operational risk.
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
When analyzing content, look for:
- Prompt injection patterns (ignore previous, hidden instructions, zero-width chars)
- Credential exfiltration (curl $API_KEY, cat .env, credentials in URL)
- Malicious JavaScript (eval, setAttribute onload, fetch to external domains)
- Phishing patterns (fake login, HTTP passwords, too-good-to-be-true offers)
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
### Phase 3: Command Safety (when executing commands)
Before executing ANY command check:
- No pipe to shell: `curl ... | sh`, `wget ... | sh`
- No secrets: $API_KEY, $TOKEN, $SECRET
- No dangerous operations: writing to /etc, ~/.ssh, recursive deletion
Referenced artifact was not completely inspected
Scans files against patterns in `config/patterns.yaml` without external LLM.
Referenced artifact was not completely inspected
Scans files against patterns in `config/patterns.yaml` without external LLM.
Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
- [ ] Content checked for prompt injection
- [ ] JS code checked for malicious patterns
- [ ] Commands approved by user (except safe ones)
- [ ] Self-audit passed without warnings
## Verification
Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
- [ ] Content checked for prompt injection
- [ ] JS code checked for malicious patterns
- [ ] Commands approved by user (except safe ones)
- [ ] Self-audit passed without warnings
## Verification
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
- id: "PI-001"
name: "Direct Override (EN)"
regex: '(?i)ignore\\s+(all\\s+)?(previous|prior|above|earlier)\\s+(instructions?|rules?|prompts?|guidelines?)'
description: "Classic prompt injection - attempt to override system instructions"
owasp: "ASI01"
- id: "PI-002"
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
- id: "PI-001"
name: "Direct Override (EN)"
regex: '(?i)ignore\\s+(all\\s+)?(previous|prior|above|earlier)\\s+(instructions?|rules?|prompts?|guidelines?)'
description: "Classic prompt injection - attempt to override system instructions"
owasp: "ASI01"
- id: "PI-002"
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
owasp: "ASI01"
- id: "PI-004"
name: "Override System"
regex: '(?i)(override|bypass|circumvent)\\s+(your\\s+)?(system|security|safety)\\s+(instructions?|rules?|guardrails?)'
description: "Attempt to override system rules"
owasp: "ASI01"
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
- id: "PI-006"
name: "Forget Previous"
regex: '(?i)forget\\s+(everything|all\\s+previous|what\\s+I\\s+said)'
description: "Request to forget previous context"
owasp: "ASI01"
- id: "PI-007"
Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.
- id: "PI-009"
name: "DAN Mode"
regex: '(?i)(DAN|do\\s+anything\\s+now|Jailbreak)'
description: "DAN (Do Anything Now) jailbreak pattern"
owasp: "ASI01"
- id: "PI-010"
Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.
- id: "PI-010"
name: "Role Play Override"
regex: '(?i)(pretend|act\\s+(as|like)|be\\s+(a|an))\\s+(different|new|special)\\s+(AI|assistant|agent)'
description: "Role play to bypass restrictions"
owasp: "ASI01"
- id: "PI-011"
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
- id: "PI-010"
name: "Role Play Override"
regex: '(?i)(pretend|act\\s+(as|like)|be\\s+(a|an))\\s+(different|new|special)\\s+(AI|assistant|agent)'
description: "Role play to bypass restrictions"
owasp: "ASI01"
- id: "PI-011"
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
- id: "DC-006"
name: "Download and Execute"
regex: '(curl|wget)\\s+[^|]+\\.sh\\s*;?\\s*(bash|sh|source)'
description: "Download and execute script"
owasp: "ASI02"
- id: "DC-007"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- id: "DE-004"
name: "File Read with Exfil"
regex: '(cat\\s+\\S+\\.env|readFileSync.*\\.env|open\\([^)]*\\.env)'
description: "Reading .env files"
owasp: "ASI02"
- id: "DE-005"
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
- id: "TM-003"
name: "Rug Pull Pattern"
regex: '(download.*execute|fetch.*run|remote.*code|self-modify)'
description: "Remote code execution patterns"
owasp: "ASI07"
Potential security issue detected. Manual review is recommended.
- id: "SE-002"
name: "Boundary Violation"
regex: '(chroot|unshare|nsenter|mount --bind|\\/mnt|\\/proc)'
description: "System boundary escape"
owasp: "ASI02"
Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
severity: "CRITICAL"
endpoints:
# AWS
- "169.254.169.254"
- "169.254.169.254/latest/meta-data/"
- "169.254.169.254/latest/user-data/"
- "metadata.aws.internal"
Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
severity: "CRITICAL"
endpoints:
# AWS
- "169.254.169.254"
- "169.254.169.254/latest/meta-data/"
- "169.254.169.254/latest/user-data/"
- "metadata.aws.internal"
Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
severity: "CRITICAL"
endpoints:
# AWS
- "169.254.169.254"
- "169.254.169.254/latest/meta-data/"
- "169.254.169.254/latest/user-data/"
- "metadata.aws.internal"
Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
severity: "CRITICAL"
endpoints:
# AWS
- "169.254.169.254"
- "169.254.169.254/latest/meta-data/"
- "169.254.169.254/latest/user-data/"
- "metadata.aws.internal"
Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
severity: "CRITICAL"
endpoints:
# AWS
- "169.254.169.254"
- "169.254.169.254/latest/meta-data/"
- "169.254.169.254/latest/user-data/"
- "metadata.aws.internal"
Detected: suspicious.install_untrusted_source, suspicious.obfuscated_code, suspicious.prompt_injection_instructions