• Stars
    star
    108
  • Rank 312,212 (Top 7 %)
  • Language
    Python
  • License
    Other
  • Created over 8 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

BGP Hijack Detection

TaBi - Track BGP Hijacks

Developed since 2011 for the needs of the French Internet Resilience Observatory, TaBi is a framework that ease the detection of BGP IP prefixes conflicts, and their classification into BGP hijacking events. The term prefix hijacking refers to an event when an AS, called an hijacking AS, advertises illegitimately a prefix equal or more specific to a prefix delegated to another AS, called the hijacked AS.

Usually, TaBi processes BGP messages that are archived in MRT files. Then, in order to use it, you will then need to install a MRT parser. Its favorite companion is MaBo, but it is also compatible with CAIDA's bgpreader. Internally, TaBi translates BGP messages into its own representation. Therefore, its is possible to implement new inputs depending on your needs.

Authors

Building TaBi

TaBi depends on two external Python modules. The easiest method to install them is to use virtualenv and pip.

If you use a Debian-like system you can install these dependencies using:

apt-get install python-dev python-pip python-virtualenv

Then install TaBi in a virtual environment:

virtualenv ve_tabi
source ve_tabi/bin/activate
pip install py-radix python-dateutil
python setup.py install

Removing TaBi and its dependencies is therefore as simple as removing the ve_tabi directory ans the cloned repository.

Usage

Historically TaBi was designed to process MRT dump files from the collectors of the RIPE RIS.

Grabbing MRT dumps

You will then need to retrieve some MRT dumps. Copying and pasting the following commands in a terminal will grab a full BGP view and some updates.

wget -c http://data.ris.ripe.net/rrc01/2016.01/bview.20160101.0000.gz
wget -c http://data.ris.ripe.net/rrc01/2016.01/updates.20160101.0000.gz

tabi - the command line tool

The tabi command is the legacy tool that uses TaBi to build technical indicators for the Observatory reports. It uses mabo to parse MRT dumps.

Given the name of the BGP collector, an output directory and MRT dumps using the RIS naming convention, tabi will follow the evolution of routes seen in MRT dumps (or provided with the --ases option), and detect BGP IP prefixes conflicts.

Several options can be used to control tabi behavior:

$ tabi --help
Usage: tabi [options] collector_id output_directory filenames*

Options:
  -h, --help            show this help message and exit
  -f, --file            files content comes from mabo
  -p PIPE, --pipe=PIPE  Read the MRT filenames used as input from this pipe
  -d, --disable         disable checks of the filenames RIS format
  -j JOBS, --jobs=JOBS  Number of jobs that will process the files
  -a ASES, --ases=ASES  File containing the ASes to monitor
  -s, --stats           Enable code profiling
  -m OUTPUT_MODE, --mode=OUTPUT_MODE
                        Select the output mode: legacy, combined or live
  -v, --verbose         Turn on verbose output
  -l, --log             Messages are written to a log file.

Among this options, two are very interesting:

  • -j that forks several tabi processes to process the MRT dumps faster
  • -a that can be used to limit the output to a limited list of ASes

Note that the legacy output mode will likely consume all file descriptors as it creates two files per processed AS (i.e. around 100k opened files). The default is the combined output mode.

Here is an example call to tabi:

tabi -j 8 rrc01 results/ bview.20160101.0000.gz updates.20160101.0000.gz

After around 5 minutes of processing, you will find the following files in results/2016.01/:

  • all.defaults.json.gz that contains all default routes seen by TaBi
  • all.routes.json.gz that contains all routes monitored
  • all.hijacks.json.gz that contains all BGP prefix conflicts

Using TaBi as a Python module

TaBi could also be used as a regular Python module in order to use it in your own tool.

The example provided in this repository enhance BGP prefix conflicts detection, with possible hijacks classification. To do so, it relies on external data sources such as RPKI ROA, route objects and other IRR objects.

More Repositories

1

AD-control-paths

Active Directory Control Paths auditing and graphing tools
C
644
star
2

rust-guide

Recommendations for secure applications development with Rust
Shell
579
star
3

bmc-tools

RDP Bitmap Cache parser
Python
429
star
4

ADTimeline

Timeline of Active Directory changes with replication metadata
PowerShell
423
star
5

polichombr

Collaborative malware analysis framework
Python
371
star
6

MLA

Multi Layer Archive - A pure rust encrypted and compressed archive file format
Rust
308
star
7

SecuML

Machine Learning for Computer Security
Python
268
star
8

libecc

Library for elliptic curves cryptography
C
254
star
9

DFIR-O365RC

PowerShell module for Office 365 and Azure log collection
PowerShell
222
star
10

ORADAD

Outil de récupération automatique des données de l'Active Directory / Automated tool for dumping Active Directory data
C++
191
star
11

SmartPGP

SmartPGP is a JavaCard implementation of the OpenPGP card specifications
Java
178
star
12

ASCAD

Side Channels Analysis and Deep Learning
Python
167
star
13

cry-me

CRY.ME (CRYptographic MEssaging application)
Kotlin
163
star
14

ctf

Epreuves de sélection de la TeamFR pour l'ECSC 2019.
Python
154
star
15

ultrablue

User-friendly Lightweight TPM Remote Attestation over Bluetooth
Kotlin
154
star
16

AD-permissions

