|
|
发表于 2009-7-20 18:50:20
|
显示全部楼层
你可以先了解下DMA。
4 N# O7 e! }7 g# i+ i" W) A2 F) i V
, C# ^0 g% [: D. q4 F# ~簡單的說要找base addr,: }4 w4 f; V$ X7 z
我們只需關注pointer。& {/ `/ N. l6 _. N" V5 P
以下是原理:. t6 D! g2 s( |: @/ s# i4 N7 W2 I
1 {9 J9 ^$ w7 H£ex in x86 asm. Q7 f4 \! e7 E' H" j
1.mov dword ptr ds:[edx+4],edi7 I5 e. m2 y# d8 g3 P# s2 d
+ s7 {5 I+ i% c/ {( \* d
if the edx+4 is the dma addr which you want to find.# q! K1 c4 E. Q+ L7 c( N
edx is the base addr.
# ]. S5 z3 o8 m- v% f4 v4 p& {2 N5 Y; D' K" L! Q
2.lea eax, [8*ecx+ecx]
0 Z( V& J* d8 j; Vif the eax is the dma addr which you want to find.: t; P2 K; E5 C/ g
ecx is the base addr.2 S; y! ^7 i0 `, _2 B! {9 O
) t' g2 v8 t8 m# z4 u
/ Q( I9 Z& ^$ d) T$ c3 ]$ |" F+ C£ex in C++:
1 j, @6 m" V, F( ^% w% ]: n5 ?DWORD *BaseAddr,val=0xea937f26;
" g, f t0 h* G( MBaseAddr = new DWORD; D4 g( U& d8 O. s% Y
*(BaseAddr+4)=val;
2 A# x3 w. j7 x7 Dcout<<"OffsetAddr:"<<*(BaseAddr+4)<<endl;
Q) F, ^) Z7 {, U, K©2009 VD7 Hacker Team Master- Krizal Chen# S2 C* M. J- c# l% v$ p# b2 R
- W v3 {& u; z4 \
0 T! t# x" G( g! |: z8 f: z* o- ]; y4 T$ A
以上已經涵蓋找出baseaddr需要的原理,3 k' L# p6 y/ u5 B& C4 R
接著用debugger分析和追蹤程式碼就要靠自己的努力了,
! @( @9 S, Q+ M- X想學更多的話,個人最近沒什麼時間。
% p; M. k# e( g7 ^2 Z. T8 `, @) w, S8 z6 D! b, B) { u
找龍兒吧,如果他願意教的話,
6 ~' f* D7 O* u3 e: ^1 q你可以學到不少。
! w& G" a" `$ B ?. S( p/ G+ ]8 t0 e+ a- k, S, B
[ 本帖最后由 krizal 于 2009-7-20 20:06 编辑 ] |
|