Back to skill

Security audit

DNS网络诊断基础版

Security checks for vulnerabilities and agentic risk

Overview

This is a network troubleshooting skill, but it under-discloses outbound traffic and includes automatic privileged system changes that users should review carefully.

Install only if you are comfortable with a skill that may run local shell commands and contact target hosts or DNS servers. Review commands before execution, avoid automatic sudo, and treat /etc/hosts changes as manual administrative actions with a backup and rollback plan.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (20)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This section includes privileged DNS cache flushes and local configuration inspection/modification workflows without clear safety warnings, rollback guidance, or confirmation requirements. These commands can alter system networking behavior, disrupt resolution, and encourage unsafe privileged execution by an agent or unsuspecting user.

Content

No source excerpt is available for this finding.

Chaining Abuse

High
Category
Tool Misuse
Confidence
92% confidence
Finding

The command chains two privileged operations with ';', encouraging compound execution without checkpoints. In an agent context, chaining state-changing commands reduces opportunities for confirmation or failure handling and can magnify unintended impact.

Content

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

md
cat /etc/hosts            # 所有平台
# ...
# 刷新DNS缓存
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder  # macOS
sudo systemd-resolve --flush-caches                            # Linux(systemd)
ipconfig /flushdns                                             # Windows
# ...

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The best-practice guidance recommends appending to /etc/hosts via sudo without emphasizing the risks of overriding name resolution, breaking connectivity, or persisting incorrect mappings. In an agent context, modifying hosts files is a sensitive system change that can redirect traffic and mask real DNS issues.

Content

No source excerpt is available for this finding.

Chaining Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Piping data directly into sudo tee appends to /etc/hosts in a single command, combining input generation and privileged file write. This pattern is especially risky in agent workflows because it simplifies irreversible or hard-to-notice system changes to a critical configuration file.

Content

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

bash
# 临时域名映射测试
echo "203.0.113.50  example.com" | sudo tee -a /etc/hosts
# 测试完成后移除
sudo sed -i '/203.0.113.50/d' /etc/hosts

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly claims that diagnostics 'run locally' and 'will not send data to external services', but its documented use of dig, nslookup, curl, nc, and openssl s_client inherently performs outbound DNS and network connections to remote hosts. This is dangerous because users may rely on the privacy claim and unintentionally probe third-party systems or disclose sensitive internal hostnames, targets, or traffic metadata.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The documented curl diagnostic performs an outbound request to a remote endpoint. In a network-diagnostics skill this behavior is expected, but it is still security-relevant because it transmits metadata to external systems and can be triggered in an automated exec-capable environment.

Content

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

分析 HTTP 请求各阶段耗时,定位慢请求根因.

bash
# 详细请求过程
curl -v https://api.example.com/endpoint
# ...
# 各阶段耗时分析
curl -o /dev/null -s -w "

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This curl timing example initiates a real outbound HTTPS request to a remote API endpoint. While consistent with the tool's purpose, it is dangerous if run automatically because it can leak target selection, test internal URLs, or violate network-use policies.

Content

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

md
总耗时:        %{time_total}s
    HTTP状态码:    %{http_code}
    响应大小:      %{size_download} bytes
" https://api.example.com/endpoint
# ...
# 查看响应头
curl -sI https://api.example.com/endpoint

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The examples for fetching response headers and following redirects both create outbound network traffic to external hosts. Redirect-following can broaden the set of contacted destinations beyond the original host, increasing data exposure and unpredictability.

Content

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

md
" https://api.example.com/endpoint
# ...
# 查看响应头
curl -sI https://api.example.com/endpoint
# ...
# 跟随重定向
curl -sIL https://example.com

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
96% confidence
Finding

The skill includes sudo-based cache-flush commands, meaning it instructs privileged execution on the host system. In an agent with exec capability, privileged commands materially increase risk because they can alter system state and bypass normal user-level safety boundaries.

Content

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

md
cat /etc/hosts            # 所有平台
# ...
# 刷新DNS缓存
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder  # macOS
sudo systemd-resolve --flush-caches                            # Linux(systemd)
ipconfig /flushdns                                             # Windows
# ...

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
95% confidence
Finding

