analyzing-mach-o-binaries-on-macos
Statically analyzes macOS Mach-O malware: parsing the header and load commands,
v1.0.02 instalaciones+2 en 7 días24 EstrellasApache-2.0sincronizado hace 10 horas
Instalar
¿Aún no tienes la CLI de NotHoly? Instálala primero.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install meltedinhex/analyzing-mach-o-binaries-on-macosEscribe en ~/.notholy/skills después de comprobar la firma y el SHA-256.
FirmaFirmado, ed25519
Paquete76b85f5e…f66efd8f
76b85f5e1621…a963f66efd8f4 archivos · 3.2 KBEscaneoMedio2 hallazgos
- Script ejecutable incluido con la skillscripts/analyst.py
- Enlaces a dominios externos
Fuentegithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/analyzing-mach-o-binaries-on-macos@da7600a
Esta entrada todavía no está escrita en tu idioma, así que aparece en English.
En esta página
When to Use
- You have a macOS sample (Mach-O) and need a static capability and trust read.
- You must handle a fat/universal binary containing multiple architecture slices.
- You need to inspect linked dylibs, entitlements, and code-signing status.
Do not use Windows PE tooling on Mach-O — the formats differ entirely; use Mach-O-aware parsers.
Prerequisites
- A Mach-O parser (Python stdlib
struct, ormacholib/LIEF); the sample handled inertly. - For signing/entitlements on macOS,
codesign/otoolare authoritative.
Safety & Handling
- Parse statically; never execute the sample, especially on a real macOS host.
- Keep the sample password-protected at rest and reference it by hash.
Workflow
Step 1: Detect fat vs. thin and architecture
Check the magic: 0xCAFEBABE (fat/universal) vs. 0xFEEDFACE/0xFEEDFACF (Mach-O 32/64). For
fat binaries, enumerate and analyze each slice.
python scripts/analyst.py header sample.machoStep 2: Parse load commands
Read load commands for linked dylibs (LC_LOAD_DYLIB), entry point (LC_MAIN), and signing
(LC_CODE_SIGNATURE). The dylib list hints at capability (networking, crypto).
Step 3: Inspect entitlements and signing
On macOS, use codesign/otool to read entitlements and verify the signature. Ad-hoc or absent
signatures and suspicious entitlements are risk indicators.
Step 4: Infer capability and route
Map linked frameworks/symbols to behaviors and route to disassembly/RE for deeper analysis.
Validation
- Fat binaries are decomposed and each slice is analyzed, not just the first.
- Load commands, dylibs, and signing status are enumerated correctly.
- Capability inferences are corroborated by linked frameworks/symbols.
Pitfalls
- Analyzing only one slice of a universal binary.
- Trusting a present signature without verifying it (ad-hoc signatures verify but aren't trusted).
- Applying PE assumptions (sections/imports) to Mach-O structures.
References
- See
references/api-reference.mdfor the Mach-O header parser. - Apple Mach-O loader.h and code signing docs (linked in frontmatter).
Archivos de esta versión
references/11.3 KB
- api-reference.md1.3 KB
scripts/12.8 KB
- analyst.py2.8 KB
- LICENSE340 B
- SKILL.md3.1 KB
Permisos
| Permiso | Declarado | Hallado en el escaneo |
|---|---|---|
| Lee archivos | No | No |
| Escribe archivos | No | No |
| Ejecuta comandos de shell | Sí | Sí |
| Usa la red | Sí | Sí |
| Usa conectores | No | No |
| Controla un navegador | No | No |
Hallazgos del escaneo
Revisado el 13 nov 2026
- MediaArchivo · Script ejecutable incluido con la skillscripts/analyst.py
- InfoEnlace · Enlaces a dominios externos
Un escaneo limpio baja el riesgo, pero no prueba que el paquete sea seguro. Lee lo que instalas.
| Versión | Publicada | Commit | SHA-256 | Firma | Cambio de permisos |
|---|---|---|---|---|---|
| v1.0.0 | 13 nov 2026 | da7600a | 76b85f5e | Firmada | – |
Más de meltedinhex
Todo de este publicador- writing-yara-rules-from-reversed-codemeltedinhex/writing-yara-rules-from-reversed-code4
- validating-detections-with-atomic-testsmeltedinhex/validating-detections-with-atomic-tests4
- writing-suricata-and-snort-rulesmeltedinhex/writing-suricata-and-snort-rules3
- writing-sigma-detection-rulesmeltedinhex/writing-sigma-detection-rules3
Más en Ingeniería inversa y fuzzing
Ver la categoríaPregunta todo lo que tu alcance permite.
Crea la cuenta, añade créditos y haz la primera pregunta en el chat o en la terminal.
- 1/3
Crea la cuenta
Individual o empresa. Puedes pasar a empresa después sin perder saldo ni claves.
IndividualEmpresa - 2/3
Añade créditos
Con tarjeta. Pagas por token, sin suscripción.
$5.00recarga mínima - 3/3
Pregunta
En el chat, o instala el CLI y ejecuta notholy login en tu terminal.
$ notholy login