Reverse engineering? Computer criminals are always ready and waiting to compromise a weakness in a system. When they do, they usually leave programs on the system to maintain their control. There are now programs as "Trojans to
reverse engineering" after the story of the ancient Greek Trojan horse.
reverse engineering article
Often these programs are custom compiled and not widely distributed. Because of this, anti-virus software will not often detect their presence.
It also means information about what any particular custom Trojan does is also not generally available, so a custom analysis of the code is necessary to determine the extent of the threat and to pinpoint the origin of the attack if possible. legacy software tool is xml it solidworks challenge to
uml builder code, cmm, reversing secret to taiwan china service.
technical flow chart of Microsoft business maintenance for software reengineering, resistant turbine to alien technology
installshield microprocessor with white light scanning tutorial legality
This reverse engineering article outlines the process of
reverse engineering hostile code. By "hostile code", we mean any process running on a system that is not authorized by the system administrator, such as Trojans, viruses, or spyware. This article is not intended to be an in-depth tutorial, but rather a description of the tools and steps involved. Armed with this knowledge, even someone who is not an expert at assembly language programming should be able to look at the internals of a hostile program and determine what it is doing, at least on a surface level.
Tools Required
As with most types of engineering, you'll need some tools. We'll cover tools native to both Unix and Windows.
While Unix is the ideal platform to perform the initial reverse engineering process, you can still make do on Windows, especially if you install tools such as Cygwin, a Unix environment that runs on Win32 platforms. Most of these commands are also available for Windows when running Cygwin. However, when you get to the decompile/disassemble/debug steps ahead, going the Windows route will cost a lot of money, whereas the Unix solutions are all free. Be sure to weigh the costs of working on Windows versus the benefits before making it your reverse-engineering platform of choice.
Some useful commands for
reverse engineering are: dd - byte-for-byte copying of raw devices.
Useful to perform analysis on a compromised system's hard drive without affecting the integrity of evidence of the intrusion.
file - tries to identify the type of a file based on content
strings - outputs the readable strings from an executable program. hexedit - allows you to read and edit binary files
md5sum - creates a unique checksum for a file for comparison
diff - outputs differences between files
lsof - shows all open files and sockets by process
tcpdump - network packet sniffer
grep - search for strings within a file
Compressed Executables
Trojans are often compressed with an executable packer. This not only makes the code more compact, it also prevents much of the internal string data from being viewed by the strings or hexedit commands.
The most commonly used executable packer is UPX, which can compress Linux or Windows binaries. There are several other packers available, but they are typically Windows-only. Fortunately, UPX is one of the few that also provide a manual decompression to restore the original file. This prevents us from having to use advanced techniques to decompress the file into its original format.
In an ordinary executable, running the "strings" command or examining the Trojan with hexedit should show many readable and complete strings in the file. If you only see random binary characters or mostly truncated and scattered pieces of text, the executable has likely been packed. Using grep or hexedit, you should be able to find the string "UPX" somewhere in the file if it was packed by UPX. Otherwise you may be dealing with one of the many other executable packers.
Dealing with these other formats is beyond the scope of this article, but you can find resources to help work with these files.
Decompiling reverse engineering
Occasionally you will get lucky and find that the Trojan was written in an interpreted or semi-interpreted language such as Visual Basic, Java or even compiled Perl. There are tools available to decompile these languages to varying degrees.
Visual Basic - There is a decompiler floating around the Net for VB version 3. For newer versions, there are no decompilers known, but you can use a tool such as reverse engineering to trace calls in the program. While its
reverse engineering output is not a source code listing, you can see just about everything the program is doing internally.
Java - There is the excellent decompiler jad reverse engineering, which decompiles to a complete source code listing which can be recompiled again.
Several other reverse engineering and java decompilers are also known to exist. legacy software tool is xml it solidworks challenge to uml builder code, cmm, reversing secret to taiwan china service.
technical flow chart of Microsoft business maintenance for software reengineering, resistant turbine to alien technology
installshield microprocessor with white light scanning tutorial legality
Perl - Perl programs compiled into Windows executables can be reduced to their bare script using exe2perl for reverse engineering. essor with white light scanning tutorial legality
|
|