Claude 24f816b6a3
Consolidate 22 sibling repos into layered organism structure
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
2026-06-10 06:53:01 +00:00

2.6 KiB

API Reference: DNS Exfiltration Detection Tools

Shannon Entropy Calculation

Python Implementation

import math
from collections import Counter

def shannon_entropy(text):
    counter = Counter(text.lower())
    length = len(text)
    return -sum((c/length) * math.log2(c/length) for c in counter.values())

Threshold Values

Entropy Classification
< 2.5 Normal domain (e.g., "google")
2.5 - 3.5 Borderline (monitor)
> 3.5 Suspicious (likely DGA/tunneling)
> 4.0 High confidence malicious

Splunk DNS Queries

Tunneling Detection

index=dns sourcetype="stream:dns"
| eval subdomain_len=len(mvindex(split(query,"."),0))
| where subdomain_len > 50
| stats count by registered_domain, src_ip

DGA Detection

index=dns
| eval sld=mvindex(split(query,"."), -2)
| where len(sld) > 12
| stats count, dc(query) AS unique by src_ip

Volume Anomaly

index=dns earliest=-24h
| bin _time span=1h
| stats count AS queries by src_ip, _time
| eventstats avg(queries) AS avg_q, stdev(queries) AS stdev_q by src_ip
| eval z_score=(queries - avg_q) / stdev_q
| where z_score > 3

TXT Record Abuse

index=dns query_type="TXT"
| stats count AS txt_queries by src_ip
| where txt_queries > 100

Zeek DNS Log Format

Log Fields (dns.log)

Column Field Description
0 ts Timestamp
2 id.orig_h Source IP
4 id.resp_h DNS server IP
9 query Query domain name
13 qtype_name Query type (A, TXT, CNAME)
15 rcode_name Response code
21 answers Response answers

Zeek CLI Analysis

cat dns.log | zeek-cut query qtype_name id.orig_h | sort | uniq -c | sort -rn

DNS Tunneling Tools (Detection Signatures)

Tool DNS Pattern
iodine *.pirate.sea (TXT/NULL records)
dnscat2 *.dnscat. prefix in queries
dns2tcp *.dns2tcp. pattern
Cobalt Strike DNS Periodic TXT queries with encoded payloads

Passive DNS Lookup APIs

Farsight DNSDB

curl -H "X-API-Key: $KEY" \
  "https://api.dnsdb.info/dnsdb/v2/lookup/rrset/name/evil.com/A"

VirusTotal Domain Resolutions

curl -H "x-apikey: $KEY" \
  "https://www.virustotal.com/api/v3/domains/evil.com/resolutions"

Cisco Umbrella (OpenDNS) Investigate API

Domain Categorization

curl -H "Authorization: Bearer $TOKEN" \
  "https://investigate.api.umbrella.com/domains/categorization/evil.com"

Security Information

curl -H "Authorization: Bearer $TOKEN" \
  "https://investigate.api.umbrella.com/security/name/evil.com"