Back to skill

Security audit

Threat Intelligence — التهديدات

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a disclosed OSINT utility, but it asks for broad execution/write authority and sends user queries to Telegram, crt.sh, and hard-coded Tor onion search services without strong scoping or output safety boundaries.

Review before installing. Only use this in an environment where outbound Tor and OSINT lookups are acceptable, avoid sensitive search terms, and treat all returned Telegram/onion content as untrusted evidence. The publisher should remove unused write authority, narrow tool permissions, encode and validate inputs, document the exact external services contacted, and clearly mark remote content as untrusted.

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/run.py:15
Finding

Untrusted Remote Content Is Emitted Without Safety Boundaries

Content
View full analysis
]*>(.*?)',p.stdout,re.DOTALL) times = re.findall(r']*datetime="([^"]+)"',p.stdout) out = [] for i,m in enumerate(msgs[-8:]): clean = re.sub(r'<[^>]+>',' ',m).strip()[:300] t = times[-(8-i)] if i < len(times) else '' out.append({"text":clean,"time":t}) return out ``` ```python links = re.findall(r'href="(http://[a-z0-9]+\.onion[^"]*)"',p.stdout) titles = re.findall(r']*href="http://[^"]+"[^>]*>([^<]+)',p.stdout) for i,link in enumerate(links[:5]): title = titles[i] if i < len(titles) else link results.append({"title":title.strip()[:80],"link":link}) ``` The resulting values are printed directly: ```python for p in posts: print(f"[{p['time'][:16]}]\n{p['text'][:200]}\n") ``` ```python for p in posts[:3]: print(f" • {p['text'][:100]}") ``` ```python for r in results: print(f" • {r['title']}\n {r['link']}") ``` ### Technical Analysis Telegram messages and dark-web search result titles are controlled by external parties. The implementation removes substrings resembling HTML tags but does not neutralize terminal control characters, distinguish trusted instructions from retrieved data, or provide machine-readable provenance and trust metadata. HTML tag removal is not a sufficient security boundary. An attacker can publish plain-text instructions intended to influence an AI agent, misleading text that impersonates application messages, or terminal escape sequences that alter how output is displayed. The retrieved content is then inserted directly into agent-facing or terminal-facing output. The script does not evaluate or ...[truncated 1846 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill advertises sensitive capabilities including Telegram scraping, Tor-based dark web search, bilingual analysis, and region-aware targeting, but the file only documents claims without showing implementation or controls for those behaviors. This mismatch is dangerous because users and reviewers may trust the declared passive/benign purpose while hidden or future code could perform broader collection, unsafe automation, or unsupported actions under that cover.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill declares required tools under a custom validation field but does not define an explicit permission or allowed-tools scope, while the documented behavior relies on shell-capable operations such as Tor usage and external network access. This creates an authorization gap where the runtime may grant broader execution capability than users expect, increasing the risk of command execution or network misuse if the skill is later implemented unsafely.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring states this is an "Arabic Threat Intelligence Tool" and specifically targets Arabic-language threat actor channels. While the CLI exposes a --lang option later, the core skill purpose and targeting are framed as language-specific by default, which is a natural-language locale constraint without explicit user opt-in or documented justification in these lines.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/run.py (reported line 12)May include surrounding context.

python
def scrape_telegram(channel):
    try:
        p = subprocess.run(["curl","-sL","--max-time","10",f"https://t.me/s/{channel}"],
            capture_output=True,text=True,timeout=12)
        msgs = re.findall(r'class="tgme_widget_message_text[^>]*>(.*?)</div>',p.stdout,re.DOTALL)
        times = re.findall(r'<time[^>]*datetime="([^"]+)"',p.stdout)

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
84% confidence
Finding

This code sends user-supplied search terms to hard-coded .onion search engines through torsocks, causing outbound Tor activity to third-party hidden services without sanitization, encoding, or trust controls. In the context of a skill explicitly marketed for dark web searching with no API keys, this increases exposure to malicious infrastructure, accidental leakage of sensitive queries, and operational/legal risk for the host environment.

Content

Scanner excerpt · scripts/run.py (reported line 33)May include surrounding context.

python
results = []
    for engine in engines:
        try:
            p = subprocess.run(["torsocks","curl","-sL","--max-time","15",engine.format(query)],
                capture_output=True,text=True,timeout=20)
            links = re.findall(r'href="(http://[a-z0-9]+\.onion[^"]*)"',p.stdout)
            titles = re.findall(r'<a[^>]*href="http://[^"]+"[^>]*>([^<]+)',p.stdout)

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/run.py (reported line 46)May include surrounding context.

python
def ct_scan(domain):
    try:
        p = subprocess.run(["curl","-s","--max-time","15",f"https://crt.sh/?q=%25.{domain}&output=json"],
            capture_output=True,text=True,timeout=18)
        d = json.loads(p.stdout)
        names = set()

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The description says this is 'The only Arabic-first OSINT and threat intelligence skill' and the README repeats 'only Arabic-first', which establishes a strong default language/locale posture. Although later flags allow --lang en and --lang both, the headline language does not clearly present language choice up front and could be read as imposing a locale preference without explicit opt-in.

Content

No source excerpt is available for this finding.

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

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

md
# Arabic Threat Intelligence

The **only Arabic-first** OSINT and threat intelligence skill for OpenClaw. Works globally — not limited to any single country or region.

## Why This Skill

Static analysis

No suspicious patterns detected.