Skip to content

Commit 3da9e9d

Browse files
Matej BarnatMatej Barnat
Matej Barnat
authored and
Matej Barnat
committed
Added URL blacklist filter module
1 parent 84f6f1b commit 3da9e9d

File tree

6 files changed

+483
-0
lines changed

6 files changed

+483
-0
lines changed

Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ SUBDIRS=amplification_detection \
1212
sip_bf_detector \
1313
smtp_spam_detector \
1414
tunnel_detection \
15+
url_blacklist_filter \
1516
voip_fraud_detection \
1617
vportscan_detector \
1718
waintrusion_detector

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ AC_CONFIG_FILES([Makefile
139139
smtp_spam_detector/smtp_spam_detector
140140
smtp_spam_detector/smtp_spam_detector_files/Makefile
141141
tunnel_detection/Makefile
142+
url_blacklist_filter/Makefile
142143
voip_fraud_detection/Makefile
143144
vportscan_detector/Makefile
144145
waintrusion_detector/Makefile

nemea-detectors.spec.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ make -j5 DESTDIR=$RPM_BUILD_ROOT install
7575
%{_bindir}/nemea/haddrscan_aggregator.py
7676
%{_bindir}/nemea/hoststatsnemea
7777
%{_bindir}/nemea/miner_detector
78+
%{_bindir}/nemea/url_blacklist_filter
7879
%{_bindir}/nemea/voip_fraud_detection
7980
%{_bindir}/nemea/vportscan_detector
8081
%{_bindir}/nemea/waintrusion_detector.py

url_blacklist_filter/Makefile.am

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
bin_PROGRAMS=url_blacklist_filter
2+
url_blacklist_filter_SOURCES=url_blacklist_filter.c fields.c fields.h
3+
url_blacklist_filter_CFLAGS=-std=gnu99
4+
url_blacklist_filter_LDADD=-lunirec -ltrap
5+
6+
EXTRA_DIST=README.md
7+
pkgdocdir=${docdir}/url_blacklist_filter
8+
pkgdoc_DATA=README.md
9+
10+
include ../aminclude.am

url_blacklist_filter/README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# URL blacklist filter - NEMEA module
2+
3+
## Description
4+
5+
This modul recieves UniRec, checks if URL is on blacklist, if it is on blacklist, then it sends this UniRec to output. It requires file with blacklist as parameter.
6+
The primary function of tthis module is to monitor incoming HTTP network traffic and detect any attempts to access addresses listed on a pre-established blacklist. This module acts as a filter.
7+
When a malicious address is detected, the module forwards it to the output interface, which should be connected to input of the [urlblacklist2idea](https://github.com/CESNET/URL_Evaluator/tree/main/nemea_modules/urlblacklist2idea) reporting module (part of [URL Evaluator](https://github.com/CESNET/URL_Evaluator)).
8+
9+
### Input
10+
11+
Number of inputs: 1\
12+
Description of input: The module receives UniRec data related to HTTP traffic. Required UniRec fields for this module are HTTP_REQUEST_HOST and HTTP_REQUEST_URL
13+
14+
### Output
15+
16+
Number of outputs: 1\
17+
Description of output: Incoming UniRec data is sent to the output if the URL within the UniRec entry is found on a blacklist.
18+
19+
## Installation
20+
21+
1) Let Autotools process the configuration files.\
22+
``` autoreconf -i ```
23+
24+
2) Configure the module directory.\
25+
``` ./configure ```
26+
27+
3) Build the module.\
28+
``` make ```
29+
30+
4) Install the module. The command should be performed as root (e.g. using sudo). \
31+
``` make install ```
32+
33+
## Usage
34+
35+
``` url_blacklist_filter -f FILE_PATH -i IFC_SPEC ```
36+
37+
### Parameters of module [OPTIONS]
38+
39+
|Parameter|Description|
40+
|---|---|
41+
|-f --file <char*>|Path to blacklist file with list of malicious URL addresses. Each line in the provided text file should contain a single URL.|
42+
43+
### Common TRAP parameters [COMMON]
44+
45+
|Parameter|Description|
46+
|---|---|
47+
|-h [trap,1]|If no argument, print this message. If "trap" or 1 is given, print TRAP help.|
48+
|-i IFC_SPEC|Specification of interface types and their parameters, see "-h trap" (mandatory parameter).|
49+
|-v|Be verbose.|
50+
|-vv|Be more verbose.|
51+
|-vvv|Be even more verbose.|

0 commit comments

Comments
 (0)