Skip to content
KitploitKITPLOIT
HerramientasBlog
Enviar
HerramientasBlog
Enviar

¡Herramientas de Hacking, PenTest y Ciberseguridad para tu Arsenal de Seguridad!

Kitploit es un directorio de herramientas de hacking, ciberseguridad y pentesting. Descubre las últimas actualizaciones de proyectos para encontrar vulnerabilidades, analizar sistemas, automatizar pruebas y fortalecer tu seguridad.

··Feeds·Contacto·Privacidad·© 2026 Kitploit

Directorio de Herramientas

Categorías

Ver todas las categorías
Loading categories
SysTrace — Linux system-call monitor using ptrace to trace file, process, network, and memory activity, with namespace isolation and machine learning classification for behavioral security analysis. | Kitploit
Herramientas/GitHubGitHub/tracebyte8/systrace
Dynamic Analysis (Sandboxing)Malware AnalysisMachine LearningAnomaly Detection
GitHubtracebyte8/systrace

SysTrace

Linux system-call monitor using ptrace to trace file, process, network, and memory activity, with namespace isolation and machine learning classification for behavioral security analysis.

Ver Repositorio
24259hace 12 díasRevisado por Kitploit

Más Populares

Ver todos →

Descubre las herramientas más usadas por nuestra comunidad.

Explora todas las herramientas

Explora nuestra colección de herramientas

Ver todas las herramientas →
Compartir
Contenido no disponible en el idioma solicitado. Mostrando versión en inglés.

SysTrace 2.0

ptrace-based Linux syscall monitor and sandbox for analyzing ELF binaries.

SysTrace runs a target inside an isolated Linux namespace environment, traces its system calls and child processes, applies rule-based detection and weighted risk scoring, then uses a Random Forest classifier as a secondary signal.

