Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add IP blacklist alerting feature #18

Merged
merged 5 commits into from
Jan 7, 2019
Merged

add IP blacklist alerting feature #18

merged 5 commits into from
Jan 7, 2019

Conversation

satta
Copy link
Member

@satta satta commented Jan 7, 2019

This PR adds a new processing handler that, not unlike the Bloom filter handler, emits alerts when source or destination IPs in any incoming event are within a list of CIDR ranges previously given to FEVER.

For instance, one could provide a list such as

10.0.0.0/24
35.190.247.0/24

which would cause any traffic from or to, say, 10.0.0.45 or 35.190.247.122 to generate an alert. The original contents of the EVE metadata item that caused the alert is attached inside the alert EVE, as it is done with traditional alerts generated by Suricata.

Here's what an alert would look like:

{
  "timestamp": "2018-12-12T15:45:02.503513+0100",
  "event_type": "alert",
  "src_ip": "10.0.0.45",
  "src_port": 29636,
  "dest_ip": "10.1.2.3",
  "dest_port": 80,
  "proto": "TCP",
  "alert": {
    "action": "allowed",
    "gid": 0,
    "rev": 0,
    "signature": "IP BLACKLIST Communication involving IP 10.0.0.45 in listed range 10.0.0.0/24",
    "category": "Potentially Bad Traffic",
    "severity": 3
  },
  "http": {
    "hostname": "foo.bar",
    "url":"\/",
    "http_user_agent":"curl\/7.52.1",
    "http_content_type":"text\/html",
    "http_method":"GET",
    "protocol":"HTTP\/1.1",
    "status":200,
    "length":894
  }
}

Ranges to alert on are held in a trie implemented by cidranger (https://github.com/yl2chen/cidranger) so lookups are fast enough to be done on both IPs in potentially high-volume input data selections.

@rhaist rhaist merged commit e97b91c into DCSO:master Jan 7, 2019
@satta satta deleted the ipalerts branch January 7, 2019 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants