Location Research Breakthrough Possible @S-Logix pro@slogix.in

Shielding CoAP Request-Flooding Attacks Against Eclipse Californium IoT Services Through Request-Rate Enforcement and Protocol Resource Controls

Description

Modern Internet of Things environments use lightweight communication protocols to exchange telemetry, commands, and resource information between constrained devices and backend services. The Constrained Application Protocol (CoAP) is designed for such environments, and Eclipse Californium provides a Java-based CoAP framework for building IoT services and applications. Californium supports CoAP features and provides configurable protocol and resource-management controls.

A CoAP request-flooding attack occurs when a large number of requests are generated against an IoT service within a short period. The objective of the controlled attack is to increase request-processing activity and consume available protocol or application resources, such as processing threads, peer state, exchanges, blockwise-transfer state, or application memory.

Californium provides several resource-protection controls. Its CoAP configuration includes controls for maximum active peers, maximum peer inactivity period, maximum message size, maximum resource-body size, blockwise status lifetime, server-side observe limits, exchange lifetime, and related protocol state. These controls can reduce the amount of state and data that a CoAP service is required to maintain.

In this use case, a controlled Eclipse Californium CoAP server is deployed on Ubuntu Linux inside an isolated VirtualBox laboratory. A synthetic IoT resource is created to represent a realistic sensor or device-management endpoint. Kali Linux is used as the controlled security-testing platform to generate a repeatable burst of CoAP requests against the laboratory Californium service. The testing remains restricted to the authorized laboratory network.

A request-rate enforcement layer is implemented before resource processing so that excessive requests from a controlled source can be identified and restricted. The Californium server is additionally configured with protocol resource controls such as maximum active peers, maximum message size, maximum resource-body size, peer inactivity limits, blockwise-transfer limits, and server-side observe limits where applicable.

The security workflow therefore uses two complementary protection layers: request-rate enforcement controls how frequently a client is allowed to generate requests, while protocol resource controls restrict the amount of state, message data, peer state, blockwise state, and observation state that the Californium service can maintain.

Wazuh monitors the Ubuntu host and relevant Californium activity, while OpenSearch provides centralized investigation and correlation of request-flooding events. The controlled flooding test is performed first against the baseline configuration and then repeated after the defensive controls are implemented. The objective is to verify that excessive request activity is detected and restricted while legitimate CoAP requests continue to operate normally.

Complete IoT Cyber Security Workflow : CoAP Client → Eclipse Californium IoT Service → Request Processing → Request-Rate Measurement → Excessive Request Detection → Rate Enforcement → Protocol Resource Controls → Excessive Request Restriction → Security Event Logging → Wazuh Monitoring → OpenSearch Investigation → Remediation → Post-Remediation Validation

Existing Security Problem

Application: Eclipse Californium CoAP IoT Service

Eclipse Californium provides the controlled CoAP server environment for the laboratory IoT service. Californium CoAP configuration provides resource-management controls, including maximum active peers, maximum peer inactivity period, maximum message size, maximum resource-body size, blockwise-transfer state lifetime, and maximum server-side observes. The MAX_ACTIVE_PEERS control is specifically intended to limit peer state so that memory consumption can be better predicted.

Existing Problem:

A CoAP service can become exposed to resource-exhaustion conditions when an excessive number of requests are processed without sufficient request-rate controls or protocol resource limits. Repeated requests may consume application-processing capacity and create additional protocol state. Depending on the request type, the service may also maintain peer state, exchanges, blockwise-transfer state, or observe relationships.

The security problem is therefore:

CoAP Client → Large Number of Requests → Eclipse Californium Endpoint → Request Processing → Repeated Resource Access → Increased CPU / Processing Activity → Increased Protocol State → Resource Consumption → Service Degradation → Potential CoAP Service Unavailability

The proposed security architecture introduces request-rate enforcement before excessive traffic reaches the application-processing layer and combines it with Californium native protocol-resource controls to limit resource consumption.

Attack

Specific Attack: CoAP Request-Flooding Attack

A CoAP request-flooding attack involves generating an excessive number of CoAP requests against a target IoT service within a limited period. The controlled attack does not attempt to exploit a software vulnerability. Instead, it evaluates how the Californium service behaves when exposed to abnormal request volume. The Kali Linux testing system generates repeated requests against a synthetic Californium resource, deliberately increasing the request rate beyond the normal laboratory baseline. The test measures request volume, response behavior, processing activity, and relevant resource-state changes. The same test is then repeated after request-rate enforcement and protocol resource controls have been implemented.

