Skip to content
Back to skills

Linker Fake Load Unwrapper

ASecurity

Use when analyzing Android AArch64 ELF files protected by a special linker-style fake PT_LOAD wrapper, impossible high-address LOAD segments, entry-point translation such as e_entry minus fake p_vaddr, XOR runtime decryptors, embedded ELF carving, shell-looking ELF second stages, or when a user mentions linker 加固/脱壳/通杀. Provides static and dynamic workflows, tools, and principles for recovering the real runtime image.

  • 34 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 24, 2026
ai-agentspythonshell

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 24, 2026

npx -y skills add alicewe1/alice_skill --skill linker-fake-load-unwrapper --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Linker Fake Load Unwrapper?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Linker Fake Load Unwrapper
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alicewe1-linker-fake-load-unwrapper/badge)](https://www.skillsdirectory.com/skills/alicewe1-linker-fake-load-unwrapper)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: linker-fake-load-unwrapper
description: Use when analyzing Android AArch64 ELF files protected by a special linker-style fake PT_LOAD wrapper, impossible high-address LOAD segments, entry-point translation such as e_entry minus fake p_vaddr, XOR runtime decryptors, embedded ELF carving, shell-looking ELF second stages, or when a user mentions linker 加固/脱壳/通杀. Provides static and dynamic workflows, tools, and principles for recovering the real runtime image.
x-alice-class: assist
---

# Linker Fake-Load Unwrapper

## Core idea

This protector abuses ELF program headers so the visible entry and memory layout look abnormal. Do not guess fixed offsets. Derive the real file entry from PHDR evidence, decode the entry stub, recover XOR ranges/key, then reconstruct the runtime image.

## Fast path

```powershell
python <skill-dir>\scripts\linker_static_unwrap.py <target> --out-dir <out>
```

Expected outputs:

- `<target>.linker_xor_runtime.bin` — reconstructed runtime image.
- `linker_static_unwrap_report.json` — PHDRs, fake LOAD, true entry offset, XOR ranges, carved embedded ELFs, interesting strings.
- `embedded_elfs/` — candidate inner ELF payloads/interpreters.

The script intentionally refuses to proceed if it cannot find the fake LOAD or recover XOR ranges; do not hardcode offsets unless you first write down why the PHDR-derived method fails.

## Static analysis procedure

1. Parse ELF64 little-endian AArch64 header and PHDRs.
2. Find fake LOAD candidate:
   - `p_type == PT_LOAD`
   - `p_offset == 0`
   - `p_filesz > file_size`
   - high `p_vaddr` such as `0xffff0000` or huge `p_filesz`
   - `e_entry` falls inside `p_vaddr .. p_vaddr + p_filesz`
3. Translate true entry:
   - `true_entry_file_offset = e_entry - fake.p_vaddr + fake.p_offset`
4. Disassemble AArch64 stub at real file entry.
5. Recover repeated decrypt calls:
   - key usually arrives in `w3/x3` as an immediate byte.
   - target pointer and size are often loaded through PC-relative `ldr` literals into `x2` and `x1`.
   - each `bl` after those loads applies XOR to a runtime range.
6. Map target VAs through normal LOADs, not the fake one, then XOR file bytes.
7. Carve embedded `ELF` blobs and inspect sections/PHDRs/UPX markers.
8. Validate runtime by string diff, embedded ELF parse, and dynamic dump comparison when possible.

## Dynamic confirmation procedure

Use dynamic dumping when:

- Capstone cannot recover stub ranges.
- The key/ranges are computed instead of literal-loaded.
- The runtime later decrypts another stage.
- Static runtime and device behavior disagree.

On Android:

1. Run the target in a controlled directory.
2. Monitor `/proc/<pid>/maps` for file-backed or anonymous executable mappings.
3. Dump relevant mappings through `/proc/<pid>/mem` as root.
4. Prefer parent-child dumpers for short-lived children.
5. Compare dump SHA256/strings/ELF offsets with static runtime.

## Validation gates

A result is not “done” until these checks can fail and pass:

- Original hash recorded.
- Fake LOAD and true entry offset recorded.
- XOR ranges/key recorded or dynamic replacement evidence recorded.
- Runtime image exists and has hash.
- Embedded ELF offsets or absence thereof documented.
- If business logic is expected, stack/heap/memfd plaintext search performed.

## Reference routing

Read `references/linker-fake-load-principles.md` for the detailed protector model, failure modes, dynamic fallback, and reporting template.

Files in this skill

  • SKILL.md3.4 KB
  • agents/openai.yaml244 B
  • references/linker-fake-load-principles.md3.9 KB
  • scripts/linker_static_unwrap.py11.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…