Skip to content

Commit 1cb4bc7

Browse files
0x707a15ecRickdeJager
authored andcommitted
Add Suricata notes in README and fix wipe_tags.py
1 parent 3ce7e14 commit 1cb4bc7

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

‎README.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,15 @@ alert tcp any any -> any any (msg: "Path Traversal-../"; flow:to_server; content
8989
```
9090
Once this rule is seen in traffic, the `path_traversal` tag will automatically be added to the filters in Tulip.
9191

92+
> [!NOTE]
93+
>
94+
> After editing Suricata rules (renaming or id change) please:
95+
>
96+
> Remove old logs: `rm ${SURICATA_DIR_HOST}/log/*` (otherwise old signatures will be repopulated).
97+
>
98+
> Restart Docker containers.
99+
>
100+
> If database was only restarted (not dropped), try cleaning tags/signatures with `python wipe_tags.py`.
92101
93102
### eve.json
94103
Suricata alerts are read directly from the `eve.json` file. Because this file can get quite verbose when all extensions are enabled, it is recommended to strip the config down a fair bit. For example:

‎wipe_tags.py‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,14 @@
1818
pcap_coll.update_many(
1919
{ },
2020
{ "$pull": { "tags": { "$nin": [ "flag-in", "flag-out" ] }} }
21-
)
21+
)
22+
23+
# suricata
24+
tags_coll = db.tags
25+
tags_coll.delete_many(
26+
{ "_id": { "$nin": [ "flag-in", "flag-out" ] }}
27+
)
28+
29+
# suricata
30+
signatures_coll = db.signatures
31+
signatures_coll.delete_many({})

0 commit comments

Comments
 (0)