Results 1 to 5 of 5

Thread: pwl Crack - Source Code

  1. #1
    Fastest Thing Alive s0nIc's Avatar
    Join Date
    Sep 2001
    Location
    Sydney
    Posts
    1,584

    pwl Crack - Source Code

    #include <windows.h>
    #include <stdio.h>

    typedef struct tagPASSWORD_CACHE_ENTRY {
    WORD cbEntry; // size of this entry, in bytes
    WORD cbResource; // size of resource name, in bytes
    WORD cbPassword; // size of password, in bytes
    BYTE iEntry; // entry index
    BYTE nType; // type of entry
    BYTE abResource[1]; // start of resource name
    // password immediately follows resource name
    } PASSWORD_CACHE_ENTRY;

    char *buf, *ob1;
    int cnt = 0;

    BOOL CALLBACK pce(PASSWORD_CACHE_ENTRY *x, DWORD)
    {
    cnt++;
    memmove(buf, x->abResource, x->cbResource);
    buf[x->cbResource] = 0;
    CharToOem(buf, ob1); // for non-English users
    printf("%-30s : ", ob1);

    memmove(buf, x->abResource+x->cbResource, x->cbPassword);
    buf[x->cbPassword] = 0;
    CharToOem(buf, ob1);
    printf("%s\n", ob1);

    return TRUE;
    }

    void main()
    {
    buf = new char[1024];
    ob1 = new char[1024];
    puts("There is no security in this crazy world!\n"
    "Win95 PWL viewer v1.01 (c) 1997, 98 Vitas Ramanchauskas\n"
    "************\n"
    "!DISCLAIMER!\n"
    "!This program intended to be used for legal purpose only!\n"
    "************\n\n"
    "This program shows cached passwords using standard (but undocumented)\n"
    "Windows API on local machine for current user (user must be logged in).\n"
    "You may invoke pwlview in this way: pwlview >> textfile.txt\n"
    "to save passwords in file (don't forget to press enter twice)\n"
    "Press Enter to begin...\n");
    getchar();

    HINSTANCE hi = LoadLibrary("mpr.dll");
    if(!hi)
    {
    puts("Couldn't load mpr.dll. This program is for Windows 95 only");
    return;
    }
    WORD (__stdcall *enp)(LPSTR, WORD, BYTE, void*, DWORD) =
    (WORD (__stdcall *)(LPSTR, WORD, BYTE, void*, DWORD))GetProcAddress(hi, "WNetEnumCachedPasswords");
    if(!enp)
    {
    puts("Couldn't import function. This program is for Windows 95 only");
    return;
    }
    (*enp)(0,0, 0xff, pce, 0);
    if(!cnt)
    puts("No passwords found.\n"
    "Probably password caching was not used or user is not logged in.");
    FreeLibrary(hi);
    puts("\nPress Enter to quit");
    getchar();

  2. #2
    Fastest Thing Alive s0nIc's Avatar
    Join Date
    Sep 2001
    Location
    Sydney
    Posts
    1,584
    i tweaked the source code a bit so it cant be used just by anyone.. those who do know what language this is will figure out what i changed..

    This is for educational purposes only... especially for those who wants to learn more about this language...

  3. #3
    Senior Member
    Join Date
    Aug 2001
    Posts
    503
    Looks good. And I'm impressed that you took my suggestion on the tweaking. Quite nice

    God bless,
    --PhirePhreak
    I know you\'re out there. I can feel you now. I know that you\'re afraid. You\'re afraid of us. You\'re afraid of change. I don\'t know the future. I didn\'t come here to tell you how this is going to end. I came here to tell you how it\'s going to begin. I\'m going to hang up this phone, and then I\'m going to show these people what you don\'t want them to see. I\'m going to show them a world without you, a world without rules and controls, without borders or boundaries. A world where anything is possible. Where we go from there is a choice I leave to you.

  4. #4
    Fastest Thing Alive s0nIc's Avatar
    Join Date
    Sep 2001
    Location
    Sydney
    Posts
    1,584
    so i take it that the mpr.dll has something to do with the decrypting of the pwl file..

    coz what i understand is that this crack uses the mpr.dll to decrypt the pwl file and displays the decrypted login name and password...

  5. #5
    Senior Member
    Join Date
    Jan 2002
    Posts
    458
    C
    but what u did changed that might need a read ..
    When the power of Love overcomes the Love of power, the world will know peace... Jimi Hendrix
    -------------------------------------------------------------
    I dream of giving birth to a child who will ask...... what was war?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •