Gobuster此工具基于Go编程语言开发,广大研究人员可使用该工具来对目录,文件,DNS和VHost等对象进行暴力破解攻击。目前,该工具刚刚发布了最新的Gobuster v3.0.1版本。
c,–cookies字符串用于请求的Cookies
r,–followredirect跟随重定向
H,–headers stringArray指定HTTP标头,-H'Header1:val1'-H'Header2:val2'
h,–help虚拟主机帮助
k,–insecuressl跳过SSL证书验证
P,–password字符串基本身份验证的密码
p,–proxy string用于请求的代理[http(s):// host:port]
      –timeout持续时间HTTP超时(默认10s)
u,–url字符串目标URL
a,–useragent字符串设置用户代理字符串(默认为“ gobuster / 3.0.1”)
U,–username字符串基本身份验证的用户名
全局标志:
z,–noprogress不显示进度
o,–output string将结果写入的输出文件(默认为stdout)
q,–quiet不要打印横幅和其他杂音
t,–threads int并发线程数(默认为10)
      –delay duration每个线程在两次请求之间等待的时间(例如1500ms)
v,–verbose详细输出(错误)
w,–wordlist字符串单词列表的路径
工具安装代码发布我们已经将项目的原始码发布到了Gobuster的GitHub内部,广大用户目前无需自行构建项目代码。
下载地址:【发布页面传送门】
使用“ go get”如果你已经建造好了Go环境,你就可以直接使用以下命令来下载和安装
go get github.com/OJ/gobuster原始构建由于该工具采用Go语言开发,那么用户首先就需要安装Go语言环境和编译器等等。关于Go环境的具体配置信息,可以参考Go语言的【官方网站】。
编译
gobuster现在约会了外部依赖组件,所以我们需要先配置依赖组件:
go get && go build该命令将会创建一份gobuster代码,运行以下命令即可在$ GOPATH / bin目录中安装:
go install配置好所有的依赖组件之后,我们就可以使用代码编写脚本了:
制作–使用当前Go配置来构建工具,例如“ go build”;
使Windows –构建32位或64位Windows程序,将其写入build子目录;
make linux –构建32位或64位Linux程序,将其写入build子目录;
make darwin –构建32位或64位Darwin程序,将其写入build子目录;
制作所有–构建跨平台程序,将其写入build子目录;
清理–清理build子目录;
做测试–运行测试;
字典与STDIN字典文件可以直接通过stdin嵌入到gobuster:
hashcat -a 3 --stdout ?l | gobuster dir -u https://mysite.com -w -使用样例dir模式命令行运行:
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.0.1 
        by 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.0.1 
        [+] 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.0.1 
        by 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.0.1 
        [+] 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.0.1 
        by 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.0.1 
        [+] 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.0.1
        by 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.0.1
        [+] 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
        ===============================================================
dns模式命令行运行:
gobuster dns -d mysite.com -t 50 -w common-names.txt运行样例:
         gobuster dns -d google.com -w ~/wordlists/subdomains.txt
        ===============================================================
        Gobuster v3.0.1 
        by 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.com
        Found: ns1.google.com
        Found: admin.google.com
        Found: www.google.com 
        Found: m.google.com
        Found: support.google.com
        Found: translate.google.com
        Found: cse.google.com
        Found: news.google.com
        Found: music.google.com
        Found: mail.google.com
        Found: store.google.com
        Found: mobile.google.com
        Found: search.google.com
        Found: wap.google.com
        Found: directory.google.com
        Found: local.google.com
        Found: blog.google.com
        ===============================================================
        2019/06/21 11:54:20 Finished
        ===============================================================
IP样本运行:
         gobuster dns -d google.com -w ~/wordlists/subdomains.txt -i
        ===============================================================
        Gobuster v3.0.1 
        by 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
        ===============================================================
DNS通配符检测:
         gobuster dns -d 0.0.1.xip.io -w ~/wordlists/subdomains.txt
        ===============================================================
        Gobuster v3.0.1 
        by 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.0 
        2019/06/21 12:13:48 [!] To force processing of Wildcard DNS, specify the '--wildcard' switch.
        ===============================================================
        2019/06/21 12:13:48 Finished
        ===============================================================
虚拟主机模式命令行运行:
gobuster vhost -u https://mysite.com -w common-vhosts.txt常规样本运行结果:
         gobuster vhost -u https://mysite.com -w common-vhosts.txt
        ===============================================================
        Gobuster v3.0.1 
        by OJ Reeves (@TheColonial) & Christian Mehlmauer (@_FireFart_)
        ===============================================================
        [+] Url:          https://mysite.com 
        [+] Threads:      10 
        [+] Wordlist:     common-vhosts.txt
        [+] User Agent:   gobuster/3.0.1 
        [+] Timeout:      10s 
        ===============================================================
        2019/06/21 08:36:00 Starting gobuster
        ===============================================================
        Found: www.mysite.com 
        Found: piwik.mysite.com
        Found: mail.mysite.com
        ===============================================================
        2019/06/21 08:36:05 Finished
        ===============================================================