π‘οΈ Abuse Prevention¶
Siyarix is a powerful tool, and I want to make sure it's used safely. To help prevent accidental damage or misuse, I've built in some layers of abuse prevention. These layers operate to try to catch mistakes and keep things reasonable.
π° The Layers of Prevention¶
Think of it like a multi-layered cake:
βββββββββββββββββββββββββββββββββββββββββββ
β Command-Level Prevention β
β ββββββββββββ ββββββββββββ β
β β Danger β β Syntax β β
β β Analysis β β Check β β
β ββββββββββββ ββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββ€
β System-Level Prevention β
β ββββββββββββ ββββββββββββ ββββββββββββ β
β βKill Sw. β β Safe β β OPSEC β β
β β(emer- β β Mode β β Evade β β
β β gency) β β β β β β
β ββββββββββββ ββββββββββββ ββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββ€
β Audit-Level Prevention β
β ββββββββββββ ββββββββββββ β
β βAudit Log β β Session β β
β β(chain) β β Log β β
β ββββββββββββ ββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββ
Tip
These layers mostly operate automatically, so you don't need to configure much out of the box.
1. π Danger Analysis¶
Before a command runs, permission_gate.py checks it against some common dangerous patterns.
PATTERNS = {
"destructive_disk": r"\b(dd|mkfs|format|mkswap|parted)\b.*(if=|/dev/)",
"recursive_delete": r"\brm\b.*\s(-rf|/\s*\*)",
"network_flood": r"\b(ping|hping3|nping)\b.*(-f|--flood)",
"fork_bomb": r":\(\)\s*\{.*:\|:&\};:",
"priv_escalation": r"\bsudo\b.*(\!\!|su\s*-)",
}
It blocks things like accidental disk formatting or recursive file deletion.
2. π§ The Permission Gate¶
Commands go through a review process:
Command β Syntax Gate β Danger Analysis β Result
The gate returns ALLOW, FLAG (asking you), or DENY.
3. π€ Data Loss Prevention (DLP) Engine¶
To help avoid accidentally sending your local secrets to cloud AI providers, the dlp.py engine tries to mask basic patterns (like SSH keys or AWS keys) locally before the prompt is sent.
Info
The DLP is a helpful safety net, but always be careful what you type into chat prompts!
4. π¨ Emergency Stop (Kill Switch)¶
If things get out of hand:
- Press Ctrl+C once: Cancels the current task.
- Press Ctrl+C twice: Halts Siyarix completely.
5. π¦Ί Safe Mode¶
If you just want to run passive tools:
In Safe Mode: - Only reconnaissance is allowed. - Destructive commands are blocked. - The Permission Gate is stricter.
6. π₯· OPSEC Controls¶
Siyarix has some built-in evasion controls via opsec.py for testing, such as TOR routing or jittered requests.
7. π System-Level Security Hardening¶
For advanced setups, security_hardening.py adds basic OS protections like checking for excessive permissions.
8. π The Audit Trail¶
Transparency is key. Safety events are logged in an audit log.
| Event Type | What gets logged |
|---|---|
| Blocked Command | The command and the matched pattern. |
| Emergency Stop | The trigger reason and timestamp. |
| Safe Mode Violation | The attempted command. |
| DLP Redaction | The type of pattern redacted, but never the actual secret. |