Logo Devirtualizing Vm Protected Code

Devirtualizing Vm Protected Code

Cộng đồng
trilwu
devirtualizing-vm-protected-code

Khôi phục logic ban đầu từ mã được bảo vệ bằng kỹ thuật làm rối mã ảo hóa — VMProtect, Themida/WinLicense, Code Virtualizer hoặc máy ảo opcode tùy chỉnh — bằng cách xác định bộ điều phối VM, dịch ngược các handler để hiểu ngữ nghĩa, trích xuất bytecode ảo và chuyển thành IR đơn giản hóa bằng Triton, miasm hoặc công cụ dựa trên VTIL. Dùng khi một hàm biến thành vòng lặp fetch-decode-dispatch khổng lồ, khi phân tích cho thấy có bảng handler thay vì mã thông thường, hoặc sau khi giải nén phát hiện phần lõi đã được ảo hóa.

Add to TypingMind

Tổng quan

Nhà phát hànhtrilwu
Kho mãsecskills
Tên kỹ năngdevirtualizing-vm-protected-code
Sao
144
Bản fork
15
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được trilwu công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Devirtualizing Vm Protected Code trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/trilwu/secskills/tree/main/secskills-core/skills/devirtualizing-vm-protected-code
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/trilwu/secskills.git /tmp/secskills
mkdir -p .claude/skills
cp -r /tmp/secskills/secskills-core/skills/devirtualizing-vm-protected-code .claude/skills/devirtualizing-vm-protected-code
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Devirtualizing Vm Protected Code trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Devirtualizing Vm Protected Code ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Devirtualizing Vm Protected Code với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Devirtualizing VM-Protected Code

Virtualization obfuscation replaces native instructions with bytecode for a custom virtual machine embedded in the binary, then runs that bytecode through an interpreter. The original logic is not gone — it is expressed in an instruction set you have to recover first. Devirtualization is a fixed pipeline: find the VM, understand its handlers, extract the bytecode, and lift it back to something readable. The obfuscator changes every build, so the pipeline, not any one tool, is the durable skill.

When to Use

  • A function turned into a large fetch-decode-dispatch loop with a handler table instead of ordinary control flow
  • Binaries protected by VMProtect, Themida/WinLicense, Oreans Code Virtualizer, or a bespoke opcode VM
  • Recovering the algorithm inside a virtualized function (a licence check, a crypto routine, anti-cheat logic)
  • After unpacking, when the real code is virtualized rather than merely packed

When NOT to Use

  • Unpacking, dumping, and fixing imports of a packed/protected binary — that is unpacking-protected-binaries, and it comes first: unpack the outer protection, then devirtualize the virtualized core it reveals.
  • Ordinary (non-virtualized) obfuscation — junk code, opaque predicates, string encryption — is normal work for analyzing-binaries.
  • Virtualized/obfuscated JavaScript — reversing-obfuscated-javascript.
  • Exploiting a bug in the recovered logic — exploiting-memory-corruption.

The Pipeline

1. Locate the VM. Find the transition from native to virtual: the vm_enter stub that saves native context and sets up the virtual machine, the dispatcher loop that fetches the next virtual opcode and jumps through a handler table, and the vm_exit that restores native context. The dispatcher is the anchor for everything else.

2. Recover the VM architecture. Identify the virtual context — the structure holding the VM's registers and virtual instruction pointer — and how the dispatcher decodes an opcode into a handler index. Note the VM's shape: stack-based vs register-based, opcode encoding, and any key/rolling obfuscation on the bytecode pointer.

3. Understand the handlers. Each handler implements one virtual instruction — a micro-operation like add, load, store, xor, push, or a native call. Analyze handlers individually; symbolic execution of a single handler (Triton, miasm) yields its semantics far faster than reading it by hand, because a handler is small and side-effect-focused even when the surrounding VM is huge. Build a table mapping opcode → semantics.

