Skip to content

WEB渗透测试数据库 密码 生成 组合

Notifications You must be signed in to change notification settings

ver007/pentestdb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

渗透测试数据库

1 介绍

渗透测试资源,为渗透测试提供常用的字典、exploit、webshell、攻击payload等,并且包含常用的脚本。

组合使用资源和脚本工具可实现批量漏洞检测/利用

常用脚本包括以下:

  • CMS识别
  • URL资源爆破
  • Exploit执行
  • 社工密码字典生成
  • Google Hacking
  • 编解码等功能

2 安装

这里下载最新版本,或使用命令

git clone https://github.com/alpha1e0/pentestdb.git

clone到本地

wiper支持Windows/Linux/MacOS,需使用python 2.6.x2.7.x运行

2.1 依赖

项目中的脚本文件依赖与requests, chardet

pip install requests
pip install chardet
pip install yaml
pip install lxml

注:windows 安装 lxml:

  1. 下载编译好的安装包:http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
  2. 安装,pip install package.whl


3 使用

3.1 常用脚本

项目中的python脚本提供用有用的渗透辅助功能,根目录下的pen.py为脚本入口。

3.1.1 CMS识别

pen.pycmsidentify子命令提供了CMS识别的功能,目前能够识别drupal discuz empirecms dedecms joomla phpcms phpwind qibo wordpress几种cms

例如:

pen.py cms http://xxx.com

3.1.2 密码字典生成

pen.pypasswdgen子命令提供了生成密码字典的功能,能够设置不同关键字生成密码字典

例如:

pen.py passwdgen --fullname "lin zhi ling" --birthday 1980-1-1 --phone 12344445555 --qq 34233888 > password.txt

3.1.3 URI爆破

pen.pyuribrute子命令提供了URI资源爆破,URI爆破字典生成的功能

例如:

pen.py uribrute -u http://127.0.0.1/discuz/6.0/ --safeurl "http://127.0.0.1/discuz/6.0/"
pen.py uribrute --generate --type jsp --ext "jspx" --keyword "xxx"

3.1.4 Exploit功能

pen.pyexploit子命令提供了exploit模块相关操作,exploit模块是一个可灵活小巧的exploit框架,可以编写各种web漏洞的exploit,该模块的操作包括以下内容:

  • 搜索exploit信息
  • 增加、删除、修改exploit信息
  • 执行某个exploit
  • 搜索并批量执行exploit

exploit保存在项目根目录下的exploit目录下

例如:

# 列举、搜索、注册、更新、删除
pen.py exploit -l
pen.py exploit -q appName:joomla
pen.py exploit --register exploit
pen.py exploit --update cms_joomla_3_4_session_object_injection.py
pen.py exploit -d "Joomla 1.5~3.4 session对象注入漏洞exploit"
pen.py exploit --detail "Joomla 1.5~3.4 session对象注入漏洞exploit"

# 执行exploit
pen.py exploit -e cms_joomla_3_4_session_object_injection.py -u http://127.0.0.1:1234 --attack
pen.py exploit -s appName:joomla -u http://127.0.0.1:1234 --verify
pen.py exploit -s appName:joomla -u @url.txt

3.1.5 编码

pen.pyencode子命令提供了编码的功能

编码方式*-t/--type*支持:

url url-all hex decimal unicode unicode-all md5 sha base64 base32 html html-all

其中**-all编码会编码所有字符包括非特殊字符

非ASCII编码*-m/--method*支持:

utf8 gbk gb2312 big5 utf16 utf7 等所有python支持的编码方式,具体请参考如下链接:

python支持的编解码格式

例如:

pen.py encode -t unicode "aaa=你好"
pen.py encode -t url-all -m gbk "id=你好"
pen.py encode -t md5 "aaaaaaaa"

3.1.6 解码

pen.pydecode子命令提供了解码的功能,并提供编码推测功能

解码方式*-t/--type*支持:

auto hex url unicode decimal base64 base32 html

