Can Reverse Engineering Help In Stopping Worms? 187
krozinov writes "The goal of this paper is to try to answer the following three questions:
How do you reverse engineer a virus? Can reverse engineering a virus lead to better ways of detecting, preventing, and recovering from a virus and its future variants? Can reverse engineering be done more efficiently?
The paper is organized into five sections and two appendixes. Section 1 is the introduction. Section 2 reviews basic x86 concepts, including registers, assembly, runtime data structures, and the stack. Section 3 gives a brief introduction to viruses, their history, and their types. Section 4 delves into the Beagle virus disassembly, including describing the techniques and resources used in this process as well as presenting a high level functional flow of the virus. Section 5 presents the conclusions of this research. Appendix A provides a detailed disassembly of the Beagle worm, while Appendix B presents the derived source code of the Beagle virus, as a result of this research."
Well (Score:1, Funny)
Re:Well (Score:3, Funny)
Because you didn't have time trying to post the first post?
Re:Well (Score:1)
Re:Well (Score:2, Interesting)
Re:Well (Score:1)
Re:Well (Score:2)
Re:Because most virii are already freely available (Score:3, Interesting)
The POINT is that copycat versions may be caught by looking at how the original works and what it does in general rather than some kind of binary pattern match like the current generation of AV does.
Many of the AV vendors cla
Waste of time (Score:3, Insightful)
Re:Waste of time (Score:1)
Re:Waste of time (Score:5, Insightful)
The virus, worm, trojan field advances, sometimes rapidly. If a new worm arrives that hasn't been seen before how much help can someone be that hasn't written or played the game in a year or longer? I think your question, and I'm not attacking you, is much like asking if forensic science is needed, just ask the murders....
I think the third question, can reverse-engineering be done more efficiently, is the important one because it will help question #2 significantly.
Re:Waste of time (Score:1, Funny)
Re:Waste of time (Score:1)
Re:Waste of time (Score:2)
Give it up, if you have something mission critical. Don't use windows or internet explorer. Use linux and firefox.
Re:Waste of time (Score:3, Interesting)
If it's mission critical why the hell are you running a web browser on it anyway?
Re:Waste of time (Score:5, Interesting)
Re:Waste of time (Score:2)
Actually, I took the article as a huge set of techniques to isolate and figure out a discovered threat. If there was a virus on their machine that hadn't been caught by current AVS, with a different set of initial steps, one could do this same thing and built a bit signature.
I look forward to when the authors examine encrypted and polymorphic malware.
Reverse Reverse (Score:4, Interesting)
Re:Reverse Reverse (Score:1)
the creater reads it and releases his now corrected version a few hours later.. or copycats i guess
Through they is a real buzz when a new worm comes out and you can take it apart.. I will never be as fast as any anti-virus venders but still entertaining none the less.
--
This is about programs, not biology. (Score:4, Insightful)
Viruses and worms exist because security models and implementations have vulnerabilities.
You see so many Windows viruses and worms because Microsoft's security model has some very basic flaws. Instead of dealing with them, Microsoft relies upon 3rd party anti-virus companies to issue very specific "patches" for each virus that comes out.
Re:This is about programs, not biology. (Score:2)
The point of that would be what? Get some more market share and then we'll talk about whether or not it's worth the effort.
Linux has a few million users. (Score:4, Interesting)
Even the old MS-DOS machines had a viable virus population, although the viruses, for the most part, had to be hand transported via floppies to each machine.
With network enabled machines, it should be even easier to spread viruses. And it is. Just look at all of the Windows viruses, worms and trojans that are out there.
If Linux was as un-secure as Windows, a simple link on
Re:This is about programs, not biology. (Score:2)
However, maybe the fact that chosing Linux needs an active decision, and therefore a minimal intelligence, helps a bit here: The script kiddies won't target Linux, since they don't have a clue about it.
Re:This is about programs, not biology. (Score:3, Interesting)
For now. I am reminded of Ken Macleod's "Cassini Divsion" [amazon.co.uk], where all electronic computer systems have been compromised by the "fast folk". An initial attempt to fight them, using a ship controlled by a different electronic system, succeeds for a bit, but is quickly also taken over, as the viruses mutate enough that even a different operating system is not effective protection.* So, for the sytstem used by the "fast folk" read Win
Sanitary practices and the evolution of germs (Score:5, Insightful)
It's well-known that a parasite that kills its host damages its own chances for survival or reproduction. A germ that doesn't make you sick enough to stay home from work leaves you in able condition to cough that germ all over your coworkers. One that kills you right off has a much decreased chance of spreading to those people ... that is, unless your town is in the habit of leaving corpses lying around.
If germs in corpses are able to infect the living, then there is much less "incentive" for germs to leave their hosts alive. If, on the other hand, your civilization isolates corpses, especially obviously infectious ones, then being in a corpse becomes a bad replication strategy for a germ.
This is clearly a way in which human cultural practices affect the evolutionary environment of infectious disease organisms. Under medieval conditions, the Black Plague was pretty darned optimal as a survival strategy. In isolated villages in Congo, the Ebola bacterium can leave messy, nasty corpses lying around and still survive. In places with more effective medical response, that would not be a very effective survival strategy.
What is the analogy to computer viruses? Right now, large portions of the Net have ridiculously crappy "medical response" to computers that are effectively "killed" (rendered useless) by virus and worm infection. Most commercial ISP networks are, to the unprotected Windows computer, the equivalent of rolling around naked in medical waste. This septic environment, in which dead and dying bodies are left to rot and spread their infections, just promote viruses that completely overwhelm the host.
Moreover, the average Windows system and user have the equivalent of terrible hygiene practices. Personal hygiene, in the real world, means that you avoid filthy things when you can; you wash when you've come into contact with them; you wash regularly even if you don't think you have filth on you; and you make sure not to mix filth with your food. Public hygiene means that your society keeps filth and corpses away from the food supply, and keeps rotting garbage off the open street. When these practices break down, you get plagues.
How to prevent this? First, some rudimentary public sanitation would help -- when a system is infected, it must be quarantined and prevented from infecting others. Second, computer users must learn to choose software which has good sanitary practices -- isolating untrusted data ("filth") from the system software ("food") and making sure to clean up those parts of the system that come into contact with the filth.
Can Windows do this? I don't know. The SP2 firewall settings are an improvement. However, it is still a system with terrible hygiene, since user software which handles filth routinely runs with administrator privileges that have access to the food supply. Ick.
better solution? (Score:4, Insightful)
in the future, i suspect this sort of malware will only get worse in terms of technical complexity, but the reason for their creation will probably be roughly the same.
my $0.02
Re:better solution? (Score:5, Insightful)
1. For fame
2. For fun
3. For profit
4. They have some sort of grudge
5. To show off
These are all basic human instincts, manifested in a bad way. There is really no way to prevent anyone from having any of these desires.
Re:better solution? (Score:2)
Sign all executables. Refuse to run unsigned executables. Dont sign malware.
Re:better solution? (Score:2)
Buy only branded drugs. Refuse to buy generic drugs. Don't buy brands from other countries.
Re:better solution? (Score:2)
Re:better solution? (Score:3, Insightful)
Re:better solution? (Score:1)
Re:better solution? (Score:4, Insightful)
a. Because they can.
b. To see if they can get away with it.
c. They believe they can't be caught.
d. To get attention/gain 'respect'.
These tend to be recurrent reasons given for a lot of crimes that do not seemingly provide any benefit to the criminal. Grafitti is another, as is petty theft when the person in question is not thieving because of any real desire to have the stolen item or profit from it.
Re:better solution? (Score:2, Funny)
On a side note, I doubt anyone from EA writes viruses. [slashdot.org]
Re:better solution? (Score:1)
Reverse Engineering a virus... (Score:5, Insightful)
It only helps if the people who write future variants are lazy...so I guess yes, it will help with there not being versions A-ZZZ of the bagle virus, but the serious ones are still going to be out there.
It already takes very little time for them to catch most variants these days. My software (AVG) is usually a day ahead of any of the major news organizations on having the fix for any new virus out there. The new, creative, and dangerous virus are the ones that worry me not the 200th version of netsky that shows up.
Perhaps the best way to control the spread of virus is to reverse engineer the OS/program that it is targeting...create fixes proactively and don't allow the exploits to be found in the first place. But there's probably a law or two out there that prohibits this kind of stuff, eh?
Re:Reverse Engineering a virus... (Score:2, Insightful)
Re:Reverse Engineering a virus... (Score:2, Funny)
Laws against writing secure software? Well yeah, that'd explain quite a lot.
Re:Reverse Engineering a virus... (Score:1)
It doesn't help stop the spread, it doesn't seem essential to detection, at best it makes removal a little more clear-cut.
Reverse engineering a virus might be an interesting academic challenge, but it's probably not that helpful except at classifying variants.
Re:Reverse Engineering a virus... (Score:2)
While I think Symantec, et al, are honest companies, I don't think they are working a way to make viruses obsolete (and themselves obsolete as well). MS is working on adding new features more than security, because you will buy it anway. My experience in life tells me that an educated outsider's opinion, if well researched, can be pretty damn insightful.
I actually read the repo
Re:Reverse Engineering a virus... (Score:1)
You mean do not try to find the problems, or not making any notice of upcoming problems ?
The later is the better, but it is not really good, because there will always be people who hear about it and exploit it
Re:Reverse Engineering a virus... (Score:2)
That's because it's the AV companies putting out the press releases about these viruses. It takes the news organizations a day to rework the press release into a 'news item'.
Pinky are you thinking what I'm thinking? (Score:5, Funny)
Re:Pinky are you thinking what I'm thinking? (Score:3, Funny)
Re:Pinky are you thinking what I'm thinking? (Score:2)
Re:Pinky are you thinking what I'm thinking? (Score:2)
No, it would be illegal to provide other people with a tool that enabled illegal copying of the virus, or instructions on how to make illegal copies of the virus.
Reverse engineering to determine how it works would still be perfectly legal. If describing how you did it would enable other people to make copies, then such descriptions would be illegal. But descriptions
Re:Pinky are you thinking what I'm thinking? (Score:2)
Well, if not (Score:1)
The lawsuit is coming (Score:2, Redundant)
"You have violated the License Agreement of the Beagle virus through your reverse engineering activities. Your publication illustrating how to do this is a clear violation of the DMCA and induces others to also violate their license agreement. Please Cease and Desist all such activities and prepare to see us in court."
--
Not free as in effort, but I'm wi [wired.com]
Re:The lawsuit is coming (Score:2)
Well, yes, and that's sot of my point. We can all agree that viruses are evil and that they need to be stopped an taken care of as quickly and fully as possible. So it is OK for Anti-virus companies to reverse engineer the viruses (for financial gain) to provide a fix for them.
By the same logic, some people (but not all) can agree that Microsoft is evil and should be stopped as quickly and fully as possible
Re:The lawsuit is coming (Score:2)
Re:The lawsuit is coming (Score:2)
It won't be long before the virus writers begin to play tricks - things like flipping around the "Yes" and "No" buttons around (so that people who instinctivly click on "No" will accidently hit "Yes" instead).
Alternativly, the virus could blackmail the user by stating that diagreeing would trash the data on your hard drive. This is very similar to the old Casino vir
Re:The lawsuit is coming (Score:2)
Re:The lawsuit is coming (Score:2)
I am aware of that, but there are many people who do not.
There are also reports about contracts made under questionable circumstances in some countries where contract law is not as well defined (although not forceful, more like a false pretence by incorrectly telling the illiterate signer that he'll get 100 thousand dollars instead of 10 thousand.) Plus, there have been movies whe
This isn't reverse engineering at all! (Score:3, Insightful)
Reverse engineering is when you disassemble and recreate a the original source (which they did) -- the easy part. Then, the hard part is to create a set of specifications without referring to the original code or snippets, then handing that over the "wall" to someone who has not been exposed to any of the IP of the original and rewriting the code from scratch
Re:This isn't reverse engineering at all! (Score:2)
Is that strictly true? Suppose I write a virus. That in itself isn't illegal, as long as I don't release it in the wild. But it is a creative work, just like any other software, so I automatically get the copyright as its author. Sure, it's unlikely that a virus author is going to sue people for breaching copyright, and there will be various fair-use arguments (dissassembling something for compatibility is allowed; to make a virus compatible with the
Re:This isn't reverse engineering at all! (Score:4, Informative)
Re:This isn't reverse engineering at all! (Score:3, Interesting)
Re:This isn't reverse engineering at all! (Score:2)
Sure they are. See, a "virus" is a program, and the source code is copyrightable, and patentable as well. Otherwise there'd be no point to the second half of your post, anyone could just use Phoenix BIOS as their own.
Every virus I've written is copyrighted to me. Now, I don't consider them viruses. Some spyware and anti-virus software will identify them as viruses, because the code will behave in viral like ways such as deleting files and making regis
Virus Patent Business! (Score:2)
Maybe I should try to find new ways for viruses to spread, hide themselves, etc., but not write a virus, but patent them. I'm sure a virus writer will not check any patents, and then if some new virus is spread and the one who has written it is caught, I'll sue him for royalties.
Thinking about it: Given that it's obviously possible to sue someone for just running patent-protected software (think GIF!),
Re:Virus Patent Business! (Score:2)
You'd have to be quick though; find a bug in a MS product, write an exploit and patent it quickly. If you wait too long the virus and previous incarnations will all be prior art.
Not that the overworked and underclued USPTO *wo
What about worm EULAs? (Score:5, Funny)
By connecting a computer to the internet, you hereby agree to the terms of this agreement (hereafter referred to as "deal with the devil") for this software (hereafter referred to as "CPU sucking nightmare")
Won't surprise me if virus/trojan/worm/spyware writers use IP law against those that would hope to rid the world of their menace.
Re:What about worm EULAs? (Score:3, Informative)
Well... (Score:4, Interesting)
Simple stuff like that...
Get rid of IE and get rid of Outlook Express and you get rid of 90 percent of the threat.
This would be a plug for Linux, as I use it daily, but there are things that Windows users can do to keep from being screwed every day. If only Mickeysoft helped their users rather than write crap software.
--
BMO
Re:Well... (Score:2)
Didn't stand a chance against applications and operating systems first written to obtain and entrench an air-tight monopoly hold over the entire software industry, rather than a common sense design. You know, like not worrying about quality when there's an opportunity to tie products together and leverage an existing monopoly to destroy the market for a competitors product, leaving only yours.
Simple stuff like...
Tying the gui, browser, media player into the operating system and f
Too much indirection (Score:5, Insightful)
It would seem a better defense to use whatever reverse engineering tools are available to fix the application. Things like Purify etc. are of some use for many common problems.
Adding additional/patched code onto a virus/worm sounds like dangerous business to me. Suppose you didn't do everything exactly right, you are now responsible for releasing a new virus into the wild.
Understanding The Pathology Is Important But... (Score:5, Insightful)
To even be more suscinct, if all it took to stop a virus was to reverse engineer it (ie. pathology), then we'd have things like AIDS, Herpes, etc. beat long ago. We clearly understand how these things spread yet infections still happen. Likewise, we already know a lot how virii spread on Windows and form best practices and yet comprimising still happens.
Re:Understanding The Pathology Is Important But... (Score:1, Funny)
Re:Understanding The Pathology Is Important But... (Score:2)
This breaks down trivially when applied to computer malware. By reverse engineering a computer virus (or other malware) you can tell how it spreads, and exactly what damage it does. By knowing how it spreads you can always avoid becoming infected. By knowing what damage it does you can always remove that damage
DMCA violation (Score:1, Troll)
It's easy and it wont' work. (Score:4, Insightful)
Back in the DOS days, the fact that code on a floppy header or something would get executed on insertion was a problem. Solution, don't bring that into memory for execution.
Word, at a point, by default, would execute macros on load of a document. Don't bring in code from a document and execute it.
In outlook, looking at email can cause JS to execute which may have it's own problems due to the implementation of js. Don't execute the JS.
Don't try and figure out how viruses work. Figure out what they exploit and close them up. Duh.
Re:It's easy and it wont' work. (Score:2)
Yeah, but a lot of modern email viruses just exploit the part of the system between the keyboard and the chair. Unfortunately no-one has worked out how to issue auto-updates for this part of the system...
Re:It's easy and it wont' work. (Score:2)
Auto-updates might not be possible for that component, but certification is.
Doctors, Lawyers, Drivers, and other trades or tasks are given a license recognised by the government stating that you are qualified for the task in question. Apply the same to computers, and the problem is solved. (Of course,
Why RE? (Score:3, Insightful)
No-execute stacks... (Score:2)
All that I come up with is that stuff "late this year" from Intel will have it, and that AMD64 has it.
An interesting read (Score:3, Funny)
-Pinkoir
Little help, but help anyway... (Score:3, Informative)
- knowing how it technically works dont disable the social engineering component, very trivial worms were very sucessful just for that.
- there are a lot of worms that have the source available in a way or another, from the first ILoveYou worm (well, most
- Some worms also are maybe simple exploits of software vulnerabilities or weakeness (mostly MS.*, but there are some for other developers and operating systems). What must be understood there is not the worm source, but what it exploit and why that software is used.
Or we could stop relying on insecure technologies (Score:2)
Am I missing something here? (Score:3, Insightful)
And we didn't feel that this was even groundbreaking work back then...
What am I missing here?
Cheers,
Ken van Wyk
Re:Am I missing something here? (Score:2)
I think what's missing is an entire generation of programmers. Those of us who got their start up through about the mid-80s (on the original PC, XT and AT) knew the technical ins and outs of both our own code and the OS. The current generation grew up with development environments and application frameworks divorcing them almost completely from how the system really works. It's not that they don't know what's going on "under the hood", it's more that they don't know there is an "under the hood" in the first
E-Mail lists (Score:3, Interesting)
Re:E-Mail lists (Score:3, Insightful)
The email program itself would need to decrypt the list in order to use it. Any 3rd party program which requested email services from the email client (think COM) would need to have an exposed API to call in order to request that service. A virus would only have to call that API to decrypt the list.
Re:E-Mail lists (Score:2)
If it gets harvested then it reduces the value of the harvested list (arbitrarily close to zero, if enough people do this).
If a worm on your own computer tries to use the list then there are all s
Guaranteed to be Too Late (Score:2)
Exploit the worm's scanning engine to slow it (Score:4, Informative)
I've had some luck against people scanning web servers for formmail.pl scripts. My formmail.pl sends random data without any CR or LF. One script so far accepted 2gb of data before disconnecting.
Re:Exploit the worm's scanning engine to slow it (Score:2)
Been done (Score:5, Interesting)
Stopping worms (Score:2)
The best way to stop the current ones, is to analyse their network usage, and block it. I did it last week, and our network is stable and not spewing filth everywhere. :)
Nah, worm writers should get it right (Score:2)
Can Reverse Engineering help stop worms and virii? (Score:3, Insightful)
The worm (or virus) is already out in the wild. Seeing how it works won't stop it.
But seeing what it exploits might.
There is a 99 percent chance that the worm/virus will exploit a known hole in the target application/operating system. Nowadays, these exploits have come much, much quicker than in the past. It used to be a few months before a hole was exploited; now it can be just a matter of hours.
What would impress me is if they reverse-engineer a worm/virus and find that it exploits a hole that was unknown beforehand. Now THAT would show some intelligence on the part of the author (if not any ethics). The 'kiddie-scripters' that mutate the source code from a worm/virus and just hex-edit their initials into it aren't very creative at all; just adolescant vandals who want to make their mark with their brethern vermin in the dark underworld of the Internet.
It's not that virus/worm authors are anything to be emulated. But you have to respect them. Like you have to respect terrorists. You may lothe them, but you have to respect them.
However, reverse-engineering IS useful. It is forensics. Someday, maybe soon, the forensics team will be able to catagorize and maybe even identify the author of a virus by the way it is written. Currently, it is helpful in finding those security holes, so they can notify the authors of the program being attacked.
Let's face it folks. Programming is still more of an art than a science. We imperfect human beings are trying to write perfect code, because the computer does exactly what it is told to do. We humans don't operate at that level very well. So we write imperfect code; something that can be eventually exploited given time and resources of anyone willing. It's gonna happen, whether your code comes from American, Indian, or Ukranian programmers. There are evil people out there, and they are going to check the doorknobs of every program to see if they can get it and cause trouble. Until someone comes up with a source-file hole checker, be prepared for more worms and virii.
OK, I'm done ranting.
Did anyone think it wouldn't help? (Score:2)
While it is a well written and interesting discussion of reverse enginnering a virus, the writers admit they hadn't really done any reverse enginnering before this project at all. Also, how exactly did everything think that Anti-virus writers have been tracking what viruses do and how to kill them? Any major virus is of course disassembled by the antivirus writers so they can decide how to remove it, espically no
Now figure out how to break out of Microsoft VM (Score:2)
Microsoft VM has to do all the wierd code-changing that VMware did, because the x86 can't be completely virtualized. And it has to emulate the I/O devices. There are probably bugs in the VM that can be exploited, most likely in the I/O area. Try wierd DMA operations, and poke around in device address space, until the real machine crashes.
Lack of competences? (Score:2, Insightful)
One obvious but irrefutable idea which arises from this article is that while we're almost all writing in hi-level languages nowadays, the final code is still in assembly. (Ok, that's not quite true for Java and the like, but let's focus on decent fully-
Re:Lack of competences? (Score:2)
The problem isn't that there are fewer and fewer programmers - it has to do with the fact that it's hard to interpret it in the first place.
For example, IBM PCs running Dos will access operating system calls by calling an Interrupt. Unless you have a
How about the DMCA ? (Score:2)
So OK, a virus is "BAAAAD", while a DRM system, is
Re:How about the DMCA ? (Score:2)
I would expect a similar application of common sense in this case. The DMCA was conceived (perhaps ill-conceived, but that isn't the point) to protect copyright holders. It was definitely not intended to allow criminals to protect their own illegal behaviors. I really doubt the DMCA would apply in this case.
And that's not e
Re:How about the DMCA ? (Score:2)
A good trojan that contained an embedded EULA, a trade-secret and a copyright notice would be funny as hell IMO... and I've not seen any exceptions in the DMCA where certain "IP Rights" are waived if th
It took them 10 weeks to compile this information (Score:2)
Well, this document is a complete primer on how to disassemble an unknown (smallish) program in a sandboxed environment. Anyone who ever wanted to learn this skill should give it a shot. Who knows, you might end up working for an antivirus company soon
For Lucent however, this was a complete waste of 10 weeks of engineering skill of three people minus the publicity
Netcraft confirms it:SOVIET RUSSIA jokes are dying (Score:3, Funny)
Re:Legal? (Score:1)
Re:against the dcma (Score:2)