Attack Behavior:
Kali Linux / Controlled CoAP Client
→
Generate Repeated CoAP Requests
→
Target Eclipse Californium Endpoint
→
Repeated Resource Requests
→
Increased Request Processing
→
Increased Protocol State
→
Resource Consumption
→
Service Degradation Condition
→
Request-Rate Evaluation
→
Excessive Request Detection
→
Rate Enforcement / Resource Restriction
→
Security Event Logging
→
Monitoring and Investigation

Security Concept

Request-Rate Enforcement and CoAP Protocol Resource Protection:

Request-rate enforcement establishes a controlled limit on how frequently a client can submit requests to the laboratory CoAP service.

The rate-control layer measures requests using attributes such as source identity, source address, target resource, and time window. When the request frequency exceeds the configured laboratory threshold, additional requests are restricted instead of being passed normally to the application resource. Californium native configuration provides a complementary resource-protection layer. MAX_ACTIVE_PEERS limits the number of active peers whose state is maintained, while MAX_PEER_INACTIVITY_PERIOD allows stale peer state to be discarded. MAX_MESSAGE_SIZE limits the maximum payload that can be transferred in a single message, and MAX_RESOURCE_BODY_SIZE limits resource-body size accepted for transparent blockwise transfers. Californium also provides controls for server-side observes and blockwise-transfer state.

The secure processing flow is:

Incoming CoAP Request
→
Client / Source Identification
→
Request-Rate Measurement
→
Rate Threshold Evaluation
→
Normal Request
→
Californium Resource Processing
→
Protocol Resource Controls
→
Maximum Peer / Message / Resource / Blockwise Limits
→
Normal CoAP Response

Defensive Mechanism

Request-Rate Enforcement

A controlled application-level rate-enforcement layer measures the number of requests received from a client within a defined time window.

Purpose

Prevent excessive request rates from continuously reaching the Californium application-processing layer.

Per-Client Request Tracking

Requests are tracked using the source identity or address associated with the laboratory CoAP client.

Purpose

Identify which client is generating abnormal request volume.

Rate Threshold Evaluation

The security layer compares the observed request rate against the configured laboratory threshold.

Purpose

Distinguish normal CoAP activity from excessive request behavior.

Excessive Request Restriction

Requests exceeding the defined rate threshold are restricted before normal resource processing.

Purpose

Reduce the processing load generated by a request-flooding source.

Maximum Active Peer Control

Californium MAX_ACTIVE_PEERS limits the number of active peers for which CoAP state is maintained. Californium documents this control as a way to make memory consumption more predictable.

Purpose

Limit excessive peer-state consumption.

Peer Inactivity Control

Californium MAX_PEER_INACTIVITY_PERIOD controls when inactive peers become stale and associated state can be discarded.

Purpose

Prevent stale peer state from remaining indefinitely.

Maximum Message-Size Control

Californium MAX_MESSAGE_SIZE limits the payload size that can be transferred in a single CoAP message.

Purpose

Limit excessive per-message resource consumption.

Maximum Resource-Body Control

Californium MAX_RESOURCE_BODY_SIZE limits resource-body size accepted during transparent blockwise transfers and is documented as a safeguard against excessive memory consumption.

Purpose

Reduce memory exposure from excessively large resource bodies.

Blockwise-State Control

Blockwise-transfer state is restricted through Californium blockwise configuration and status lifetime controls.

Purpose

Prevent excessive persistence of incomplete blockwise exchanges.

Server-Side Observe Limit

Californium provides MAX_SERVER_OBSERVES to limit the number of observations supported by a CoAP server.

Purpose

Restrict excessive observation-state consumption.

Protocol Exchange Lifetime Control

CoAP exchange lifetime and related timeout controls are configured according to the laboratory service requirements.

Purpose

Limit how long protocol state remains active.

Security Event Monitoring

Request-rate violations and relevant Californium service activity are recorded for security monitoring.

Purpose

Detect and investigate abnormal CoAP request behavior.

Centralized Security Investigation

Relevant request-flooding telemetry is forwarded to centralized analysis infrastructure.

