Gobuster的使用

一、gobuster简单介绍

Gobuster是一种用于暴力的工具:
  • 网站中的URI(目录和文件)。

  • DNS子域(支持通配符)。

  • 目标网络服务器上的虚拟主机名。

  • 打开亚马逊S3存储桶

  • 打开谷歌云桶

  • TFTP服务器

GitHub项目地址:
https://github.com/OJ/gobuster
kali系统安装命令:
sudo apt-get install gobuster

二、gobuster的详细使用

全局标志
全局标志:      --delay duration    每个线程在请求之间等待的时间(例如1500ms)      --no-color          禁用颜色输出      --no-error          不显示错误  -z, --no-progress       不显示进度  -o, --output string     将结果写入的输出文件(默认为stdout)  -p, --pattern string    包含替换模式的文件  -q, --quiet             不要打印横幅和其他噪音  -t, --threads int       并发线程数(默认为10)  -v, --verbose           详细输出(错误)  -w, --wordlist string   单词列表的路径
1."dir"模式(目录爆破模式)
使用目录/文件枚举模式用法:Gobuster dir [flags]Flags:  -f, --add-slash                       附加/到每个请求  -c, --cookies string                  用于Cookie的请求  -d, --discover-backup                 通过附加多个备份扩展名来搜索备份文件      --exclude-length ints             排除以下内容长度(完全忽略状态)。提供多次以排除多种尺寸  -e, --expanded                        扩展模式,打印完整URL地址  -x, --extensions string               要搜索的文件扩展名  -r, --follow-redirect                 跟随重定向  -H, --headers stringArray             指定 HTTP 标头,-H 'Header1: val1' -H 'Header2: val2'  -h, --help                            帮助目录      --hide-length                     在输出中隐藏正文的长度  -m, --method string                   使用以下HTTP方法(默认为“GET”)  -n, --no-status                       不打印状态代码  -k, --no-tls-validation               跳过TLS证书验证  -P, --password string                 基本身份验证的密码      --proxy string                    用于请求的代[http(s)://host:port]      --random-agent                    使用随机的用户代理字符串      --retry                           应在请求超时时重试      --retry-attempts int              请求超时重试次数(默认为3)  -s, --status-codes string             正状态代码(如果设置,将被状态代码黑名单覆盖)  -b, --status-codes-blacklist string   否定状态代码(如果设置,将覆盖状态代码)(默认为“404”)      --timeout duration                HTTP超时(默认10s)  -u, --url string                      目标URL  -a, --useragent string                设置用户代理字符串(默认为“gobuster/3.2.0”)  -U, --username string                 基本身份验证的用户名
使用实例
gobuster dir -u https://mysite.com/path/to/folder -c 'session=123456' -t 50 -w common-files.txt -x .php,.html
默认选项如下所示:
gobuster dir -u https://buffered.io -w ~/wordlists/shortlist.txt===============================================================Gobuster v3.2.0by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)===============================================================[+] Mode         : dir[+] Url/Domain   : https://buffered.io/[+] Threads      : 10[+] Wordlist     : /home/oj/wordlists/shortlist.txt[+] Status codes : 200,204,301,302,307,401,403[+] User Agent   : gobuster/3.2.0[+] Timeout      : 10s===============================================================2019/06/21 11:49:43 Starting gobuster===============================================================/categories (Status: 301)/contact (Status: 301)/posts (Status: 301)/index (Status: 200)===============================================================2019/06/21 11:49:44 Finished===============================================================
禁用状态代码的默认选项如下所示:
gobuster dir -u https://buffered.io -w ~/wordlists/shortlist.txt -n===============================================================Gobuster v3.2.0by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)===============================================================[+] Mode         : dir[+] Url/Domain   : https://buffered.io/[+] Threads      : 10[+] Wordlist     : /home/oj/wordlists/shortlist.txt[+] Status codes : 200,204,301,302,307,401,403[+] User Agent   : gobuster/3.2.0[+] No status    : true[+] Timeout      : 10s===============================================================2019/06/21 11:50:18 Starting gobuster===============================================================/categories/contact/index/posts===============================================================2019/06/21 11:50:18 Finished===============================================================
详细输出如下所示:
gobuster dir -u https://buffered.io -w ~/wordlists/shortlist.txt -v===============================================================Gobuster v3.2.0by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)===============================================================[+] Mode         : dir[+] Url/Domain   : https://buffered.io/[+] Threads      : 10[+] Wordlist     : /home/oj/wordlists/shortlist.txt[+] Status codes : 200,204,301,302,307,401,403[+] User Agent   : gobuster/3.2.0[+] Verbose      : true[+] Timeout      : 10s===============================================================2019/06/21 11:50:51 Starting gobuster===============================================================Missed: /alsodoesnotexist (Status: 404)Found: /index (Status: 200)Missed: /doesnotexist (Status: 404)Found: /categories (Status: 301)Found: /posts (Status: 301)Found: /contact (Status: 301)===============================================================2019/06/21 11:50:51 Finished===============================================================
显示内容长度的示例:
gobuster dir -u https://buffered.io -w ~/wordlists/shortlist.txt -l===============================================================Gobuster v3.2.0by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)===============================================================[+] Mode         : dir[+] Url/Domain   : https://buffered.io/[+] Threads      : 10[+] Wordlist     : /home/oj/wordlists/shortlist.txt[+] Status codes : 200,204,301,302,307,401,403[+] User Agent   : gobuster/3.2.0[+] Show length  : true[+] Timeout      : 10s===============================================================2019/06/21 11:51:16 Starting gobuster===============================================================/categories (Status: 301) [Size: 178]/posts (Status: 301) [Size: 178]/contact (Status: 301) [Size: 178]/index (Status: 200) [Size: 51759]===============================================================2019/06/21 11:51:17 Finished===============================================================
静音输出,状态禁用和扩展模式看起来像这样(“grep模式”):
gobuster dir -u https://buffered.io -w ~/wordlists/shortlist.txt -q -n -ehttps://buffered.io/indexhttps://buffered.io/contacthttps://buffered.io/postshttps://buffered.io/categories
2.dns模式(域名爆破模式)
使用DNS子域枚举模式用法:  gobuster dns [flags]Flags:  -d, --domain string      目标域  -h, --help               帮助目录  -r, --resolver string    使用自定义DNS服务器(格式为server.com或server.com:port)  -c, --show-cname         显示CNAME记录(不能与“-i”选项一起使用)  -i, --show-ips           显示IP地址      --timeout duration   DNS解析程序超时(默认1秒)      --wildcard           找到通配符时强制继续操作
使用实例
gobuster dns -d mysite.com -t 50 -w common-names.txt
正常的样本运行是这样的:
gobuster dns -d google.com -w ~/wordlists/subdomains.txt===============================================================Gobuster v3.2.0by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)===============================================================[+] Mode         : dns[+] Url/Domain   : google.com[+] Threads      : 10[+] Wordlist     : /home/oj/wordlists/subdomains.txt===============================================================2019/06/21 11:54:20 Starting gobuster===============================================================Found: chrome.google.comFound: ns1.google.comFound: admin.google.comFound: www.google.comFound: m.google.comFound: support.google.comFound: translate.google.comFound: cse.google.comFound: news.google.comFound: music.google.comFound: mail.google.comFound: store.google.comFound: mobile.google.comFound: search.google.comFound: wap.google.comFound: directory.google.comFound: local.google.comFound: blog.google.com===============================================================2019/06/21 11:54:20 Finished===============================================================
显示IP样本运行是这样的:
gobuster dns -d google.com -w ~/wordlists/subdomains.txt -i===============================================================Gobuster v3.2.0by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)===============================================================[+] Mode         : dns[+] Url/Domain   : google.com[+] Threads      : 10[+] Wordlist     : /home/oj/wordlists/subdomains.txt===============================================================2019/06/21 11:54:54 Starting gobuster===============================================================Found: www.google.com [172.217.25.36, 2404:6800:4006:802::2004]Found: admin.google.com [172.217.25.46, 2404:6800:4006:806::200e]Found: store.google.com [172.217.167.78, 2404:6800:4006:802::200e]Found: mobile.google.com [172.217.25.43, 2404:6800:4006:802::200b]Found: ns1.google.com [216.239.32.10, 2001:4860:4802:32::a]Found: m.google.com [172.217.25.43, 2404:6800:4006:802::200b]Found: cse.google.com [172.217.25.46, 2404:6800:4006:80a::200e]Found: chrome.google.com [172.217.25.46, 2404:6800:4006:802::200e]Found: search.google.com [172.217.25.46, 2404:6800:4006:802::200e]Found: local.google.com [172.217.25.46, 2404:6800:4006:80a::200e]Found: news.google.com [172.217.25.46, 2404:6800:4006:802::200e]Found: blog.google.com [216.58.199.73, 2404:6800:4006:806::2009]Found: support.google.com [172.217.25.46, 2404:6800:4006:802::200e]Found: wap.google.com [172.217.25.46, 2404:6800:4006:802::200e]Found: directory.google.com [172.217.25.46, 2404:6800:4006:802::200e]Found: translate.google.com [172.217.25.46, 2404:6800:4006:802::200e]Found: music.google.com [172.217.25.46, 2404:6800:4006:802::200e]Found: mail.google.com [172.217.25.37, 2404:6800:4006:802::2005]===============================================================2019/06/21 11:54:55 Finished===============================================================
当基域无法解析时,基域验证警告。这是一个警告,而不是如果用户在键入域时发胖的手指,这是一个失败。
gobuster dns -d yp.to -w ~/wordlists/subdomains.txt -i===============================================================Gobuster v3.2.0by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)===============================================================[+] Mode         : dns[+] Url/Domain   : yp.to[+] Threads      : 10[+] Wordlist     : /home/oj/wordlists/subdomains.txt===============================================================2019/06/21 11:56:43 Starting gobuster===============================================================2019/06/21 11:56:53 [-] Unable to validate base domain: yp.toFound: cr.yp.to [131.193.32.108, 131.193.32.109]===============================================================2019/06/21 11:56:53 Finished===============================================================
通配符DNS也被正确检测到:
gobuster dns -d 0.0.1.xip.io -w ~/wordlists/subdomains.txt===============================================================Gobuster v3.2.0by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)===============================================================[+] Mode         : dns[+] Url/Domain   : 0.0.1.xip.io[+] Threads      : 10[+] Wordlist     : /home/oj/wordlists/subdomains.txt===============================================================2019/06/21 12:13:48 Starting gobuster===============================================================2019/06/21 12:13:48 [-] Wildcard DNS found. IP address(es): 1.0.0.02019/06/21 12:13:48 [!] To force processing of Wildcard DNS, specify the '--wildcard' switch.===============================================================2019/06/21 12:13:48 Finished===============================================================
如果用户想要强制处理具有通配符条目的域,请使用--wildcard
gobuster dns -d 0.0.1.xip.io -w ~/wordlists/subdomains.txt --wildcard===============================================================Gobuster v3.2.0by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)===============================================================[+] Mode         : dns[+] Url/Domain   : 0.0.1.xip.io[+] Threads      : 10[+] Wordlist     : /home/oj/wordlists/subdomains.txt===============================================================2019/06/21 12:13:51 Starting gobuster===============================================================2019/06/21 12:13:51 [-] Wildcard DNS found. IP address(es): 1.0.0.0Found: 127.0.0.1.xip.ioFound: test.127.0.0.1.xip.io===============================================================2019/06/21 12:13:53 Finished===============================================================
3.vhost模式(虚拟主机爆破模式)
使用VHOST枚举模式(您很可能希望使用IP地址作为URL参数)用法:  gobuster vhost [flags]Flags:      --append-domain         将URL中的主域附加到单词列表中的单词。否则,需要在单词列表中指定完全限定的域。  -c, --cookies string        用于Cookie的请求      --domain string         使用IP地址作为URL时要附加的域。如果保留为空并且指定了基于域的URL,则会提取URL中的主机名      --exclude-length ints   排除以下内容长度(完全忽略状态)。提供多次以排除多种尺寸。  -r, --follow-redirect       跟随重定向  -H, --headers stringArray   指定 HTTP 标头,-H 'Header1: val1' -H 'Header2: val2'  -h, --help                  帮助目录  -m, --method string         使用以下HTTP方法(默认为“GET”)  -k, --no-tls-validation     跳过TLS证书验证  -P, --password string       基本身份验证的密码      --proxy string          用于请求的代理 [http(s)://host:port]      --random-agent          使用随机的用户代理字符串      --retry                 应在请求超时时重试      --retry-attempts int    请求超时重试次数(默认为3)      --timeout duration      HTTP超时(默认10s)  -u, --url string            目标URL  -a, --useragent string      设置用户代理字符串(默认为“gobuster/3.2.0”)  -U, --username string       基本身份验证的用户名
使用实例
gobuster fuzz -u https://example.com?FUZZ=test -w parameter-names.txt
4. s3模式(枚举打开的S3桶,并查找存在和桶列表)
使用aws bucket枚举模式用法:  gobuster s3 [flags]Flags:  -h, --help                 帮助目录  -m, --maxfiles int         列出bucket时要列出的最大文件数(仅在详细模式下显示)(默认值为5)  -k, --no-tls-validation    跳过TLS证书验证      --proxy string         用于请求的代理[http(s)://host:port]      --random-agent         使用随机的用户代理字符串      --retry                应在请求超时时重试      --retry-attempts int   请求超时重试次数(默认为3)      --timeout duration     HTTP超时(默认10s)  -a, --useragent string     设置用户代理字符串(默认为“gobuster/3.2.0”)
使用实例
gobuster s3 -w bucket-names.txt
5.gcc模式(枚举打开的谷歌云桶)
使用gcs bucket枚举模式用法:  gobuster gcs [flags]Flags:  -h, --help                 帮助目录  -m, --maxfiles int         列出bucket时要列出的最大文件数(仅在详细模式下显示)(默认值为5)  -k, --no-tls-validation    跳过TLS证书验证      --proxy string         用于请求的代理 [http(s)://host:port]      --random-agent         使用随机的用户代理字符串      --retry                Should retry on request timeout      --retry                应在请求超时时重试      --retry-attempts int   请求超时重试次数(默认为3)      --timeout duration     HTTP超时(默认10s)  -a, --useragent string     设置用户代理字符串(默认为“gobuster/3.2.0”) 
使用实例
gobuster gcs -w bucket-names.txt
6.tftp模式(bruteforce tftp文件)
使用TFTP枚举模式用法:  gobuster tftp [flags]Flags:  -h, --help               帮助目录  -s, --server string      目标TFTP服务器      --timeout duration   TFTP超时(默认1秒)
使用实例
gobuster tftp -s tftp.example.com -w common-filenames.txt

记得点赞+关注,关注微信公众号菜鸟学渗透,有任何问题可以后台私信我

有考取NISP一级/二级/三级、CISP-PTE/PTS等证书的可以加我好友私信我(公众号回复“加好友”)。

  • 2
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
Gobuster是一个用于在Web应用程序中进行目录和子域名爆破的工具。它可以通过指定的字典文件来尝试不同的目录或子域名,并返回找到的结果。以下是一些使用Gobuster的示例命令: 1. 使用字典文件和输出到文件: gobuster dns -d iqiyi.com -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -i -o iqiyi.txt 这个命令将使用指定的字典文件对iqiyi.com进行DNS爆破,并将结果输出到iqiyi.txt文件中。 2. 使用管道将生词传递给Gobuster: hashcat -a 3 --stdout ?l | gobuster -u https://mysite.com -w - 这个命令将使用hashcat生成的生词通过管道传递给Gobuster,并对https://mysite.com进行目录爆破。 3. 基本域验证警告: gobuster -m dns -w ~/wordlists/subdomains.txt -u yp.to -i 这个命令将使用指定的字典文件对yp.to进行DNS爆破,并输出找到的子域名。 请注意,这些只是使用Gobuster的一些示例命令,具体的使用方法和参数可以根据实际需求进行调整。 #### 引用[.reference_title] - *1* [利用gobuster对感兴趣的网站进行域名进行探测](https://blog.csdn.net/dyx0910/article/details/124676764)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [GOBUSTER - 目录/文件和DNS爆破工具。](https://blog.csdn.net/nzjdsds/article/details/86756828)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

菜鸟学渗透

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值