التحليل الديناميكي بالتتبّع والاعتراض
تجاوز التفكيك الساكن، وراقب البرنامج أثناء تشغيله باستخدام تتبّع استدعاءات النظام وتتبّع المكتبات واعتراض الدوال لفهم سلوكه الفعلي.
التحليل الديناميكي بالتتبّع والاعتراض درس مجاني في Assembly Language & x86 Low-Level Systems Programming على CoddyKit. هذا هو الدرس 4 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Assembly Language & x86 Low-Level Systems Programming، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Assembly Language & x86 Low-Level Systems Programming 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
Static vs Dynamic Analysis
Static analysis inspects a binary without running it (disassembly, strings). Dynamic analysis watches the program while it executes, revealing behavior that only appears at runtime, such as decrypted strings or network calls.
Why Dynamic Analysis Wins
Packed or obfuscated binaries hide their logic from a disassembler. But to actually do anything, the code must eventually run real instructions and make real syscalls — and that is exactly what dynamic tools capture.
System Call Tracing with strace
On Linux, strace logs every system call a process makes. It instantly shows files opened, network connections, and arguments passed to the kernel.
strace -f ./target # follow child processes
strace -e trace=network ./bin # only network syscalls
strace -p 1234 # attach to running PID 1234Reading strace Output
Each line is a syscall with arguments and return value:
openat(AT_FDCWD, "/etc/passwd", O_RDONLY) = 3
This reveals the program read /etc/passwd and got file descriptor 3 — behavior invisible in static text.
Library Call Tracing with ltrace
ltrace traces calls into shared libraries, like strcmp, malloc, or getenv. This is gold for cracking password checks where the comparison happens in libc.
ltrace ./crackme
# strcmp("hunter2", "letmein") = -1Function Hooking
Hooking intercepts a function call to inspect or change arguments and return values. You redirect the original function pointer to your own code, do your work, then optionally call the original.
LD_PRELOAD Interception
On Linux you can override any libc function by exporting a replacement in a preloaded shared object. The loader resolves your symbol first.
export LD_PRELOAD=./myhook.so
./target # calls now route through your hookA Simple Hook in C
This overrides strcmp to log every comparison, then calls the real one via dlsym(RTLD_NEXT, ...).
#define _GNU_SOURCE
#include <stdio.h>
#include <dlfcn.h>
#include <string.h>
int strcmp(const char *a, const char *b) {
int (*real)(const char*, const char*) = dlsym(RTLD_NEXT, "strcmp");
fprintf(stderr, "strcmp: %s vs %s\n", a, b);
return real(a, b);
}Hardware and Software Breakpoints
Dynamic debuggers use breakpoints to pause execution. A software breakpoint replaces a byte with 0xCC (INT 3). A hardware breakpoint uses the CPU debug registers DR0-DR3 and can also trip on memory reads/writes.
Instrumentation Frameworks
For heavy automation, frameworks like Frida and Intel Pin inject instrumentation at runtime. Frida lets you script hooks in JavaScript while the target runs — ideal for mobile and live analysis.
Anti-Debugging Awareness
Malware fights back. It may call ptrace(PTRACE_TRACEME) to detect a debugger, check timing, or scan for 0xCC bytes. Recognizing these checks is part of dynamic reverse engineering.
Quick Check
Test your dynamic-analysis knowledge.
Recap
You learned to analyze running programs:
- Dynamic analysis reveals runtime behavior static tools miss
- strace traces syscalls; ltrace traces library calls
- Hooking via LD_PRELOAD or Frida intercepts function calls
- Breakpoints (INT 3 / debug registers) and anti-debugging tricks shape the work
الأسئلة الشائعة
هل درس «التحليل الديناميكي بالتتبّع والاعتراض» مجاني؟
نعم — نص درس «التحليل الديناميكي بالتتبّع والاعتراض» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Assembly Language & x86 Low-Level Systems Programming، انتقل إلى CoddyKit PRO. تتضمن دورة Assembly Language & x86 Low-Level Systems Programming 4 دروس في المجموع.
ماذا ستتعلم في «التحليل الديناميكي بالتتبّع والاعتراض»؟
تجاوز التفكيك الساكن، وراقب البرنامج أثناء تشغيله باستخدام تتبّع استدعاءات النظام وتتبّع المكتبات واعتراض الدوال لفهم سلوكه الفعلي. تتمرن على Assembly Language & x86 Low-Level Systems Programming مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ Assembly Language & x86 Low-Level Systems Programming؟
لا تُشترط خبرة سابقة. Assembly Language & x86 Low-Level Systems Programming على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 4 من أصل 4.
كم من الوقت يستغرق درس «التحليل الديناميكي بالتتبّع والاعتراض»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس Assembly Language & x86 Low-Level Systems Programming هذا؟
نعم. كل درس في Assembly Language & x86 Low-Level Systems Programming يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- استخدام GDB لتصحيح أخطاء Assembly
- مقدمة إلى أدوات التفكيك
- تقنيات الهندسة العكسية الأساسية
- التحليل الديناميكي بالتتبّع والاعتراض