how do you “reverse engineer” something?

548 views

how do you “reverse engineer” something?

In: 64

22 Answers

Anonymous 0 Comments

oh man, it’s a big subject…

in general you could state that reverse engineering is a process of figuring out how something works blindly, without prior knowledge or recipe or algorithm of inner workings of such thing/process/program/whatever.

if you’d narrow this to, say coding, real-world scenario would look like this:

1. i want to reverse-engineer a piece of software
2. i can interact with it, so i more less know how it works
3. feed a binary to a tool called disassembler (it tranlastes machine code back to assembly language).
4. analyze output (which maybe works/maybe it doesnt) and try to figure out exactly how it works (this is the hardest part)
5. fix the disassembler output so variables, symbols, functions (all pieces of code) have a meaningful names/identifiers – in essence make it human-readable-friendly, so it makes sense when you browse through the source code and you see function DoThis(); and variable *counter* or *index* instead of function _124(); and var i,j,k : of a type;.
6. try to compile your new generated/fixed code and compare the workings of the original with your version/ various tools can be used, like debuggers and the like.

i think i don’t have to tell you, that such endavours are, one of most hardcore things in IT you can be doing. the bigger the program, the worse it gets (pretty quickly).

Anonymous 0 Comments

Have you ever played the mouse trap game? Where you build a really big and intricate mousetrap?

If you have the completed moustrap, you can look at it in a bunch of different ways to try and figure out how it works.

Reverse engineering is knowing how all the pieces work and imagining what happens when you put it all together.

Anonymous 0 Comments

As others have said, it’s starting with the finished product, slowly disassembling it, and testing each component to see how it interacts with other components, either physically, electrically or via code (or controller). The process becomes more difficult the more complex the item being reverse engineered is.

There are limits, however. Highly complex items are almost impossible to reverse engineer due to the amount of manpower, years of development, and proprietary tech to get to that item (e.g., high-end photolithography machines for chip manufacturing). Some technology may be mechanically understood, but the material sciences behind them may not (e.g., the metallurgical process for manufacturing jet turbine blades is highly specialized/proprietary).

Anonymous 0 Comments

In normal engineering you go: Function -> Requirements -> Methdos -> Product. Reverse engineering is quite literally the same process but in reverse. You take a product (Object, program, building… whatever it doesn’t matter), then you look at it to figure out the methods used to make it, then you consider the requirements that it had to meet, then lastly the function.

Since you can achieve one result via many means, reverse engineering is that you try to figure out what means were used to achieve that result. Example if you want to reverse engineer a pie, it isn’t enough that you know the ingredients, they are listed at the back of the box. You need to carefully consider how the ingredients were mixed, used, in what order; how was the dough made, how the pie was put together and what order, how and how long it was baked for.

Lot of it is trial and error, but there are people specialised in this. Not for corporate espionage purposes or to copy products; but because there are many things in our modern world people don’t know how they exactly work or how they were made. You’d be surprised how many critical systems like banking and infrastructure run on systems that have hardware and software so old, that the people who know how it works and how it was made have simply died of old age. Reverse engineering is needed to figure out why and how, so they can be fixed or new one be made. Because if a system is otherwise functional, you don’t want to remake it all because one component failed and couldn’t be replaced. So you reverse engineer that component to fix the system. Then you are left with a patchwork mess of a system where only failing parts get attention and you run to shit like Y2k even when we first knew about it in 1958 and still shat our pants in late 90’s fixing it. Or where you have critical infrastructure systems like water or power that have untold critical failure points because they are 50-100 years old and left ignored because “*They still work and pre-emptive maintenance is expensive and brings no quartely benefit”*.

Anonymous 0 Comments

I don’t know where you stand in education, but think of it as solving for X.

7x^2 /37=3
That would be your original product, say a pen. You want to figure out how it works (you want to solve the equation).

So you would solve:
7x^2 =111,
7x= 10.5,
x=10.5/7

You strip components, finding x (how it works), until you find it out.

Anonymous 0 Comments

To legally reverse engineer something, one team takes apart what they want to copy to see how it works. They break down the processes, step by step. They give that information to the manager. The manager then assigns a second team, that had no interaction with the first, a task of creating a new object or process; The requirements for the new object are explicitly detailed… like suspiciously detailed. The second team the. “Invents” something that just happens to do the same things as the first.

Ex: Team B, I want you to invent a new widget that kills mice. It should have a thin wooden base in a rectangle shape measuring 2.5”x6”. On top should be a “U” shaped metal bar, with right corners, attached to the base with a spring that hold it down with at least x lbs per inch. On the opposite side of the base should be a metal bar with a hoop at one end, thru which a staple connects the bar to the base. The bar should reach halfway down the base…..etc.

Anonymous 0 Comments

There’s no one answer because it could be applied to many different things that correlate to many different fabrication disciplines.

Generally speaking though you take something and you inspect it to try to determine how it works, and more importantly, how it was made. Depending on the object in question one may be more important than the other. Typically in order to reverse engineer something you need to have access to it, and the process may ultimately destroy it.

How do you do that? It depends really. You can inspect it, take it apart, use specialised equipment to analyse it, cut it in half or however many pieces you require, run experiments with it, etc. It really depends on what exactly you’re reverse engineering. Are you after the function? Are you after the fabrication technique? Are you after material qualities? All these change how easy or hard it may be, and in many cases, there may not be a direct way to actually reverse engineer something.

For example Coca Cola is supposed to have a secret recipe. Sure anyone can just get a bottle and do whatever they want with it. They can read off the list of ingredients, they can analyse it in every which way they want and determine its components and their percentages. Ultimately that still leaves a big question mark as to how exactly it is made. Are all the ingredients just thrown into a vat and stirred? Shaken? What is the order and how much does it matter? Is anything boiled, roasted, cooked or otherwise processed in order to get the final result? I guess one with the complete ingredient list would still have to test many different recipes to ultimately come down to the true one through trial and error, and that’s if it doesn’t require specialised proprietary equipment not just anyone can get their hands on. So ultimately that leaves the recipe a secret, though someone, probably competitors, may have secretly figured it out. Of course even with that knowledge in that specific case simply copying it would not be a good look for a company.

I have a desk I bought many years ago. The shop that sold it to me is closed but I want one just like it. So I visually inspect it. There’s 4 wooden panels, the desk top, two side panels that serve as the legs and a narrow one connecting all three for rigidity. The panels are made from melamine faced particle boards and they’re connected with 2 dowel/cam connectors each. Knowing all this I can perfectly replicate this desk despite not being the original creator.

I have a motorcycle and I want to understand how the engine works. I can take it apart bit by bit and see all the inner workings, which gear turns which component, where there’s seals or gaskets and what type and why, where the coolant channels are and where the oil channels are, where they flow from, where they’re going, what the engine displacement is and what the compression ratio is, how much the valves travel and how the cams are timed. I can get a full picture of all its parts and how it works. This doesn’t however give me any indication of how specifically the parts have been cast, forged, or machined, but if I had the kind of equipment that enables me to fabricate something like an engine, reverse engineering another engine saves a ton of work for me from having to come up with it myself.

Overall reverse engineering is a very useful skill. It’s used in archaeology, technology, engineering, to great effect and results, but it’s also used in espionage, corporate or state, and in theft of intellectual property, so it’s not always morally sound.

Anonymous 0 Comments

In this context, the opposite of reverse engineering – let’s call it engineering – creates some sort of a machine, a piece of software, or other product from smaller parts, using a particular formula, design, a recipe, an equation, or something like that for combining the parts together.

So reverse engineering then means looking at that full product, and dividing it into its smaller parts to understand how it functions. You want to either know the parts its made of or the equation/design/recipe that makes it run, or both.

Broadly speaking, the end goal is to gain enough understanding of the system or a product that you can replicate its functionality.

Sometimes you can reverse engineer something by simply observing its behavior for a while. If a machine has two inputs and one output, and when I input `2` and `4` I get `6` and when I input `0` and `11` I get `11`, I can deduce that the machine is summing the two inputs together. Tada, reverse engineered.

Often it’s more complex than that. If you’re reverse engineering how e.g. a game authenticates with a game server, you might want to look at the actual network traffic being sent by a software like Wireshark. Sometimes you may want to try to decompile the software to see if you could understand parts of its code. Being knowledgeable about common authentication protocols, network protocols, game design, etc, is helpful.

If you have a physical device (e.g. during WW2, some weapons were used sparsely because of the worries of them being reverse engineered and copied by the enemy) you might inspect it from the outside, determine the materials being used, and you might take it apart to try to get an understanding of how it functions.

Anonymous 0 Comments

If it’s hardware, you can pull it apart and try to understand what each component does. If it’s software, you can see how the software is used and try to infer the logic behind it based on the inputs and outputs.

Anonymous 0 Comments

Timmy sees his friend Jimmy has a cool new bike. He wants one too, but the store just sold out if that model. But Timmy is pretty clever with mechanical stuff. And he thinks he can make a new bike just like Jimmy’s.

So he borrows Jimmy’s bike, promising that he’ll return it just as he got it. Then, with Jimmy’s permission, he takes it apart. Every piece that’s attached to each other, he separated until every part is on its own. Then, he studies each part, every detail he can find. And he works out how to build that part out of some scrap metal his dad gave him. And he’s careful to note how the parts went together, so that he can rebuild Jimmy’s bike.

Once he has all of the parts built, he re-assembles Jimmy’s bike and gives it back. Then, he assembles the parts he made, exactly in the same way. At the end, he has a bike just like Jimmy’s. And he never looked up how to make a bike. He just looked at one already made, and figured it out in reverse.