調試器原理與架構3. • 白盒調試器
開發平台 & IDE 通常會配置的內建調試器
提供開發者更高級別的進程控制能力
黑盒調試器
目標行程的跟蹤
用戶態調試器(ring 3)V.S 內核態調試器 (ring 0)
6. FILO的參數結構
堆疊由內存高的位址向內存低的位址增長
EX :
int my_socks(a27_one, a27_two, a27_three)
組語型態
push a27_one
push a27_two
push a27_three
Call my_socks
Hint:
ESP暫存器用於紀
錄當前堆疊的頂部
EBP暫存器用於紀
錄當前堆疊的底部
返回地址
a27_one
a27_two
a27_three
堆疊基地址
ESP暫存器
EBP暫存器
堆疊增長方向
進程執行方向
9. 工具 : Lazy Engine
鎖定記憶體
更改描述
更改地址
更改數值
更改類型
10. 題目 :
[Neo]
Hmm... there is no clue to track down the
criminals.
But, there is one way I love to use.
Getting myself into the virtual world.
It risks my life, but saving the world is worth
risking!
I will get into the virtual world for clues!
23. if ( Msg != 273 )
return
DefWindowProcA(hW
nd, Msg, wParam,
lParam);
if ( (unsigned
__int16)wParam == 1 )
{
GetWindowTextA(::hW
nd, &String, 128);
SetWindowTextA(hWn
d, &String);
v16 = 5;
do
{
String -= v16;
String ^= 3u;
--v16;
}
while ( v16 );
v17 = 4;
do
{
v23 -= v17;
v23 ^= 4u;
--v17;
}
while ( v17 );
v18 = 3;
do
{
v24 -= v18;
v24 ^= 5u;
--v18;
}
while ( v18 );
v19 = 2;
do
{
v25 -= v19;
v25 ^= 6u;
--v19;
while ( v19 );
v20 = strcmp(&String,
"C;@R");
if ( v20 )
v20 = -(v20 < 0) | 1;
if ( v20 )
{
MessageBoxA(hWnd,
";;", "ohtahacker", 0);
exit(0);
}
MessageBoxA(hWnd,
"congratulation",
"ohtahacker", 0);
加密的地方找到了
25. 從IDA & OD 看出簡單的迴圈
Pseudocode ex :
while(LoopCount--)
{
InputText[i] -= LoopCount;
InputText[i] ^= XorKey;
}