Map the footprint of your network
Amass: "The OWASP Amass tool suite 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."
Notebook: Install and invoke Amass (including Go languague runtime) & Graphistry from a Google Colab notebook
In [39]:
#!pip install graphistry -q
!apt -q install golang-go libzmq3-dev
%env GOPATH=/root/go
!go get -u github.com/OWASP/Amass/...
In [0]:
import graphistry
#graphistry.register(key='MY_API_KEY')
graphistry.__version__
data.jsondata.json into formatted Graphistry graph g-viz.json
In [12]:
!/root/go/bin/amass -do data.json -d graphistry.com
In [0]:
!/root/go/bin/amass.viz -graphistry g-viz.json -i data.json
In [40]:
import json
import pandas as pd
with open('g-viz.json') as json_file:
data = json.load(json_file)
nodes_df = pd.DataFrame(data['labels'])
edges_df = pd.DataFrame(data['graph'])
print('# nodes', len(nodes_df))
print('# edges', len(edges_df))
nodes_df.sample(3)
Out[40]:
In [38]:
g = graphistry\
.bind(source='src', destination='dst', edge_title='edgeTitle')\
.bind(node='node', point_color='pointColor', point_title='pointLabel')
g.plot(edges_df, nodes_df)
Out[38]:
In [50]:
raw_df = pd.read_json('./data.json', lines=True)
raw_df.sample(3)
Out[50]:
In [51]:
hg = graphistry.hypergraph(
raw_df,
entity_types=['addr', 'asn', 'cidr', 'desc', 'domain', 'name', 'service', 'target_domain', 'target_name'],
direct=True)
hg['graph'].plot()
Out[51]:
In [0]: