Repository navigation
Releases: Momoko-Ayase/Senbei
Releases · Momoko-Ayase/Senbei
Release list
v1.3.3
Added
- Support for legacy 32-bit Windows PE files with fully encrypted payloads and compact loader layouts.
Fixed
- Correct stage-key and metadata handling for compact PE32 layouts, including restoration of the original entry point and PE data directories.
- Fix export-copy failures when companion payloads omit the loader stub’s plaintext export data.
- Preserve the complete export-directory space during PE32 output compaction, including zero-filled regions, preventing export restoration from overwriting the next section.
Reliability
- Trial-decrypt configuration-table candidates before accepting them, allowing false candidates to be skipped without losing the valid layout.
- Restore original data between failed decryption trials.
- Validate complete source and destination export ranges for PE32 and PE32+ companion-based inputs, safely skipping invalid or truncated ranges.
- Add regression coverage for legacy payload layouts, candidate selection, metadata restoration, and companion export preservation.
v1.3.2
Android (AArch64) restoration
- Restore protected IL2CPP runtime state (#8): reconstruct .dynsym/.dynstr, symbol hashes, .rela.dyn, and .rela.plt into a read-only load mapping; restore hidden dynamic symbols from module 0x9E; decode auxiliary relocation symbol permutations (seed discovered dynamically from module 0x96); drop protector-only symbol tails and PLT records; convert image-defined GLOB_DAT/ABS64 relocations to R_AARCH64_RELATIVE generically.
- Newer protection profile support (#8): constructor suppression table from module 0x98 with variable entry counts and fail-closed validation; full .got.plt reconstruction; recovery of the five omitted libc imports classified from AArch64 call-site ABI shapes rather than fixed slot numbers.
- Validated on-device against two independent protected IL2CPP applications on separate protection profiles: no native linker or relocation crashes, Unity initialization reached.
- SysV-only ELF hash tables (#6): restore libraries whose hash section is SysV-only.
- Crowded ELF program headers (#5): preserve and relocate the program-header table when extending ELFs with no spare gap.
- IL2CPP 24.1 metadata (#7): restore method indices for the 24.1 runtime and carry v24 runtime context across package scans.
Other
- Docs: README now points at the GitBook documentation site.
- Repo hygiene: removed the CLAUDE.md symlink (agent guidance lives in AGENTS.md).
v1.3.1
Fixed
- Windows: PE32 DLLs with a TLS directory crashed at process start (0xc0000005 in LdrpAllocateTlsEntry). The packer neutralizes the four base-relocation entries covering the TLS directory's VA fields by demoting them to IMAGE_REL_BASED_ABSOLUTE padding, since its own loader fixes TLS up by hand. Restored verbatim, a DLL mapped off its preferred base kept stale VAs in its TLS directory. Senbei now re-arms those entries as IMAGE_REL_BASED_HIGHLOW for DLL outputs. EXE outputs are byte-identical to v1.3.0, and all previous unpacks remain unchanged. (Should fix #1)
Web app
- Android targets are recognized: dropping an .apk/.apks/.xapk package or a .so library no longer reports "not recognized — will be skipped" (which read as "not protected"). These files now get an explicit Android row explaining the CLI handles them, without enabling the Unpack button or erroring mid-run.
- Narrow screens: the file-row status no longer wraps one word per line on phone-width viewports; below 560px it stacks on a full-width line under the file name.
v1.3.0
Fixes
- Restore managed Windows companion DLLs while preserving the declared CLR metadata and runtime regions in the original DLL.
- Support Android libraries that use compact ELF dynamic-table layouts.
- Validate ELF section names against the ELF string table before accepting a candidate layout.
- Support Android v29 method-token layouts during metadata restoration.
- Stream Android package targets during scanning to reduce temporary buffering and keep package processing bounded.
- Align the platform crate boundaries so PE and ELF parsing remain separate from the platform-specific unpacking engines.
- Require Rust 1.98.1 across the native workspace and WebAssembly bindings.
Dependency Updates
- Upgrade
zipfrom 0.6 to 8.x. - Upgrade
aesfrom 0.8 to 0.9. - Upgrade
sha2from 0.10 to 0.11. - Update the related code paths for the current cipher traits and digest formatting APIs.
v1.2.0
Merge changes from bfloat16/senbei, branch Android.
Added
- Android .so restore. Statically restores hollowed ELF64/AArch64 libraries: decrypts the stage-1 parameter block and stage-2 payload from the appended SHT_LOUSER section, walks the recursive record streams to decode the module set, replays the target-image and fixup containers onto the file, and rebuilds the stripped dynamic-linker tables (.dynsym/.dynstr/.hash/.gnu.hash/.rela.dyn/.rela.plt/.gnu.version*). Validation is structural and total — a library that can't be rebuilt consistently fails loudly instead of emitting a broken image.
- App-package containers. .apk inputs are searched entry-by-entry; .apks/.xapk bundles recurse into nested split APKs. Outputs mirror the package layout under /, e.g. unpack/game.apk/lib/arm64-v8a/libil2cpp.unpack.so.
- Folder and single-file routing. The same senbei <file|folder> entry point now content-detects protected .so files (ELF64/AArch64 prefix → full protection probe) and packages (extension + zip magic) alongside PE targets. Mixed trees work; identical content appearing loose and in a package is restored once, preferring the loose copy.
- Embedded il2cpp metadata extraction. For builds that ship no standalone global-metadata.dat, the metadata blob is located in the restored library's data section by content probe, unwrapped from its per-word XOR layer, and written as global-metadata.unpack.dat next to the library. The shipped keystream covers the one observed build using this packaging variant; other builds are skipped (key derivation is untraced).
- Android metadata de-obfuscation. The seeded five-round MethodDef-RID permutation (v31) is restored with statically discovered seeds, validated per-RID, falling back to the structural remap. The existing Windows -GMD structural path is unchanged and both now share one routing entry point.
- Android corpus test (tests/android_samples.rs): per-file restore against .golden.so.sha256 sidecars, embedded-metadata sidecars, .restore-fails known-gap markers, and a folder-mode end-to-end pass per app tree. Corpus at samples/android/, overridable with SENBEI_ANDROID_SAMPLES.
- Summary line gains a packages count when app packages were processed.
Changed
- New workspace crates: senbei-android-crypto, senbei-android-engine, senbei-android-elf, senbei-android-metadata; orchestration lives in senbei-io::android. The PE core (senbei-pe) remains pure/no-I/O and everything on the wasm path still builds for wasm32-unknown-unknown.
- Output naming follows the existing convention everywhere: .unpack infix under /unpack or --out.
- Docs: new "Android targets" section in docs/usage.md, pipeline design in docs/design.md, corpus layout in samples/README.md.
Dependencies
- zip 0.6.6 → 8.6.0 (0.6 line unmaintained), aes 0.8 → 0.9.3, sha2 0.10 → 0.11.0; all other crates at latest stable in both lockfiles. Outputs are byte-identical across the upgrade (full golden corpus passes).
v1.1.0
v1.0.1
New
- Managed (CLR) EXE support in the old-layout EXE pipeline: protected .NET executables previously errored as "corrupt or unsupported"; they now unpack with the COR20 header, BSJB metadata stream, and CLR resources restored (ilspycmd-validated, full IL decompiles cleanly).
- Kind::Exe split into NativeExe / ManagedExe, mirroring the DLL kinds — CLI lines, run logs, and the web UI now report all four kinds (web detect()/unpack_file() return "native-exe" / "managed-exe").
Improved
- dd8 shift detector now scores candidates by a structural RET+int3 padding fingerprint instead of raw 0xCC counts: wrong candidates score below the no-dd8 baseline (they destroy padding runs), making the apply/skip and shift-0/shift-15 decisions cleaner and harder to fool. Falls back to the previous count when sampled pages have no padded epilogues.