mirror of
https://github.com/SHOGGOTH-SECTOR/sica-fondt.git
synced 2026-08-01 08:30:20 +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
2.1 KiB
2.1 KiB
API Reference: Static Malware Analysis with PE Studio Agent
Overview
Performs automated static analysis of Windows PE binaries using pefile to inspect headers, sections, imports, strings, and resources for malware indicators.
Dependencies
| Package | Version | Purpose |
|---|---|---|
| pefile | >= 2023.2.7 | PE file parsing and section analysis |
| hashlib | stdlib | MD5, SHA-1, SHA-256 hash computation |
Core Functions
compute_hashes(filepath)
Generates MD5, SHA-1, SHA-256 hashes and file size.
- Returns:
dictwithmd5,sha1,sha256,size
analyze_sections(pe)
Inspects PE sections for entropy, virtual/raw size ratios, and packing indicators.
- Flags:
HIGH_ENTROPY(>7.0),HIGH_VR_RATIO(>10x) - Returns:
list[dict]- section analysis entries
detect_packer(pe)
Identifies known packer section names (UPX, ASPack, VMProtect, Themida) and low import counts.
- Returns:
list[str]- detected packer names
analyze_imports(pe)
Categorizes imports into Process Injection, Keylogging, Persistence, Evasion, Network, Crypto.
- Returns:
list[dict]withcategory,dll,function
extract_strings(filepath, min_length=6)
Extracts ASCII strings and classifies into URLs, IPs, emails, registry keys, file paths.
- Returns:
dict[str, list[str]]- categorized string indicators
analyze_resources(pe)
Inspects PE resources for high-entropy data and embedded PE files.
- Returns:
list[dict]withtype_id,size,entropy,flags
analyze_pe(filepath)
Full analysis pipeline producing structured report.
- Returns:
dict- complete analysis report
Suspicious Import Categories
| Category | Example Functions |
|---|---|
| Process Injection | VirtualAllocEx, WriteProcessMemory, CreateRemoteThread |
| Keylogging | GetAsyncKeyState, SetWindowsHookExA |
| Persistence | RegSetValueExA, CreateServiceA |
| Evasion | IsDebuggerPresent, CheckRemoteDebuggerPresent |
| Network | InternetOpenA, URLDownloadToFileA, WSAStartup |
| Crypto | CryptEncrypt, CryptDecrypt |
Usage
python agent.py suspect.exe