4. Extract the bytecode. With the handlers understood, read the virtual instruction stream the dispatcher walks — the actual program, in the VM's instruction set.

5. Lift and simplify. Translate the virtual instructions into an IR and run optimization passes — constant folding, dead-code elimination, peephole — to collapse the VM's verbosity back toward the original logic. This is where VTIL-based tooling (and, for VMProtect x64, NoVmp) shines: it lifts to an optimizable IR and simplifies, turning thousands of virtual ops into a handful of real ones. Triton and miasm support the same lift-and-simplify approach when no ready tool fits the target VM.

Static vs Dynamic

Handlers can be studied statically, but a dynamic execution trace — capturing the sequence of handlers actually run for a given input — is often the faster route into a specific virtualized function: it tells you which handlers matter and in what order, so you devirtualize the path that runs rather than the whole VM. Combine them: trace to find the relevant handlers, symbolic-execute them to get semantics, lift the traced bytecode.

Expectations

  • No universal button. VMProtect and Themida differ, versions differ, and custom VMs share nothing. Off-the-shelf devirtualizers target specific protector versions and break on others; treat them as accelerators for the pipeline, not replacements for it.
  • The core is recoverable even when the whole is not. You rarely need to devirtualize an entire binary — you need the one function with the algorithm. Scope to it.
  • Nested and mutating VMs exist. Some protectors virtualize inside a virtual machine, or mutate handlers per build. Recover one layer at a time.

Rationalizations to Reject

  • "A tool devirtualized it, so I'm done." Automated devirtualizers match specific protector versions and silently produce partial or wrong output on others. Validate the recovered logic against the binary's observed behaviour.
  • "I have to devirtualize the whole binary." You need the target function. Trace to it and lift only what runs; whole-binary devirtualization is usually wasted effort.
  • "The handlers are too big to read." A handler is one micro-op with a lot of obfuscation around it. Symbolic-execute it for the semantics instead of reading the noise.
  • "It's still packed, I'll devirtualize first." Unpack first (unpacking-protected-binaries); devirtualization operates on the revealed code, and anti-debug/anti-dump defenses will fight you until the outer layer is off.
  • "The virtual instruction stream is the answer." The raw bytecode is not readable logic — you must lift and simplify it. The optimization passes are what turn recovered opcodes back into the algorithm.

References

  • unpacking-protected-binaries — remove packing/anti-debug before devirtualizing
  • analyzing-binaries — general RE of the recovered, devirtualized code
  • reviewing-cryptography — when the virtualized routine is a crypto/licence check
  • exploiting-memory-corruption — exploiting a bug in the recovered logic

Câu hỏi thường gặp

Kỹ năng AI Devirtualizing Vm Protected Code làm được gì?

Khôi phục logic ban đầu từ mã được bảo vệ bằng kỹ thuật làm rối mã ảo hóa — VMProtect, Themida/WinLicense, Code Virtualizer hoặc máy ảo opcode tùy chỉnh — bằng cách xác định bộ điều phối VM, dịch ngược các handler để hiểu ngữ nghĩa, trích xuất bytecode ảo và chuyển thành IR đơn giản hóa bằng Triton, miasm hoặc công cụ dựa trên VTIL. Dùng khi một hàm biến thành vòng lặp fetch-decode-dispatch khổng lồ, khi phân tích cho thấy có bảng handler thay vì mã thông thường, hoặc sau khi giải nén phát hiện phần lõi đã được ảo hóa.

Vì sao nên dùng Devirtualizing Vm Protected Code trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Devirtualizing Vm Protected Code là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Devirtualizing Vm Protected Code trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/trilwu/secskills/tree/main/secskills-core/skills/devirtualizing-vm-protected-code. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Devirtualizing Vm Protected Code?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Devirtualizing Vm Protected Code với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Devirtualizing Vm Protected Code với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Devirtualizing Vm Protected Code có miễn phí không?

Có. Kỹ năng này được trilwu phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