2012-05-07 10 views

cevap

3

Derlemeyi biliyorsanız, aksamı değiştirmek için a komutunu kullanabilirsiniz (yani, tüm NOP'lara "a = 25;" için opcodes'i döndürün). NOP yapmak istediğimde veya bir yönerge akışını değiştirdiğimde normalde yaptığım şey budur.

Bazen insanlar NOP öğretim için bayt kod 0x90 olmasına güvenmek ve hafızayı düzenlemek için E'yi komutunu kullanacağız (örneğin, "ew @eip 0x9090"). Bu, a komutunu kullanarak aynı sonucudur.

Son olarak, seyrek Bu işlemi isabet ve sadece elle, GUI operasyon "Mevcut Talimatı ayarla" kullanabilirsiniz talimat atlamak istiyorsanız eğer:

http://msdn.microsoft.com/en-us/library/windows/hardware/ff542851(v=vs.85).aspx

2

burada bir öğretici yok ki Bunu nasıl yapacağınızı açıklarsanız, ofseti, satır atlayacak şekilde ayarlayabilirsiniz: http://cfc.kizzx2.com/index.php/tutorial-using-windbg-to-bypass-specific-functions-windbg-kung-fu-series/ ve register eip değerini bu değere ayarlayın.

Ayrıca, kesme noktası ayarlamak ve kesme içine komutu koymak aynı şeyi yapabilirsiniz: http://japrogbits.blogspot.co.uk/2010/01/using-breakpoints-to-skip-function-in.html ve başka bir blog: http://www.shcherbyna.com/?p=1234 ve ayrıca aynı ulaşmak için .call kullanabilirsiniz: Yeniden http://blogs.msdn.com/b/oldnewthing/archive/2007/04/27/2292037.aspx

5

çok geç montaj karıştırmasını tercih değilse cevap
Eğer
böylece o boşlukta bir koşullu kesme noktası olarak ayarlanmış yürütmek istemiyorum 401034 aşağıdaki örnekte satır bir satır

edilir yürütme atlamak için koşullu bir kesme noktası ayarlamak ama o

bp 401034 "r eip = @$eip + size of current instruction";gc" bu durumda gc = go yılında

jmptest:\>dir /b 
jmptest.c 

jmptest:\>type jmptest.c 
#include <stdio.h> 
int func() 
{ 
    int a = 10 , b = 20; 
    a = 25; 
    b = 30; 
    return a+b; 
} 
int main (void) 
{ 
    int i , ret; 
    for (i= 0; i< 10; i++) 
    { 
     ret = func(); 
     printf("we want 40 we get %d\n",ret); 
    } 
    return 0; 
} 
jmptest:\>cl /nologo /Zi jmptest.c 
jmptest.c 

jmptest:\>dir /b *.exe 
jmptest.exe 

jmptest:\>cdb -c "uf func;q" jmptest.exe | grep 401 
00401020 55    push ebp 
00401021 8bec   mov  ebp,esp 
00401023 83ec08   sub  esp,8 
00401026 c745fc0a000000 mov  dword ptr [ebp-4],0Ah 
0040102d c745f814000000 mov  dword ptr [ebp-8],14h 
00401034 c745fc19000000 mov  dword ptr [ebp-4],19h 
0040103b c745f81e000000 mov  dword ptr [ebp-8],1Eh 
00401042 8b45fc   mov  eax,dword ptr [ebp-4] 
00401045 0345f8   add  eax,dword ptr [ebp-8] 
00401048 8be5   mov  esp,ebp 
0040104a 5d    pop  ebp 
0040104b c3    ret 

jmptest:\>cdb -c "bp 401034 \"r eip = 0x40103b;gc\";g;q " jmptest.exe | grep wan 
t 
we want 40 we get 40 
we want 40 we get 40 
we want 40 we get 40 
we want 40 we get 40 
we want 40 we get 40 
we want 40 we get 40 
we want 40 we get 40 
we want 40 we get 40 
we want 40 we get 40 
we want 40 we get 40 

jmptest:\> 
kırmak conditionl atlamak
İlgili konular