其中auto方式会自动检测url类型、hex类型、unicode类型的字符串并进行解码

非ASCII编码*-m/--method*支持:

utf8 gbk gb2312 big5 utf16 utf7 等所有python支持的编码方式,具体请参考如下链接:

python支持的编解码格式

例如:

pen.py decode -t base64 5ZOI5ZOI
pen.py decode -m utf8 aaa%E5%93%88%E5%93%88
pen.py encode -t hex "\x61\x61\xe5\x93\x88\xe5\x93\x88"
pen.py decode -d "\x61\x61\xe5\x93\x88\xe5\x93\x88"

3.1.7 文件处理功能

pen.pyfile子命令提供了常用的文件操作,包括:文件编码推断、文件类型转换、文件hash计算、文件图片隐藏(制作php图片木马)

使用*--list查看支持的文件编码格式,文件编码转换格式--dtype*支持:

utf-32le utf-32le-bom utf-32 utf-32-bom utf-32be utf-32be-bom utf-16be utf-16be-bom utf-8 utf-8-bom utf-16 utf-16-bom utf-16le utf-16le-bom gbk gb2312 big5 ...

例如:

pen.py file cmdb.jsp -d
pen.py file cmdb.jsp --hash md5

# 文件转换,转换为utf-16-bom类型文件(jsp/aspx的utf-16-bom类型文件可绕过一些安全软件)
pen.py file cmd.jsp -c --dtype utf-16-bom --dfile dst.jsp

# 制作图片木马
pen.py file caidao.php --hfile aa.jpg --dfile picshell.jpg

3.1.8 Google Hacking功能

pen.pygh子命令提供了Google Hacking的功能,搜索引擎目前支持:

  • baidu
  • bing
  • google

例如:

pen.py gh "inurl:viewthread.php" -s 10 -o tmp.txt

# --unique设定域名唯一,相同域名只记录一个搜索结果
pen.py gh "inurl:viewthread.php" -s 10 --unique -o tmp.txt

3.1.9 字典数据库维护

pen.pydb子命令提供简单的字典数据库维护功能,使用"-h"查看帮助

字典数据库是一个列表,其中每个记录由两部分组成,字符串和字符串频率统计

pen.py可以将不同的字典文件加入到数据库中,加入的过程会自动维护字符串的频率,例如

pen.py db password.db -w user-password\password\user_defines.txt

pen.py可以根据指定的长度导出字典文件,例如生成top 1000的字典文件

pen.py db password.db -g 1000

3.1.10 邮箱账户验证

pen.pymailcheck子命令提供了验证邮箱账户的功能,使用"-h"查看帮助

例如:

pen.py mailcheck mail_accouts.txt

mail_accounts.txt 为邮箱账户列表文件,每个记录格式为“xxx@xxx.com passwd” 

注:邮箱账户验证功能需要邮件服务器支持POP3功能

3.1.11 邮箱账户爆破

pen.pymailbrute子命令提供了邮箱账户爆破的功能,使用"-h"查看帮助

例如:

pen.py mailbrute xxx@xxx.com @passwd.txt

如果参数前加“@”说明指定的是字典文件

注:邮箱账户爆破功能需要邮件服务器支持POP3功能


3.2 user-passwd字典

password目录包含密码字典文件

user目录包含用户名字典文件


3.3 dns字典

dns爆破字典

3.4 directory字典

web目录爆破字典,详见相关目录readme.md文件

3.5 attack-payload

各种攻击payload字典,详见相关目录readme.md文件

3.6 webshell

webshell收集,详见相关目录readme.md文件

3.7 script

常用脚本

3.8 exploit

一些有用的exploit,详见相关目录readme.md文件


4 备注

项目中的字典等文件统一使用“/**”作为注释符,注释符在一行开头,且只能注释单行

本项目仅供学习交流,请勿用于未授权的渗透活动

About

WEB渗透测试数据库 密码 生成 组合

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 36.4%
  • PHP 29.1%
  • Classic ASP 27.2%
  • Python 7.3%