Purpose

Correlate request-rate violations with service and host activity.

Security Tools

IoT CoAP Framework: Eclipse Californium

Eclipse Californium provides the controlled CoAP server framework for the laboratory IoT service. It is a Java-based CoAP framework intended for IoT and constrained environments.

Purpose
  • Host the laboratory CoAP service.
  • Process CoAP requests.
  • Provide configurable protocol controls.
  • Maintain controlled CoAP resources.
  • Support request-flooding validation.

CoAP Server: Californium CoAP Endpoint

The Californium endpoint exposes the synthetic laboratory IoT resources used during the security test.

Purpose
  • Receive CoAP requests.
  • Process legitimate IoT resource requests.
  • Apply protocol resource controls.
  • Generate controlled CoAP responses.
  • Provide the target for request-flooding validation.

Request-Rate Enforcement Layer: Custom Java Rate-Control Component

A lightweight application-level rate-control component is placed before the protected CoAP resource-processing logic.

Purpose
  • Measure request frequency within a defined time window.
  • Track requests by client source identity or address.
  • Compare observed request rates with the configured threshold.
  • Restrict excessive requests before normal resource processing.
  • Record rate-limit violations for security monitoring.

Security Testing Platform: Kali Linux

Kali Linux provides the controlled environment for generating authorized request-flooding traffic.

Purpose
  • Generate controlled CoAP traffic.
  • Test request-rate enforcement.
  • Measure response behavior.
  • Validate resource controls.
  • Perform post-remediation testing.

Network Analysis Tool: Wireshark

Wireshark is used to inspect the controlled CoAP network traffic between the Kali testing system and the Californium server.

Purpose
  • Capture CoAP packets.
  • Measure request frequency.
  • Observe response patterns.
  • Verify restricted traffic behavior.
  • Preserve network evidence.

Security Monitoring Tool: Wazuh

Wazuh monitors the Ubuntu host and relevant Californium security activity.

Purpose
  • Monitor application logs.
  • Detect rate-limit violations.
  • Monitor abnormal request activity.
  • Generate security alerts.
  • Support investigation.

Security Analytics Tool: OpenSearch

OpenSearch provides centralized analysis of request-flooding security events.

Purpose
  • Search request-rate violations.
  • Correlate request timestamps.
  • Investigate source activity.
  • Analyze security events.
  • Preserve the attack timeline.

Operating System: Ubuntu Linux

Ubuntu provides the controlled environment hosting the Californium IoT service.

Purpose
  • Host Java and Californium.
  • Run the CoAP service.
  • Store application logs.
  • Execute security controls.
  • Provide host security telemetry.

Virtualization Platform: VirtualBox

VirtualBox provides the isolated laboratory infrastructure.

Purpose
  • Host Ubuntu and Kali Linux.
  • Isolate CoAP testing.
  • Provide controlled networking.
  • Support repeatable security experiments.
  • Prevent impact on external IoT systems.

Process

STEP 01

Step 1: Prepare the Isolated IoT Security Laboratory

  • Create the Ubuntu Linux virtual machine for the Californium CoAP service.
  • Prepare the Kali Linux security-testing virtual machine.
  • Configure isolated laboratory networking.
  • Assign controlled laboratory IP addresses.
  • Verify communication between the two laboratory systems.
  • Confirm that all request-flooding testing remains restricted to the authorized environment.
Tools: VirtualBox + Ubuntu + Kali Linux
STEP 02

Step 2: Install the Java Runtime Environment

  • Install the required Java runtime and development environment on Ubuntu.
  • Verify the installed Java version.
  • Configure the Java environment variables where required.
  • Verify that Java applications can execute normally.
  • Record the environment information for reproducibility.
Tools: Java + Ubuntu
STEP 03

Step 3: Deploy Eclipse Californium

  • Obtain the approved Californium source or package for the laboratory.
  • Build or install the Californium application.
  • Start the controlled CoAP server.
  • Verify that the CoAP endpoint is listening.
  • Record the Californium version used in the laboratory.
Tools: Eclipse Californium + Java + Ubuntu
STEP 04

Step 4: Create the Synthetic IoT Resource

  • Create a controlled CoAP resource representing a laboratory sensor.
  • Define a simple resource path.
  • Configure a safe response payload.
  • Verify normal GET access to the resource.
  • Verify that the resource does not contain real device or personal information.
