find-oep
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "find-oep":https://skillpi.com/zh/skills/deepskill-ad10e9e52a82d9aaf7d5f18810a11f88e7e53e89f72514a929de828425cb1a71。安装前核对上游来源和版本:https://github.com/dariushoule/x64dbg-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
基于智能追踪的 OEP 查找器,针对加壳或受保护的 PE 可执行文件。通过智能单步执行、反调试规避与启发式 OEP 检测,穿越加壳存根代码,在原始入口点捕获程序状态快照。
介绍来源: third_party · dariushoule · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 输入和输出
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: find-oep
description: Smart trace-based OEP finder for packed/protected PE executables. Traces through packer stubs using intelligent stepping, anti-debug evasion, and heuristic OEP detection, then captures a state snapshot at the original entry point.
allowed-tools: mcp__x64dbg__list_sessions, mcp__x64dbg__start_session, mcp__x64dbg__connect_to_session, mcp__x64dbg__get_debugger_status, mcp__x64dbg__disconnect, mcp__x64dbg__allocate_memory, mcp__x64dbg__write_memory, mcp__x64dbg__read_memory, mcp__x64dbg__set_register, mcp__x64dbg__get_register, mcp__x64dbg__get_all_registers, mcp__x64dbg__disassemble, mcp__x64dbg__assemble, mcp__x64dbg__set_breakpoint, mcp__x64dbg__clear_breakpoint, mcp__x64dbg__list_breakpoints, mcp__x64dbg__step_over, mcp__x64dbg__step_into, mcp__x64dbg__go, mcp__x64dbg__pause, mcp__x64dbg__run_to_return, mcp__x64dbg__set_comment, mcp__x64dbg__set_label, mcp__x64dbg__get_symbol, mcp__x64dbg__eval_expression, mcp__x64dbg__execute_command, mcp__x64dbg__refresh_gui, mcp__x64dbg__get_memory_map, mcp__x64dbg__trace_over, mcp__x64dbg__trace_into, mcp__x64dbg__wait_for_event, AskUserQuestion, Bash, Read, Write, Skillfind-oep
Smart trace-based OEP finder for packed/protected PE executables. Walks through unpacking stages using intelligent stepping, anti-debug evasion, and heuristic OEP detection. Once the OEP is found, captures a state snapshot for downstream use (PE reconstruction, analysis, etc.).
Instructions
1. Gather input and assess target
Ask the user (via AskUserQuestion) for any information not already provided:
- Target path — absolute path to the packed PE on disk
- x64dbg path — absolute path to x64dbg/x32dbg (if not already known)
- Bitness — 64-bit or 32-bit (default: 64)
Determine the CIP register name: rip for 64-bit, eip for 32-bit.
Determine the stack pointer register: rsp for 64-bit, esp for 32-bit.
Determine the debugger variant: x64dbg.exe for 64-bit, x32dbg.exe for 32-bit.
2. Launch the debugger and load the target
Use mcp__x64dbg__start_session with:
executable_path: the packed PE pathx64dbg_path: the appropriate debugger binary
Always start a new session for a clean environment. Wait for the debugger to settle — call mcp__x64dbg__get_debugger_status and confirm the debuggee is paused at the entry point. If running, call mcp__x64dbg__pause.
Record the session PID and x64dbg path for later reconnection.
3. Initial reconnaissance
Gather information about the packed binary to inform the unpacking strategy:
- Capture entry state: Call
mcp__x64dbg__get_all_registersto record the initial register state (especially the stack pointer — packers often restore it before jumping to OEP). - Memory map: Call
mcp__x64dbg__get_memory_mapto identify the module's sections, their protections, and any suspicious characteristics (e.g., sections with write+execute, sections with zero raw size but large virtual size, non-standard section names). - Entry point disassembly: Disassemble 50–100 instructions from the entry point using
mcp__x64dbg__disassembleto identify the packer stub pattern. - YARA scan: Invoke
/yara-sigsviaSkill("yara-sigs")to identify the packer and obvious crypto/anti-debug signatures.- You may rerun this YARA scan if the packer contains self-decrypting code that hides signatures until unpacked.
Summarize findings to the user:
- Identified packer (if recognized)
- Section layout and anomalies
- Entry stub characteristics
- Recommended unpacking strategy
4. Heuristic OEP discovery (core loop)
This is the main unpacking loop. The goal is to trace through the packer stub and identify when execution transfers to the original, unpacked code.
OEP Heuristics
The OEP is likely reached when several of these conditions align:
| Heuristic | Description |
|---|---|
| Section transition | CIP moves from a packer section (e.g., .rsrc, .aspack, last section) into the original code section (usually .text or the first section) |
| Stack restoration | ESP/RSP returns to (or near) its initial value from step 3 |
| Common OEP patterns | Disassembly shows typical compiler entry sequences: push ebp; mov ebp, esp, sub rsp, N, call __security_init_cookie, MSVC/GCC/Delphi/Borland CRT init patterns |
| Large code region | After writes settle, a large contiguous region of valid-looking code exists in the original code section |
| IAT populated | The import table region contains valid pointers to API functions |
Stepping strategy
-
Start at the packed entry point. Disassemble the current location.
-
Identify the current phase:
- Decode loop: Repetitive instruction patterns (xor, mov byte, loop/dec+jnz). Set a breakpoint after the loop (on the first instruction following the loop exit) and
go. If you cannot determine the loop exit, usemcp__x64dbg__trace_overwith abreak_conditionthat detects leaving the loop (e.g., a CIP range check). - API resolution: Calls to
GetProcAddress,LoadLibrary*, hash-based API resolution. Step over these — they are building the IAT. - Anti-debug check: See step 6 for detection and evasion.
- Inter-module call: Calls into system DLLs. Step over unless they appear suspicious.
- Tail jump / OEP transfer: A
jmporpush+retthat lands in a different section — potential OEP. Verify with the heuristics above. - Multi-stage transition: Decoded stub that itself decodes another layer. Repeat the process.
- Decode loop: Repetitive instruction patterns (xor, mov byte, loop/dec+jnz). Set a breakpoint after the loop (on the first instruction following the loop exit) and
-
When in a repetitive region (same addresses appearing repeatedly):
- Use
mcp__x64dbg__trace_overwith abreak_conditionlikecip < <loop_start> || cip > <loop_end>to escape the loop efficiently. - Alternatively, identify the loop counter and set a conditional breakpoint:
mcp__x64dbg__set_breakpointwith an appropriate condition.
- Use
-
At each significant transition, disassemble 20–30 instructions at the new location, check the memory section it belongs to, and evaluate the OEP heuristics.
-
Label and comment key addresses as you go: decode loop entries, API resolution routines, anti-debug checks, stage transitions, and the final OEP. Use
mcp__x64dbg__set_commentandmcp__x64dbg__set_label.
5. Anti-debug detection and evasion
Packers frequently employ anti-debug techniques. When you encounter them, work around them to simulate non-debugged execution:
| Technique | Detection | Evasion |
|---|---|---|
| IsDebuggerPresent | Call to kernel32.IsDebuggerPresent or direct PEB.BeingDebugged read |
Step to the call, then set eax/rax to 0 after it returns (mcp__x64dbg__set_register) |
| NtQueryInformationProcess (DebugPort) | Call with class 0x7 |
Step over the call, then zero the output buffer (mcp__x64dbg__write_memory) |
| PEB.BeingDebugged | Direct memory read of fs:[30]+2 (x86) or gs:[60]+2 (x64) |
Write 0x00 to the BeingDebugged byte in the PEB (mcp__x64dbg__write_memory). Find PEB address via mcp__x64dbg__eval_expression with peb(). |
| PEB.NtGlobalFlag | Read of PEB+0x68 (x86) or PEB+0xBC (x64) | Write 0x00000000 to clear debug flags |
| Heap flags | PEB.ProcessHeap flags check | Patch the heap flags to remove debug indicators |
| Timing checks | rdtsc, GetTickCount, QueryPerformanceCounter |
Step over the first call, note the result, step over the second, then patch the result to show minimal elapsed time |
| Hardware breakpoint detection | GetThreadContext / direct DR register reads |
Clear debug registers before the check or patch the return values |
| INT 2D / INT 3 tricks | Exception-based anti-debug | Set the appropriate exception handler breakpoint and ensure execution continues as if no debugger is present |
| Self-checksum | CRC/hash of code regions (detects software breakpoints) | Use hardware breakpoints instead of software breakpoints in checksummed regions |
This list is not exhaustive. Always analyze the disassembly to understand the anti-debug technique being used and apply the appropriate evasion.
When you detect anti-debug behavior:
- Inform the user what technique was found
- Apply the evasion
- Verify execution continues normally
- Add a comment at the anti-debug location
Proactive anti-debug setup: At the start of unpacking, consider preemptively patching common PEB fields:
- Write
0x00to PEB.BeingDebugged - Write
0x00000000to PEB.NtGlobalFlag This can be done viamcp__x64dbg__eval_expressionto findpeb(), thenmcp__x64dbg__write_memory.
6. Confirm OEP
When you believe you've reached the OEP:
- Disassemble 50+ instructions and verify the code looks like a real program entry (not packer stub code).
- Check section: Confirm CIP is in the expected code section (
.textor first section). - Check stack: Compare ESP/RSP to the initial value from step 3.
- Check IAT: Read a few pointers from the import section — they should point to valid API functions in loaded DLLs. Use
mcp__x64dbg__get_symbolto verify. - Inform the user with:
- The OEP address
- The section it's in
- A disassembly listing of the first ~30 instructions
- Confidence level and reasoning
Ask the user via AskUserQuestion: "OEP found at <address>. Take a state snapshot?"
If the user says no or wants to adjust, continue stepping as directed.
7. Capture state snapshot
Invoke /state-snapshot via Skill("state-snapshot") to dump the full debuggee memory state at the OEP. Note the snapshot output directory.
Report the final results to the user:
- OEP address and section
- Packer identified
- Anti-debug techniques encountered and evaded
- Snapshot output directory
- The debugger session remains open — the user can continue analysis or chain with other skills
8. Refresh GUI
Always call mcp__x64dbg__refresh_gui as the final step.
当前收录版本
0.0.1
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 针对加壳PE文件的OEP查找是逆向工程和恶意软件分析中的核心任务
- 提供了完整的智能追踪、反调试规避和启发式检测技术方案
- 适用于专业安全分析师和逆向工程师的高频刚需场景
亮点
- 触发词精准描述了基于智能追踪的OEP查找器功能
- 明确指定了适用对象为加壳/受保护的PE可执行文件
- 功能边界清晰,与其他逆向工具区分明显
亮点
- Phase划分清晰,从输入收集到最终快照捕获的完整流程
- 包含详细的OEP启发式检测条件和反调试技术表格
- 提供了具体的寄存器名称判断逻辑和调试器选择策略
亮点
- 使用了正确的x64dbg MCP工具集,参数定义完整
- 包含反调试检测与规避的具体实施方案
- 在关键节点设置了用户确认机制,确保操作可控
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。