This Linux cache-flush command requires sudo and changes resolver state. Though intended for troubleshooting, it can disrupt active networking and should not be silently included in an auto-executing agent workflow.

Content

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

md
# ...
# 刷新DNS缓存
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder  # macOS
sudo systemd-resolve --flush-caches                            # Linux(systemd)
ipconfig /flushdns                                             # Windows
# ...
# 查看systemd-resolved状态

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This API timing analysis example sends an outbound request to a remote endpoint as part of performance diagnosis. In an automated skill, repeated execution can generate unapproved traffic or interact with production services unexpectedly.

Content

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

md
服务器处理:    %{time_starttransfer}s
总耗时:        %{time_total}s
下载大小:      %{size_download} bytes
" https://api.example.com/endpoint
# ...
# 判断瓶颈位置
TOTAL=$(curl -o /dev/null -s -w "%{time_total}" https://api.example.com/endpoint)

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The TOTAL timing measurement uses curl against an external API endpoint, creating outbound traffic. Even if the request is harmless, automatic execution can expose internal troubleshooting activity and interact with live remote systems.

Content

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

" https://api.example.com/endpoint

...

判断瓶颈位置

TOTAL=$(curl -o /dev/null -s -w "%{time_total}" https://api.example.com/endpoint) DNS=$(curl -o /dev/null -s -w "%{time_namelookup}" https://api.example.com/endpoint) echo "DNS占比: $(echo "scale=2; $DNS/$TOTAL*100" | bc)%"

text

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The DNS timing measurement performs another outbound HTTPS request to the same external endpoint. Multiple back-to-back test requests amplify the privacy, policy, and service-impact concerns of automated diagnostics.

Content

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

...

判断瓶颈位置

TOTAL=$(curl -o /dev/null -s -w "%{time_total}" https://api.example.com/endpoint) DNS=$(curl -o /dev/null -s -w "%{time_namelookup}" https://api.example.com/endpoint) echo "DNS占比: $(echo "scale=2; $DNS/$TOTAL*100" | bc)%"

text

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger section says the skill should be used for '代码生成、编程辅助、调试测试、开发部署', which is much broader than the documented DNS/network diagnostic scope. This ambiguity could cause the skill to activate for many ordinary development requests unrelated to networking.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill says the agent will automatically run DNS, port-testing, and certificate-check commands, but it does not require confirmation before making outbound connections or running commands on the user's machine. In an agent environment with exec enabled, automatic execution can surprise users, contact unintended hosts, and create audit or policy violations.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
99% confidence
Finding

Using sudo tee to append to /etc/hosts is a privileged system modification that can redirect hostname resolution. If misapplied or automated, it can create persistent traffic redirection, hide real issues, or interfere with security controls relying on correct DNS.

Content

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

bash
# 临时域名映射测试
echo "203.0.113.50  example.com" | sudo tee -a /etc/hosts
# 测试完成后移除
sudo sed -i '/203.0.113.50/d' /etc/hosts

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
98% confidence
Finding

The sudo sed command edits /etc/hosts with elevated privileges, again demonstrating privileged file modification in the skill. Although framed as cleanup, it still normalizes root-level automated edits to a critical system file.

Content

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

临时域名映射测试

echo "203.0.113.50 example.com" | sudo tee -a /etc/hosts

测试完成后移除

sudo sed -i '/203.0.113.50/d' /etc/hosts

text

## 常见问题

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 375)May include surrounding context.

md
brew install bind
# ...
# Ubuntu/Debian
sudo apt install dnsutils
# ...
# CentOS/RHEL
sudo yum install bind-utils

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 378)May include surrounding context.

md
brew install bind
# ...
# Ubuntu/Debian
sudo apt install dnsutils
# ...
# CentOS/RHEL
sudo yum install bind-utils

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The display name and summary are presented in Chinese, and the rest of the skill instructions are also effectively Chinese-only. There is no indication that users can opt into another language or that the locale restriction is intentional and justified.

Content

No source excerpt is available for this finding.