Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rustedr-light

rustedr-light es un detector ligero de procesos para Linux con reglas declarativas en JSON, salida en texto o JSONL y modo daemon con deduplicación de alertas.

Qué hace ahora

  • Escanea procesos y recoge pid, parent pid, nombre, comando, ejecutable y memoria.
  • Evalúa reglas configurables por campo (command, name, executable) y por tipo de match (contains, regex, equals, starts_with, ends_with).
  • Filtra por severidad mínima y puede escribir a stdout o a fichero.
  • Tiene modo scan, daemon, list-rules y validate-rules.
  • Incluye tests unitarios para el motor de reglas y la deduplicación en runtime.

Uso rápido

cargo run -- scan
cargo run -- scan --show-processes
cargo run -- daemon --iterations 3 --interval-secs 2
cargo run -- --format json --output alerts.jsonl scan
cargo run -- list-rules
cargo run -- validate-rules

Configuración opcional

Se puede cargar un JSON con overrides globales:

{
  "rules": "rules/default_rules.json",
  "format": "json",
  "output": "output/alerts.jsonl",
  "min_severity": "medium",
  "max_cmd_len": 320,
  "daemon_interval_secs": 5,
  "alert_cooldown_secs": 120,
  "max_alerts_per_scan": 100
}

Ejemplo:

cargo run -- --config config.json daemon --iterations 5

Reglas

Formato base:

{
  "metadata": {
    "name": "custom-rules",
    "version": "1.0"
  },
  "rules": [
    {
      "id": "curl-pipe-shell",
      "description": "Curl piping directly into a shell",
      "severity": "high",
      "field": "command",
      "match_mode": "regex",
      "pattern": "\\bcurl\\b.+\\|\\s*(?:ba|z)?sh\\b",
      "tags": ["download", "execution"],
      "enabled": true
    }
  ]
}

Validación

Los tests relevantes se ejecutan con:

cargo test

About

Light Rust EDR

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages