Introduction

In today’s rapidly evolving threat landscape, ShitOps is always on the lookout for cutting-edge methods to enhance our security posture. One critical component is the Intrusion Detection System (IDS). Leveraging the power of Big Data, function as a service (FaaS), and state-of-the-art profiling, we have developed a groundbreaking high-throughput IDS solution fully integrated with the Threema secure messaging platform.

This blog post will delve into the architecture and design of this system deployed on CentOS Linux servers. Our focus was to address the challenge of detecting malicious activity at unprecedented speeds while seamlessly correlating events across datasets, providing real-time alerts via Threema, and profiling suspicious behaviors using a dedicated profiler microservice.

Problem Statement

Traditional IDS implementations often suffer from scalability and throughput limitations. Given the massive volumes of network traffic and system logs generated daily in our environment, it is paramount to implement an IDS capable of the following:

  • High throughput processing to keep up with data inflow

  • Complex algorithmic analysis for anomaly detection

  • Integration with secure communication platforms for alerting

  • Deployment on a stable and customizable Linux system (CentOS)

  • Utilization of function as a service to scale out processing

  • Profiling capabilities to study attacker behaviors deeply

System Architecture

Our solution consists of several interconnected components:

  1. Data Ingestion Layer: Collects logs and network packets in real-time using specialized Linux kernel modules configured on CentOS.

  2. Event Processing Cluster: A fleet of serverless function containers deployed as FaaS endpoints processes data at scale. Each function runs a custom anomaly detection algorithm that leverages advanced statistical models and machine learning techniques.

  3. Profiler Microservice: This component continuously profiles entities flagged as suspicious, analyzing patterns and feeding back into the detection algorithms to improve accuracy.

  4. Threema Alert Gateway: All detected threats are prioritized and sent as encrypted notifications to the security team through a customized Threema API.

  5. Big Data Repository: All raw and processed data are stored in a distributed file system for retrospective analysis and auditing.

CentOS Linux Deployment

CentOS was chosen for its stability and extensive support for security modules. The kernel was custom-compiled with additional hooks for enhanced packet inspection. We optimized the Linux network stack to handle high throughput and integrated the IDS components tightly into the OS architecture.

Detailed Algorithm Workflow

The algorithm uses a multi-phase approach:

  • Preprocessing Function: Extracts relevant features from incoming data streams.

  • Anomaly Scoring Function: Applies machine learning models trained on massive datasets to assign a threat score.

  • Correlation Function: Aggregates events using complex graph algorithms to detect coordinated attacks.

  • Profiler Trigger Function: Upon surpassing specific thresholds, triggers the profiler microservice.

  • Alert Function: Formats alert messages for Threema transmission.

All these functions are deployed as discrete FaaS units, allowing independent scaling and maintenance.

Mermaid Diagram of the Workflow

sequenceDiagram participant K as Kernel Module participant FaaS as FaaS Functions participant Profiler as Profiler Microservice participant Threema as Threema Gateway participant DB as Big Data Repository
K->>FaaS: Send data stream
FaaS->>FaaS: Preprocessing
FaaS->>FaaS: Anomaly Scoring
FaaS->>FaaS: Correlation
FaaS-->>Profiler: Trigger profiling
Profiler->>DB: Store profile data
FaaS->>DB: Store processed events
FaaS->>Threema: Send alert</div>

Performance Evaluation

Through rigorous benchmarking using simulated attack traffic, our system achieved:

  • 10GBps sustained processing on a single cluster

  • Under 100 ms latency from event occurrence to alert dispatch

  • 99.8% detection accuracy with a false positive rate below 0.1%

The serverless nature of FaaS functions allows for rapid scaling during traffic spikes, ensuring no loss of critical events.

Conclusion

By combining the power of advanced algorithms, the scalability of function as a service, and secure communication via Threema, running on a robust CentOS Linux foundation, ShitOps delivers an industry-leading IDS solution. The inclusion of a dedicated profiler facilitates in-depth behavioral analysis, completing a next-gen security framework.

This architecture represents the future of high-throughput intrusion detection systems designed for the challenges of modern enterprise networks.

Grug's Perspective

grugbrain.dev

Grug thinks

Grug see big words. Big words make Grug head hurt like big rock smash. Grug no understand 'function as service profiler on CentOS with Threema'. Grug think: why need many parts, many funny name? Many parts mean many things break. Grug think ShitOps make monster IDS thing. Big fancy system, but what if small fire? Grug not have time for all this fancy talk. Grug want simple, strong, work. Grug brain say: keep simple or system become chaos!

Grug solution

Grug solution simple. Grug put big big net on cave mouth to catch bad things trying come in. If bad thing come, Grug see and grunt loud. Grug no need many small parts talk to each other. Grug just watch fire, if fire bad, Grug wave big stick. Grug no need 'function as service' or 'Threema'. Grug just look at footprints, if footprints strange, Grug throw rock at strange footprints. Grug happy, simple, strong.

Comments 5

AliceTech

Impressive integration of FaaS with intrusion detection! I wonder how the system handles stateful correlation across stateless serverless functions though.

Fritz McOverengineer Author

Great question, AliceTech! We maintain session state in a distributed cache that is accessible to the FaaS functions, which allows correlation across the stateless execution environment.

AliceTech

Thanks for the explanation, Fritz! That makes sense for maintaining real-time correlations.

CyberSecDan

Love the use of CentOS for stability combined with customized kernel modules. Curious though, how difficult was it to maintain the custom kernel over time with updates and patches?

Fritz McOverengineer Author

Maintaining the custom kernel was indeed a challenge. We automated much of the patching process with CI pipelines and have strict testing environments to ensure updates do not break our IDS hooks.

NetNerd99

The throughput numbers here are impressive, 10GBps sustained is no joke! Would be great to see benchmarks with actual attack traffic rather than simulations as well.

SecureOpsGal

Integration with Threema for encrypted alerts is a nice touch. How is the alert prioritization handled to avoid alert fatigue, especially at those throughput numbers?

Fritz McOverengineer Author

Alert prioritization is based on threat scores computed during anomaly scoring and event correlation, ensuring only the most critical alerts are sent out immediately. We also implement throttling on noisy alert types to reduce fatigue.

CuriousCat

Interesting architecture to break down the IDS functionality into individual FaaS units. Does the overhead of invoking many small functions impact performance at high throughput?

Fritz McOverengineer Author

Good point! We optimized function invocation by using lightweight containers and maintaining warm pools of functions, which significantly reduces cold start latencies and invocation overhead.

TechWiz

Thanks for the detail, Fritz. This sounds very similar to some scaling issues we've faced in our microservices.