Cutter: Having trouble debugging a exe with cutter which otherwise debuggs fine

Created on 11 Feb 2020  路  3Comments  路  Source: rizinorg/cutter

Environment information

  • Operating System: Microsoft Windows 10 Pro
  • Cutter version: 1.10.1
  • Obtained from:

    • [] Built from source

    • [x ] Downloaded from release

    • [ ] Distribution repository

  • File format:
    The file is a .exe file.
    Describe the bug

To put it simple i wrote a simple crack me and cracked it with x64 a couple of hours later i looked into the exe with cutter and cutter did show me instead of the jge , jle , jne that it detected this region of the exe as:

" ;-- str.This_is_not_the_right_number:
.string "\n This is not the right number \n"

To Reproduce

  1. Use this src for the cpp=

include

using namespace std;

int main(){

int a;

int b = 3645;

int c = 3452;

int d = 3546;

// "right" number is 10643

cout << "please enter a number";

cin >> a;

cout << "your number is" << a ;

if(a > b+c+d)
{
cout<< "\n This is not the right number \n";
}

if(a < b+c+d)
{
cout<< "\n This is not the right number \n";
}

if(a == b+c+d)
{
cout<< "\n This is not the right number \n";
}

}

  1. compile the src with mingw w64:

https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download

  1. search for the strings :

please enter a number

your number is

This is not the right number

Expected behavior

The expected behavior is that it will output this gibberish:

;-- section..rdata:
0x00404000 add byte [rax + 0x6c], dh ; [02] -r-- section size 4096 named .rdata
0x00404001 ;-- str.please_enter_a_number:
0x00404001 .string "please enter a number" ; len=22
0x00404017 ;-- str.your_number_is:
0x00404017 .string "your number is" ; len=15
0x00404026 add byte [rax], al
0x00404028 ;-- str.This_is_not_the_right_number:
0x00404028 .string "\n This is not the right number \n" ; len=33

instead of:

for example:

00000000004015C8 | 39C2 | cmp edx,eax | edx:EntryPoint, eax:EntryPoint
-- | -- | -- | --
00000000004015CA | 7D 13 | jge cuttertest.4015DF | 聽
00000000004015CC | 48:8D15 552A0000 | lea rdx,qword ptr ds:[404028] | rdx:EntryPoint, 0000000000404028:"\n This is not the right number \n"

Screenshots

both:

https://imgur.com/a/JvsGQXX

x64 dbg:

https://imgur.com/ck6hPP4

cutter:

https://imgur.com/U26IJpi

Additional context

Hopefully this is not a misunderstanding and i am missing something :) anyway hopefully this cleared up.

Most helpful comment

Seems like you're looking at the data section that contains the strings, and not at the code section. Use the functions list at the left to navigate between the functions. Otherwise, you can X-Ref the usage of these string by navigating to them and pressing X, either on the list of Strings or on the places you should in your screenshot

All 3 comments

Thank you! I didn't read the issue yet, but can you please share the exact binary file you used? It's better than compiling by ourselves because we would want to have an environment as similar to yours.

Seems like you're looking at the data section that contains the strings, and not at the code section. Use the functions list at the left to navigate between the functions. Otherwise, you can X-Ref the usage of these string by navigating to them and pressing X, either on the list of Strings or on the places you should in your screenshot

So i was missing something. Works like a charm now :) maybe you guys could add a tooltip or something for reversing noobs like me.

Anyway thank you ITAYC0HEN i can now switch from x64 dbg to cutter i am happy now.

Thank you clearing this up and i hope you have a nice week.

https://imgur.com/a/9XTo4tS

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Maijin picture Maijin  路  4Comments

ITAYC0HEN picture ITAYC0HEN  路  4Comments

xarkes picture xarkes  路  4Comments

s0i37 picture s0i37  路  5Comments

doublegrey picture doublegrey  路  4Comments