Using IDA Pro's Debugger. © DataRescue 2005This small tutorial introduces the main functionalities of the ID A D ebugger plugin. ID A supports debugging of x86 Windows PE files, A MD 64 Windows PE files, and x86 Linux ELF files, either locally or remotely. Let's see how the debugger can be used to locally debug a simple buggy C c onsole progra m c ompiled unde r W indows.The buggy program.This progra m s imply c omputes a verages of a s et of va lues (1, 2, 3, 4 a nd 5). T hose va lues a re s tored in t wo a rrays: one c ontaining 8 bi t va lues, the ot her c ontaining 32-bi t va lues. #include char char_average( char array[], int count){ int i; char average; average = 0; for (i = 0; i < count; i++) average += array[i]; average /= count; return average;}int int_average( int array[], int count){ int i, average; average = 0; for (i = 0; i < count; i++) average += array[i]; average /= count; return average;}void main( void) { char chars[] = { 1, 2, 3, 4, 5 }; int integers[] = { 1, 2, 3, 4, 5 }; printf( "chars[] - average = %d\n ", char_average(chars, sizeof(chars))); printf( "integers[] - average = %d\n ", int_average(integers, sizeof(integers)));}IDA Pro Debugger Tutorial 1Running t his progra m gi ves us t he fol lowing re sults: chars[] - average = 3integers[] - average = 1054228Obviously, the computed average on the integer array is wrong. Let's use ID A 's debugger to ...
Voir