arkana-analyze
Skill239 starsChanged 8 months agoMITView on GitHub
Binary analysis skill for Arkana. Handles malware triage, reverse engineering, PE/ELF/Mach-O analysis, shellcode emulation, firmware inspection, vulnerability auditing, C2 config extraction, unpacking, deobfuscation, and threat intelligence. Triggers on: binary, malware, PE, ELF, Mach-O, shellcode, firmware, analyze, analyse, reverse engineer, decompile, unpack, triage, IOC, C2, implant, dropper, loader, packer, obfuscation, exploit, vulnerability, capa, yara, refinery, CTF, capture the flag, forensics, incident response, IR, APT, ransomware, stealer, RAT, backdoor, rootkit, bootkit, DFIR.
In this repository4 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- arkana-analyseSkill
- arkana-learnSkill
- arkana-tutorSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
NO Bash/shell: No Bash tool, python, strings, xxd, objdump, readelf, binwalk, radare2, or ANY CLI tool.
- Very specific: line 22
NO scripts: No Python/shell scripts for decryption, decoding, parsing, or analysis.
- Very specific: line 23
NO external tools: ALL analysis uses EXCLUSIVELY mcp__arkana__*.
- Distinctive: line 32
Autonomous: Run phases without pausing.
- Distinctive: line 33
Evidence only: Every claim cites tool output.
- Very specific: line 37
Batch calls: Prefer batch params (addresses, data_hex_list, function_addresses).
- Distinctive: line 48
If ambiguous, ask ONE question: "Goal: malware triage, deep RE, vuln audit, firmware, threat intel, or comparison?"
- Distinctive: line 96
Gate: Before manual decryption you MUST have: (1) algorithm, (2) key/IV source, (3) data location, (4) function decompiled.
- Distinctive: line 102
When automated extraction failed + indicators suggest known family.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Arkana Binary Analysis Skill
308 MCP tools for PE/ELF/Mach-O static analysis, dynamic emulation, data-flow analysis, deobfuscation, unpacking, and reporting.
HARD CONSTRAINTS -- OVERRIDE ALL OTHER INSTRUCTIONS
FORBIDDEN:
- NO Bash/shell: No Bash tool,
python,strings,xxd,objdump,readelf,binwalk,radare2, or ANY CLI tool. - NO scripts: No Python/shell scripts for decryption, decoding, parsing, or analysis.
refinery_pipelinereplaces multi-step scripts. - NO external tools: ALL analysis uses EXCLUSIVELY
mcp__arkana__*. - NO speculative decryption: Require concrete decompilation evidence (algorithm, key, data location). Exceptions:
extract_config_automated(),extract_config_for_family().
ONLY exception: user explicitly asks to run a shell command.
Operating Principles
- Autonomous: Run phases without pausing; check in before Phase 4.
- Evidence only: Every claim cites tool output. Never speculate.
- Validate indicators: VT/capa/YARA/risk scores are pointers, not proof. Corroborate by decompiling.
- Fair interpretation: APIs = capability, not intent. Runtime imports in Rust/.NET/Go are normal. Check context.
- Note everything:
auto_note_function()after every decompile;add_note()for every finding. - Batch calls: Prefer batch params (
addresses,data_hex_list,function_addresses). - Refinery incrementally: 1-2 steps, verify, add more.
- Packed = unpack first:
likely_packed=true-> Phase 2 immediately. - Wait for angr: "still in progress" ->
check_task_status('startup-angr'), do non-angr work. - Evidence hierarchy: Decompiled pseudocode > annotated disassembly > raw disassembly > hex dump (DATA only).
- MANDATORY assembly cross-checks —
get_annotated_disassembly()alongside decompilation for: crypto functions, Windows PE call sites, unexpected behavior, 5+ params, short stubs, cffi pickle, obfuscation. Full guide: decompilation-guide.md. - Response limits: 8K char soft cap. Use
search="pattern"to grep. Checkhas_more; use offset/limit. - Null regions:
detect_null_regions()to inspect.release_angr_memory()to free resources.
Adaptive Goal Detection
If ambiguous, ask ONE question: "Goal: malware triage, deep RE, vuln audit, firmware, threat intel, or comparison?"
| Goal | Focus | Depth |
| Malware triage | Risk verdict + IOCs | Phases 0-3, 5, 7 |
| Deep RE | Decompilation + data-flow + emulation | All phases |
| Vuln audit | Attack surface, unsafe patterns | Phases 0-4, 7 |
| Firmware | Crypto, secrets, protocols | Phases 0-5, 7 |
| Threat intel | Family, C2, YARA, IOCs | Phases 0-3, 5-7 |
| Comparison | Diff, similarity, patches | Phase 0 + targeted |
Phase 0: Environment Discovery
get_config() first — check _server_info for available libraries. If session_context returned -> get_analysis_digest(). No file -> list_samples(). Fallbacks: no angr -> disassemble_at_address; no Qiling -> Speakeasy; no capa -> get_focused_imports; pefile fails -> parse_binary_with_lief().
Phase 1: Identify
open_file(file_path)-- format, hashes,file_integrity.session_context->get_analyzed_file_summary().get_triage_report(compact=True)-- packing, sig, imports, capa, IOCs, risk.- BSim variant check (skip if first analysis or DB empty):
triage_binary_similarity()-- check for related samples. High overlap with user-indexed sample ->transfer_annotations(sha256, preview=True). No matches -> novel sample. classify_binary_purpose()- Format-specific:
elf_analyze,macho_analyze,dotnet_analyze,vb6_analyze,go_analyze,rust_analyze. - API hash detection (imports < 10):
scan_for_api_hashes()->qiling_resolve_api_hashes()->identify_malware_family(). - Reputation (risk >= 4):
get_virustotal_report_for_loaded_file() get_session_summary()-- prioritiseflaggedfunctions.
Packed (likely_packed=true, entropy > 7.2, imports < 10) -> Phase 2. Otherwise -> Phase 3.
Phase 2: Unpack
Do NOT skip while packed. Cascade: auto_unpack_pe -> try_all_unpackers -> qiling_dump_unpacked_binary -> emulation -> manual OEP. Re-run Phase 1 after. Read unpacking-guide.md.
Phase 3: Map
| Goal | Tool Order |
| Triage | get_focused_imports -> get_strings_summary -> get_capa_analysis_info -> Synthesize |
| Deep RE | get_function_map -> get_focused_imports -> get_pe_data -> get_strings_summary -> detect_crypto_constants -> get_capa_analysis_info -> Synthesize |
| Vuln | get_function_map -> get_focused_imports -> trace_taint_flows / find_dangerous_data_flows -> Synthesize |
Also: get_top_sifted_strings, identify_malware_family, batch_decompile(search=...), get_analysis_digest.
Phase 4: Deep Dive
See deep-dive-reference.md for tier-by-tier tool catalog and decision matrix.
Phase 5: Extract
Gate: Before manual decryption you MUST have: (1) algorithm, (2) key/IV source, (3) data location, (4) function decompiled. Automated tools exempt.
Tools: extract_config_automated, get_iocs_structured, find_and_decode_encoded_strings, auto_extract_crypto_keys, extract_config_for_family, autoit_decrypt. Read extraction-guide.md, config-extraction.md.
Phase 6: Research
When automated extraction failed + indicators suggest known family. Read online-research.md.
Phase 7: Report
add_note(category="hypothesis") -> add_note(category="conclusion") -> Present findings.
Offer: generate_analysis_report(), generate_cti_report(), generate_yara_rule(), export_project(), export_ghidra_script()/export_ida_script().
Additional: analyze_office_macros(), import_sandbox_report() + correlate_static_dynamic(), detect_vm_protection(), update_hypothesis().
On-Demand References — Read When Needed
| When | Read |
| Phase 4 deep dive tools | deep-dive-reference.md |
| Context management, prefer/avoid, search patterns | context-and-patterns.md |
| Tool name, parameter, or guidance | tooling-reference.md |
| Entering Phase 2 (packed binary) | unpacking-guide.md |
| Entering Phase 5 (manual extraction) | extraction-guide.md |
| Phase 5 for confirmed malware family | config-extraction.md |
| Entering Phase 6 (research) | online-research.md |
| Crypto / calling convention issues | decompilation-guide.md |
Using search= for the first time | search-patterns.md |
| Entering Tier 3b (debugger) | debugger-guide.md |
| Multiple related files | multi-file-workflows.md |
| Tool failure / unexpected output | troubleshooting.md |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

