Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (1)

Powered by Vanilla. Made with Bootstrap.
Got a problem with a crackme app im making, any help?
  • So iv been trying to make a crack me, all is good but the char comparison doesn't work. Can anyone help explain why??







    #include iostream
    #include stdio.h
    #include string.h

    using namespace std;

    int main();

    void strget(char password[])
    {
    char Local[10] = "AP4ssW0rD";

    char *Get = Local;
    cout << Get << " = " << password << endl;
    if(strcmp(Get, Local) != 0)
    {
    cout << "Welcome to the CIA...\n\n";
    }else{
    main();
    }
    }


    int main()
    {
    int Attempts = 0;
    char passwordprompt[] = "Password: ";
    char entered[10];
    char *Prompt = passwordprompt;
    cout << endl << Prompt;
    cin >> entered;
    if(Attempts >= 3)
    {
    goto End;
    }else{
    char *EnteredPassword = entered;
    Attempts++;
    strget(EnteredPassword);
    }

    End:
    return 0;
    }



    PS. Hope you like my little code box, appart from the stupid border that this forum adds to code tags :/

    Skype: mrpt3o
    Twitter: MrPteo


    image
  • Sh3llc0d3
    Posts: 1,910
    Quickly changed it... how about this, i'm not sure if i've quite got what you're trying to do with it though: http://pastebin.com/CCCR33bd
  • it's pretty much what i wanted although it still always returns false, same issue :/
    Skype: mrpt3o
    Twitter: MrPteo


    image
  • Sh3llc0d3
    Posts: 1,910
    Apologies only just seen you'd replied, I'll have another look.

    Edit: Try...

    http://pastebin.com/4UVpuK0Y

    Not at all my best c++ code but it'll do the job I think. Juggling my daughter and visual studio at the mo.

    Edit2: You could use something like this too:

    http://codepad.org/peHoX4Il

    The idea behind that is it generates a pseudo-random password so that every-time the program is run it should give a different pass (in theory - although this isn't always guaranteed). A tad more challenging for people trying to crack the app. Realistically I think to find the pass of the other one you'd just need to use the 'strings' command in linux and it'd probably list the password. As it's a static string within the binary. Anyway I've probably taken this well out of what you wanted but I got a tad bored xD.
  • This is pretty cool, i wan't to learn more about C++ security, encryption etc. but i can seem to find much about it.
    Skype: mrpt3o
    Twitter: MrPteo


    image
  • Sh3llc0d3
    Posts: 1,910
    Unfortunately learning c++ online properly is a bit hard, I've found when a few c++ coders get together on forums are quite elitist I've found. Especially on hf for instance. Encryption in C++ is quite interesting to get into. I've done some basic encryption programs in c++ which I'll upload when the code embedding get's sorted. One good book to check out is "applied cryptography 2nd edition". Porting C code to C++ from the book is fairly easy once you understand it.
  • Yer learning C++ online is very hard although i like to think im doing okay. I managed to get this crackme working, and i managed to add XOR encryption for an extra layer of security.
    Skype: mrpt3o
    Twitter: MrPteo


    image