[TOC]

xray

单个url检测

./xray_windows_amd64 webscan –url https://xxx.edu.cn –html-output edu.html

批量检测

./xray_windows_amd64 webscan –url-file edu.txt –html-output e du.html

E:\sakura的工具箱\扫描\xray\xray_windows_amd64.exe webscan –url-file C:\Users\Sakura\Desktop\target.txt –html-output C:\Users\Sakura\Desktop\edus.html

dirsearch使用:

dirsearch自带的字典在db目录下

常用的参数有

  • -u 指定网址

  • -e 指定网站语言

  • -w 指定字典

  • -r 递归目录(跑出目录后,继续跑目录下面的目录)

  • –random-agents 使用随机UA

  • -t 指定线程

  • –random-agents 使用随机US(默认再db/user-agents.txt中,可以自己添加)

  • -x 排除指定状态码

  • -s 请求之间得延时(秒)

  • 扫描网站zip以及php文件排除403状态码

     dirsearch.py -u http://127.0.0.1  -e php,zip -x 403
    

    扫描所有类型并且设置线程为20默认为10

     dirsearch.py -u http://127.0.0.1 -e*-t 20
    

    自定义字典扫描

    dirsearch.py -u http://127.0.0.1  -e* -w db/php.txt
    

    使用随机ua头

    dirsearch.py -u http://127.0.0.1  -e* --random-agents
    

    指定cookie扫描

    dirsearch.py -u http://127.0.0.1:999  -e* -c "user=Mo60;"
    

    递归扫描最大3层

    dirsearch.py -u http://127.0.0.1  -e* -r 3
    

    每一秒扫描一次

    dirsearch.py -u http://127.0.0.1  -e* -s 1
    

    关于字典

    字典必须是文本文件,使用特殊词%EXT%,会在扫描时候根据 -e 传进来的值生成对应的字典

    例:

    Mo60.%EXT%
    

    使用以下语句去扫描

     dirsearch.py -u http://127.0.0.1 -e jsp -w db/str.txt
    
python dirsearch.py -u http://node4.buuoj.cn:25833/ -e * -s 1 -x 400,403,404,500,503,429 -w C:\Users\Sakura\Desktop\dic\备份.txt -o C:\Users\Sakura\Desktop\1.txt
python dirsearch.py  -u http://7580b1d4-c607-4a67-a008-092706787c67.node4.buuoj.cn:81/ -e * --timeout=2 -t 1 -x 400,403,404,500,503,429 -o C:\Users\Sakura\Desktop\1.txt
python dirsearch.py -u http://xxx.com/ --header-list=E:\sakura的工 具箱\字典\user-gent.txt -e * -s 1 -t 3 --full-url --proxy=http://127.0.0.1:1080

Flask-Unsign

安装

要安装应用程序,只需使用pip:

$ pip3 install flask-unsign[wordlist]

如果您只想安装核心代码,请省略[wordlist]后缀:

$ pip3 install flask-unsign

要出于开发目的安装该工具,请运行以下命令(下载副本后):

$ pip3 install -e .[test]

用法

要获得所有可能选项的概述,只需调用flask unsign without 任何这样的参数:

$ flask-unsign

获取解码会话cookies

由于flask cookies是签名的未加密的,因此 可以对会话数据进行本地解码。为此,可以使用--decode 争论。

会话cookies可以通过使用代理检查您的http请求来获得 像burp代理一样,使用浏览器的网络检查器或浏览器 查看/更改cookies的扩展。默认情况下,flask使用会话名称 "session"

$ flask-unsign --decode --cookie 'eyJsb2dnZWRfaW4iOmZhbHNlfQ.XDuWxQ.E2Pyb6x3w-NODuflHoGnZOEpbH8'
{'logged_in': False}

您还可以通过 传递--server参数,而不是--cookie参数。do注释 但是,并不是所有网页都可能返回会话,因此请确保传递 是的网址。

$ flask-unsign --decode --server 'https://www.example.com/login'
[*] Server returned HTTP 302 (FOUND)
[+] Successfully obtained session cookie: eyJsb2dnZWRfaW4iOmZhbHNlfQ.XDuWxQ.E2Pyb6x3w-NODuflHoGnZOEpbH8
{'logged_in': False}

未签名(强制使用密钥)

在获得一个示例会话cookie之后,您将能够尝试使用暴力 服务器的密钥。如果你幸运的话,这可能会被设置成 猜猜看,或者是在网上找到的,可能在你的一个词表里。为了 这样,就可以使用--unsign参数。

$ flask-unsign --unsign --cookie < cookie.txt
[*] Session decodes to: {'logged_in': False}
[*] No wordlist selected, falling back to default wordlist..
[*] Starting brute-forcer with 8 threads..
[+] Found secret key after 351 attempts
'CHANGEME'

签名(会话操作)

一旦你获得了服务器的密钥,你就可以自己设计 自定义会话数据。为此,可以使用--sign参数。

