मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी6.5k · #14161

anti-debug-bypass

यह क्या करती है

यह प्रोग्राम में आम anti-debugging और anti-VM जाँचों का वर्णन करती है, और यह कि विश्लेषक लैब में उनसे कैसे निपटते हैं। यह संरक्षित या दुर्भावनापूर्ण सॉफ़्टवेयर का अध्ययन करने वाले रिवर्स इंजीनियरों के लिए है।

कब इस्तेमाल करें

  • ✓जब विश्लेषक को दिखे कि debugger जुड़ने पर प्रोग्राम बंद होता है या अलग व्यवहार करता है।
  • ✓जब शोधकर्ता पता करना चाहे कि कोई सैंपल कौन सी anti-debugging जाँच इस्तेमाल करता है।
  • ✓जब टीम किसी संरक्षित प्रोग्राम का अध्ययन कर रही हो और देखना हो कि वह virtual machine पर कैसे प्रतिक्रिया देता है।

Skill का लिंक

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/reverser/anti-debug-bypass/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/reverser/anti-debug-bypass/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मैं debugger जोड़ता हूँ तो यह प्रोग्राम चलना बंद कर देता है। मैं पता कैसे करूँ कि ऐसा क्यों होता है?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह स्किल आम जाँचों की सूची देती है, दिखाती है कि प्रोग्राम में उन्हें कैसे खोजें, और समझाती है कि विश्लेषण के दौरान हर एक से कैसे निपटा जाता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

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)

  1. Install ScyllaHide plugin
  2. In the plugin, enable all checks (PEB patches, NtSetInformation hooks, etc)
  3. Open the binary, set BP at entry → continue
  4. 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
अक्सर पूछे जाने वाले सवाल

यह कौन सी जाँचें कवर करती है?

Windows debugger जाँच, Linux ptrace जाँच और virtual machine पहचान।

विश्लेषकों को इसकी ज़रूरत क्यों है?

कुछ प्रोग्राम विश्लेषण टूल पकड़ने पर अपना व्यवहार छिपा लेते हैं, इसलिए ये जाँचें पहले समझनी होती हैं।

क्या यह दूसरों से गतिविधि छिपाने के लिए है?

नहीं। यह लैब में विश्लेषण कार्य के लिए है, ताकि समझा जा सके कि प्रोग्राम कैसे व्यवहार करता है।

जानकारी

लेखक का मूल विवरण

Detect and neutralize anti-debug / anti-VM checks — IsDebuggerPresent, ptrace, NtGlobalFlag, timing, hardware-breakpoint detection.

repo: BitterSecurity/Decepticon

लोकप्रियता

GitHub स्टार
6.5k
रैंकिंग में स्थान
#14161
लाइसेंस
Apache-2.0
अपडेट की गई
1/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

detector-overview

6.5k

यह आपके एजेंट को स्कैनर से चिह्नित कोड पढ़ने और तय करने में मदद करती है कि कौन सी जगहें असली सुरक्षा बग हैं और कौन सी गलत चेतावनी।

कोडिंगसिक्योरिटी

exploiter-overview

6.5k

यह आपके एजेंट को कई पक्की सुरक्षा कमज़ोरियों को एक परीक्षण श्रृंखला में जोड़ने और जाँचने में मदद करती है कि वह श्रृंखला कितनी दूर तक पहुँच सकती है।

कोडिंगसिक्योरिटी

llm-redteam-overview

6.5k

यह आपके एजेंट को परीक्षण के लिए सही AI रेड-टीम गाइड खोजने में मदद करती है, प्रॉम्प्ट इंजेक्शन से लेकर मॉडल के दुरुपयोग तक 15 रणनीति समूहों में।

कोडिंगसिक्योरिटी

aatmf-t01-prompt-injection

6.5k

समझाती है कि प्रॉम्प्ट इंजेक्शन क्या है, जिसमें छिपे निर्देश AI सिस्टम के नियम बदलने की कोशिश करते हैं, ताकि सुरक्षा परीक्षक उसकी जाँच कर सकें।

कोडिंगसिक्योरिटी

मिलती-जुलती skills