Logo: Vm And Bytecode Reverse

Vm And Bytecode Reverse

Communautéit
ptn1411
vm-and-bytecode-reverse

Benotzerdefinéiert virtuell Maschinnen a proprietäre Bytecode per Reverse Engineering analyséieren (Dispatcher-Schläifen, Opcode-Tabellen, VM-Protectors, .pyc/CIL/JVM/Lua-Bytecode). Aktivéiert dëse Skill, wann de Binärprogramm eng dënn Native-Shell ëm en Interpreter ass.

Add to TypingMind

Iwwersiicht

Editeurptn1411
Repositoryskill
Skill-Nummvm-and-bytecode-reverse
Stären
275
Forks
133
Matgeliwwert Dateien
3
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 3 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    ptn1411 huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Vm And Bytecode Reverse an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/ptn1411/skill/tree/main/vm-and-bytecode-reverse
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ptn1411/skill.git /tmp/skill
mkdir -p .claude/skills
cp -r /tmp/skill/vm-and-bytecode-reverse .claude/skills/vm-and-bytecode-reverse
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Vm And Bytecode Reverse an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Vm And Bytecode Reverse automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Vm And Bytecode Reverse net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

VM & Bytecode Reverse Engineering

Upstream reference: yaklang/hack-skills/vm-and-bytecode-reverse — facts/tables distilled from ctf-wiki. Final user-facing summary in Vietnamese.

0. Authorization & routing

Operates under MASTER_POLICY.md §1-§2.

Sibling skillWhen
binary-identifierFirst — confirm whether you are looking at native code or VM-driven
anti-debugging-techniquesMany commercial VMs ship anti-debug inside the dispatcher
symbolic-execution-toolsSymbolically run handlers to recover constraints
nuitka-decryptorSpecifically for Nuitka-compiled Python (XOR+B64 layer over .pyd)
javascript-deobfuscatorCustom JS VMs (jsvmp, obfuscator.io)

1. Recognition signatures (in IDA / Ghidra / Binary Ninja)

Pattern in disassemblyDispatcher styleFirst move
while(1) { switch(byte[pc++]) { case 0: ... } }switch-basedEnumerate cases → opcode table
Indirect call via [table + idx*8]table-based (jump table)Dump the table, label handlers
Long if/else chain on opif-chainSame as switch
push/pop dominate, single operand streamstack VMMap push/pop/arith opcodes first
reg[k] = … arithmetic on a small arrayregister VMDetermine reg count + width
pc = code[pc]; goto *handlers[op]threaded codeOne handler per opcode, ends with goto-next

Signature of a VM in any binary: a tight loop containing one fetch (opcode = mem[pc++]), one decode (table or switch), and one set of small handlers reading from and writing to the same context structure.

2. Reconstructing the ISA

StepAction
1Locate the dispatcher loop — it dominates execution time, easy to spot in a profiler / coverage trace
2Identify the VM context: bytecode pointer, PC, stack/regs, memory area. Often a single struct
3Walk every case/handler. Annotate operand widths (pc++ once = 1 byte operand, four times = 32-bit)
4Build an opcode table: { opcode → mnemonic, operand_layout, semantics }
5Write a disassembler that consumes the bytecode blob and prints mnemonics
6(Optional) Write a lifter that emits semantically equivalent C / Python / LLVM IR per handler
7(Optional) Re-host: emulate the VM in Python so you can fuzz, brute, symbolize

3. Disassembler skeleton (Python, stack-VM example)

python
# Generic single-byte-opcode + variable operand
OPCODES = {
    0x00: ('nop',  0),
    0x01: ('push', 4),     # push imm32
    0x02: ('pop',  0),
    0x03: ('add',  0),
    0x04: ('sub',  0),
    0x05: ('jz',   2),     # short branch
    0x06: ('call', 2),
    0xFF: ('halt', 0),
}

def disasm(blob: bytes, base: int = 0) -> list[str]:
    pc, out = 0, []
    while pc < len(blob):
        op = blob[pc]
        mnem, oplen = OPCODES.get(op, (f'db {op:#04x}', 0))
        operand = int.from_bytes(blob[pc+1:pc+1+oplen], 'little') if oplen else None
        out.append(f'{base+pc:08x}: {mnem}' + (f' {operand:#x}' if operand is not None else ''))
        pc += 1 + oplen
    return out

4. Common interpreter targets and their tooling

TargetFormatDecompiler / disassemblerNotes
CPython.pycdecompile3, uncompyle6 (≤3.8), pycdc (3.9+)Magic header bytes encode version
PyInstallerbundled .pycpyinstxtractor then decompile3/pycdcstruct.tuple header strip
Nuitkanative .pyd/.exenone direct — use nuitka-decryptor for XOR-encrypted variantsCompiled to C, not classical bytecode
.NETPE/CILdnSpyEx, ilspy, dotPeekStrong decompilation; watch for ConfuserEx
JVM.class/.jarcfr, procyon, jadx-cliStrings often obfuscated, control flow flattened
Android Dexclasses.dexjadx, apktoolSmali for surgical patches
Lua 5.x.luacluadec, unluacHeader magic \x1bLua
WASM.wasmwabt (wasm2wat), wasm-decompileStack-VM with structured control flow
V8 snapshot.bin/.jscV8 ssa decompiler (limited)Largely opaque; usually reverse via tracing
EVM (Ethereum)bytecode hexpanoramix, heimdall-rs, ethervm.ioStack VM, 256-bit words
Custom CTF VMproprietarywrite your own (§3)Most common

5. VM protectors (commercial)

ProtectorWhat it doesApproach
VMProtectLifts hot blocks into a stack VM with randomized handler set per buildMatch handler patterns across builds; VMPDump / vmp-decompiler recover handlers; trace with Intel PIN
ThemidaSeveral VM "engines"; mixes with code mutation and anti-debugTools fragile per-version; usually trace + handler clustering
Code VirtualizerOlder Oreans VMSimilar approach to Themida
VMware ThinApp / IonCube / SourceGuardianDomain-specific VMs around PHP/PythonLook for vendor-specific decoders first

Heuristic: VM protectors push lots of context onto the stack at function entry (vctx), then the rest of the function is one giant unrolled dispatcher. Handler count is the fingerprint — collect 20-30 handlers and cluster by operand-pattern to map them to the abstract VM ISA.

6. Maze / interpreter-style CTF tricks

  • 2D grid + step opcodes → extract the grid, run BFS/DFS for the shortest legal path.
  • "Brainfuck-like" tape VMs: the input is the program; build a meta-disassembler around the tape opcodes.
  • Crackme that hashes input through a VM: re-implement the VM in Python, then either brute-force per-byte if state is byte-local, or feed it to angr (see symbolic-execution-tools).

7. Methodology

  1. Confirm it really is a VM (single loop dominates, opcode-shaped switch/table).
  2. Extract the bytecode blob (often a .rodata array, sometimes encrypted — decrypt first).
  3. Walk every handler; build the opcode dictionary.
  4. Implement a disassembler; sanity-check by disassembling a known block.
  5. (If needed) implement an emulator for fuzzing/symbolic execution.
  6. Hand off the recovered semantics to binary-patcher (patch handler) or symbolic-execution-tools (solve constraints).

8. Final report (Vietnamese)

🧠 VM/Bytecode RE hoàn tất:
  🏛️ Kiến trúc VM   : <stack | register | threaded | maze>
  📜 Số opcode     : <COUNT>
  📚 Bảng opcode   : opcodes.json (mnemonic, operand_layout, semantics)
  🛠️ Disassembler  : disasm.py — verify trên block test
  🧪 Emulator      : (tùy chọn) emu.py
  ▶ Tiếp           : symbolic-execution-tools (giải input) hoặc binary-patcher (vá handler)

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Vm And Bytecode Reverse?

Benotzerdefinéiert virtuell Maschinnen a proprietäre Bytecode per Reverse Engineering analyséieren (Dispatcher-Schläifen, Opcode-Tabellen, VM-Protectors, .pyc/CIL/JVM/Lua-Bytecode). Aktivéiert dëse Skill, wann de Binärprogramm eng dënn Native-Shell ëm en Interpreter ass.

Firwat Vm And Bytecode Reverse op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Vm And Bytecode Reverse besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Vm And Bytecode Reverse an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/ptn1411/skill/tree/main/vm-and-bytecode-reverse an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Vm And Bytecode Reverse benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Vm And Bytecode Reverse benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Vm And Bytecode Reverse domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Vm And Bytecode Reverse gratis?

ptn1411 huet de Skill op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