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