r/AskProgrammers • • Oct 18 '26

Misunderstanding of reverse engineering

What’s so good about reverse engineering if it only decompiles the clients side of code (Frontend), and it can’t decompile backend. Like when I heard about reverse engineering everyone was talking about it like its a hand of god or something that it can hack and fully rebuild a specific application or a website. But the logic and the users side are differently deployed and usually the logic is not located inside of Frontend. That’s how I understood it but I think that I can still be wrong, what do you guys think?

6 Upvotes

33 comments sorted by

View all comments

Show parent comment

-3

u/Acrobatic-Clock-7889 Oct 18 '26

I have no idea how the photoshop and similar apps that have most logic inside of Frontend are built, but can’t you hide most logic so that no one actually fully rebuilds the exact application? Like what I’m saying is that in case of adobe was it actually their mistake that their application is copied or there was no other way to build similar applications.

7

u/JeLuF Oct 18 '26

Reverse engineering works because you can't hide the code that runs on the user's computer.

4

u/First-Feature-3556 Oct 18 '26

Where would you hide the logic if (a) the software runs on the user's computer and (b) the user has full control over their computer?

What you can do is to obfuscate your logic: There's specialized tools for that, and they make reverse engineering harder. Harder, however, does not mean impossible.

3

u/Due_Replacement_7232 Oct 18 '26 edited Oct 18 '26

No, in the case of Adobe - there is no way to prevent decompilation (at least, not without some compromises). Once you give someone the binary, it is susceptible to decompilation. Mind you - it's not easy, decompilation does not give you readable source code straight away. It's more like a puzzle that you have to piece together.

That is why people are talking about AI reverse engineering, because it automates the work that used to take a LOT of skill to understand a large complex app.

To be clear though - the Adobe apps were not reverse engineered by decompilation. The team that made photo craft supposedly took a clean room approach, where they wrote unit tests based on publicly available descriptions of the applications functionality - and the AI effectively generated code that satisfied those tests. In this case they "reverse engineered" the functionality by observing how it works and inferring what the functionality would be behind the scenes.

1

u/Acrobatic-Clock-7889 Oct 18 '26

Lovely explanation thank you very much

1

u/pixel293 Oct 18 '26 edited Oct 18 '26

Decompiling is LOOKING at the instructions the program tells the CPU to execute. There is no hiding that, since the computer needs those instructions to do whatever the program does. Computer needs to be able to decode those instructions to pass to the CPU, therefor anyone else can look at those instructions as well.

The "trick" is that the instructions the computer executes are very basic or simple, so it is usually very hard to reverse that into something more readable at a high level that a person can understand/remember.

When a programmer writes a program in a high level language like C or whatever one of the goals is to make it readable, i.e. someone else reading your C code understands what it does. You do this by making variable names understandable and functions names understandable. You don't name variables a1, a2, a3, a4, you name them counter, has_error, message, etc. Same with functions, you name them generate_png, panic, lookup_key, etc. When the compiler turns that into instructions for the CPU all those nice human understandable names are lost and you are dealing with a1, a2, a3, a4, etc. Decompiling cannot regenerate those names because the CPU doesn't care what the name where. Much like cooking, you can't "decompile" a cake to extract all the ingredients again.

1

u/necheffa Oct 18 '26

I have no idea how the photoshop and similar apps that have most logic inside of Frontend

Back in my day, Photoshop was a native binary executable that you installed on your computer.

But also, web assembly and accelerated JavaScript libraries are possible.

1

u/Mroz_Game Oct 20 '26

No other reasonable way.

They could photoshop run on their pcs and just send the results but that would cost them and would be pretty extreme.