Reverse Engineering - Padma Dasari Reverse Engineering Engineering is the profession involved in designing, manufacturing, constructing, and maintaining of products, systems, and structures. The process of duplicating an existing component, subassembly, or product, without the aid of drawings, documentation, or computer model is known as reverse engineering. • Software Reverse engineering is taking apart an object/program to see how it works in order to duplicate or enhance the object. • Technically, Software reverse engineering involves reversing a program's machine code, into the source code. Reverse Engineering Reverse engineering can be viewed as the process of analyzing a system to: • Identify the system's components and their interrelationships • Create representations of the system in another form or a higher level of abstraction • Create the physical representation of that system • physics is an attempt to reverse Engineering the Universe. • Molecular Biology is an attempt to reverse Engineering the genetic code. Why do Reverse Engineering? • Consider a piece of software for which no one has yet bothered to write a manual or piece of software with undocumented features. • An Artifacts are broken and we want to understand its structure so we can fix it. • An Artifacts is old and clunky and want to replace with newer and sleeker version. • Want to steal/replicate our competitors’ ideas. Reverse Engineering Analyze piece of code in order to figure out how expensive it would be to make some proposed change. we can use two techniques. 1. Hierarchical Regular Expression 2. Island grammars. Hierarchical Regular Expression Hierarchical Regular Expression – Lightweight analysis – Regular Expression • (aUb)* aaabba (aUb)* Hierarchical Regular Expression [ <type> ] <functionName> \ ( [ {<formalArg> }1 ] \ ) [ { <type> <argDecl> ; }1 ] \{ <calledFunctionName> \ ( [ { <parm> }1 ] \) Is it legal? What are reasons!! Reasons for reverse engineering a part or product: • The original manufacturer of a product no longer produces a product • There is inadequate documentation of the original design • The original manufacturer no longer exists, but a customer needs the product • The original design documentation has been lost or never existed • Some bad features of a product need to be designed out. • To strengthen the good features of a product based on longterm usage of the product • To analyze the good and bad features of competitors' product Instant Messaging or IM Instant Messaging: The instant messaging marketplace is current fragmented among a lot of different networks: • AOL Instant Messenger • MSN Messenger • Yahoo Messenger • Google Talk and • others. IM: [No] Networking Although these IM companies have periodically discussed making their networks interoperable, at present none of them are, despite the fact that they’ve been on the market for years. Ex: AOL, Yahoo, MSN has been there for years and no sharing among these networks. Needs many IM applications instead of one application software -Software reverse engineering come to rescue. Reverse Engineering Reasons for reverse engineering a part or product: • An open source project called Fire built a Mac OS X application that can access all four networks (and some others). That means that I can run one program and have access to all four networks Details about Fire software can be found at http://fire.sourceforge.net/ Scientific Methods- Steps • • • • • • • • • • The Compilation Process Gathering Info Determining Program Behavior Determining Interesting Functions Understanding Assembly Debugging Executable formats Code Modification Network Application Interception Tools