Take the 2-minute tour ×
Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. It's 100% free, no registration required.

This question already has an answer here:

How "legal" is it to read and edit .exe files, .dll files, and other compiled source files? Decompilation is taking the compiled code of a program, often minified and obfuscated, and trying to get the original source code back as it was written, or at least get it in a form a person could read. There are various reasons a person or company would make its code harder to read while compiling it, but the 2 I've seen most often have to do with saving resources, like space, RAM, power, etc., and making it so the code is harder to read so the user can not see what it does as easily. As we are a community about questioning the practices of reverse engineering, I think it's safe to say most of us don't like the second reason. I am asking for facts here, though, not opinions.

Because this question could get very broad, I will limit this to laws in particular countries and rules of various influential or popular companies, but info about generalities is also welcome. I am definitely not asking about morals/ethics, although I know those will certainly come up.

There was already a question about the legality of reverse engineering in general, but I'm talking only about decompilation here. As the answers to this question stated, decompilation is one type of reverse engineering. As far as I could tell, the other question didn't get answers about decompilation specifically, though you are free to provide these yourself. One answer did say the question was too broad, but perhaps this question will have a better scope.

share|improve this question

marked as duplicate by Jason Geffner, 0xC0000022L, jvoisin, Edward, 0xea Jul 2 at 13:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
So reverse code engineering (RCE) is not a superset of decompilation then? –  0xC0000022L Jul 1 at 10:21
    
Idk, is it? I never said it wasn't, I said reverse engineering itself was a superset. From Wikipedia's definition, they seem similar, but does decompilation have to be performed on hardware? Can only software be compiled? (I'm genuinely asking, as I don't know.) –  trysis Jul 1 at 13:50
2  
I would take any answers to your question on this site with a grain of salt. If you have legal questions, you should be talking with lawyers, not with reverse engineers. –  Jason Geffner Jul 1 at 13:50
    
I know, I mainly asked this question to elicit discussion. I am fully aware it will probably not get a complete(ly correct) answer. –  trysis Jul 1 at 13:53
1  
@trysis: well this is not a forum, but a Q&A site, so discussion is actually not encouraged. –  0xC0000022L Jul 1 at 14:23
show 3 more comments

2 Answers 2

up vote 2 down vote accepted

Legality of decompilation depends on the EULA (End User License Agreement) of the binary you wish to work with. While Open Source License Agreements like GPL may allow to edit/decompile the binary, other closed source proprietary agreements will prevent you in most cases.

That being said decompiling is always legal to somewhat a limited extend according to copyright laws of Europe and the US.

More information on this topic here
https://uk.answers.yahoo.com/question/index?qid=20111105222757AAGuJvd
http://en.wikipedia.org/wiki/Decompiler#Legality
http://security.stackexchange.com/questions/30359/is-decompiling-software-considered-unethical-or-illegal

share|improve this answer
    
So what do you do in legislation where it's fully legal to decompile (reverse engineer) something for the purpose of interoperability? Which ranks higher: law or EULA? –  0xC0000022L Jul 1 at 14:24
    
@0xC0000022L It's always legal to decompile for the purposes of interoperability. The DMCA allows it for Security Testing, Evaluation and Reverse Engineering. If someone releases a closed source malware (which obviously applies to all), AV companies would definitely RE & decompile it. They cannot be held guilty by the law. –  Extreme Coders Jul 2 at 4:10
    
so the DMCA affects me in what way? The point is legislation differs based on location and time and so does the content of your answer. –  0xC0000022L Jul 2 at 11:44
add comment

In Australia, you need to have a valid license for the software and be reversing for "compatibility" purposes. Which is pretty wide and includes investigating a security issue. Obviously if the code is available from the vendor, you need to get hold of that source code instead of reversing.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.