Tools: Californium + Java + Ubuntu
STEP 05

Step 5: Establish the Normal CoAP Traffic Baseline

  • Generate normal CoAP requests from the laboratory client.
  • Record the normal request frequency.
  • Record response times and response codes.
  • Capture representative CoAP packets.
  • Record normal Californium application activity.
  • Preserve the baseline for comparison with flooding tests.
Tools: Californium cf-client + Wireshark + Ubuntu + Kali Linux
STEP 06

Step 6: Establish the Californium Resource Baseline

  • Inspect the active Californium CoAP configuration.
  • Record the maximum active-peer setting.
  • Record the maximum message-size setting.
  • Record the maximum resource-body-size setting.
  • Record peer inactivity and blockwise settings.
  • Record the configured server-side observe limit where applicable.
Tools: Californium Configuration + Ubuntu
STEP 07

Step 7: Implement the Request-Rate Enforcement Layer

  • Add the controlled request-rate enforcement component to the laboratory application.
  • Define a request-counting time window.
  • Define a laboratory request-rate threshold.
  • Associate incoming requests with their source identity or address.
  • Configure the component to permit normal traffic while restricting excessive traffic.
Tools: Java + Californium + Custom Rate-Control Component
STEP 08

Step 8: Implement Request-Rate Security Logging

  • Record each rate-limit violation.
  • Record the source identity or address.
  • Record the affected CoAP resource.
  • Record the request timestamp.
  • Record the observed request count and configured threshold.
  • Store the security event in the controlled Ubuntu environment.
Tools: Java Logging + Californium + Ubuntu
STEP 09

Step 9: Configure Maximum Active-Peer Protection

  • Configure Californium maximum active-peer value according to the laboratory workload.
  • Restart the service using the updated configuration.
  • Verify the resulting active-peer behavior.
  • Generate controlled connections from multiple laboratory sources where appropriate.
  • Record the resource-management behavior.
Tools: Californium + CoAP Configuration + Ubuntu
STEP 10

Step 10: Configure Message and Resource-Body Controls

  • Configure the maximum CoAP message size appropriate for the laboratory resource.
  • Configure the maximum resource-body size.
  • Configure blockwise-transfer limits appropriate for the application.
  • Test normal resource requests after applying the limits.
  • Verify that requests exceeding the controlled limits are not processed as normal application traffic.
Tools: Californium + CoAP Configuration + Ubuntu
STEP 11

Step 11: Configure Peer Inactivity and Protocol-State Controls

  • Configure the maximum peer inactivity period.
  • Configure the required exchange and blockwise state lifetimes.
  • Verify that stale state is eventually removed.
  • Monitor the controlled service during repeated requests.
  • Record the resulting protocol-state behavior.
Tools: Californium + CoAP Configuration + Ubuntu
STEP 12

Step 12: Configure Server-Side Observe Protection

  • Identify whether the laboratory application uses CoAP Observe.
  • Configure the maximum server-side observe limit where Observe is enabled.
  • Generate controlled observation registrations.
  • Verify that legitimate observations continue to operate.
  • Verify that the configured observation limit is enforced.
Tools: Californium + CoAP Observe + Ubuntu
STEP 13

Step 13: Configure Wazuh Security Monitoring

  • Configure Wazuh on the Ubuntu laboratory system.
  • Collect Californium application logs.
  • Collect request-rate enforcement events.
  • Monitor relevant host activity.
  • Create detection logic for repeated rate-limit violations.
  • Generate a controlled test event and verify Wazuh visibility.
Tools: Wazuh + Californium + Ubuntu
STEP 14

Step 14: Configure OpenSearch Security Investigation

  • Forward relevant Wazuh events to OpenSearch.
  • Create searches for rate-limit violations.
  • Create searches for repeated requests from the same source.
  • Correlate request timestamps with Californium events.
  • Verify that the complete request-flooding sequence can be reconstructed.
Tools: Wazuh + OpenSearch
STEP 15

Step 15: Generate the Controlled CoAP Request-Flooding Traffic

  • Use Kali Linux as the authorized security-testing platform.
  • Generate repeated requests against the laboratory CoAP resource.
  • Gradually increase the request frequency within the controlled environment.
  • Record request counts and response behavior.
  • Capture the traffic with Wireshark.
  • Do not target external or production IoT systems.
