1
1
Fork 0
mirror of https://github.com/OJ/gobuster.git synced 2024-05-19 02:36:02 +02:00
gobuster/README.md

259 lines
9.3 KiB
Markdown
Raw Normal View History

Gobuster v1.1 (OJ Reeves @TheColonial)
2015-02-01 12:51:58 +01:00
======================================
Alternative directory and file busting tool written in Go. DNS support recently added after inspiration and effort from [Peleus](https://twitter.com/0x42424242).
2015-02-01 12:51:58 +01:00
### Oh dear God.. WHY!?
Because I wanted:
1. ... something that didn't have a fat Java GUI (console FTW).
1. ... to build something that just worked on the command line.
1. ... something that did not do recursive brute force.
2015-02-04 21:56:16 +01:00
1. ... something that allowed me to brute force folders and multiple extensions at once.
2015-02-01 12:51:58 +01:00
1. ... something that compiled to native on multiple platforms.
1. ... something that was faster than an interpreted script (such as Python).
1. ... something that didn't require a runtime.
1. ... use something that was good with concurrency (hence Go).
1. ... to build something in Go that wasn't totally useless.
### But it's shit! And your implementation sucks!
Yes, you're probably correct. Feel free to :
* Not use it.
* Show me how to do it better.
### Common Command line options
2015-02-01 12:51:58 +01:00
2015-05-28 02:37:08 +02:00
* `-m <mode>` - which mode to use, either `dir` or `dns` (default: `dir`)
* `-t <threads>` - number of threads to run (default: `10`).
2016-06-04 00:53:49 +02:00
* `-u <url/domain>` - full URL (including scheme), or base domain name.
2016-01-28 01:23:41 +01:00
* `-v` - verbose output (show all results).
2016-06-04 00:53:49 +02:00
* `-w <wordlist>` - path to the wordlist used for brute forcing.
2016-01-28 01:23:41 +01:00
### Command line options for `dns` mode
* `-i` - show all IP addresses for the result.
2015-05-15 10:26:58 +02:00
### Command line options for `dir` mode
2016-06-04 00:53:49 +02:00
* `-a <user agent string>` - specify a user agent string to send in the request header
* `-c <http cookies>` - use this to specify any cookies that you might need (simulating auth).
2015-05-28 02:37:08 +02:00
* `-f` - append `/` for directory brute forces.
2016-01-28 01:23:41 +01:00
* `-l` - show the length of the response.
* `-n` - "no status" mode, disables the output of the result's status code.
2016-06-04 00:53:49 +02:00
* `-p <proxy url>` - specify a proxy to use for all requests (scheme much match the URL scheme)
* `-q` - disables banner/underline output.
2016-06-04 00:53:49 +02:00
* `-r` - follow redirects.
* `-s <status codes>` - comma-separated set of the list of status codes to be deemed a "positive" (default: `200,204,301,302,307`).
2015-05-28 02:37:08 +02:00
* `-x <extensions>` - list of extensions to check for, if any.
2016-06-04 01:11:39 +02:00
* `-P <password>` - HTTP Authorization password (Basic Auth only, prompted if missing).
* `-U <username>` - HTTP Authorization username (Basic Auth only).
2015-02-01 12:51:58 +01:00
2015-05-16 07:57:33 +02:00
### Building
Since this tool is written in [Go](https://golang.org/) you need install the Go language/compiler/etc. Full details of installation and set up can be found [on the Go language website](https://golang.org/doc/install). Once installed you have two options.
#### Compiling
```
gobuster$ go build
```
This will create a `gobuster` binary for you.
2016-06-04 00:53:49 +02:00
2015-05-16 07:57:33 +02:00
#### Running as a script
```
gobuster$ go run main.go <parameters>
```
2015-02-01 12:51:58 +01:00
### Examples
2015-05-15 10:26:58 +02:00
#### `dir` mode
2015-02-01 12:54:15 +01:00
Command line might look like this:
2015-02-01 12:51:58 +01:00
```
$ ./gobuster -u https://mysite.com/path/to/folder -c 'session=123456' -t 50 -w common-files.txt -x .php,.html
2015-02-01 12:51:58 +01:00
```
Default options looks like this:
2015-02-01 12:54:15 +01:00
```
$ ./gobuster -u http://buffered.io/ -w words.txt
=====================================================
Gobuster v1.1 (DIR support by OJ Reeves @TheColonial)
(DNS support by Peleus @0x42424242)
=====================================================
[+] Mode : dir
[+] Url/Domain : http://buffered.io/
[+] Threads : 10
[+] Wordlist : words.txt
[+] Status codes : 200,204,301,302,307
=====================================================
2016-01-28 01:23:41 +01:00
/index (Status: 200)
/posts (Status: 301)
/contact (Status: 301)
=====================================================
```
Default options with status codes disabled looks like this:
```
$ ./gobuster -u http://buffered.io/ -w words.txt -n
=====================================================
Gobuster v1.1 (DIR support by OJ Reeves @TheColonial)
(DNS support by Peleus @0x42424242)
=====================================================
[+] Mode : dir
[+] Url/Domain : http://buffered.io/
[+] Threads : 10
[+] Wordlist : words.txt
[+] Status codes : 200,204,301,302,307
[+] No status : true
=====================================================
/index
/posts
/contact
=====================================================
```
Verbose output looks like this:
```
$ ./gobuster -u http://buffered.io/ -w words.txt -v
=====================================================
Gobuster v1.1 (DIR support by OJ Reeves @TheColonial)
(DNS support by Peleus @0x42424242)
=====================================================
2015-05-15 10:10:21 +02:00
[+] Mode : dir
[+] Url/Domain : http://buffered.io/
2015-02-01 12:54:15 +01:00
[+] Threads : 10
[+] Wordlist : words.txt
[+] Status codes : 200,204,301,302,307
2015-05-16 07:57:33 +02:00
[+] Verbose : true
=====================================================
2016-01-28 01:23:41 +01:00
Found : /index (Status: 200)
Missed: /derp (Status: 404)
Found : /posts (Status: 301)
Found : /contact (Status: 301)
=====================================================
```
Example showing content length:
```
=====================================================
Gobuster v1.1 (DIR support by OJ Reeves @TheColonial)
2016-01-28 01:23:41 +01:00
(DNS support by Peleus @0x42424242)
=====================================================
[+] Mode : dir
[+] Url/Domain : http://buffered.io/
[+] Threads : 10
[+] Wordlist : /tmp/words
[+] Status codes : 301,302,307,200,204
=====================================================
/contact (Status: 301)
/posts (Status: 301)
/index (Status: 200) [Size: 61481]
=====================================================
```
Quiet output, with status disabled and expanded mode looks like this ("grep mode"):
```
$ ./gobuster -u http://buffered.io/ -w words.txt -q -n -e
http://buffered.io/posts
http://buffered.io/contact
http://buffered.io/index
```
2015-05-15 10:26:58 +02:00
#### `dns` mode
Command line might look like this:
```
$ ./gobuster -m dns -u mysite.com -t 50 -w common-names.txt
```
2015-05-15 12:39:20 +02:00
Normal sample run goes like this:
```
2015-05-15 12:39:20 +02:00
$ ./gobuster -m dns -w subdomains.txt -u google.com
=====================================================
Gobuster v1.1 (DIR support by OJ Reeves @TheColonial)
(DNS support by Peleus @0x42424242)
=====================================================
2015-05-15 10:10:21 +02:00
[+] Mode : dns
[+] Url/Domain : google.com
[+] Threads : 10
[+] Wordlist : subdomains.txt
=====================================================
Found: m.google.com
Found: admin.google.com
Found: mobile.google.com
2015-05-15 12:39:20 +02:00
Found: www.google.com
Found: search.google.com
2015-05-15 12:39:20 +02:00
Found: chrome.google.com
Found: ns1.google.com
Found: store.google.com
Found: wap.google.com
Found: support.google.com
2015-05-15 12:39:20 +02:00
Found: directory.google.com
Found: translate.google.com
Found: news.google.com
2015-05-15 12:39:20 +02:00
Found: music.google.com
Found: mail.google.com
Found: blog.google.com
2015-05-15 12:39:20 +02:00
Found: cse.google.com
Found: local.google.com
=====================================================
```
2016-01-28 01:23:41 +01:00
Show IP sample run goes like this:
2015-05-15 12:39:20 +02:00
```
2016-01-28 01:23:41 +01:00
$ ./gobuster -m dns -w subdomains.txt -u google.com -i
2015-05-15 12:39:20 +02:00
=====================================================
Gobuster v1.1 (DIR support by OJ Reeves @TheColonial)
2015-05-15 12:39:20 +02:00
(DNS support by Peleus @0x42424242)
=====================================================
[+] Mode : dns
[+] Url/Domain : google.com
[+] Threads : 10
[+] Wordlist : subdomains.txt
2015-05-16 07:57:33 +02:00
[+] Verbose : true
2015-05-15 12:39:20 +02:00
=====================================================
Found: chrome.google.com [2404:6800:4006:801::200e, 216.58.220.110]
Found: m.google.com [216.58.220.107, 2404:6800:4006:801::200b]
Found: www.google.com [74.125.237.179, 74.125.237.177, 74.125.237.178, 74.125.237.180, 74.125.237.176, 2404:6800:4006:801::2004]
Found: search.google.com [2404:6800:4006:801::200e, 216.58.220.110]
Found: admin.google.com [216.58.220.110, 2404:6800:4006:801::200e]
Found: store.google.com [216.58.220.110, 2404:6800:4006:801::200e]
Found: mobile.google.com [216.58.220.107, 2404:6800:4006:801::200b]
Found: ns1.google.com [216.239.32.10]
Found: directory.google.com [216.58.220.110, 2404:6800:4006:801::200e]
Found: translate.google.com [216.58.220.110, 2404:6800:4006:801::200e]
Found: cse.google.com [216.58.220.110, 2404:6800:4006:801::200e]
Found: local.google.com [2404:6800:4006:801::200e, 216.58.220.110]
Found: music.google.com [2404:6800:4006:801::200e, 216.58.220.110]
Found: wap.google.com [216.58.220.110, 2404:6800:4006:801::200e]
Found: blog.google.com [216.58.220.105, 2404:6800:4006:801::2009]
Found: support.google.com [216.58.220.110, 2404:6800:4006:801::200e]
Found: news.google.com [216.58.220.110, 2404:6800:4006:801::200e]
Found: mail.google.com [216.58.220.101, 2404:6800:4006:801::2005]
=====================================================
2015-02-01 12:54:15 +01:00
```
Base domain validation warning when the base domain fails to resolve. This is a warning rather than a failure in case the user fat-fingers while typing the domain.
```
$ ./gobuster -m dns -w subdomains.txt -u yp.to -i
=====================================================
Gobuster v1.1 (DIR support by OJ Reeves @TheColonial)
(DNS support by Peleus @0x42424242)
=====================================================
[+] Mode : dns
[+] Url/Domain : yp.to
[+] Threads : 10
[+] Wordlist : /tmp/test.txt
=====================================================
[!] Unable to validate base domain: yp.to
Found: cr.yp.to [131.155.70.11, 131.155.70.13]
=====================================================
```
2015-02-01 12:51:58 +01:00
### License
See the LICENSE file.
2016-01-28 01:23:41 +01:00
### Thanks
See the THANKS file for people who helped out.