Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Cracking CrackMe's on Linux?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming -> Crackmes
View previous topic :: View next topic  
Author Message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Fri Aug 21, 2009 6:48 am    Post subject: Cracking CrackMe's on Linux? Reply with quote

Heya crackers.
I've always been a fan of CrackMe's, just never really done much with it.
So I decided to try it out on Linux, and found the commands "file", "nm" and "strings" useful, which are used in tutorial.
To test it out, I made a very simple CrackMe in C++, which should be very easy to crack, yet I don't know how to find it.
So how would I find the password value, "hej", using the various commands?

I know this is pretty noobish, but I'd like to learn. And please correct me, if I'm doing it all wrong.

My CrackMe source
Code:
#include <iostream>
using namespace std;

int main()
{
   string password;
   string userInput;
   
   password = "hej";
   
   cout << "Enter password: ";
   cin >> userInput;
   
   if (userInput == password) {
      cout << "CORRECT!\n";
   }
   else {
      cout << "Wrong!\n";
   }
   
   //cin.get();
   return 0;
}


The "nm" output (Posted on Pastebin.org)

The "strings" output:
Code:
/lib/ld-linux.so.2
RSRhu
CyIk
libstdc++.so.6
__gmon_start__
_Jv_RegisterClasses
pthread_cancel
_ZNKSs4sizeEv
_ZSt4cout
_ZNSsC1Ev
_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
_ZNSt8ios_base4InitC1Ev
_ZSt3cin
_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RSbIS4_S5_T1_E
_ZNSsD1Ev
_ZNKSs4dataEv
_ZNSt8ios_base4InitD1Ev
_ZNSsaSEPKc
__gxx_personality_v0
libm.so.6
libgcc_s.so.1
_Unwind_Resume
libc.so.6
_IO_stdin_used
__cxa_atexit
memcmp
__libc_start_main
GCC_3.0
GLIBC_2.0
GLIBC_2.1.3
CXXABI_1.3
GLIBCXX_3.4
PTRh
[^_]
Enter password:
CORRECT!
Wrong!
zPLR
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Fri Aug 21, 2009 11:19 am    Post subject: Reply with quote

Use GDB instead.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming -> Crackmes All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites