Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Security Books Media Worms Book Reviews

The Art of Computer Virus Research and Defense 100

nazarijo writes "I think by now we're all familiar with viruses and worms. It may have been a term paper diskette chewed up by a virus back in college, a family member's computer infected with the latest worm, or your email inbox clogged with a mass mailer of the week. But how do AV researchers dissect such malware, especially when virus writers have devoted so much time to avoiding detection and perfecting their craft with self-decrypting viruses, polymorphic shellcode, and obfuscated loops. Haven't you wanted a peek into how that's done, and how you would analyze such a monster that landed in your computer? Well, Peter Szor's book The Art of Computer Virus Research and Defense (TAOCVRD) has been gaining lots of critical acclaim lately for filling that gap, and rightfully so. (Before we begin, however, I should make one thing perfectly clear: I was a technical reviewer of this book. I enjoyed it when I read it originally, and I'm even more pleased with the final result. And now on to your regularly scheduled review.)" Read on for the rest.
The Art of Computer Virus Research and Defense
author Peter Szor
pages 713
publisher Addison Wesley Longman and Symantec Press
rating 9
reviewer Jose Nazario
ISBN 0321304543
summary Clear, sweeping coverage of virus history and technical details

TAOCVRD opens with Part 1: Strategies of the attacker. Here we get to start to think about malicious code from the original ideas and viewpoints of its makers. Chapter 1 opens up with various games of the classic computer science world, including Conway's Game of Life and Core Wars, which is still fun after all of these years. From this we can start to think about computer viruses as a natural extension of other self-replicating computer structures. What's great about this chapter is that you can actually understand, and share in, the fascination of replicating code. It's as if you can understand the pure world that some virus writers live in.

Chapter 2 starts off the virus-analysis section, including some of the basics (like the types of malicious programs and their key features), as well as the naming scheme. Chapter 3, "Malicious Code Environments," serves as a lengthy and complete description of how various viruses work. The dependencies that you would expect to see, including OS, CPU, file formats, and filesystems, are all described. Then Szor goes on to describe how viruses work with various languages, from REXX and DCL to Python and even Office macros. Not all of the descriptions are lengthy, but you get to see how flexible the world of writing a virus can be. What I most enjoyed about the book overall is represented in this chapter, namely Szor's command of the history of the virus as well as his technical prowess, which he drops in as appropriate.

Chapter 4 gets a bit more technical and now focuses on infection strategies. Again, Szor isn't afraid to delve into history or technical meat, including a lengthy and valuable section "An In-Depth Look at Win32 Viruses." If you don't feel armed to start dissecting viruses by this point, you're in luck: there's so much more to read. Chapter 5 covers in-memory strategies used by viruses to locate files, processes, and sometimes evade detection. Szor has a list of interrupts and their utility to the virus writer, providing a comprehensive resource to the virus analyst.

Chapters 6 and 7 cover basic and advanced self protection schemes, respectively, used by viruses. TAOCVRD's completeness of information in a usable space, together with very functional examples and descriptions, is again evident. Szor walks you through a basic decryptor routine, for example, showing you how a self-contained virus can be both evasive and functional at the same time. Sadly little attention is given to various virus construction kits at the end of chapter 7, though.

Chapters 8 and 9 get a little less technical and somewhat more historical. These chapters cover virus payloads and their classification (ie benevolent viruses, destructive viruses, etc) and computer worms, respectively. The overview of payloads is almost entirely historical, giving a great overview of how virus writers have used their techniques to cause havoc or just have "fun" from time to time. Chapter 9 gives a concise and valuable overview of computer worms, almost boiling about half of my worms book down into just one chapter in a clear and easy to use fashion.

Part 1 concludes with chapter 10, which covers exploits and attack techniques used by worms and viruses. Again, Szor's clarity of explanation shines as he artfully gives a concise overview of how a buffer overflow attack works (including stack layout and address manipulation), heap-based attacks, format string attacks, and related methods. He then discusses these techniques in light of various historical examples, clearly explaining how they operated and were successful. If you've been yearning for a short overview of attack techniques and how malware has used them, this chapter is for you.

Part 2 covers the defender's strategies. Chapter 11 serves as a nice introduction to this section by describing many of the current and advanced defense techniques such as some of the first and second generation scanners, code and system emulation, and metamorphic virus detection. This is all covered in nice technical detail, always at a reasonable level to not leave everyone in the dust. Through it all small examples are constantly given, which reinforce the text nicely. Chapter 12 is very similar, this time focusing on in-memory scanning and analysis techniques.

Chapter 13 covers worm blocking techniques, focusing on host-based methods which can prevent the buffer overflow from being successful or the code from arbitrarily gaining network access again. Chapter 14 complements this with network specific defenses, including ACLs and firewalls, IDS systems, honeypots, and even counterattacks. These two chapters are a lot less technical than the previous two, but still quite valuable.

