Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 04-14-2005, 09:24
ReVeR
 
Posts: n/a
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,.
Reply With Quote
  #2  
Old 04-14-2005, 14:35
etherlord
 
Posts: n/a
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
Reply With Quote
  #3  
Old 04-14-2005, 15:35
Hero Hero is offline
VIP
 
Join Date: Jan 2005
Posts: 226
Rept. Given: 2
Rept. Rcvd 1 Time in 1 Post
Thanks Given: 5
Thanks Rcvd at 2 Times in 2 Posts
Hero Reputation: 1
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!
Reply With Quote
  #4  
Old 04-15-2005, 03:45
NeOXOeN NeOXOeN is offline
Friend
 
Join Date: Jan 2005
Posts: 273
Rept. Given: 2
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 2
Thanks Rcvd at 18 Times in 18 Posts
NeOXOeN Reputation: 3
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
Reply With Quote
  #5  
Old 04-16-2005, 08:28
ReVeR
 
Posts: n/a
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?
Reply With Quote
  #6  
Old 04-16-2005, 14:07
nuemga2000 nuemga2000 is offline
Friend
 
Join Date: Jan 2002
Posts: 59
Rept. Given: 1
Rept. Rcvd 2 Times in 2 Posts
Thanks Given: 0
Thanks Rcvd at 5 Times in 5 Posts
nuemga2000 Reputation: 2
Maybe you should look for the ReadConsole call ...

Kerstin
Reply With Quote
  #7  
Old 04-16-2005, 23:24
ReVeR
 
Posts: n/a
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?
Reply With Quote
  #8  
Old 04-17-2005, 03:05
FKMA
 
Posts: n/a
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.
Reply With Quote
  #9  
Old 04-20-2005, 02:50
taipan
 
Posts: n/a
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


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


All times are GMT +8. The time now is 15:16.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )