Assembly Language & x86 Low-Level Systems Programming · Leçon

Analyse dynamique par traçage et interception

Allez au-delà du désassemblage statique : observez un programme pendant son exécution grâce au traçage des appels système, au traçage des bibliothèques et à l’interception des fonctions pour comprendre son comportement réel.

Leçon 4 sur 413 étapes

Analyse dynamique par traçage et interception est une leçon Assembly Language & x86 Low-Level Systems Programming gratuite sur CoddyKit. Ceci est la leçon 4 sur 4. Tu peux lire la leçon complète ci-dessous gratuitement — puis la pratiquer en direct dans le navigateur avec un éditeur de code intégré et un tuteur IA 24/7. Elle fait partie du parcours d'apprentissage Assembly Language & x86 Low-Level Systems Programming, et ta progression se synchronise sur le web et l'application CoddyKit. Le cours Assembly Language & x86 Low-Level Systems Programming comprend 4 leçons au total.

Certaines parties de cette leçon n'ont pas encore été traduites et s'affichent en anglais.

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 1234

Reading 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") = -1

Function 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 hook

A 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
Gratuit pour commencer

Apprends Assembly avec un tuteur IA — gratuit

Écris et exécute du vrai code dans ton navigateur, obtiens de l'aide instantanée d'un tuteur IA disponible 24h/24, et reprends là où tu t'es arrêté sur le web ou dans l'app.

Cours
12
Leçons
48

Questions Fréquemment Posées

La leçon « Analyse dynamique par traçage et interception » est-elle gratuite ?

Oui — le texte complet de « Analyse dynamique par traçage et interception » est gratuit à lire ici sur le web. Pour la pratiquer de manière interactive (un éditeur de code intégré et un tuteur IA 24/7) et déverrouiller le reste du cours Assembly Language & x86 Low-Level Systems Programming, passe à CoddyKit PRO. Le cours Assembly Language & x86 Low-Level Systems Programming comprend 4 leçons au total.

Qu'est-ce que j'apprendrai dans « Analyse dynamique par traçage et interception » ?

Allez au-delà du désassemblage statique : observez un programme pendant son exécution grâce au traçage des appels système, au traçage des bibliothèques et à l’interception des fonctions pour comprend… Tu pratiques Assembly Language & x86 Low-Level Systems Programming avec du code pratique que tu exécutes directement dans le navigateur, et un tuteur IA 24/7 répond à tes questions au fur et à mesure que tu avances dans la leçon.

Dois-je avoir de l'expérience pour commencer Assembly Language & x86 Low-Level Systems Programming ?

Aucune expérience préalable n'est requise. Assembly Language & x86 Low-Level Systems Programming sur CoddyKit est structuré pour les débutants jusqu'aux apprenants avancés, donc tu peux commencer ici ou depuis le début et avancer à ton rythme. Ceci est la leçon 4 sur 4.

Combien de temps prend la leçon « Analyse dynamique par traçage et interception » ?

La plupart des leçons CoddyKit prennent environ 5–10 minutes. Chacune est courte et interactive, tu progresses régulièrement et tu repiques exactement où tu t'es arrêté sur le web et l'app.

Peux-tu écrire et exécuter du code dans cette leçon Assembly Language & x86 Low-Level Systems Programming ?

Oui. Chaque leçon Assembly Language & x86 Low-Level Systems Programming inclut un éditeur de code intégré, tu écris et exécutes du vrai code directement dans ton navigateur et tu reçois des retours IA instantanés — aucune configuration locale requise.

Toutes les leçons de ce cours

  1. Utiliser GDB pour déboguer de l’assembleur
  2. Introduction aux outils de désassemblage
  3. Techniques de base de rétro-ingénierie
  4. Analyse dynamique par traçage et interception
← Retour à Assembly Language & x86 Low-Level Systems Programming