Known Threats
The known threats checker matches the client IP against compiled FireHOL threat intelligence feeds. FireHOL aggregates data from dozens of public sources covering active attackers, scanning infrastructure, abuse participants, and anonymity networks. A match in any feed adds a penalty weighted by that feed's severity level.
This checker runs in the cheap phase with no network I/O, all threat feeds are pre-compiled into MMDB databases loaded at startup.
How It Works
The middleware maintains five MMDB databases compiled from the FireHOL feed collection:
firehol_anonymous.mmdb: VPNs, open proxies, and Tor exit nodes not already in the Tor database. A match setsctx.anon = trueand applies theanonymiseNetworkpenalty.firehol_l1.mmdb: Confirmed active attack sources. FireHOL maintains this list with a strict no-false-positives policy.firehol_l2.mmdb: Current abuse participants: scanners, brute-force sources, spam senders.firehol_l3.mmdb: Broader web threat aggregation combining multiple exploit and scanning lists.firehol_l4.mmdb: Extended watch list with relaxed inclusion criteria. Higher false-positive rate than levels 1–3.
Each level applies a separate penalty. Multiple levels can fire for the same IP if it appears across feeds.
Configuration
await defineConfiguration({
store: { main: { driver: 'sqlite', name: './bot-detector.db' } },
checkers: {
enableKnownThreatsDetections: {
enable: true,
penalties: {
anonymiseNetwork: 20,
threatLevels: {
criticalLevel1: 40,
currentAttacksLevel2: 30,
threatLevel3: 20,
threatLevel4: 10,
},
},
},
},
})
All weights live inside the penalties: {} sub-object. The four FireHOL level penalties live in the nested penalties.threatLevels object.
20.40.30.20.10.Reason Codes
| Code | Trigger |
|---|---|
ANONYMITY_NETWORK | IP matched in the FireHOL anonymity feed. |
FIREHOL_L1_THREAT | IP matched in FireHOL Level 1 (confirmed attackers). |
FIREHOL_L2_THREAT | IP matched in FireHOL Level 2 (active abuse). |
FIREHOL_L3_THREAT | IP matched in FireHOL Level 3 (web threats). |
FIREHOL_L4_THREAT | IP matched in FireHOL Level 4 (watch list). |
bot-detector init to download and compile the FireHOL feeds. The databases are written to _data-sources/ inside the package directory and reloaded automatically when the files change on disk. Re-run init periodically to keep the feeds current.threatLevel4 with other signals rather than raising it to banScore in isolation.