$ flask-unsign --sign --cookie "{'logged_in': True}" --secret 'CHANGEME'
eyJsb2dnZWRfaW4iOnRydWV9.XDuW-g.cPCkFmmeB7qNIcN-ReiN72r0hvU

NC

nc(NetCat),在网络工具中有”瑞士军刀”的美誉,它短小精悍,功能强大。

基本参数

想要连接到某处: nc [-options] hostname port[s] [ports] …
绑定端口等待连接: nc -l -p port [-options] [hostname] [port]
参数:
-g gateway source-routing hop point[s], up to 8
-G num source-routing pointer: 4, 8, 12, …
-h 帮助信息
-i secs 延时的间隔
-l 监听模式,用于入站连接
-n 指定数字的IP地址,不能用hostname
-o file 记录16进制的传输
-p port 本地端口号
-r 任意指定本地及远程端口
-s addr 本地源地址
-u UDP模式
-v 详细输出——用两个
-v可得到更详细的内容
-w secs timeout的时间
-z 将输入输出关掉——用于扫描时,其中端口号可以指定一个或者用lo-hi式的指定范围。

简单用法举例
1 、端口扫描

nc -v -w 2 192.168.2.34 -z 21-24
nc: connect to 192.168.2.34 port 21 (tcp) failed: Connection refused
Connection to 192.168.2.34 22 port [tcp/ssh] succeeded!
nc: connect to 192.168.2.34 port 23 (tcp) failed: Connection refused
nc: connect to 192.168.2.34 port 24 (tcp) failed: Connection refused

2、从192.168.2.33拷贝文件到192.168.2.34

在192.168.2.34上: nc -l 1234 > test.txt
在192.168.2.33上: nc 192.168.2.34 < test.txt

3、简单聊天工具

在192.168.2.34上: nc -l 1234
在192.168.2.33上: nc 192.168.2.34 1234

这样,双方就可以相互交流了。使用ctrl+C(或D)退出。

用nc命令操作memcached

1)存储数据:printf “set key 0 10 6\r\nresult\r\n” |nc 192.168.2.34 11211
2)获取数据:printf “get key\r\n” |nc 192.168.2.34 11211
3)删除数据:printf “delete key\r\n” |nc 192.168.2.34 11211
4)查看状态:printf “stats\r\n” |nc 192.168.2.34 11211
5)模拟top命令查看状态:watch “echo stats” |nc 192.168.2.34 11211
6)清空缓存:printf “flush_all\r\n” |nc 192.168.2.34 11211 (小心操作,清空了缓存就没了)

使用nc来传文件

发送端:  cat a.txt  |  nc -l  3333

接收端:  nc 192.168.0.3   3333 >  a.txt

或者

发送端:    cat a.txt   |  nc 192.168.0.3   9999 

接收端:    nc -l 9999 > a.txt

hashcat

hashcat是一款自称为世界上最快的密码破解工具。
hashcat常用命令

-m                           指定哈希类型

-a                            指定破解模式

-V                            查看版本信息

-o                            将输出结果储存到指定文件

--force                     忽略警告

--show                    仅显示破解的hash密码和对应的明文

--remove                 从源文件中删除破解成功的hash

--username             忽略hash表中的用户名

-b                             测试计算机破解速度和相关硬件信息

-O                            限制密码长度

-T                            设置线程数

-r                             使用规则文件

-1                             自定义字符集  -1 0123asd     ?1={0123asd}

-2                             自定义字符集  -2 0123asd    ?2={0123asd}

-3                             自定义字符集  -3 0123asd    ?3={0123asd}

-i                              启用增量破解模式

--increment-min       设置密码最小长度

--increment-max      设置密码最大长度

hashcat破解模式介绍

0 straight 字典破解

1 combination 将字典中密码进行组合(1 2>11 22 12 21)

3 brute-force 使用指定掩码破解

6 Hybrid Wordlist + Mask 字典+掩码破解

7 Hybrid Mask + Wordlist 掩码+字典破解

hashcat集成的字符集

?l 代表小写字母

?u 代表大写字母

?d 代表数字

?s 代表特殊字符

?a 代表大小写字母、数字以及特殊字符

?b 0x00-0xff

hash id 对照表

img

实例演示-暴力破解MD5值

1.使用字典进行破解

hashcat -a 0 0192023a7bbd73250516f069df18b500 password.txt –force

img

2.使用指定字符集进行破解

hashcat -a 3 63a9f0ea7bb98050796b649e85481845 ?l?l?l?l –force

img

3.使用字典+掩码进行破解

hashcat -a 6 1844156d4166d94387f1a4ad031ca5fa password.txt ?d?d?d –force

img

4.使用掩码+字典进行破解

hashcat -a 7 f8def8bcecb2e7925a2b42d60d202deb ?d?d password.txt –force

img

如果破解时间太长,我们可以按s键查看破解进度,p键暂停,r键继续破解,q键退出破解。