Active Directory permissions (ACL/ACE) auditing tools
PHP
146
star
17

DFIR4vSphere

Powershell module for VMWare vSphere forensics
PowerShell
129
star
18

bootcode_parser

A boot record parser that identifies known good signatures for MBR, VBR and IPL.
Python
97
star
19

SysvolExplorer

Active Directory Group Policy analyzer
C++
95
star
20

Binacle

Full-bin indexation of binary files
Rust
92
star
21

audit-radius

A RADIUS authentication server audit tool
Python
80
star
22

AnoMark

Algorithme d'apprentissage statistique permettant de créer un modèle sur les lignes de commandes des évènements "Création de Processus", afin de détecter des anomalies dans les évènements futurs
Python
73
star
23

bits_parser

Extract BITS jobs from QMGR queue and store them as CSV records
Python
73
star
24

route_leaks

BGP Route Leaks Detection
Python
70
star
25

transdep

Discover SPOF in DNS dependency graphs
Go
68
star
26

SecAESSTM32

Bibliothèque C et assembleur permettant le chiffrement/déchiffrement AES-128 de messages pour des composants grand public (famille STM32F3/STM32F4)
C
65
star
27

x509-parser

a RTE-free X.509 parser
C
57
star
28

guide-journalisation-microsoft

Guide journalisation Microsoft
PowerShell
54
star
29

mabo

MRT Parser
OCaml
46
star
30

chipsec-check

Tools to generate a Debian Linux distribution with chipsec to test hardware requirements
Shell
44
star
31

picon

Picon
C
38
star
32

nogaxeh

Tools for analyzing hexagon code
C++
38
star
33

OVALI

Generic graph exploration, manipulation and visualization tool (Outil de Visualisation et Analyse de Liens Inter-objets)
JavaScript
35
star
34

secAES-ATmega8515

Secure AES128 Encryption Implementation for ATmega8515
Assembly
32
star
35

Open-ISO7816-Stack

This project aims to provide an open-source implementation of the ISO7816-3 communication protocol from the reader side. This protocol is ruling the interactions between a smartcard and a card-reader when using its contacts to communicate
C
26
star
36

packetweaver

A Python framework for script filing and task sequencing
Python
25
star
37

lidi

Transfer a raw TCP or Unix stream or files through a unidirectional link with forward error correction
Rust
24
star
38

ADCP-DirectoryCrawler

AD-control-paths LDAP submodule
C
20
star
39

WAAD

Détection d'anomalie à partir des journaux d'authentification Windows
Python
16
star
40

sftp2misp

Automation script to download JSON MISP files from a SFTP server and import them via API to a MISP instance.
Python
15
star
41

cardstalker

CardStalker provides a UART-driven smartcard reader at the T=1 (see ISO7816-3) level (link and physical layer), where most of the smartcard reader devices on the market are only providing an APDU interface (application layer).
C
15
star
42

IPECC

A VHDL IP for ECC (Elliptic Curve Cryptography) hardware acceleration
VHDL
14
star
43

mdbook-checklist

mdbook preprocessor for generating checklists and indexes
Rust
13
star
44

shovel

Web interface to explore Suricata EVE outputs
Lua
11
star
45

xsvgen

XML Schema Validator Generator
OCaml
10
star
46

cornetto

Outil de gestion de version statique de site web
JavaScript
9
star
47

ORADAZ

Outil de récupération automatique des données AZure / Automated tool for dumping Azure configuration data
Rust
9
star
48

ProTIP

ProTIP permet de caractériser la connectivité réelle entre composants d'une architecture PCI Express
Prolog
9
star
49

coq-prelude

General-purpose monad typeclass hierarchy for Coq
Coq
8
star
50

pciemem

Linux kernel module for driving an USB3380 board, exposing a /dev/pciemem device node on the analysis machine representing the physical memory of the machine under test
C
8
star
51

scep

Security Contexts for Enhanced Protection Linux Security Module
C
7
star
52

Faults_analyzer

Logiciel d'analyse de campagnes de perturbations sur composants
Python
6
star
53

caradoc

A PDF parser and validator
6
star
54

WSUS_Audit

Auditing scripts for WSUS infrastructures
6
star
55

DroidWorks

Rust
5
star
56

pycrate

A Python library to ease the development of encoders and decoders for various protocols and file formats; contains ASN.1 and CSN.1 compilers.
5
star
57

ADCP-libdev

AD-control-paths libraries submodule
C
5
star
58

libapn

libapn is a header-based C++ library developed to study vectorial Boolean functions, including but not limited to APN functions.
C++
4
star
59

caml-crush

Caml Crush: an OCaml PKCS#11 filtering proxy
3
star
60

libdrbg

A portable library implementing NIST SP 800-90A DRBGs
C
3
star
61

Faults_experiments

Résultats bruts de campagnes de perturbation de composants réalisées par le laboratoire de sécurité des composants de l'ANSSI
Python
2
star
62

concerto

Toolset to analyse TLS datasets
1
star
63

opkcs11-tool

opkcs11-tool: managing and operating PKCS #11 security tokens in OCaml
1
star
64

eurydice

A user-friendly solution to transfer files through a physical diode using the Lidi utility, complete with data retention, file history, user accounts and admin management. Provides a scriptable API and a web interface.
1
star
65

DECODE

Anomaly detection tool for PE files on Microsoft Windows system
Python
1
star