anti-debug-bypass
Skill này làm gì
Skill mô tả các kiểm tra chống gỡ lỗi và chống máy ảo phổ biến trong chương trình, cùng cách nhà phân tích xử lý chúng trong phòng thí nghiệm. Dành cho kỹ sư dịch ngược nghiên cứu phần mềm được bảo vệ hoặc độc hại.
Khi nào nên dùng
- ✓Khi nhà phân tích thấy chương trình tự đóng hoặc hoạt động khác khi có trình gỡ lỗi đính kèm.
- ✓Khi nhà nghiên cứu muốn tìm xem một mẫu dùng những kiểm tra chống gỡ lỗi nào.
- ✓Khi một đội đang nghiên cứu chương trình được bảo vệ và cần xem nó phản ứng thế nào với máy ảo.
Liên kết skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/reverser/anti-debug-bypass/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Chương trình này dừng chạy khi tôi đính kèm trình gỡ lỗi. Làm sao để biết lý do?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill liệt kê các kiểm tra phổ biến, chỉ cách quét chương trình để tìm chúng và giải thích cách xử lý từng kiểm tra khi phân tích.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Anti-Debug Bypass Playbook
Malware and protected commercial software check for debuggers and sandboxes before running real logic. Bypassing these checks is required to dynamically analyze them. Each check has a known counter.
1. Enumerate anti-debug techniques in the binary
Static signature scan
# Windows API calls
strings /tmp/sample | grep -iE 'IsDebuggerPresent|NtQuery|CheckRemoteDebugger|OutputDebugString'
# Linux ptrace check
strings /tmp/sample | grep -iE 'ptrace|/proc/self/status|TracerPid'
# CPUID hypervisor check
strings /tmp/sample | grep -iE 'vmware|VirtualBox|qemu|xen'
# Detect via YARA rules
yara -r /opt/yara-rules/anti_debug.yar /tmp/sample
Decepticon helper:
bin_anti_debug_scan("/tmp/sample")
2. Common checks + bypasses
Windows checks
| Check | What it does | Bypass |
|---|---|---|
IsDebuggerPresent() |
reads PEB.BeingDebugged byte | Set PEB.BeingDebugged = 0 in debugger; ScyllaHide handles |
CheckRemoteDebuggerPresent() |
calls NtQueryInformationProcess(ProcessDebugPort) | Patch return to FALSE; ScyllaHide hooks the syscall |
NtQueryInformationProcess(ProcessDebugPort) |
returns nonzero if debugger attached | Hook + return 0 |
NtQueryInformationProcess(ProcessDebugFlags) |
returns 0 if debugger, 1 if not | Force return 1 |
NtQueryInformationProcess(ProcessDebugObjectHandle) |
nonzero handle if attached | Force NULL |
PEB.NtGlobalFlag |
0x70 if heap debugging | Set to 0 |
PEB.HeapFlags & PEB.ForceFlags |
non-default if debugger | Reset to defaults |
NtSetInformationThread(ThreadHideFromDebugger) |
unhook debugger from thread | Hook NtSetInformationThread |
INT 2D / INT 3 exception handling |
normal flow if no debugger | Set exception handler in debugger |
Hardware breakpoint detection (GetThreadContext check) |
reads DR0-3, fails if BPs set | Use software BPs, or zero DRs before check |
ScyllaHide (x64dbg/x32dbg/IDA plugin) handles essentially all of these automatically.
Linux checks
| Check | What it does | Bypass |
|---|---|---|
ptrace(PTRACE_TRACEME) |
fails if already traced | Run w/o ptrace, or use LD_PRELOAD to hook |
Read /proc/self/status TracerPid: |
nonzero if debugger | LD_PRELOAD hook reading; or modify /proc on a fork |
prctl(PR_SET_DUMPABLE, 0) |
prevents gdb attach |
Patch out the prctl |
getppid() parent process name |
if it's gdb/strace | rename gdb binary, or LD_PRELOAD getppid |
Timing checks via rdtsc |
measures execution time | Use gdb's set $rax = ... to fake; or patch rdtsc out |
LD_PRELOAD bypass example
// bypass.c
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <sys/ptrace.h>
#include <string.h>
long ptrace(int request, int pid, void *addr, void *data) {
return 0; // pretend it always succeeds
}
FILE *fopen(const char *path, const char *mode) {
static FILE *(*orig)(const char *, const char *) = NULL;
if (!orig) orig = dlsym(RTLD_NEXT, "fopen");
if (strstr(path, "/proc/self/status") || strstr(path, "/proc/self/stat")) {
// Return a doctored file
FILE *tmp = tmpfile();
fprintf(tmp, "TracerPid:\t0\n");
rewind(tmp);
return tmp;
}
return orig(path, mode);
}
gcc -shared -fPIC bypass.c -o bypass.so -ldl
LD_PRELOAD=./bypass.so gdb /tmp/sample
3. Anti-VM / sandbox detection
| Check | Bypass |
|---|---|
| CPUID leaf 0x40000000 (hypervisor bit) | Mask CPUID via KVM -cpu host,-hypervisor or VMM config |
VMware backdoor 0x564D5868 magic via IN/OUT |
Patch the magic number check |
| MAC address vendor (00:0C:29 = VMware) | Spoof MAC in VM config |
| Disk size < 50GB | Allocate larger disk for the analysis VM |
| RAM < 2GB | Provision more RAM |
Username sandbox, vagrant, virtual |
Change username in analysis env |
| Recent file count low | Pre-populate Documents folder before run |
| Mouse cursor never moves | Use xdotool to inject mouse jitter |
| Process count, uptime, kernel objects | Boot the VM a while before analysis |
4. Dynamic bypass via debugger
x64dbg / x32dbg (Windows)
- Install ScyllaHide plugin
- In the plugin, enable all checks (PEB patches, NtSetInformation hooks, etc)
- Open the binary, set BP at entry → continue
- ScyllaHide neutralizes most checks transparently
IDA Pro
- Built-in remote debugger + IDAStealth plugin
- For step-tracing through anti-debug: `Debugger options → Suspend on library load
Câu hỏi thường gặp
Nó bao gồm những kiểm tra nào?
Nó bao gồm kiểm tra trình gỡ lỗi của Windows, kiểm tra ptrace của Linux và phát hiện máy ảo.
Vì sao nhà phân tích cần điều này?
Một số chương trình ẩn hành vi khi phát hiện công cụ phân tích, nên cần hiểu các kiểm tra này trước.
Có dùng để che giấu hoạt động không?
Không. Nó nói về công việc phân tích trong phòng thí nghiệm, để hiểu chương trình hoạt động thế nào.
Chi tiết
Mô tả gốc của tác giả
Detect and neutralize anti-debug / anti-VM checks — IsDebuggerPresent, ptrace, NtGlobalFlag, timing, hardware-breakpoint detection.
Độ phổ biến
- Sao GitHub
- 6.5k
- Vị trí xếp hạng
- #14161
- Giấy phép
- Apache-2.0
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
detector-overview
6.5kGiúp agent của bạn đọc code mà một công cụ quét đã đánh dấu, rồi quyết định điểm nào là lỗ hổng bảo mật thật và điểm nào là báo động giả.
exploiter-overview
6.5kGiúp agent của bạn ghép nhiều lỗ hổng bảo mật đã xác nhận thành một chuỗi kiểm thử và kiểm tra chuỗi đó có thể gây hậu quả đến đâu.
llm-redteam-overview
6.5kGiúp agent của bạn tìm đúng hướng dẫn red-team AI cho một bài kiểm thử, bao quát 15 nhóm chiến thuật từ prompt injection đến lạm dụng mô hình.
aatmf-t01-prompt-injection
6.5kGiải thích prompt injection, khi các chỉ dẫn ẩn cố ghi đè một hệ thống AI, để chuyên gia bảo mật có thể kiểm tra lỗi này.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.