|
Home | Switchboard | Unix Administration | Red Hat | TCP/IP Networks | Neoliberalism | Toxic Managers |
(slightly skeptical) Educational society promoting "Back to basics" movement against IT overcomplexity and bastardization of classic Unix |
Old News ;-) |
See Also |
Recommended Books |
Reverse Engineering | Understanding | ||
FAT filesystem | Softpanorama Archives | Tribute to Dmitry Gurtyak | Humor | Etc |
|
|
Dissy is a disassembler for multiple architectures. It is implemented as a graphical frontend to objdump. It allows fast navigation through the disassembled code and easy searching for addresses and symbols.Release focus: Minor feature enhancements
Changes:
This release adds a text entry box for highlighting patterns in the disassembled code. The PowerPC version now supports visualizing jumps. A few minor bugs have been fixed.Author:
Simon Kagstrom [contact developer]
Update: Click hereI'm sure you've already heard about the Sony rootkit that was first revealed by Mark Russinovich of Sysinternals. After the Finnish hacker Matti Nikki (aka muzzy) found some revealing strings in one of the files (go.exe) that are part of the copy protection software, the rootkit is also suspected to be in violation of the open-source license LGPL. The strings indicate that code from the open-source project LAME was used in the copy protection software in a way that's not compatible with the LGPL license which is used by LAME.
On Slashot muzzy mentioned that he doesn't have access to Sabre BinDiff, a tool that can be used to compare binary files. I was in the opposite position as I have BinDiff but I didn't have the file in question (go.exe). I mailed muzzy and he hooked me up with the file.
I compared go.exe with a VC++-compiled version of lame_enc.dll but unfortunately BinDiff didn't find a single relevant matched function. A quick manual check didn't reveal any LAME functions in go.exe either.
Even though go.exe apparently does not contain any LAME code, a considerable amount of tables and constants from the LAME source files can be found in the go.exe file. Here's a list of the LAME tables I've been able to locate. The first column shows the hex address where the table can be found in the go.exe file, the second column shows the name of the table as it appears in the LAME source code and the third column shows the LAME source file where the table can be found.
I have to add though, that not a single table actually seems to be used by the go.exe code. What does that mean? I've asked random people and I've heard speculation ranging between "accidentaly linked" and "encrypted code in go.exe that uses the tables and can't be found in the disassembler". Further analysis needs to be made but at this point I'm leaning towards more or less accidental inclusion.
Posted by sp in Misc at 11:38
Comments
Display comments as (Linear | Threaded)The code in GO.EXE could be compiled with another compiler. In that case your comparison would probably not find a match, but it may still be there. #1 Rhialto on Nov 14 2005, 12:41 Reply This idea is absolutely right and I've thought about it. go.exe was apparently compiled using VC++ 7 (debug build) while lame_enc.dll was compiled using VC++ 6 (release build). That's what PEiD ( http://peid.has.it/ ) says, at least.In the past I've succesfully used BinDiff to match functions from files compiled with gcc to functions from files compiled with VC++ though. The question is now whether VC++ 7 is so much different from VC++ 6 that BinDiff is less likely (or even unable) to match them even though code produced from VC++ 6 and gcc seem to be similar enough for BinDiff to work.
Furthermore I think the main point of importance is that the tables in go.exe are not referenced by any code (at least not in a way that a static disassembler can detect). I think the reason for this might be the solution to the entire violation question.
#1.1 sp on Nov 14 2005, 12:52 Reply They are very different, the VC7 compiler was a complete rewrite of the VC6 compiler and has many improvements. #1.1.1 Anonymous on Nov 15 2005, 17:03 Reply Heya,I'm another reverser, and I'd be interested in taking a look at this myself (I also have IDA and BinDiff)... could you possibly send me a copy of the exe?
Cheers,
Will
#2 Will Whistler on Nov 14 2005, 13:06 Reply This raises an interesting question: are tables originating from LGPLed code enough to make the LGPL apply to the final executable, even though it might not actually use the data?After all, the tables also have been written and are part of the source code covered by the license. I don't think copyright law would make a difference between the source for executable code and that for the data needed by that code.
#3 Arend Lammertink (http://plone.vrijschrift.org) on Nov 14 2005, 14:38 Reply Good observation. That's actually exactly why I didn't even make an attempt to answer the question posed in the topic. I don't know enough about license and copyright issues to make an educated guess. #3.1 sp on Nov 14 2005, 15:27 Reply Coming to think of it, it's not surprising at all you can't find any code if you compare a dll and a static linked executable on Windows.Windows' dlls are designed in such a way that function calls between dlls are completely different from their static equivalents. Function calls are adressed using an offset table in the dll. The caller uses special access code. That's why dlls are accompanied by "import" libraries. Every function that can be used from outside of a dll has to be "exported" using some declspec macro's. I'm sure these will also influence name mangling, etc.
To make a long story short: try comparing the executable with a static Lame library...
#4 Arend Lammertink (http://plone.vrijschrift.org) on Nov 14 2005, 15:18 Reply I assumed that this wouldn't matter because of the level of abstraction BinDiff uses to determine whether code from two files is equal or not. The calling convention shouldn't really matter here.But alas, assumption is the mother of all fuck-ups. So I went back to check. As I expected I don't get any results from a statically linked LAME either.
I also want to draw attention to another issue. LAME is an application that uses a lot of FPU instructions. Go.exe barely uses any.
I've created an opcode distribution list for the files lame_enc.dll and go.exe. The former uses tens of thousands of FPU instructions with fld being the 2nd most used instruction (only mov is used more often). The latter file, on the other hand, uses only a few hundred FPU instructions and there are 26 more frequently used CPU instructions before the 1st FPU instruction comes in the list.
#4.1 sp on Nov 14 2005, 20:11 Reply What relevant parts of the LGPL would be infringed if it does contain this? The LGPL doesn't require that things that link to it also be LGPL, unlike the GPL. #5 Nick Johnson on Nov 14 2005, 21:04 Reply They still have to offer the source code for any LGPL code they distribute, or modify and distribute, and they still have to include an LGPL license notice. They can link to LPGL code, but they can't hide it. #5.1 Rodrin on Nov 15 2005, 16:22 Reply Another, perhaps more logical explanation, given the lack of substantial similarity: Perhaps the Sony software includes LAME signatures so it can detect whether a user is running LAME to encode MP3s. #6 Ansel (http://www.anselsbrain.com/) on Nov 14 2005, 21:22 Reply Perhaps the tables in question aren't used to execute anything, but merely to detect LAME and/or programs that use it? #7 HyperHacker (http://hypernova.amarok-shadow.com) on Nov 15 2005, 07:19 Reply Let me quote some comment on a slashdot story (http://yro.slashdot.org/yro/05/11/15/1250229.shtml?tid=117&tid=188&tid=17) from muzzy:That only concerns GO.EXE, and while the analysis is correct for that executable, I checked for LAME references against every binary in the compressed XCP.DAT file after I managed to unpack it (thanks to freedom-to-tinker.com guys for providing description of the format). Turns out, there's more binaries including references to LAME, and this time there's actually code that uses the data as well. And not just LAME, there's also Id3lib included in one dll, and bladeenc and mpglib distributed along with the DRM. All of this is LGPL, it's code, and it's being used.
#8 Cone on Nov 15 2005, 15:06 Reply Yes, this is correct. We're right now working on the new files and we've already matched code manually. We're now in the process of developing a few tools to match code automatically because there's a lot of code to match. #8.1 sp on Nov 15 2005, 15:08 Reply Congratulations, guys! #8.1.1 Arend Lammertink on Nov 15 2005, 15:26 Reply What if the tables from LAME are there, to be used to detect a LAME encoder being used on the system? ie, if you try to rip the tracks, it will see that LAME is running, and perhaps corrupt the resulting ripped file? #9 Ed Felton on Nov 15 2005, 16:30 Reply Wonders if go.exe makes any systems calls to register itself. #10 hawkeyeaz1 on Nov 15 2005, 16:44 Reply
See also Decompilation Page and Reverse Engineering Links
The REAP project at InterGlossa is developing tools to support maintenance and reverse engineering of assembly language programs, concentrating on well-engineered hand-coded programs. Abstraction of assembly programs takes place in the context of a selected `engineering model' which includes the definition of the instruction set semantics but also constraints on the programs similar to those found in ABIs. The process of translation takes the form of a large-scale inductive demonstration that the program meets the constraints of the `engineering model' as the translated abstraction is produced. An engineer's interface makes this manifest to the engineer supervising the translation.
This approach can in principle handle programs whose models include a disciplined use of code self-modification or dynamic register bank switching. As intermediate language for the major analyses involved we use a representation based on the XANDF X/Open standard originating from the UK Defence Research Agency. XANDF is a standard for architecture neutral program representation which will permit support for analyses of portability. Concurrency is not yet covered but recent advances show how XANDF can be extended to encompass concurrency and distribution. We illustrate the effectiveness of the tools with examples taken from live Intel 8051 and Zilog Z80 systems.
WCRE '96 Abstracts Mandrake: A Tool for Reverse-Engineering IBM Assembly Code
Paul Morris and Robert Filman
Software Technology Center
Lockheed Martin Missiles & Space
Assembly language code provides both
a daunting challenge and a sterling opportunity for software reengineering.
Ideally, we would like a system which, when fed assembly code, would
automatically produce quality, maintainable high-level programs. That
ideal, if not impossible, is certainly far beyond current technology.
However, automation can profitably be applied to part of the task of
reverse-engineering assembly code, by producing a "draft'' of a high-level
language version, to be verified, modified and polished by competent
software reengineers. In this paper we describe our progress on developing
a reengineer's apprentice to aid reverse-engineering of handwritten
IBM 370 Assembly Code by automatically translating it to a higher-level
form. This paper explores the problems that arise and some potential
solutions, and describes the implementation of Mandrake, a system that
performs an interesting collection of the reengineer's apprentice tasks.
ELF disassembler -- Modified version of NASM's NDISASM program. WARNING! Reverse engineering and cracking may be ILLEGAL, use it only for your own programs or for educational purpose!
Additional features:
- ELF file (executable/object/shared library) reading
- load and use STATIC and DYNAMIC symbol table if present
- optionally dump ELF sections to files (linked data...)
- display ASCIIZ text constants from ".rodata" section
- signed hex values (ndisasm writes [ebp+0xfffffffe] instead of [ebp-0x2])
This util can be used for understand programs without their sources.Author: Árpád Gereöffy (A'rpi/ESP-team)
Platform: LINUX x86 only
Filename: elfdisasm-0.*.tar.gz
VACE | Accelerating the understanding, maintenance and re-engineering of source code. This product processes Assembler source. A demo of the beta product is available at their web site. |
Analysis only (no assembly or execution) |