By this point I'm sure you're ready to try your hand at virus analysis, and Szor is eager to help you out. In chapter 15 he gives you a great setup for virus analysis, including various tools and examples of how they work and what kind of information they give you. Finally, in chapter 16 you have the obligatory (and valuable) resource roundup which complements the references given in every chapter, as well.

Overall I find Szor's book to be amazing, both in terms of its technical prowess over so many specifics in the field but also for its presentation. Without dumbing it down, Szor's able to communicate to most readers with clarity in a manner they'll understand, learn from, and be able to use. I think that many of us, especially those of us who get plundered in our email inboxes with malware, are curious to spend some time dissecting these beasts using techniques AV professionals use, and Szor's book does an exemplary job of introducing that world to us all. I consider this to be one of the most important computer security books I own due to it's clarity and completeness of coverage.


You can purchase The Art of Computer Virus Research and Defense from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

This discussion has been archived. No new comments can be posted.

The Art of Computer Virus Research and Defense

Comments Filter:
  • Is it just me... (Score:3, Insightful)

    by udderly ( 890305 ) on Tuesday June 21, 2005 @05:39PM (#12876238)
    Is it just me or does this sound like it would be a really cool job--especially if you like sleuthing.
  • by Anonymous Coward on Tuesday June 21, 2005 @05:44PM (#12876276)
    Don't get one in the first place.

    Don't download random crap and execute it.
  • by kaosrain ( 543532 ) <{root} {at} {kaosrain.com}> on Tuesday June 21, 2005 @05:45PM (#12876286) Homepage
    But how do AV researchers dissect such malware, especially when virus writers have devoted so much time to avoiding detection and perfecting their craft with self-decrypting viruses, polymorphic shellcode, and obfuscated loops.

    It is important to note that virus authors who have perfected their craft create viruses that are not found.
  • by MrPower ( 687654 ) on Tuesday June 21, 2005 @05:49PM (#12876304)
    Either that, or they're REALLY DAMN GOOD at getting hold of some fledgling outbreak

    I suspect that many of these "fledgling outbreaks" that the AV companies most quickly defeat are the variants that have just been edited by script kiddies.

    Tweak the engine a little and viola, they have defeated a virus in 10 minutes!

  • by Jeremi ( 14640 ) on Tuesday June 21, 2005 @06:04PM (#12876428) Homepage
    Don't download random crap and execute it.


    That's easy to say, but harder to do. Any non-trivial program that connects to the Internet is going to download something... that's what makes it useful. And if the program wasn't 100% correctly written, there may be a way to make it execute the thing it downloaded. Voila, all the conditions are there to catch a virus, without the user ever realizing he was "downloading random crap" at all. (For examples, see: every web browser ever written)

  • by rufusdufus ( 450462 ) on Tuesday June 21, 2005 @06:07PM (#12876451)
    Virus scanners/blockers are a scam; they have caused more problems in my network of tech-unsavy users than viruses have by a long way. Just last night my sister's McAffee took her harddrive out back for a thrashing. Another person I know runs 3 firewalls and 2 virus blockers at the same time, computer is practically useless.

    There is a better way people! Either boot from a read only media or restore an image of the system every few boots--much faster and practically invulnerable. Put your documents (non executable formats only!) onto removable media and leave them removed except for saving.

    This way even if an internet worm exploits a hole in your OS or email, its gone the next boot--even if it is undetectable!

    Not only is this more effective and faster, you don't have to pay for pattern updates.
  • by tyates ( 869064 ) on Tuesday June 21, 2005 @06:14PM (#12876486) Homepage
    From the review, it sounds like the book's missing something critical.
    1. The fact that viruses even exist today is a testament to crappy OS Design. OS X and Linux don't even get viruses. And then if you put crappy application design on top of crappy OS design, you get viruses you don't even have to execute, like Outlook and Word macro viruses.
    2. Worms and viruses are totally different. Worms attack you from the outside. But the odds of you getting a worm on a patched, up-to-date system that's behind a firewall is practically nil. (see for example, Apple Software Update.)
    In other words, in a "sane" world with decent operating systems and applications, viruses and worms wouldn't even exist.
  • by Redwin ( 805980 ) on Tuesday June 21, 2005 @08:03PM (#12877285)
    Um, the first ever computer viruses were written in Unix. Exploits to raise user permissions are well known, copying files to overwrite other files of the same access level would do it for exmaple.

    see http://www.cybersoft.com/whitepapers/papers/print/ networks_print.html [cybersoft.com]
    for more information :-)

Math is like love -- a simple idea but it can get complicated. -- R. Drabek

Working...