Sign in to follow this  

ethics of automated reverse engineering of software

This topic is 4783 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have written a runtime x86 assembler, but did so without having to learn all the x86 encodings. I am wondering if I have full rights to my assembler, since over 90% of it's behavior is taken from analyzing the output of another assembler. Let me explain: (Sorry this is a long.) - I wrote a program that generates a long assembly source listing containing just about every form of every x86 instruction that I want. - This assembly file was assembled in NASM. - The file NASM assembled was disassembled by NDISASM. - The disassembled output from NDISASM shows hex vs. assembly. I have another program that analyzes the result of NDISASM and places it in a data structure. ( A trie of template instructions.) - I wrote an assembler that takes in strings containing instructions, and looks up the template instruction in the trie. This works for most instructions. For instructions with addresses/ constants, I change the constant in the template instruction to reflect the new value. I also had to write some code to deal with relative addreses for conditional jumps, and also to support labels and forward referencing. This is all relatively minor, and the entire assembler is only 500 lines of C. So what I have is not exactly an assembler, but a program that mimics the operation of an assembler, with it's behavior governed by the data structure that resulted by running this 'reverse engineering' program on NASM. At a first glace, I simply reverse engineered NASM. However, the reverse engineering process was automated, which brings up the issue of a derived work. Now I am torn between two interpretations: Case 1: I own the assembler: If I assemble a program I wrote in NASM, there is do doubt I own the output of NASM (the executable), because that is a derived work of the source I put in. So, from one viewpoint, I fed NASM a source file I owned, so I own the output (an exe containing all instruction encodings), and then fed that output back into NDISASM. Now I also own the output of NDISASM, since the original input was from my program that generated all those instructions. So all I did was analyze a file I owned, so therefore I own the homemade assemler and the datafile. Case 2: Owner of NASM owns my assembler's data file: Ff a program takes in an input, the output is owned by the person who owns to input, since the output of the program is a derived work of the input. So, you can also view my whole automated reverse engineering setup as a closed blackbox system. The input to the system was NASM. The output is a datafile that describes how to assemble instructions, produced by analyzing the behavior of NASM. So, this datafile is a derived work of NASM, so it is owned by whoever owns NASM. So, which is it? Do I own my assembler, or not?

Share this post


Link to post
Share on other sites
I think you're fine in this case because the information you reverse-engineered is publically available (get the ISR from Intel!) and that subverts a claim to damages. Also I believe 1 is current case-law and uncontested for many years now.

If you used the source of NASM I think the situation would be different.

As far as the ethics go, there are a number of cases in which reverse engineering is protected, and compatibility/interoperability is one of them. I think your efforts may fall under this as well.

*IANAL*
This should not be misconstrewed as legal advice.

Share this post


Link to post
Share on other sites
I think the answer lies in the line:-

"- I wrote a program that generates a long assembly source listing containing just about every form of every x86 instruction that I want."

You then processed this program in such a way to get a lookup table for your project. Using other programs to help you does not remove ownership of the original work, nor the results of the processing.

It is clear to me the program is yours, as is anything constructed by or from it using whatever means, including assemblers and disassemblers.

It has been pointed out already the INTEL instruction manual contains the information in some form anyway, and therefore is not secret.

Share this post


Link to post
Share on other sites

This topic is 4783 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this