Back to skill

Security audit

Domain Checker

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims: it checks domain availability using WHOIS and DNS, with limited hardening issues around unvalidated domain text in terminal output.

Before installing, understand that this skill makes outbound WHOIS and DNS queries and may reveal the domains you are checking to external infrastructure. Use trusted domain inputs where possible, and treat results from unusual or machine-supplied domain strings cautiously because malformed input could affect displayed output.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/check_domains.sh:56
Finding
Terminal and Log Output Injection in the Bash Domain Checker<![CDATA[ ## Vulnerability Details **File Location**: `scripts/check_domains.sh:56-74, 78-95` **Vulnerability Type**: Improper neutralization of terminal control and backslash escape sequences **Risk Level**: Medium ### Vulnerable Code ```bash # --- Cross-verify and decide --- if [ -n "$created" ]; then # whois shows creation date = definitely taken printf "${RED}❌ %-30s TAKEN %s${NC}\n" "$domain" "$created" elif [ -n "$not_found" ] && [ -z "$ns" ]; then # whois says not found AND no NS records = very likely available printf "${GREEN}✅ %-30s AVAILABLE${NC}\n" "$domain" elif [ -n "$not_found" ] && [ -n "$ns" ]; then # whois says not found but has NS = conflicting signals, likely taken printf "${YELLOW}⚠️ %-30s LIKELY TAKEN (has NS: %s)${NC}\n" "$domain" "$ns" elif [ -n "$ns" ] || [ -n "$a_record" ]; then # No whois creation date but has DNS records = likely taken printf "${YELLOW}⚠️ %-30s LIKELY TAKEN (has DNS records)${NC}\n" "$domain" else # No whois data, no DNS = unknown (whois may have failed) printf "${YELLOW}❓ %-30s UNKNOWN (whois returned no data — check manually)${NC}\n" "$domain" fi ``` ```bash # Read domains from args or stdin domains=() if [ $# -gt 0 ]; then domains=("$@") else while IFS= read -r line; do for word in $line; do domains+=("$word") done done fi # ... for d in "${domains[@]}"; do result=$(check_one "$d") echo -e "$result" ``` ### Technical Analysis The script accepts arbitrary command-line or standard-input values without validating that they are syntactically valid domain names. The value is included in a formatted verdict and stored in `result`. The statement `echo -e "$result"` then interprets backslash escape sequences contained in the attacker-controlled value. For example, textual sequences representing newlines, carriage returns, or terminal escape characters can be converted into control characters when the result is displayed. Literal terminal control characters are also n ...[truncated 1598 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Validate every input before performing WHOIS or DNS operations. Reject whitespace, control characters, escape characters, leading hyphens, empty labels, labels longer than 63 characters, and names longer than 253 characters. 2. Permit only normalized DNS syntax appropriate for the tool, such as ASCII letters, digits, hyphens, and dots, with hyphens prohibited at label boundaries. 3. Replace escape-interpreting output: ```bash echo -e "$result" ``` with literal output: ```bash printf '%s\n' "$result" ``` 4. Keep terminal color sequences separate from user-controlled data and use constant format strings. 5. Protect external commands from option injection where their implementations support an option delimiter: ```bash whois -- "$domain" dig +short -- "$domain" NS ``` If a utility does not support `--` in that position, strict rejection of leading-hyphen inputs is required. 6. Return structured verdict data from `check_one` rather than capturing preformatted terminal output and parsing it with `grep`. 7. Add regression tests covering textual `\n` and `\033` sequences, literal ESC bytes, carriage returns, leading hyphens, malformed labels, and oversized names. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/check_domains.py:101
Finding
Terminal and Log Output Injection in the Python Domain Checker<![CDATA[ ## Vulnerability Details **File Location**: `scripts/check_domains.py:101-143` **Vulnerability Type**: Improper neutralization of control characters in user-controlled output **Risk Level**: Medium ### Vulnerable Code ```python def check_domain(domain: str) -> str: """Check a single domain. Returns verdict string.""" domain = domain.strip().lower() # Step 1: whois query whois_text = whois_query(domain) whois_lower = whois_text.lower() has_created = any(p in whois_lower for p in CREATED_PATTERNS) has_not_found = any(p in whois_lower for p in NOT_FOUND_PATTERNS) # Extract creation date for display created_line = "" if has_created: for line in whois_text.splitlines(): ll = line.lower().strip() if any(p in ll for p in CREATED_PATTERNS): created_line = line.strip() break # Step 2: DNS check has_a, has_any_dns = dns_check(domain) # Step 3: Cross-verify if has_created: return f"❌ {domain:<30s} TAKEN {created_line}" elif has_not_found and not has_any_dns: return f"✅ {domain:<30s} AVAILABLE" elif has_not_found and has_any_dns: return f"⚠️ {domain:<30s} LIKELY TAKEN (has DNS records)" elif has_any_dns: return f"⚠️ {domain:<30s} LIKELY TAKEN (has DNS records)" elif whois_text.strip(): # Got whois response but no clear signal return f"❓ {domain:<30s} UNKNOWN (whois unclear — check manually)" else: return f"❓ {domain:<30s} UNKNOWN (whois server unreachable — check manually)" def main(): domains = [] if len(sys.argv) > 1: domains = sys.argv[1:] elif not sys.stdin.isatty(): for line in sys.stdin: domains.extend(line.strip().split()) # ... for d in domains: result = check_domain(d) print(result) ``` ### Technical Analysis Calling `strip().lower()` normalizes casing and removes only leading an ...[truncated 1754 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Validate and normalize the input before calling `whois_query` or `dns_check`. 2. Reject all ASCII control characters, Unicode control and formatting characters, whitespace, leading hyphens, and characters outside the accepted internationalized-domain policy. 3. If internationalized domain names are required, convert them through a deliberate IDNA normalization step and validate the resulting ASCII labels. 4. Enforce DNS length and label rules. A basic ASCII-only policy should verify each label independently and reject empty labels except for an explicitly supported trailing root dot. 5. Keep a separately escaped representation for terminal and log output. For example, render unexpected characters with `repr()` or an equivalent visible encoding rather than printing raw control bytes. 6. Add tests using literal ESC, carriage-return, backspace, bidirectional formatting, malformed-label, and oversized-domain inputs. ]]>
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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
Findings (1)

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill describes and invokes network-capable scripts (`whois`, DNS, raw socket access) but does not declare any explicit tool scope such as `permissions` or `allowed-tools`. This creates a governance gap: an agent may execute network operations without clear sandboxing or policy review, increasing the risk of unintended outbound access, misuse in restricted environments, or expansion of capability beyond what the platform expects.

Static analysis

No suspicious patterns detected.