Reverse Engineering 101 ( Using A Hex Editor To Find Passwords )

The Camtasia Studio video content presented here requires a more recent version of the Adobe Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by downloading here.

Posted By: SecurityTube_Bot
Posted On: Mon 21 Feb 2011
Views: 28058
Share this video:
Share it on Facebook Share it on Twitter Share it on Reddit Share it on Digg Share it on Stumbleupon
Support SecurityTube:


Description: This video is the first of many on the subject of Reverse Engineering. I will try my best to go slow so that you can grasp the concepts properly. I would highly recommend that you try out all the samples yourself, as it will be the fastest way to learn. Please download the c code and the binary exe file (don't worry it's not a virus :D ) before starting with this tutorial.

In this tutorial we will understand how to use a Hex Editor to view a binary file and find useful things. For this video we have created a sample exe using the code shown below. The idea is to hide a string in the exe and use it for a password validation in the application. As everyone knows this is the most insecure form of authentication ;-) and we will use a Hex editor to crack the password by looking at strings in the binary file.

After watching this video, please download the binary and try it yourself. Hex Workshop is a good Hex editor and is the one used for the video.

 
--------- Program Starts -----------

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
 
#define password "FindMeIfYouCan"

int main(int argc, char *argv[])
{
  char pass[100];
 
 
  printf("Please enter your password\n\n");
  scanf("%s", pass);
  if ( strcmp(pass, password) == 0 )
  {
       printf("Congrats!! Correct Pass\n\n");
  }
  else
  {
      printf("Wrong Pass\n\n");
  }
      
  system("PAUSE");   
  return 0;
}

------------Program Ends ---------------

Tags: programming ,


Comments (1)

hakimkt on Sat 22 Oct 2011

Thanks Security Tube for this video.

Login to post a comment