You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lightweight Endpoint Detection and Response (EDR) tool for Linux systems.
8
+
A lightweight yet comprehensive Endpoint Detection and Response (EDR) solution for Linux systems that monitors command execution, analyzes system behavior, and provides actionable security insights with minimal performance impact.
9
9
10
-
## Features
10
+
## Overview
11
11
12
-
- Non-blocking trace reader for `/sys/kernel/tracing/trace_pipe`
13
-
- Thread-safe event aggregation with memory protection
14
-
- Process-focused event collection and grouping
15
-
- Scheduled summarization and reporting every 15 minutes
16
-
- OpenAI integration (gpt-4o-mini) for automated threat analysis
17
-
- Configurable output formats (JSON, console)
18
-
- Flexible configuration via config.ini
19
-
- Type-safe implementation with comprehensive error handling
20
-
- Privacy-respecting design (see [Privacy Policy](PRIVACY.md))
12
+
Linux EDR captures process execution data through Linux's kernel tracing capabilities and builds a multi-tiered reporting structure that allows for both real-time threat detection and long-term security trend analysis. By focusing on command execution patterns, it provides valuable security insights without the overhead of traditional EDR solutions.
13
+
14
+
## Key Features
15
+
16
+
-**Efficient Monitoring**: Non-blocking trace reader for `/sys/kernel/tracing/trace_pipe` with automatic recovery
17
+
-**Scalable Architecture**: Thread-safe event buffer with configurable capacity and age limits
18
+
-**Smart Data Organization**: Process-focused event collection and intelligent command grouping
19
+
-**Hierarchical Reporting**: Tiered reports from 15-minute snapshots to monthly trend analysis
20
+
-**AI-Enhanced Security**: OpenAI integration with gpt-4o-mini for automated threat detection
21
+
-**Flexible Output**: Configurable reporting to JSON files or console
22
+
-**Production-Ready**: Comprehensive error handling with graceful recovery from failures
23
+
-**Privacy-Focused**: Collects only necessary command execution data (see [Privacy Policy](PRIVACY.md))
21
24
22
25
## Installation
23
26
@@ -47,7 +50,7 @@ linux-edr show-config
47
50
48
51
## Data Structure
49
52
50
-
Linux EDR groups execve events by process name and maintains the full command:
53
+
Linux EDR groups execve events by process name and maintains the full command line for context:
51
54
52
55
```json
53
56
{
@@ -106,28 +109,28 @@ include_raw_events = true
106
109
107
110
## Hierarchical Reporting Architecture
108
111
109
-
Linux EDR uses a hierarchical reporting system to provide insights at different time scales:
112
+
Linux EDR implements a sophisticated multi-tiered reporting system that provides security visibility across different time scales:
-**Context-rich pattern recognition** at the Block level
125
+
-**Daily security posture assessment** in DailyReports
126
+
-**Trend identification** in WeeklyReports
127
+
-**Strategic security planning** with MonthlyReports
125
128
126
-
All reports are stored in JSON format under the configured `reports_dir` with subdirectories for each level.
129
+
All reports are automatically stored in JSON format in the configured `reports_dir` with appropriate subdirectories for each level.
127
130
128
131
## Systemd Service
129
132
130
-
Linux EDR can be run as a systemd service:
133
+
Linux EDR can be deployed as a systemd service for continuous monitoring:
131
134
132
135
1. Copy the service file to systemd directory:
133
136
```bash
@@ -151,66 +154,68 @@ Linux EDR can be run as a systemd service:
151
154
sudo systemctl status linux-edr.service
152
155
```
153
156
154
-
## Automated Analysis
157
+
## Automated Security Analysis
155
158
156
-
The tool sends process execution data to OpenAI's gpt-4o-mini model for analysis every 15 minutes (configurable). The AI looks for suspicious patterns like:
159
+
Linux EDR leverages OpenAI's gpt-4o-mini model to analyze process execution patterns and identify potential security threats. The analysis focuses on:
157
160
158
-
- Unusual command execution patterns
161
+
- Unusual command execution patterns and frequencies
159
162
- Potential privilege escalation attempts
160
-
-Data exfiltration attempts
161
-
-Unusual network access
162
-
- Suspicious file operations
163
+
-Command sequences indicating data exfiltration
164
+
-Anomalous network access patterns
165
+
- Suspicious file operations or permission changes
163
166
164
-
Analysis results are saved alongside the JSON reports with the `.analysis` extension.
167
+
Analysis results are saved alongside JSON reports with the `.analysis` extension, providing actionable insights without requiring manual review of raw data.
165
168
166
169
## Privacy and System Impact
167
170
168
-
Linux EDR is designed to be non-invasive and privacy-respecting:
171
+
Linux EDR is designed with privacy and performance in mind:
169
172
170
-
-Only monitors execve syscalls, not file contents or keystrokes
171
-
- Stores data locally by default
172
-
- Transmits data externally only with explicit configuration
173
-
- Uses minimal system resources
174
-
-Gracefully handles various error conditions
175
-
- See our full [Privacy Policy](PRIVACY.md)
173
+
-Collects only process execution data, not file contents or user input
174
+
- Stores data locally by default with configurable retention
175
+
- Transmits data externally only when explicitly configured
176
+
- Uses non-blocking I/O and efficient buffering to minimize CPU usage
177
+
-Implements backpressure mechanisms to handle high-volume events
178
+
- See the full [Privacy Policy](PRIVACY.md) for details
176
179
177
-
## Error Handling
180
+
## Advanced Error Handling
178
181
179
-
Linux EDR includes comprehensive error handling to ensure reliable operation:
182
+
To ensure reliable operation in production environments, Linux EDR includes:
180
183
181
-
- Graceful handling of missing trace_pipe (waits for it to become available)
182
-
- Proper permission error reporting
183
-
- Automatic reopening of trace files if they become unavailable
184
-
- Configurable logging levels and rotation
185
-
- Thread-safe operations with proper resource cleanup
184
+
- Smart retry logic for trace pipe access with configurable backoff
185
+
- Graceful handling of permission errors with clear guidance
186
+
- Automatic reconnection if trace sources become unavailable
187
+
- Thread-safe operations with proper resource management
188
+
- Comprehensive logging with configurable verbosity
189
+
- Clean shutdown mechanisms that preserve data integrity
186
190
187
191
## Requirements
188
192
189
193
- Python 3.11 or later
190
-
-[uv](https://github.com/astral-sh/uv)(required for all dependency management and installation)
194
+
-[uv](https://github.com/astral-sh/uv) for dependency management
191
195
- Linux kernel with ftrace support
192
-
- Appropriate permissions to read from trace_pipe (typically root)
196
+
- Appropriate permissions to read from trace_pipe (typically requires root)
0 commit comments