Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 13:30

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
 Post subject: SmartFTP password decoder - WideCharToMultiByte
PostPosted: 20 Oct 2008 05:03 

Joined: 01 Sep 2008 07:40
Posts: 31
Luigi, ive been trying to do some work with your smartftp password decoder and i have a couple of questions.

how come your pwd starts out as unicode but then gets converted by wincrypt to a wide char? secondly, how come when trying to convert this into an ansi char using WideCharToMultiByte() it always returns NULL for me?


Top
 Profile  
 
 
 Post subject: Re: SmartFTP password decoder - WideCharToMultiByte
PostPosted: 20 Oct 2008 05:16 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
the password is a unicode string but this doesn't matter because wincrypt handles binary data without caring of its content (L"SmartFTP" is considered as binary data too).

I have never used WideCharToMultiByte so I don't know what could be the problem, probably wcstombs or other similar functions can do the job


Top
 Profile  
 
 Post subject: Re: SmartFTP password decoder - WideCharToMultiByte
PostPosted: 20 Oct 2008 05:29 

Joined: 01 Sep 2008 07:40
Posts: 31
would wcstombs() work even tho pwd is a different pointer type? it seems to fail for me


Top
 Profile  
 
 Post subject: Re: SmartFTP password decoder - WideCharToMultiByte
PostPosted: 20 Oct 2008 15:58 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
first check if the decrypted password is valid showing for example the hex of its first 10 bytes, so you should see a sequence of "char zero" of the first 5 chars.

if the password is real but wcstombs still gives problem you can use other solutions like sprintf(buffer, "%S", (void*)decrypted_password); or a small functions which gets a byte from the input and skips the second for building your ANSI string


Top
 Profile  
 
 Post subject: Re: SmartFTP password decoder - WideCharToMultiByte
PostPosted: 22 Oct 2008 06:25 

Joined: 01 Sep 2008 07:40
Posts: 31
Luigi, im wondering, in case you didnt know, bf2 since version 1.03 has stored cdkeys in the registry as hashed md5 values, no longer plain text. would it be possible to use the same windows cryptography functions like you did here in your SmartFTP password decoder, to decode these hashed cdkey values?


Top
 Profile  
 
 Post subject: Re: SmartFTP password decoder - WideCharToMultiByte
PostPosted: 22 Oct 2008 13:43 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
bf2 uses the CryptProtectData function which differs from the one of SmartFTP because the first is system based (the key is hardware based) while the second has a fixed password and so can be decrypted on any other computer.

for BF2 you can use my cunprot tool:

http://aluigi.org/pwdrec.htm#cunprot


Top
 Profile  
 
 Post subject: Re: SmartFTP password decoder - WideCharToMultiByte
PostPosted: 23 Oct 2008 04:48 

Joined: 01 Sep 2008 07:40
Posts: 31
aluigi wrote:
bf2 uses the CryptProtectData function which differs from the one of SmartFTP because the first is system based (the key is hardware based) while the second has a fixed password and so can be decrypted on any other computer.

for BF2 you can use my cunprot tool:

http://aluigi.org/pwdrec.htm#cunprot

thank you, works great on the cdkey as well as the stored login.


Top
 Profile  
 
 Post subject: Re: SmartFTP password decoder - WideCharToMultiByte
PostPosted: 13 Jul 2009 01:23 

Joined: 19 Apr 2009 23:01
Posts: 13
you can decrypt bf2 logins?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron