Wednesday, January 8, 2014

Reverse Engineering Tutorial 1 - Introduction to Reverse Engineering


Hello Firends, As I posted on my Facebook Page “Bangash Hacker” that I will start tutorials on ‘Reverse Engineering’ or ‘Software Cracking’ so this is the first tutorial on Reverse Engineering and this it’s title is ‘Introduction to Reverse Engineering’.In this tutorial I will teach you that what is Reverse Engineering and what types of tools is used in Reverse Engineering.
Note: If you have any question or query related to Reverse Engineering you can post you question on my Facebook or Google+ Page.You can also post comment here but I will prefer to post you question on Facebook or Google+ Page.
My Facebook Page: Bangash Hacker
My Google+ Page: Bangash Hacker
So lets start Reverse Engineering.

What is reverse engineering?

Reverse engineering is the process of taking a compiled binary and attempting to recreate (or simply understand) the original way the program works. A programmer initially writes a program, usually in a high- level language such as C++ or C# or Visual Basic (or God forbid, Delphi) etc. Because the computer does not inherently speak these languages, the code that the programmer wrote is assembled into a more machine specific format, one to which a computer does speak. This code is called, originally enough, machine language. This code is not very human friendly,  and often times requires a great deal of brain power to figure out exactly what the programmer had in mind.

What is reverse engineering used for?

Reverse engineering can be applied to many areas of computer science, but here are a couple of generic categories;
  1.  Making it possible to interface to legacy code (where you do not have the original code source). 
  2. Breaking copy protection (ie. Impress your friends and save some $$ like Cracking IDM). 
  3. Studying viris and malware.
  4. Evaluating software quality and robustness. 
  5.  Adding functionality to existing software.
d    The first category is reverse engineering code to interface with existing binaries when the source code is not available. I will not be discussing this much, as it is boring.
The second category (and the biggest) is breaking copy protection. This means disabling time trials, defeating registration, and basically everything else to get commercial software for free. This we will be discussing at great length.
The third category is studying virus and malware code. Reverse engineering is required because not a lot of virus coders out there don’t send instructions on how they wrote the code, what it is supposed to accomplish, and how it will accomplish this (unless they are really dumb). This is a pretty exciting field, but requires a great deal of knowledge. We will not discuss this much until later on.
The fourth category is evaluating software security and vulnerabilities. When creating large (think Windows Operating Systems), reverse engineering is used to make sure that the system does not contain any major vulnerabilities, security flaws, and frankly, to make it as hard as possible to allow crackers to crack the software.
The final category is adding functionality to existing software. Personally, I think this is one of the most fun. Don’t like the graphics used in your web design software? Change them. Want to add a menu item to encrypt your documents in your favorite word processor? Add it. Want to annoy your co-workers to no end by adding derogatory message boxes to Windows calculator? Let’s do it. This we will be getting into later in the series.

What knowledge is required?

As you can probably guess, a great deal of knowledge is necessary to be an effective reverse engineer. Fortunately, a great deal of knowledge is not necessary to ‘begin’ reverse engineering, and that’s where I hope to come in. That being said, to have fun with reversing and to get something out of these tutorials you should at least have a basic understanding of how program flow works (for example, you should know what a basic if…then statement does, what an array is, and have at least seen a hello world program). Secondly, becoming familiar with Assembly Language is highly suggested; You can get thru the tutorials without it, but at some point you will want to become a guru at ASM to really know what you are doing. In addition, a lot of your time will be devoted to learning how to use tools. These tools are invaluable to a reverse engineer, but also require learning each tool’s shortcuts, flaws and idiosyncrasies. Finally, reverse engineering requires a significant amount of experimentation; playing with different packers/protectors/encryption schemes, learning about programs originally written in different programming languages (even Delphi), deciphering anti-reverse engineering tricks…the list goes on and on. At the end of this tutorial I have added a ‘further reading’ section with some suggested sources. If you really want to get good at reversing, I highly suggest you do some further reading.

What kinds of tools are used?

There are many different kinds of tools used in reversing. Many are specific to the types of protection that must be overcome to reverse a binary. There are also several that just make the reverser’s life easier. And then some are what I consider the ‘staple’ items- the ones you use regularly. For the most part, the tools fit into a couple categories:
1. Disassemblers
Disassemblers attempt to take the machine language codes in the binary and display them in a friendlier format. They also extrapolate data such as function calls, passed variables and text strings.  This makes the executable look more like human-readable code as opposed to a bunch of numbers strung together. There are many disassemblers out there, some of them specializing in certain things (such as binaries written in Delphi). Mostly it comes down to the one your most comfortable with. I invariably find myself working with IDA (there is a free version available http://www.hex-rays.com/), as well as a couple of lesser known ones that help in specific cases.

2. Debuggers
Debuggers are the bread and butter for reverse engineers. They first analyze the binary, much like a disassembler  Debuggers then allow the reverser to step through the code, running one line at a time and investigating the results. This is invaluable to discover how a program works. Finally, some debuggers allow certain instructions in the code to be changed and then run again with these changes in place. Examples of debuggers are Windbg and Ollydbg. I almost solely use Ollydbg (http://www.ollydbg.de/), unless debugging kernel mode binaries, but we’ll get to that later.

3.Hex editors
Hex editors allow you to view the actual bytes in a binary, and change them. They also provide searching for specific bytes, saving sections of a binary to disk, and much more. There are many free hex editors out there, and most of them are fine. We won’t be using them a great deal in these tutorials, but sometimes they are invaluable.

4. PE and resource viewers/editors
Every binary designed to run on a windows machine (and Linux for that matter) has a very specific section of data at the beginning of it that tells the operating system how to set up and initialize the program. It tells the OS how much memory it will require, what support DLLs the program needs to borrow code from, information about dialog boxes and such. This is called the Portable Executable, and all programs designed to run on windows needs to have one.
In the world of reverse engineering, this structure of bytes becomes very important, as it gives the reverser needed information about the binary. Eventually, you will want to (or need to) change this information, either to make the program do something different than what it was initially for, or to change the program BACK into something it originally was (like before a protector made the code really hard to understand). There are a plethora of PE viewers and editors out there. I use CFF Explorer (http://www.ntcore.com/exsuite.php) and LordPE (http://www.woodmann.com/collaborative/tools/index.php/LordPE), but you can feel free to use whichever you’re comfortable with.
Most files also have resource sections. These include graphics, dialog items, menu items, icons and text strings. Sometimes you can have fun just by looking at (and altering    ) the resource sections. I will show you an example at the end of this tutorial.

5. System Monitoring tools
When reversing programs, it is sometimes important (and when studying virii and malware, of the utmost importance) to see what changes an application makes to the system; are there registry keys created or queried? are there .ini files created? are separate processes created, perhaps to thwart reverse engineering of the application? Examples of system monitoring tools are procmon, regshot, and process hacker. We will discuss these later in the tutorial.

6. Miscellaneous tools and information
There are tools we will pick up along the way, such as scripts, unpackers, packer identifiers etc. Also in this category is some sort of reference to the Windows API. This API is huge, and at times, complicated. It is extremely helpful in reverse engineering to know exactly what called functions are doing.

7. Enjoy.....

This was simple introduction to Reverse Engineering and on my next tutorial I will show how crack Windows default Calculator and change the menus and buttons etc and impress you friends that you can change & crack software......

Further Reading

1.Assembly Language. Assembly Language For Intel Based Computers is the de-facto book on it . You can also check out some web sites that offer a tremendous amount of downloads , instruction, sample code , and help. Another good resource is “The Art of Assembly”. I will be including this in one of the next tutorials, but you can also download it here.

2. The PE file structure. One of the best resources is from Microsoft themselves: “An in-depth look into the Win32 Portable Executable File Format“. Another good document (with lots of pretty pictures) is “PE File Structure“.   It is a downloadable PDF.

3.Windows Operating System Internals. The de-facto book is “Microsoft Windows Internals” by Mark Russinovich. It’s about as exciting as women’s baseball, but it is THE resource.


If you have any question or query then post comment on my Facebook or Google plus Page or post here.


16 Responses so far.

  1. Unknown says:

    Corn Mill Machine We at Dharti Industries known as best manufacturer corn mill machine in Rajkot.  We are Machinery specializes in producing corn processing equipment and corn mill machine.

  2. Now, you can get reliable source and dial Yahoo technical support so that it will be handy for you to get rid of Yahoo password connected matters. Call up at the technical support for Yahoo and seek best of all services in just a while.

  3. Anonymous says:

    ✅ ✅ MEET THE REAL HACKERS ✅✅

    Hello,

    I’m Nicholas Shields I’m the Marketing Manager Of The Hack Team COMPOSITE HACKS, We Are Hackers Who Specializes in All Kinds Of Legit Hacking Services, I'm really concerned about sharing my views on this advert cause many people now don't know who to ask for help anymore but there's really an actual solution to that which I am giving you for free, Don't go for the cheap Ones which I know you understand what I'm saying like hackers using gmail and other cheaper email accounts that could be easily hacked you know, why would a REAL HACKER want to use something that brings out his vulnerabilities? it's really so sad that they even lack creativity to the extent that they show their frustrations to people. so you see they are really not who they say they're, they are just here to Rip people Off and my advice really goes out to you looking for a Real Hacker that's a heads up so that you would fall deep into their trap no more.

    * ✅ So hit me up to get to experience real life effective hacking Services, I Will Link you Up with some Legit Hackers That you never believed you could meet, such as BEN SADEGHIPOUR, FRANS ROSEN, PETER YAWORSKI, JOBERT ABMA, JACK CABLE and More.

    ✅CONTACT:
    * Email:
    compositehacks@cyberservices.com
    * Hire a Hacker!
    * Want faster service? Contact us!
    * HackerOne©️LLC 2018.
    * All Rights Reserved ®️

  4. Nice Information.. Thanks for sharing this Post.. Are you looking for logo design for your company or business please contact subraa freelance logo designer in singapore. visit below links to learn more:

    Logo Design
    Logo Design Singapore
    Logo Designer Singapore
    Logo Designer in Singapore
    Logo Design Company in Singapore
    Design a Logo

  5. Need The To Hire A Hacker❓ Then contact PYTHONAX✅

    The really amazing deal about contacting PYTHONAX is that the Hack done by us can’t get traced to you, as every Hacking job we do is strongly protected by our Firewall. It’s like saying if anyone tries to trace the Hack, it will lead them to us and we block whatever actions they are doing.

    We have been Invisible to Authorities for almost a decade now and if you google PYTHONAX, not really about us comes out, you can only see comments made by us or about us.

    Another Amazing thing to you benefit from Hiring our Hackers is that you get a Legit and the best Hacking service, As we provide you with Professional Hackers who have their Hacking Areas of specialization.
    We perform every Hack there is, using special Hacking tools we get from the dark web.

    Some list of Hacking Services we provide are-:
    ▪️Phone Hacking & Cloning ✅
    ▪️Computer Hacking ✅
    ▪️Emails & Social Media Account Hacking✅
    ▪️Recovering Deleted Files✅
    ▪️Tracking & Finding People ✅
    ▪️Hunting Down Scammers✅
    ▪️Hack detecting ✅
    ▪️Stealing/Copying Files & Documents From Restricted Networks and Servers ✅
    ▪️Bitcoin Multiplication✅
    ▪️Binary Option Money Recovery ✅
    ▪️Forex Trading Money Recovery✅
    ▪️IQ Option Money Recovery✅
    And lots more......


    Whatever Hacking service you require, just give us an Email to the Emails Address provided below.
    pythonaxhacks@gmail.com
    pythonaxservices@gmail.com

    2020 © PYTHONAX.

  6. I was in a relationship with David for 5years. I was so true and dearly to him, i even had plans to get married to him as soon as possible before i started noticing some foul play. He always tries to satisfy me even when I wanted only little of him. I noticed some signs that he was cheating on me so I decided to take laws into my hands and told my best friend about it and then she gave me a reliable hacker's Email who changed my whole life for the better. I thought it was a joke but after when i funded the exploits and was told to be in 24 hours, He assisted me in hacking his Facebook accounts, his Emails and all his social media platforms and I got to find out that he has being cheating with not only one but with different women since the 5years we’ve been together. All thanks to him. Contact him via: (hackingsetting50@gmail.com) definitely you gonna thank me later.

  7. This professional hacker is absolutely reliable and I strongly recommend him for any type of hack you require. I know this because I have hired him severally for various hacks and he has never disappointed me nor any of my friends who have hired him too, he can help you with any of the following hacks:

    -Phone hacks (remotely)
    -Credit repair
    -Bitcoin recovery (any cryptocurrency)
    -Make money from home (USA only)
    -Social media hacks
    -Website hacks
    -Erase criminal records (USA & Canada only)
    -Grade change
    -funds recovery

    Email: onlineghosthacker247@ gmail .com

  8. It's still bizarre knowing that people don't know they can get their money sent to scammers back, or recover their lost crypto wallet or phrase key and lots more. I used to think otherwise also but everything is attainable when you are dealing with pros and reliable digital asset recovery hackers and programmers. Have you ever lost money to scammers via crypto fake currency investments websites, online romance scams, phishing, loan scam, lottery scam, or whatever? don't panic, I bring good news to you all, CYBER GENIE HACK INT'L are out there helping people regain their lives and businesses back by recovering funds they had sent or lost to scammers no matter how long it must have been. I only came to realize you can recover money from scammers after I had sent some crypto scammer $410.000.00 to assist me to invest. When I couldn't get through to him anymore, I hired Cyber Genie guys, and they got my funds back. I am happy I had an encounter with these internet pros. Do you want to reach them, use their info attached here...
    email: CYBERGENIE(@)CYBERSERVICES( . ) CO M...
    w/a: +1 (252) 512-0391...

Leave a Reply

Related Posts Plugin for WordPress, Blogger...
 
 

Create Free Store

Followers

Contributors