![]() |
|
|
|
#1
|
|||
|
|||
|
C++ Console Application
Hello.
I was wondering how can i get password which is compeared as passEntered[1]=='t' OR something in that style. There is no strcmp How can i break on something like this, or find it in string references,. |
|
#2
|
|||
|
|||
|
Could be difficult as is, inside the apps would probably be
something like cmp reg,'t', which could be quite hard to locate as long as you are not supposed to know the 't' part... So, instead of focusing on what you can't locate easily, why not starting your trace at the point where the program retrieve the password ? (using functions such as getchar, or fget.. ?) etherlord |
|
#3
|
|||
|
|||
|
What you wrote,is not an strcmp,because one of operands is only a char.
This compare can be simply written in assembly like this: lea al,byte ptr [passEntered + 1] cmp al,74h jne IsNotEqual sincerely yours
__________________
I should look out my posts,or JMI gets mad on me!
|
|
#4
|
|||
|
|||
|
You cant break at all but you need to check HEX bytes in your disasmbler like IDA.I dont see anything hard about this
passEntered[0]=='???' passEntered[1]=='t' passEntered[..]=='???' its all there just chech how long password is and which chars does it uses ![]() Bye |
|
#5
|
|||
|
|||
|
well tracing from the point of entrance....i know that it uses std::cin to enter the password, i am not sure how to find that in either IDA w3dasm or olly.
any ideas? |
|
#6
|
|||
|
|||
|
Maybe you should look for the ReadConsole call ...
Kerstin |
|
#7
|
|||
|
|||
|
ReadConsole is not in IAT.
the inpute is done using std::cin function. The IDE is devcpp 5. does anyone know how i can locate the std::cin function? |
|
#8
|
|||
|
|||
|
Use IDA. It may recognize standart ?and C++ functions by signatures.
In Name window (after analizyng) you will see std::cin and will may look for all calls to it. |
|
#9
|
|||
|
|||
|
String equality is often checked with REP CMPSB (or more likely (len>>2) * CMPSD + (len & 3) *CMPSB), then JNZ @mismatch.
Maybe using hardware breakpoints on Read or Write Access could help. |
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Hooking WMI (.NET Application) | aldente | General Discussion | 12 | 08-07-2012 01:32 |
| 16Bit DOS executable to 32Bit Windows Console app | memo-5 | General Discussion | 10 | 03-08-2012 23:14 |