Decompilers : Legal or Illegal ?
The blog is been written by
Vaishnavi Padmawar, Gayatri Panchal and Pradnya Pawar, students of Vishwakarma Institute of Technology, Pune.
At first, let us know what exactly Decompilation is? So the Decompiler is a computer program or a tool that takes an executable file or low level machine language which can be easily understandable to a machine as an input and aims to create the high-level source file which is a format understandable for a software that can be recompiled successfully. It is therefore called as decompiler because it works opposite of compiler, which takes a source file and aims to make it an executable. Decompilers are generally unable to perfectly remodel the original source code as it interprets source code into an executable format in a reverse manner. Decompilers are prominent tool in the reverse engineering of computer software.
There is a similar tool for decompiler called a Disassembler that translates object code into the assembler language. There are various reasons for the purpose of decompilation or the disassembly, for example, in order to understand a program or to recover the source code for purposes of archiving or or debugging programs or updating or finding viruses and translating the obsolete code.
HOW ARE DECOMPILER USEFUL?
1. For recovery of our lost source code to archive or maintain our code
2. For debugging our programs.
3. For antivirus capability to find vulnerabilities in our program.
4. For interoperability(ability to use and exchange information) to facilitate the migration of our program across different platforms.
So in simple words, decompiler is a tool which is used in conversion of an executable code into a higher-level programming language so that the programmers/humans can read easily.
Disassembler
As we discussed in the previous post,decompilation is basically process of converting a binary executable code which is then compiled program means translation of low level language into a higher-level language which can be easily read or we can say understandable by humans. Usually, this means turning a program executable into source code in a language such as C, C++, or C#. For decompiling,most system fail to directly convert the programs into 100% source code. Instead of that, they usually provide almost their type of intermediate representation. Many reverse compilers are basically the disassemblers that come up with a dump of the machine code that makes a program to work according to the programmer.
Softwares/Programs to transform binary code into text form have always been available. Straightforward matched mapping of processor instruction codes into the instruction method is performed by the disassemblers.Many disassemblers are obtainable in the market, that are either free or commercial. The most powerful disassembler tool is “IDA Pro tool”. IDA Pro Tool can handle binary code for a large number of processors and it has open architecture so the developers are allowed to write add-on analytic modules.
Decompilers are different from disassemblers in one very important view while both of them generate human-readable code ot text, decompilers produce much higher level text which is easier to read.
The Interactive Disassembler know as IDA binary disassembly. IDA is able of disassembling “virtually any file format”. This makes it terribly helpful for the safety researchers and CTF players who often need to analyze unknown files without knowing what they are and where they came from. IDA also ability that leading Hex-Rays decompiler which will convert assembly code back to the pseudo-code format
IDA also has a plugin interface which used to create some successful plugins that can make reverse engineering (decompilation) easier.
Actual Decompilation.
In this post, we’ll see however the particular decompilation is finished i.e., however the reverse engineering takes place. we have a tendency to do this by victimization the dotPeek application that is completely free. Decompiling code via dotPeek is really easy. It supports DLLs, EXEs, Windows eight information files, and more.
This is the particular c# code that we have a tendency to square measure about to compile and acquire the .exe file, which implies we have a tendency to square measure changing the problem-oriented language into low-level language. And additional, we have a tendency to use this file for the decompilation method
Drag the .exe file into the Assembly mortal of the dotPeek application. dotPeek conjointly provides varied choices like gap and viewing files and directories. you’ll be able to open a file from the classification system additionally. With dotPeek put in and loaded, we are able to simply load compiled files for a better look within. simply double-click on the category name to seem at its ASCII text file.
dotPeek has associateother fascinating feature simply additional to this unleash is that the Export to Project choice that permits you to export generated ASCII text file to a visible Studio project its a form of reversing the circle of life with a development project then beginning at decompilation and ending at an actual project.
Legality of Decompilation.
Decompilation process involves disassembling application that is already made by other person. Decompilers have been standard issue for many IT consultants, an indispensable tool for modifying unsupported software executables.To gain some knowledge about its functionality, but it can amount to copyright due to the software application is constructed by the programming it which is protected by copyright. So, purchasing a machine or application that decompiles it to know the information behind the working of its software application might be considered as copyright infringement in few cases totally depends on whether the country in which it is performed this act allows it or not. Before the advent of the web and the criminal act, decompilers had many legal uses :
• Code unification — Few of retailers use decompilers to standardize code from several languages into a unified procedural language.
• Migrations — Decompilers are used during system migrations to check code consistency.
• Vendor product maintenance — Decompilers square measure oft utilized in IT outlets to support defunctional computer code.
Is decompilation legal or illegal in India?
The legality of reverse engineering totally depends on the country. In India, it is legal untill the software was acquire legally. In our country legitimate rights are deal with under the Indian Contract Act. Section 23 of the Indian Contract Act states that a contract to be illegal if an act is against public policy. Public policy is announce that section 52 of the Copyright Act. Reverse engineering is allows in a limited way like, recovery of your lost source code by any accident or migration of your software applications to any new hardware platform.
In our opinion, if we have to violate the terms of a EULA(end-user license agreement) to do decompilation, then it is illegal. Although most of the states have laws that square measure expressly allowing reverse engineering, it is our understanding that that is not an ‘inalienable right’, but one you can waive contractually.
From what we can understand that the direct reverse engineering of the software application, in whole or in part, for use for our own software for commercial use, is protected under copyright otherwise it’s legal!!