
BGP Hijack Detection
This example demonstrates how to use the tabi module in order to detect
all possible BGP hijacks seen from a BGP collector.
WARNING: Before trying this example make sure you have at least 2GB of free memory on your computer
The installation procedure is described in the main README.
This example is compatible with mabo and bgpreader.
python detect_hijacks.py -c rrc01 -i mabo \
--rpki-roa-file roa.csv \
--irr-ro-file routes.csv \
--irr-mnt-file maintainers.csv \
--irr-org-file organisations.csv \
../../{bview,updates}.*.gz
This example script prints the abnormal events that were detected by the
tabi module. Additionnaly it tries to filter out the conflicts that are most
probably legitimate using the following methods:
AS_PATH of the hijacker contains the ASN of the hijackedThese heuristics are documented in the tabi.annotate module.
In this example, the announce updating the route of 2403:8600:ea89::/48
originating from AS55441 leads to the probable redirection of the traffic that
was initially directed towards AS131317. This is suspicious because there are valid route object and ROA for the original route but not for the latest route update.
{
"timestamp" : 1451609472,
"collector" : "rrc01",
"peer_ip" : "2001:7f8:4::7992:1",
"peer_as" : 31122,
"announce" : {
"prefix" : "2403:8600:ea89::/48",
"asn" : 55441,
"as_path" : "31122 6939 6453 4755 45820 55441",
"type" : "U"
},
"conflict_with" : {
"prefix" : "2403:8600:ea89::/48",
"asn" : 131317,
"valid" : [
"apnic",
"roa"
]
},
"type" : "ABNORMAL"
}
U if the announce was received from a BGP update or F if it was from a BGP full viewprefix & asnIn this example the announce withdrawing the route 23.192.176.0/20 from
AS5570 leads to the probable redirection of the traffic towards AS35889 which
is announcing a route to the less specific prefix 23.192.0.0/11.
{
"timestamp" : 1451609643,
"collector" : "rrc01",
"peer_ip" : "195.66.224.138",
"peer_as" : 2914,
"withdraw" : {
"asn" : 55740,
"prefix" : "23.192.176.0/20",
"type" : "W"
},
"conflict_with" : {
"prefix" : "23.192.0.0/11",
"asn" : 35994
},
"type" : "ABNORMAL"
}