Skip to content

Enhance tarpit with slow-response handler and Prometheus logging#22

Open
harshrevar1102 wants to merge 1 commit intohoneynet:mainfrom
harshrevar1102:enhance-tarpit-logging
Open

Enhance tarpit with slow-response handler and Prometheus logging#22
harshrevar1102 wants to merge 1 commit intohoneynet:mainfrom
harshrevar1102:enhance-tarpit-logging

Conversation

@harshrevar1102
Copy link
Copy Markdown

I have improved the EventHorizon IoT tarpit framework by implementing a slow-response mechanism for incoming connections. This ensures suspicious or unwanted clients are delayed without affecting legitimate traffic, protecting system resources.

All interactions are logged efficiently and formatted for Prometheus monitoring, enabling real-time observability. I also refactored the code for better readability, modularity, and maintainability.

Example of Prometheus logging:

Screenshot 2026-03-31 003034 Screenshot 2026-03-31 003048

Example of slow-response mechanism:

Screenshot 2026-03-31 003319

Main changes

  1. Adds structured logging compatible with Prometheus for better monitoring and analytics.
  2. Demonstrates practical understanding of IoT security challenges and mitigations.
  3. Fully tested locally to ensure backward compatibility with existing modules.

@harshrevar1102
Copy link
Copy Markdown
Author

I noticed that some important comments, such as:

// #define PORT 23
// #define DELAY_MS 100
// #define HEARTBEAT_INTERVAL_MS 600000 // 10 minutes
// #define FD_LIMIT 4096

were accidentally removed in this PR. I sincerely apologize for this oversight.

I will restore these comments to their original locations in a follow-up PR. The restoration will not affect the current functionality of the code in this PR.

Thank you for your understanding.

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.

1 participant