mirror of
https://github.com/SHOGGOTH-SECTOR/sica-fondt.git
synced 2026-08-02 17:03:25 +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
1.5 KiB
1.5 KiB
API Reference: Detecting DNS Exfiltration
Shannon Entropy Calculation
import math
from collections import Counter
def entropy(text):
freq = Counter(text)
length = len(text)
return -sum((c/length) * math.log2(c/length) for c in freq.values())
# Normal subdomain: entropy ~2.5-3.0
# Encoded data: entropy >3.5-4.0
Detection Thresholds
| Metric | Normal | Suspicious |
|---|---|---|
| Subdomain entropy | < 3.0 | > 3.5 |
| Subdomain length | < 20 chars | > 40 chars |
| TXT record ratio | < 5% | > 30% |
| Queries to single domain | < 50/hr | > 100/hr |
Zeek dns.log Fields
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p proto trans_id
query qclass qclass_name qtype qtype_name rcode rcode_name
DNS Tunneling Tools
| Tool | Protocol | Indicators |
|---|---|---|
| iodine | TXT/NULL/CNAME | Encoded subdomains, high volume |
| dnscat2 | TXT/CNAME | Base32/Base64 subdomains |
| dns2tcp | TXT | Long TXT responses |
Splunk SPL Detection
index=dns
| eval subdomain=replace(query, "\.[^.]+\.[^.]+$", "")
| eval entropy=...
| where len(subdomain) > 40 AND query_count > 100
| stats count by query, src_ip
Suricata DNS Rules
alert dns any any -> any 53 (msg:"DNS Tunnel - Long Query"; \
dns.query; content:"."; offset:50; sid:2000001;)
CLI Usage
python agent.py --dns-log dns.log --format zeek
python agent.py --dns-log dns.log --entropy-threshold 3.8 --length-threshold 50