Posts for: #Offsec

[OSED, EXP-301] Instructional notes

OSED / EXP-301 instructional notes covering x86 architecture and WinDbg debugging, stack buffer overflow exploitation, SEH overflows and SafeSEH, reverse engineering with IDA Pro, egghunters under space restrictions, and hand-written x86 custom shellcode with PEB walking, export table parsing, API hashing, NULL-free position-independent code, and a reverse shell.

[]

[OSED, EXP-301] Instructional notes - Part 4

OSED EXP-301 筆記 Part 4,將 SEH-Based Egghunter 透過修改 TEB StackBase 移植到 Windows 10,接著手寫 x86 Custom Shellcode:以 PEB Method 定位 kernel32.dll、解析 Export Table 並用 Hash 比對找出 API,實作 NULL-Free 與 Position-Independent Shellcode,最後串接 ws2_32.dll 的 WSAStartup、WSASocketA、WSAConnect 與 CreateProcessA 取得 Reverse Shell。

[]

[OSED, EXP-301] Instructional notes - Part 3

OSED EXP-301 筆記 Part 3,聚焦空間受限環境下的 Egghunter 漏洞利用,以 Savant Web Server 3.1(CVE-2002-1120)為例,涵蓋 crash 分析與 Bad Characters 偵測、Partial EIP Overwrite、以 POP EAX; RET 與 Conditional Jump 將執行流程導回並改寫 HTTP Method、Windows Heap Memory Manager 與第二階段 Buffer 配置、使用 Keystone Engine 組譯 Egghunter、透過 NtAccessCheckAndAuditAlarm System Call 掃描記憶體並修正 Windows 10 System Call Number 與 Null Byte 問題、msfvenom Meterpreter payload 取得 Shell,以及改用 SEH-based Egghunter 提升跨版本可攜性等等。

[]

[OSED, EXP-301] Instructional notes - Part 2

OSED EXP-301 筆記 Part 2,整理 SEH Overflow 利用、Structured Exception Handling 機制、TEB、SafeSEH & SEHOP、KiUserExceptionDispatcher & RtlDispatchException、以 narly 定位未啟用 SafeSEH 的模組、POP POP RET & NSEH/SEH 覆寫、short jump & Island-Hopping,以及 IDA Pro 反組譯介面、Graph/Text/Proximity view、Search 與 Cross-Reference、IDA 與 WinDbg 的 Static-Dynamic 同步(Rebase program)、追蹤 Notepad 的 CreateFileW 與 ReadFile 等等。

[]

[OSED, EXP-301] Instructional notes - Part 1

OSED EXP-301 筆記 Part 1,涵蓋 x86 架構與 CPU 暫存器、WinDbg 除錯基礎(記憶體讀寫、符號、Software/Hardware 中斷點、單步執行),以及 Stack Buffer Overflow 利用:以 Sync Breeze 為例控制 EIP、尋找 JMP ESP、檢查 Bad Characters,並用 msfvenom 產生 shellcode 取得 reverse shell。

[]