Tools: Kali Linux + Californium cf-client + Wireshark
STEP 16

Step 16: Validate Request-Rate Enforcement

  • Verify that normal request rates continue to receive valid responses.
  • Increase the request frequency beyond the configured laboratory threshold.
  • Verify that excessive requests trigger the rate-enforcement mechanism.
  • Record restricted requests and rate-limit events.
  • Compare the protected behavior with the initial baseline.
  • Verify that the Californium application remains responsive to legitimate requests.
Tools: Californium + Rate-Control Component + Kali Linux + Wireshark
STEP 17

Step 17: Validate Protocol Resource Controls

  • Repeat the controlled traffic test against the protected Californium configuration.
  • Monitor active-peer state.
  • Monitor message and resource-body limits.
  • Monitor blockwise and observation state where applicable.
  • Verify that stale protocol state is removed according to the configured limits.
  • Confirm that legitimate CoAP functionality remains available.
Tools: Californium + CoAP Configuration + Wireshark + Ubuntu
STEP 18

Step 18: Investigate and Remediate the Request-Flooding Event

  • Review Californium request and rate-limit logs.
  • Review Wazuh alerts associated with the test.
  • Search OpenSearch for related events.
  • Correlate source, timestamp, request volume, and restriction events.
  • Confirm that the observed event matches the controlled flooding scenario.
  • Adjust the laboratory rate threshold or protocol resource limits if validation identifies excessive resource consumption.
  • Repeat the protected test after the configuration adjustment.
Tools: Californium + Wazuh + OpenSearch + Ubuntu
STEP 19

Step 19: Perform Final CoAP Request-Flooding Protection Validation

  • Repeat the normal CoAP traffic baseline.
  • Repeat the controlled request-flooding scenario.
  • Verify request-rate enforcement.
  • Verify per-client request tracking.
  • Verify maximum active-peer protection.
  • Verify peer inactivity controls.
  • Verify maximum message-size protection.
  • Verify maximum resource-body protection.
  • Verify blockwise-transfer state controls.
  • Verify server-side observe limits where applicable.
  • Verify Wazuh monitoring.
  • Verify OpenSearch investigation.
  • Verify that legitimate CoAP requests continue to operate.
  • Verify that excessive request activity is restricted.
  • Preserve the final network captures, security logs, configuration evidence, and validation results.
Tools: Eclipse Californium + Californium cf-client + Java + Wireshark + Wazuh + OpenSearch + Kali Linux + Ubuntu

Outcome

  1. A controlled Eclipse Californium CoAP IoT service is successfully deployed on Ubuntu Linux within an isolated VirtualBox laboratory.
  2. A synthetic IoT resource is established, and a normal CoAP traffic baseline is recorded for comparison with abnormal request-flooding behavior.
  3. A controlled CoAP request-flooding scenario is successfully reproduced using the authorized Kali Linux testing environment without targeting external or production IoT systems.
  4. An application-level request-rate enforcement layer is implemented to identify and restrict excessive request frequencies before they continuously reach the protected application resource.
  5. Californium protocol-resource controls are configured to limit active peer state, message size, resource-body size, peer inactivity, blockwise-transfer state, and server-side observation state where applicable.
  6. Wireshark provides packet-level evidence of normal and excessive CoAP request patterns and allows the request-rate enforcement behavior to be validated at the network level.
  7. Wazuh provides monitoring and alerting for rate-limit violations and relevant Californium security activity, while OpenSearch provides centralized investigation and correlation of the request-flooding timeline.
  8. Post-remediation testing confirms that excessive CoAP request activity is restricted while legitimate IoT resource requests continue to receive normal service.
  9. The combined request-rate and protocol-resource controls reduce the amount of application and protocol state that can be consumed by abnormal request activity, providing layered protection against controlled CoAP request-flooding conditions.
  10. The complete Eclipse Californium CoAP request-flooding detection and prevention workflow is successfully demonstrated, covering IoT service deployment, normal traffic baseline, request-rate enforcement, active-peer protection, message and resource-body limits, peer-state management, blockwise and observe controls, controlled flooding validation, Wazuh monitoring, OpenSearch investigation, remediation, and final security validation.