Skip to content
ASN target organization IP range attack surface mapping for reconnaissance, fast and lightweight
Branch: master
Clone or download
Latest commit e565fb3 Nov 26, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information. Update README Nov 26, 2019
asnip.go Fix redundant loop Nov 24, 2019


Asnip retrieves all IPs of a target organization—used for attack surface mapping in reconnaissance phases.

It uses the IP or domain name and looks up the Autonomous System Number (ASN), retrieves the Classless Inter-Domain Routing (CIDR) subnet masks and converts them to IPs.

IP / Domain → ASN → CIDRs → IPs

Please note that this technique only makes sense if the target has its own ASN. It is also advised to not perform tests on IP ranges that belong to multiple entities.


go get

This tool requires golang


go get -u


  -t string
        Domain or IP address (Required)
  -p string
        Print results to console


$ asnip -t -p

[:] ASN: 15169 / GOOGLE - Google LLC, US
--- snip ---
[:] Writing 501 CIDRs to file...
[:] Converting to IPs...
--- snip ---
[:] Writing 14222870 IPs to file...


This tool must use an external API (which is subject to rate limiting) such as HackerTarget to retrieve relevant data. The conversion of CIDRs to IPs will be done locally.

Asnip is work in progress, if you make optimization changes yourself, you are invited to create a pull request or check the GitHub issues page—help is always appreciated.

© 2019 Leonid Hartmann

You can’t perform that action at this time.