Assembly Language & x86 Low-Level Systems Programming · Aula

Análise dinâmica com rastreamento e interceptação

Vá além da desmontagem estática: observe um programa enquanto ele é executado usando rastreamento de chamadas do sistema, rastreamento de bibliotecas e interceptação de funções para entender seu comportamento real.

Aula 4 de 413 etapas

Análise dinâmica com rastreamento e interceptação é uma aula grátis de Assembly Language & x86 Low-Level Systems Programming no CoddyKit. Esta é a aula 4 de 4. Você pode ler a aula completa abaixo gratuitamente — depois pratica ao vivo no navegador com um editor de código integrado e um tutor de IA 24/7. Faz parte do caminho de aprendizado de Assembly Language & x86 Low-Level Systems Programming, e seu progresso é sincronizado entre a web e o app CoddyKit. O curso de Assembly Language & x86 Low-Level Systems Programming inclui 4 aulas no total.

Partes desta aula ainda não foram traduzidas e aparecem em inglês.

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
Grátis para começar

Aprenda Assembly com um tutor de IA — grátis

Escreva e execute código real no seu navegador, obtenha ajuda instantânea de um tutor de IA 24/7 e continue de onde parou na web ou no app.

Cursos
12
Aulas
48

Perguntas Frequentes

A aula “Análise dinâmica com rastreamento e interceptação” é grátis?

Sim — o texto completo de “Análise dinâmica com rastreamento e interceptação” é grátis para ler aqui na web. Para praticá-la interativamente (um editor de código integrado e um tutor de IA 24/7) e desbloquear o restante do curso de Assembly Language & x86 Low-Level Systems Programming, atualize para CoddyKit PRO. O curso de Assembly Language & x86 Low-Level Systems Programming inclui 4 aulas no total.

O que vou aprender em “Análise dinâmica com rastreamento e interceptação”?

Vá além da desmontagem estática: observe um programa enquanto ele é executado usando rastreamento de chamadas do sistema, rastreamento de bibliotecas e interceptação de funções para entender seu comp… Você pratica Assembly Language & x86 Low-Level Systems Programming com código prático que executa diretamente no navegador, e um tutor de IA 24/7 responde suas dúvidas enquanto trabalha na aula.

Preciso ter experiência prévia para começar Assembly Language & x86 Low-Level Systems Programming?

Nenhuma experiência prévia é necessária. Assembly Language & x86 Low-Level Systems Programming no CoddyKit é estruturado para alunos iniciantes até avançados, então você pode começar aqui ou desde o início e aprender no seu ritmo. Esta é a aula 4 de 4.

Quanto tempo leva a aula “Análise dinâmica com rastreamento e interceptação”?

A maioria das aulas CoddyKit leva cerca de 5–10 minutos. Cada uma é compacta e interativa, então você faz progresso constante e retoma exatamente de onde parou entre web e app.

Posso escrever e executar código nesta aula de Assembly Language & x86 Low-Level Systems Programming?

Sim. Cada aula de Assembly Language & x86 Low-Level Systems Programming inclui um editor de código integrado, então você escreve e executa código real direto no navegador e recebe feedback de IA instantaneamente — nenhuma configuração local necessária.

Todas as aulas deste curso

  1. Usando o GDB para Depuração de Assembly
  2. Introdução às Ferramentas de Desmontagem
  3. Técnicas Básicas de Engenharia Reversa
  4. Análise dinâmica com rastreamento e interceptação
← Voltar para Assembly Language & x86 Low-Level Systems Programming