source: fierce2/branch/README @ 257

Revision 257, 8.3 KB checked in by jabra, 4 years ago (diff)

docs update from Kristian H. enjoy

Line 
1******
2README
3******
4
5* Installation
6* What is new in 2.0 ?
7* Description
8
9
10
11*******************
12Installation
13*******************
14
15perl Makefile.PL
16make
17sudo make install
18
19
20
21*******************
22What is new in 2.0?
23*******************
24
25Fierce 2.0 is a complete rewrite of the Fierce code using a modular method of
26development. Therefore, many of the pieces can be used as their own entity.
27This will allow people to quickly create scripts using one or more features of
28Fierce.
29
30Obviously, Fierce 2.0 will include the Fierce script which uses the new
31modules. This will allow the code to be more readable and will enable faster
32development and greater flexibility.
33
34Another major improvement in Fierce 2.0, is the testing framework. Each module
35will have an included set of tests, allowing us to verify things are working
36the way they should.
37
38
39
40***********
41Description
42***********
43
44Fierce domain scan was born out of personal frustration after performing a web
45application security audit. It is traditionally very difficult to discover
46large swaths of a corporate network that is non-contiguous. It's terribly easy
47to run a scanner against an IP range, but if the IP ranges are nowhere near one
48another you can miss huge chunks of networks.
49
50First what Fierce is not. Fierce is not an IP scanner, it is not a DDoS tool,
51it is not designed to scan the whole internet or perform any un-targeted
52attacks. It is meant specifically to locate likely targets both inside and
53outside a corporate network. Only those targets are listed (unless the
54-nopattern switch is used). No exploitation is performed (unless you do
55something intentionally malicious with the -connect switch). Fierce is a
56reconnaissance tool. Fierce is a Perl script that quickly scans domains
57(usually in just a few minutes, assuming no network lag) using several tactics.
58
59First it queries your DNS for the DNS servers of the target. It then switches
60to using the target's DNS server (you can use a different one if you want by using
61the -dnsserver switch, but this can cause problems if the server you use won't
62tell you information about other people's sites and of course you won't find
63much relevant internal address space). Fierce then attempts to dump the SOA
64records for the domain in the very slim hope that the DNS server that your
65target uses may be misconfigured. Once that fails (because it almost always
66will) it attempts to "guess" names that are common amongst a lot of different
67companies. Don't ask me where I got the list, it's just a list of names that id
68and I have seen all over the place. I thought about adding a dictionary to
69this, but I think that would take a lot longer, and given that very few of the
70words are dictionary words I don't think this would add a lot of value.
71
72Next, if it finds anything on any IP address it will scan up and down a set
73amount (default 5 but you can expand it with -traverse or increase it to the
74entire subnet with -wide) looking for anything else with the same domain name
75in it using reverse lookups. If it finds anything on any of those it will
76recursively scan until it doesn't find any more. In this way it ends up looping
77a lot, and the bigger the domain is the more you get back. The reason Fierce
78automatically switches to using the target's DNS server is so that it can probe
79the Intranet (RFC1918) of the target, assuming the target uses a single DNS
80server for both their Intranet and external sites.
81
82I also added a random call to something that should fail to test for wildcard
83DNS. If it's found, the wildcard is discarded to reduce erroneous results. That
84doesn't speed up the scan because it still needs to check to see if the test
85resolves back to IP address that the wildcard is pointing to. However it does
86reduce false positives.
87
88Also, I've added a "search" option that allows you to find other non-related
89domain names. For example, let's say my target's domain is widget.com but I
90know they have email addresses like soandso@widgetcompany.com, and own a
91company called nutsandbolts.com--for these I can add search queries. This won't
92scan for those domains, but if those names pop up, it won't ignore them. Fierce
93will report on anything inside the search pattern as long as it matches. If you
94want everything you could put a,b,c,...,x,y,z, but I'll probably make
95something in the future to allow for scanning/reporting the entire C block once
96anything is found in it that matches the DNS string. Here's the syntax:
97
98perl fierce -dns widget.com -search widgetcompany,nutsandbolts
99
100I also realized it can be a little bad about finding everything in a class C if
101the target used non-contiguous blocks within the class C. To deal with that I
102built in a function to allow a scan (of only C blocks). This is also really
103useful for scanning intranets if the DNS is poorly configured. I might expand
104on this later.
105
106perl fierce -range 10.10.10.0-255 -dnsserver ns1.example.com
107
108As an alternative, you can use the -wide switch which does a wide path of
109reverse lookups after finding any C names that match your query in the C block.
110This provides a lot more information but is a lot more noisy.
111
112perl fierce -dns example.com -wide -output output.txt
113
114Fierce also has wordlist support so that you can supply your own dictionary
115using the -wordlist keyword. Since the brute force does rely on matching at
116least a few internal targets, this could be helpful if you know that the naming
117convention has to do with a certain non-obvious naming convention or uses
118another language, etc.
119
120perl fierce -dns example.com -wordlist dictionary.txt -output output.txt
121
122Not convinced? Prior to running the scan I had never been to either mail.ru or
123rambler.ru (a few of the top Alexa sites in Russia). Since I don't read
124Russian, performing an audit against them is far more difficult. Here's some
125sample output from the two. In the first example you can see that mail.ru has a
126non-contiguous address for it's mobile.mail.ru than it does for the rest of the
127site. That would have been very difficult to locate with any other scanner. In
128the rambler.ru example you can see the RFC1918 space 10.* pop up:
129
130    * mail.ru - 418 entries and 303 hostnames found.
131    * rambler.ru - 472 entries and 458 hostnames found.
132
133Trust me, we've found far more interesting sites than these two in our tests,
134but I don't want to disparage any companies for their mistakes. I'm sure you
135can think of a few companies to test this against. The results can be pretty
136amazing. If you don't get many results, that could be one of three things, 1)
137you aren't scanning their corporate domain, you are only scanning their
138external domain which they only have one or two machines on, 2) it's a very
139small company, or 3) you typo'd the domain name (I haven't built any checks to
140make sure the domain you entered is valid).
141
142Requirements: This is a Perl program requiring the Perl interpreter with the
143additional perl modules listed below. You can install modules using CPAN:
144
145        perl -MCPAN -e 'install Net::DNS'
146        perl -MCPAN -e 'install Net::CIDR'
147        perl -MCPAN -e 'install Net::Whois::ARIN'
148        perl -MCPAN -e 'install Object::InsideOut'
149        perl -MCPAN -e 'install Template'
150        perl -MCPAN -e 'install Test::Class'
151        perl -MCPAN -e 'install HTML::SimpleLinkExtor'
152        perl -MCPAN -e 'install threads'
153        perl -MCPAN -e 'install threads::shared'
154        perl -MCPAN -e 'install Thread::Queue'
155
156Windows users: You can use Fierce under Windows if you use Cygwin with Perl and
157the above modules installed. I have not tested this using ActivePerl in
158Windows, so I would recommend Cygwin until ActivePerl can be thoroughly tested.
159I am/was working on a win32 version of Fierce, but have put the project on
160hold. If anyone is interested in picking up where I left off, drop me a line.
161
162Version: Fierce is currently at version 2.0 - 11/08/2009
163
164(Thanks to Kristian Erik Hermansen and Robert E Lee for the help with this and to Michael Thumann's
165DNSDigger wordlist).
166
167Getting started: perl fierce -help
168
169This may some bugs in it. Also this can be a noisy scanner, but in the tests
170I've performed it's exceptionally effective at finding non-contiguous IP blocks
171and new attack points. This should be considered a pre-cursor to nmap,
172unicornscan or nessus, as it gives you enough information to begin a much more
173thorough scan with one of those other tools. Also, it can point out DNS entries
174for hosts that are no longer up or have not yet been put into production.
175Please use Fierce with care and at your own risk.
176
Note: See TracBrowser for help on using the repository browser.