🚀 Launch Week Day 4:Introducing the Alert Details Page: A Better Way to Explore Alerts.Learn More
Socket
Book a DemoInstallSign in
Socket

www.github.com/owasp/amass.git

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

www.github.com/owasp/amass.git

Go Modules
Version
v2.6.0+incompatible
Version published
Created
Source

OWASP Logo OWASP Amass

GitHub Issues CircleCI Status GitHub Release Go Version License Contribute Yes Chat on Discord Follow on Twitter

The OWASP Amass tool obtains subdomain names by scraping data sources, recursive brute forcing, crawling web archives, permuting/altering names and reverse DNS sweeping. Additionally, Amass uses the IP addresses obtained during resolution to discover associated netblocks and ASNs. All the information is then used to build maps of the target networks.

Image of a network graph

How to Install

Prebuilt

A precompiled version is available for each release.

If you are on a distribution such as Kali Linux, and have never used snap previously, follow these steps to access snap packages:

$ sudo apt install snapd

$ sudo systemctl start snapd

Add the snap binaries to your PATH using a method similar to the following:

$ export PATH=$PATH:/snap/bin

If your operating environment supports Snap, you can click here to install, or perform the following from the command-line:

$ sudo snap install amass

If you would like snap to get you the latest unstable build of OWASP Amass, type the following command:

$ sudo snap install --edge amass

From Source

If you would prefer to build your own binary from the latest version of the source code, make sure you have a correctly configured Go >= 1.10 environment. More information about how to achieve this can be found on the golang website. Then, take the following steps:

  • Download amass:
$ go get -u github.com/OWASP/Amass/...
  • If you wish to rebuild the binaries from the source code:
$ cd $GOPATH/src/github.com/OWASP/Amass

$ go install ./...

At this point, the binaries should be in $GOPATH/bin.

  • Several wordlists can be found in the following directory:
$ ls $GOPATH/src/github.com/OWASP/Amass/wordlists/

Using the Tool

The most basic use of the tool, which includes reverse DNS lookups and name alterations:

$ amass -d example.com

If you need Amass to run faster and only use the passive data sources:

$ amass -nodns -d example.com

If you are running Amass within a virtual machine, you may want to slow it down a bit:

$ amass -freq 480 -d example.com

The example below is a good place to start with amass:

$ amass -v -ip -brute -min-for-recursive 3 -d example.com
[Google] www.example.com
[VirusTotal] ns.example.com
...
13139 names discovered - archive: 171, cert: 2671, scrape: 6290, brute: 991, dns: 250, alt: 2766

Add some additional domains to the enumeration:

$ amass -d example1.com,example2.com -d example3.com

Additional switches available through the amass CLI:

FlagDescriptionExample
-activeEnable active recon methodsamass -active -d example.com net -p 80,443,8080
-blBlacklist undesired subdomains from the enumerationamass -bl blah.example.com -d example.com
-blfIdentify blacklisted subdomains from a fileamass -blf data/blacklist.txt -d example.com
-brutePerform brute force subdomain enumerationamass -brute -d example.com
-dfSpecify the domains to be enumerated via text fileamass -df domains.txt
-freqThrottle the rate of DNS queries by number per minuteamass -freq 120 -d example.com
-hShow the amass usage informationamass -h
-ipPrint IP addresses with the discovered namesamass -ip -d example.com
-jsonAll discoveries written as individual JSON objectsamass -json out.json -d example.com
-lList all the domains to be used during enumerationamass -whois -l -d example.com
-logLog all error messages to a fileamass -log amass.log -d example.com
-min-for-recursiveDiscoveries required for recursive brute forcingamass -brute -min-for-recursive 3 -d example.com
-noaltsDisable alterations of discovered namesamass -noalts -d example.com
-nodnsA purely passive mode of executionamass -nodns -d example.com
-norecursiveDisable recursive brute forcingamass -brute -norecursive -d example.com
-oWrite the results to a text fileamass -o out.txt -d example.com
-oAOutput to all available file formats with prefixamass -oA amass_scan -d example.com
-rSpecify your own DNS resolversamass -r 8.8.8.8,1.1.1.1 -d example.com
-rfSpecify DNS resolvers with a fileamass -rf data/resolvers.txt -d example.com
-vOutput includes data source and summary informationamass -v -d example.com
-versionPrint the version number of amassamass -version
-wChange the wordlist used during brute forcingamass -brute -w wordlist.txt -d example.com
-whoisSearch using reverse whois informationamass -whois -d example.com

Have amass send all the DNS and infrastructure enumerations to the Neo4j graph database:

$ amass -neo4j neo4j:DoNotUseThisPassword@localhost:7687 -d example.com

Here are switches for outputting the DNS and infrastructure findings as a network graph:

FlagDescriptionExample
-d3Output a D3.js v4 force simulation HTML fileamass -d3 network.html -d example
-gexfOutput to Graph Exchange XML Format (GEXF)amass -gephi network.gexf -d example.com
-graphistryOutput Graphistry JSONamass -graphistry network.json -d example.com
-visjsOutput HTML that employs VisJSamass -visjs network.html -d example.com

amass.netnames

Caution: If you use the amass.netnames tool, it will attempt to reach out to every IP address within the identified infrastructure and obtain names from TLS certificates. This is "loud" and can reveal your reconnaissance activities to the organization being investigated.

To discover all domains hosted within target ASNs, use the following option:

$ amass.netnames -asn 13374,14618

To investigate within target CIDRs, use this option:

$ amass.netnames -cidr 192.184.113.0/24,104.154.0.0/15

For specific IPs or address ranges, use this option:

$ amass.netnames -addr 192.168.1.44,192.168.2.1-64

By default, port 443 will be checked for certificates, but the ports can be changed as follows:

$ amass.netnames -cidr 192.168.1.0/24 -p 80,443,8080

Integrating OWASP Amass into Your Work

If you are using the amass package within your own Go code, be sure to properly seed the default pseudo-random number generator:

import(
    "fmt"
    "math/rand"
    "time"

    "github.com/OWASP/Amass/amass"
)

func main() {
    output := make(chan *amass.AmassOutput)

    go func() {
        for result := range output {
            fmt.Println(result.Name)
        }
    }()

    // Seed the default pseudo-random number generator
    rand.Seed(time.Now().UTC().UnixNano())

    // Setup the most basic amass configuration
    config := amass.CustomConfig(&amass.AmassConfig{Output: output})
    config.AddDomain("example.com")

    amass.StartEnumeration(config)
}

Settings for the OWASP Amass Maltego Local Transform

  • Setup a new local transform within Maltego:

Maltego setup process

  • Configure the local transform to properly execute the go program:

Maltego configuration

  • Go into the Transform Manager, and disable the debug info option:

Disabling debug

Community

  • Discord Server - Discussing OSINT, network recon and developing security tools using Go

Mentions

FAQs

Package last updated on 28 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts