What is reverse engineering?

Asked

Viewed 1,512 times

48

I always say I don’t get along very well with terms.

These days I needed to do an operation on a given framework in PHP called Laravel, where I needed to find a resource that would allow me to use an existing bank and have it automatically generate the models and Migrations application via the tables of that bank.

Usually what happens is the opposite: You generate models and Migrations, which in turn generate the database.

I did a lot of research on the internet (in English) to find what I wanted, but I couldn’t find it. Until I used the term Database Reverse Engine for Laravel, and found what I was looking for.

Until then I was not so familiar with the term, for thinking of dealing with something far removed from my day-to-day programming. But it turns out it wasn’t true.

What I understand from my experience is that reverse engineering is related to using what was generated to create the generator. Correct me if I’m wrong.

That’s why I come here to ask: What exactly is Reverse Engineering?

Note: I won’t include the tag php or laravel, because it’s not about the subject, it was just an example.

  • 2
  • 2

    Dismantling a toy, for example, is reverse engineering.

  • 3

    One interesting thing to note is that the word re-verse, as an adjective, it does not translate to reverse yes to inverted or in reverse. That is to say, reverse engineering (as well as instance ) are neologisms of programming in Portuguese.

  • 1

    Dismantle something to know how it was done, to then use the knowledge obtained, and try to do the same or similar. Some say the Chinese do it to create their fake electronics. In computing, it means undoing the build process, and retrieving the source code.

4 answers

37


Reverse engineering, in layman’s terms, is nothing more than discovering how the program works with the finished program.¹

To perform reverse engineering one must analyze the finished product and check "how it was built". Like @rray said in the comments, the crack of games is a good example of this. Of course, made for "evil" (for manufacturers and well for us, rsrs), but it’s a great example.

There are reports that companies use reverse engineering to verify competitors' products, whether in software or not. As the eternal fight between the Apple vs Samsung about information theft and patent infringement fits this medium. In this case we can see that reverse engineering is not limited only in codes, but in several areas, in this particular example, hardware as well.

But then, it’s hard to do reverse engineering?

It depends a lot on your qualities and what you want to do.

An easy example is the use of .NET Reflector to get the source code of dll’s .NET. See below for an example image.

inserir a descrição da imagem aqui

In this example I’m just checking what’s behind the dll System.xml.Linq.dll, from Microsoft. This was possible only with 2 clicks with the program, nothing difficult, do not agree?

And re-engineering, it’s the same thing?

Today there is great confusion about reverse engineering and re-engineering (refactoring).
Re-engineering is nothing more than examining a finished product and building again, but with improvements¹.

In short, reverse engineering gets you how it was done, for whatever the goal, Dark Side or not. Already in re-engineering you just improve, and do not necessarily need to do a reverse engineering to get the sources.

You’re saying everyone has access to my sources so?

In a way, yes.
You can’t "make it impossible" to get your code, but you can make it harder.

This question from @Math has excellent answers about this, so I won’t go into more detail. p


¹ What is the Difference between re-engineering and Reverse Engineering?

  • I agree with almost everything, I just don’t understand how "crack" can do any good? In my view the choice of the rights of use/reproduction of a software/game is of who does it and not of who wants to enjoy it.

  • 1

    @That part was a joke, I’m sorry if I wasn’t clearer. But crack goes far beyond simple reverse engineering, which would be too broad to handle in a single answer. There are N factors that can influence this subject.

  • 1

    @Randrade next time adds the tag <sarcasm> or <ironic>, so that someone doesn’t think you’re apologizing. Of course the content of the text makes it clear that you didn’t want to do this

20

It is the reverse flow to the engineering of a solution.

The traditional flow can be expressed as follows:

Specification > Architecture > Implementation > Demeanor

Reverse engineering, in this case, is when the specification is deduced from the behaviour:

Demeanor > Implementation > Architecture > Specification

This is a widely used principle in implementing solutions as a result of various situations:

  • A legacy solution that can no longer be changed directly still needs to receive data entry: A professional can analyze the API or application interfaces, and write a solution that publishes data in the expected format. (This process is so frequent that it even gets a name: Brokerage.)
  • A Web-based API solution can have its behavior studied, and new clients can be written (example cases: Dropbox, Yik Yak)
  • 2

    Did not know the term Brokerage. It was nice to meet!

17

Reverse engineering is the process of, from the whole, understanding the parts, the functioning, the principles of something. It is a term that has been coined for hardware, however, is widely applied to software.

Example: When disassembling a radio you can understand a lot about how it works. What electronic components it uses, how these components are interconnected, modules, etc. It is very common for companies to purchase devices from others to disassemble and understand the types of components that have been used. In the war between Apple and Samsung several mobile phones were destroyed for this purpose.

In software, this term is applied in various contexts. Examples are not lacking:

  • Generate database creation codes from tables and relationships already created;

  • Understand a specific network protocol from the network packets. A classic example is Samba, a software that allows Linux operating systems to share files and printers with Windows machines.

  • Understand a specific file format. A classic example is Openoffice, because it can open Office spreadsheets and documents (mainly before Office 2007, since it was a binary format).

  • 1

    In this case Wine is also part of this context? With it we can run applications .exe windows on Linux.

  • 4

    @Denercarvalho, undoubtedly Wine is an example of Reverse Engineering. The developers of Wine had to understand a lot without any kind of documentation or even support from Microsoft to implement Wine and be able to run Windows binaries on Linux. Well-remembered.

16

Reverse engineering is the opposite process of the usual software development or not, from something already generated get access or discover how something was done without having the internal knowledge or is like identifying the components, the shape/order of mounting a black box, this can be done in full or in part.

Examples:

  • Some software can take a . jar and turn it into plain text file.

  • CASE tools or sometimes Ides can generate class diagram from source code.

  • +1 Um... That’s what I wanted to know. Thank you @rray. Actually, this term came as a surprise when I was googling. I have already said that at this point of terminology I am not very good (because I don’t really like these terms, rsrsrsrs).

  • It would be like getting coffeescript from a already compiled javascript?

  • @Wallacemaxters yes, has some other uses.

  • 2

    @Wallacemaxters like you think people ride crack software :P?

  • would not classify the diagrams generated from the source code as Eng. reverse since it already has the source, but in the case of . jar agree

Browser other questions tagged

You are not signed in. Login or sign up in order to post.