The question
CoAP is the web protocol of small IoT devices, and DTLS or OSCORE encrypt it. Encryption stops eavesdropping and tampering. It does nothing about a client that sends far too many requests, or an attacker who forges a neighbour’s address so that blocking the attacker also blocks the neighbour.
What we built
Two detectors on either side of the encryption. Layer 1 reads raw frames before decryption: it watches ARP bindings and per-(IP, MAC) datagram rates and installs expiring firewall drops keyed on the (IP, MAC) pair. Layer 2 runs inside a libcoap 4.3.5 server after decryption. It counts each client’s requests against a limit learned from benign traffic, answers abuse with 4.29 Too Many Requests or 4.13 Request Entity Too Large, and reports authenticated verdicts back to Layer 1.
We measured it on a network-namespace testbed with the server and Layer 1 sharing one processor core: 1,566 runs under DTLS with a pre-shared key and under OSCORE.
What we found
With one honest client, the adaptive Layer 2 caught a low-rate flood of 50 requests per second and a 512-byte oversized payload in every run under both transports. A fixed global threshold of 100 requests per second caught neither. With up to 20 honest clients, a pooled per-client limit kept catching the low-rate flood with no false alarms, and on 3.8 client-hours of replayed benign traffic it refused about 1.1 single windows per client-hour.
Honest client’s goodput under a flood that forges its address
Data: Record description and runs.jsonl (Zenodo 10.5281/zenodo.23529249)Show the numbers as a table
| Firewall key | Goodput kept |
|---|---|
| IP only | 0.4% |
| (IP, MAC) | 91.5% |
On a server limited to 20% of one core, floods left an honest client with 3 to 20% of its requests answered. Dropping the flood before decryption restored 89% or more. Under OSCORE an insider flood never reached the request handler at all, because libcoap answered each request with a fresh Echo challenge, so only Layer 1 could see it.
What it does not show
One machine, one server implementation and a fixed set of attacks. Real deployments add radio losses and many more device types.
Data, code and citation
Data and code for: A Two-Layer Intrusion Detection System for Denial-of-Service and Spoofing Attacks That Persist on CoAP After DTLS and OSCORE
Show BibTeX
@dataset{sahay2026_23529249,
author = {Sahay, Shahan and Bhatia, Amol},
title = {Data and code for: A Two-Layer Intrusion Detection System for Denial-of-Service and Spoofing Attacks That Persist on CoAP After DTLS and OSCORE},
year = {2026},
publisher = {Zenodo},
version = {1.0},
doi = {10.5281/zenodo.23529249},
url = {https://doi.org/10.5281/zenodo.23529249}
}