BGP Ranking & IP-ASN History - FIRST

24
BGP Ranking & IP-ASN History Making Something Useful Out of Old Massive Datasets Rapha¨ el Vinot [email protected] [email protected] FIRST 20190617

Transcript of BGP Ranking & IP-ASN History - FIRST

Page 1: BGP Ranking & IP-ASN History - FIRST

BGP Ranking & IP-ASN HistoryMaking Something Useful Out of Old Massive Datasets

Raphael [email protected]

[email protected]

FIRST 20190617

Page 2: BGP Ranking & IP-ASN History - FIRST

about CIRCL

The Computer Incident Response Center Luxembourg (CIRCL) is agovernment-driven initiative designed to provide a systematicresponse facility to computer security threats and incidents. CIRCL isthe CERT for the private sector, communes and non-governmentalentities in Luxembourg and is operated by securitymadein.lu g.i.e.

2 of 24

Page 3: BGP Ranking & IP-ASN History - FIRST

Objectives of the presentation

3 of 24

Page 4: BGP Ranking & IP-ASN History - FIRST

Our objectives of the presentation

• Why do we need tools like BGP Ranking and IPASN History

• How to effectively aggregate big datasets of malicious IPs

• Show the integration of IP ASN History and BGP Ranking

• Explain how to use the respective APIs

• Discuss the future developments

4 of 24

Page 5: BGP Ranking & IP-ASN History - FIRST

History

5 of 24

Page 6: BGP Ranking & IP-ASN History - FIRST

IP ASN history

• Owners of IP prefixes evolve in time

• Investigations can happen late

• BGP views may vary depending on source

• RIPE has a very comprehensive interface, but doesn’t scale forthousand IPs

6 of 24

Page 7: BGP Ranking & IP-ASN History - FIRST

BGP Ranking

• Many vendors propose lists of malicious IP addresses

• Malicious IP addresses evolve in time

• Many small providers are owned by malicious actors

• No simple way to track them over months/years

7 of 24

Page 8: BGP Ranking & IP-ASN History - FIRST

IP ASN History

8 of 24

Page 9: BGP Ranking & IP-ASN History - FIRST

Data Sources and format

• BGP Routing tables: IP Prefix → AS number

• Currently supported sources: CAIDA and Ripe (RRC01)

• Future: CIRCL

9 of 24

Page 10: BGP Ranking & IP-ASN History - FIRST

Implementation

• Load one BGP routing table per day per source

• Lookup services using patricia trees loaded in memory

• Automatic update daily

• Automatic cleanup of old datased (default: > 180 days)

• Accessible as a web service

10 of 24

Page 11: BGP Ranking & IP-ASN History - FIRST

Features

• Fast Lookup

• Find daily ownership for an IP

• Multiple IPs lookup at once

• Import your own BGP routing table

• Run the tool in-house

11 of 24

Page 12: BGP Ranking & IP-ASN History - FIRST

BGP Ranking

12 of 24

Page 13: BGP Ranking & IP-ASN History - FIRST

Data sources

• Public lists containing IP addresses (Abuse.ch, Dshield, BambenekConsulting, blocklist.de, ...)

• Shadowserver (fetches the list from the web interface, requires anaccount)

• Future: MISP instances, DNS lookup, other private sources(?)

13 of 24

Page 14: BGP Ranking & IP-ASN History - FIRST

Implementation

• Hourly fetch of data sources, aggregation by day

• Prefix and ASN lookup against IP ASN History

• Computation every 8 hours (ASN and prefix in AS)∑(IP Address × source weight)∑

IP announced by AS(1)

∑(IP Address × source weight)∑

IP in prefix(2)

14 of 24

Page 15: BGP Ranking & IP-ASN History - FIRST

Features

• Follow the evolution of an AS over time

• Discover suspicious IPs in the neigourhood

• Ranking by country

• Run the tool in-house, on your own feeds

15 of 24

Page 16: BGP Ranking & IP-ASN History - FIRST

Current use-case: D4 Project

16 of 24

Page 17: BGP Ranking & IP-ASN History - FIRST

Problem statement

• CSIRTs (or private organisations) build their own honeypot,honeynet or blackhole monitoring network

• Designing, managing and operating such infrastructure is a tediousand resource intensive task

• Automatic sharing between monitoring networks from differentorganisations is missing

• Sensors and processing are often seen as blackbox or difficult toaudit

17 of 24

Page 18: BGP Ranking & IP-ASN History - FIRST

Objective

• Based on our experience with MISP1 where sharing played animportant role, we transpose the model in D4 project

• Keeping the protocol and code base simple and minimal

• Allowing every organisation to control and audit their ownsensor network

• Extending D4 or encapsulating legacy monitoring protocolsmust be as simple as possible

• Ensuring that the sensor server has no control on the sensor(unidirectional streaming)

• Don’t force users to use dedicated sensors and allow flexibility ofsensor support (software, hardware, virtual)

1https://github.com/MISP/MISP18 of 24

Page 19: BGP Ranking & IP-ASN History - FIRST

Integration

• Use data from D4 as a source

• Lookup DDoS data against BGP-Ranking

• Correlate DDoS datasets with other type of malicious activities

19 of 24

Page 20: BGP Ranking & IP-ASN History - FIRST

APIs

20 of 24

Page 21: BGP Ranking & IP-ASN History - FIRST

IP ASN History

• curl https://bgpranking-ng.circl.lu/ipasn history/?ip=8.8.8.8

• With Python client: ipasn.py –ip 8.8.8.8

21 of 24

Page 22: BGP Ranking & IP-ASN History - FIRST

BGP Ranking

• curl -X POST -d ’{”asn”: ”5577”, ”date”: ”2019-05-19”}’https://bgpranking-ng.circl.lu/json/asn

• With Python client: bgpranking –asn 5577

22 of 24

Page 23: BGP Ranking & IP-ASN History - FIRST

References

23 of 24

Page 24: BGP Ranking & IP-ASN History - FIRST

References

• https://bgpranking-ng.circl.lu/

• https://www.d4-project.org/

• https://github.com/D4-project/IPASN-History

• https://github.com/D4-project/BGP-Ranking/

24 of 24