Features

  • ptrace syscall tracing
  • Follows fork, vfork, clone, and execve
  • Linux user, PID, and mount namespaces
  • Minimal pivot_root sandbox
  • File, process, memory, and network monitoring
  • Per-process and aggregate syscall statistics
  • Rule-based detection with SIGKILL enforcement
  • Weighted risk score from 0–100
  • Random Forest ML classification
  • HTML security report
  • JSON and text logs
  • Raw syscall trace
  • Quick Start

    Clone the repository:

    root@kitploit:~
    git clone https://github.com/tracebyte8/SysTrace.git
    cd SysTrace
    

    Make the configuration script executable:

    root@kitploit:~
    chmod +x config.sh
    

    Run SysTrace against a compiled ELF binary:

    root@kitploit:~
    ./config.sh ./tests/bin/mal_fileopen
    

    config.sh automatically:

    1. Checks gcc, make, and python3
    2. Creates .venv
    3. Installs the required Python dependencies
    4. Builds SysTrace
    5. Runs the target through the monitor
    6. Generates the security report

    No manual Python package installation is required.

    The target must be an already compiled ELF binary. A .c source file cannot be passed directly.

    Architecture

    root@kitploit:~
    Target ELF
        │
        ▼
    Namespace Sandbox
        │
        ├── CLONE_NEWUSER
        ├── CLONE_NEWPID
        ├── CLONE_NEWNS
        └── pivot_root
        │
        ▼
    ptrace Tracer
        │
        ├── Syscall tracing
        ├── fork/vfork/clone following
        └── exec following
        │
        ▼
    System Call Monitors
        │
        ├── File
        ├── Process
        ├── Memory
        └── Network
        │
        ▼
    Statistics
        │
        ▼
    Rule Engine
        │
        ├── Alerts
        └── SIGKILL enforcement
        │
        ▼
    Risk Scoring
        │
        ├── features.json
        │
        └── Random Forest
                 │
                 ▼
          security_report.html
    

    What It Monitors

    CategoryTracked syscalls
    Fileopen, openat, read, close
    Processexecve, fork, clone, wait4, ptrace
    Memorymmap, mprotect
    Networksocket, connect, sendto, recvfrom, bind, listen, accept

    Other syscalls are also written to syscall.txt when their names are available in the syscall table.

    Detection Rules

    TriggerConditionAction
    Sensitive file access/etc/passwd or /etc/shadowAlert + SIGKILL
    Excessive file opensopen > 100Alert + SIGKILL
    Excessive readsread > 29Alert + SIGKILL
    Excessive forkingfork/clone > 8Alert + SIGKILL
    Excessive re-executionexecve > 8Alert + SIGKILL
    Network connectionAny connect()Alert + SIGKILL
    Network sendTracked send syscallAlert + SIGKILL
    Memory protection changemprotect > 5Alert + SIGKILL
    Cross-process tracingAny ptrace()Alert + SIGKILL
    High riskScore ≥ 70Alert + SIGKILL
    Moderate risk40 ≤ score < 70Alert

    killit records SIGKILL actions performed by the rule engine.

    Risk Scoring

    SysTrace calculates a weighted behavioral score:

    root@kitploit:~
    score =
        (sum of weighted syscall counts)
        / (total syscalls × 6.0)
        × 100
    

    The score is clamped to 0–100.

    If the rule engine kills a process, the risk score is forced to at least 90.

    Weights

    BehaviorWeight
    ptrace6.0
    connect5.0
    network4.0
    execve3.0
    mprotect3.0
    fork2.0
    process1.5
    open0.5
    mmap0.5
    file0.3
    read0.2
    close0.1

    Machine Learning

    SysTrace uses a Random Forest classifier as a secondary behavioral signal.

    The model is located at:

    root@kitploit:~
    ml/syscall_model.pkl
    

    The monitored syscall statistics are exported to:

    root@kitploit:~
    features.json
    

    ml/predict.py reads the latest feature record and produces:

    root@kitploit:~
    prediction.txt
    

    Example:

    root@kitploit:~
    Program: ./tests/bin/mal_fileopen
    
    Prediction: MALICIOUS
    Confidence: 91.42%
    

    The ML result should be treated as a secondary signal, not a definitive verdict.

    The repository does not ship the original training dataset or published model accuracy.

    Reports and Logs

    FileDescription
    security_report.htmlFinal HTML security report
    alerts.jsonJSON security alerts
    features.jsonML feature records
    prediction.txtLatest ML prediction
    log.txtHuman-readable alerts
    syscall.txtRaw syscall trace

    features.json, alerts.json, log.txt, and syscall.txt accumulate records across runs.

    security_report.html and prediction.txt are overwritten on each run.

    Dashboard

    SysTrace Dashboard

    The HTML report contains:

    • Rule engine score
    • ML prediction
    • ML confidence
    • Final danger percentage
    • Security events
    • Behavioral statistics

    Project Structure

    root@kitploit:~
    SysTrace/
    ├── src/
    │   ├── tracer.c
    │   ├── namespace.c
    │   ├── set_root.c
    │   ├── file_monitor.c
    │   ├── process_monitor.c
    │   ├── memory_monitor.c
    │   ├── network_monitor.c
    │   ├── rules.c
    │   ├── score.c
    │   ├── stat.c
    │   └── dataset.c
    │
    ├── include/
    ├── dashboard/
    │   ├── index.c
    │   └── style.css
    │
    ├── ml/
    │   ├── train.py
    │   ├── predict.py
    │   └── syscall_model.pkl
    │
    ├── tests/
    │   └── bin/
    │
    ├── image/
    ├── Makefile
    ├── config.sh
    └── README.md
    

    Build Manually

    If you do not want to use config.sh:

    root@kitploit:~
    make
    

    Clean the project:

    root@kitploit:~
    make clean
    

    Rebuild:

    root@kitploit:~
    make re
    

    Manual Python setup:

    root@kitploit:~
    python3 -m venv .venv
    source .venv/bin/activate
    pip install numpy scikit-learn
    

    Test Programs

    ProgramBehavior
    benign_idle.cSleeps and exits
    benign_fileread.cCreates, reads, and removes a temporary file
    mal_fileopen.cOpens/reads/closes multiple files
    mal_forkbomb.cCreates a capped number of children
    mal_connect.cAttempts multiple network connections
    mal_mmap_mprotect.cRepeated mmap/mprotect operations

    Example:

    root@kitploit:~
    ./config.sh ./tests/bin/mal_forkbomb
    

    Then open:

    root@kitploit:~
    xdg-open security_report.html
    

    Security and Limitations

    SysTrace is a research/learning dynamic-analysis tool, not a hardened security boundary or production EDR.

    Important limitations:

    • Only a single target is analyzed per run.
    • Enforcement occurs through SIGKILL after detection; it is not kernel-level syscall blocking.
    • The sandbox uses Linux user/PID/mount namespaces and pivot_root.
    • Unprivileged user namespaces must be enabled.
    • The minimal root filesystem contains only the target and selected runtime libraries.
    • Dynamically linked binaries with additional dependencies may fail inside the sandbox.
    • The sandbox runtime currently assumes x86-64 library paths.
    • File-descriptor tracking is global rather than PID-scoped.
    • The ML model has no published accuracy guarantee.
    • The rule engine and ML classifier can produce false positives and false negatives.
    • The sandbox should not be treated as a replacement for a VM or hardened container.

    Run SysTrace only against binaries you own or are authorized to analyze.

    For untrusted binaries, use a dedicated VM or other appropriately isolated environment.

    Version

    SysTrace 2.0

    Descargar herramienta