mirror of
https://github.com/SHOGGOTH-SECTOR/sica-fondt.git
synced 2026-08-01 16:40:24 +00:00
Place useful parts of the surrounding repos into sica-fondt by layer, per the
body model (Ada = membrane; brain/endocrine/capabilities/knowledge non-Ada):
- brain/ LLM reasoning + providers (dapr, hermes, MoMoA)
- capabilities/ REPRAG sidecars: hermes tools/skills, dapr tools, parallel
dispatch, A51 channels, and the OSINT cluster
- knowledge/ LORAG corpus: 754 cyber-skills, agency personas, secure-coding,
MITRE ATT&CK data
- reference/ defensive threat-reference (C3, shhbruh doc) + AdaYaml parser
License handling: AGPL sources (worldosint, advanced_evolution, mercury,
Reticulum) and GPL DeTTECT are SPEC-only clean-room/port descriptions — no
copyleft code copied. MIT/Apache/data parts copied as working trees.
Safety: shhbruh escape/persistence material and C3 covert-C2 kept as reference
only, not wired into the running organism. See CONSOLIDATION.md.
https://claude.ai/code/session_01UehUqEXXJJCsHoA4voCU5c
45 lines
1.5 KiB
Markdown
45 lines
1.5 KiB
Markdown
# API Reference — Hunting for Scheduled Task Persistence
|
|
|
|
## Libraries Used
|
|
- **subprocess**: Execute `schtasks /query` and `schtasks /query /xml` for task enumeration
|
|
- **csv**: Parse schtasks CSV output for structured task analysis
|
|
- **python-evtx** (Evtx): Parse Security EVTX for Event ID 4698 (Task Created)
|
|
|
|
## CLI Interface
|
|
|
|
```
|
|
python agent.py enumerate # List and risk-score all tasks
|
|
python agent.py events --evtx-file <path> # Scan EVTX for task creation events
|
|
python agent.py export --task-name <name> # Export task XML definition
|
|
```
|
|
|
|
## Core Functions
|
|
|
|
### `enumerate_tasks()`
|
|
Runs `schtasks /query /fo CSV /v` and classifies each task as high/medium/low risk.
|
|
|
|
**Returns:** dict with `total_tasks`, `high_risk`, `medium_risk`, `suspicious_tasks`, `non_vendor_tasks`.
|
|
|
|
### `scan_event_log_4698(evtx_file)`
|
|
Parses Windows Security EVTX for Event ID 4698 (Scheduled Task Created).
|
|
|
|
**Parameters:**
|
|
| Name | Type | Description |
|
|
|------|------|-------------|
|
|
| `evtx_file` | str | Path to Security .evtx log file |
|
|
|
|
### `export_task_xml(task_name)`
|
|
Exports a task's full XML definition using `schtasks /query /tn <name> /xml`.
|
|
|
|
## Risk Classification
|
|
| Risk | Criteria |
|
|
|------|---------|
|
|
| **High** | Action matches suspicious patterns (powershell -enc, certutil, temp paths) |
|
|
| **Medium** | Non-vendor task (not under \\Microsoft\\, \\Google\\, etc.) |
|
|
| **Low** | Known vendor task prefix |
|
|
|
|
## Dependencies
|
|
```
|
|
pip install python-evtx # Optional, for EVTX parsing
|
|
```
|