Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Reverse 0x2@HackerSir 10th

YJK
August 31, 2024
0

Reverse 0x2@HackerSir 10th

YJK

August 31, 2024
Tweet

Transcript

  1. Dynamic Analysis Tool GDB • GNU Debugger • 互動式的 shell

    • CLI x64dbg • For Windows • GUI • x32dbg WinDbg • 微軟開發 • 對 Windows 相容性較高 • GUI
  2. GDB

  3. GDB • GNU Debugger • GNU 系統中的標準除錯器 • 許多類 UNIX

    系統都可以使用 • 支援許多語言,包括 C、C++ 等
  4. GDB - Examine • 特定格式將記憶體印出 • x/<fmt> <address> • fmt

    = count + size + format • ex: x/2gx $rax • size: b (byte)、h (halfword)、w (word)、g (giant, 8 bytes) • format: x (hex)、d (decimal)、c (char)、s (string)…
  5. Operation code • ldc: 將常數載入到 stack 上 • astore_1: 將資料儲存到區域變數索引值

    = 1 的位置 • aload_1: 將區域變數索引值 = 1 的資料載入到 stack 上
  6. Virtual Machine System Virtual Machine • 完整系統 (ex: Ubuntu、kali、Windows) •

    Hypervisor • ex: VMWare、VirtualBox Process Virtual Machine • 專門提供給特定架構 • 環境提供執行某個特定架構的程式 • ex: JVM (Java Virtual Machine)
  7. Java • 編譯成 bytecode 形式 • 在 JVM 上執行 •

    只要有對應的環境就可以執行
  8. How Java Works? source code (.java) Java Compiler (javac) Java

    ByteCode (.class) JVM JVM Windows Linux
  9. Java disassemble • 安裝好 JDK 後有個指令 javap • javap <options>

    <classes> • Options: -c Disassemble the code • javap –c main
  10. Java decompile • JD-GUI • Procyon • CFR • JD-Core

    • Jadx • Fernflower • JAD • Online-tool
  11. Decompile .jar or .class • 選擇一個 .class 或是 .jar •

    底下選項不用特地改變 • 上傳並反編譯