Slashdot Mirror


Malware - Fighting Malicious Code

AMuse writes "After taking a course at SANS from Ed Skoudis (and later hacking with him at the DefCon "Capture the Flag" contest in Las Vegas), I decided it was time to buy a copy of his latest book and see if he writes as well as he teaches. "Malware: Fighting Malicious code" is his most recent computer security book and was definitely a worthy purchase. Though the topic itself is not for novices, Skoudis does a splendid job of reviewing the basics with each chapter so that a less experienced security professional can follow along and learn. Additionally, he is very careful to show both Windows and UNIX/Linux examples of the topics, making the book accessible to a far wider crowd than some platform centric books I've read." Read on for the rest of AMuse's review. Malware: Fighting Malicious Code author Ed Skoudis pages 636 publisher Prentice Hall rating 9 reviewer Matt Linton ISBN 0131014056 summary A detailed look at malicious computer code, how to examine and defend against it.

One of the finest points of the book is that it's structured with the simplest (and most common) cyber-attacks in the initial chapters, and later in the book builds upon those concepts clearly. With each new chapter he delves deeper into the computer attack world and the increasing complexity of attacks and how to recognize, detect and counter them. Every description of an attack is paired with useful graphics and examples of code dumps or program output. As a bonus, the programs he recommends as tools in his book are the very ones he uses in his demonstrations.

Viruses, Worms and Mobile Code: The first few chapters start out relatively light for an experienced security person. They cover viruses, worms and mobile code (the nifty high level languages like ActiveX, JavaScript and VB which are so easy to abuse). Though the information is on a light level for the pro, a novice would find these chapters packed with useful information and examples of each of many types of nasty code. After each example, the book shows how to recognize an infection, then how to prevent them in the first place.

Trojans and Backdoors Once he's gotten the reader's feet feet wet, Skoudis begins to wade in deeper with discussion and analysis of Trojans and Backdoors. Even a pro will likely read something here that they didn't know before. As a quick example, he covers "port knocking" with spoofed hosts and sniffers as a means of evading detection of your backdoor by pesky net admins. Although these chapters include many high level concepts, Skoudis clearly demonstrates them via real world examples and references to code that you can obtain yourself and try out (On a well isolated network, of course!)

User and Kernel mode Rootkits After a healthy dose of trojans and backdoors, the book moves on to discuss in very great detail the current status of User and Kernel mode rootkits. In my opinion, these two chapters were the most detailed and thorough in the book. All told, about 160 pages of the book are dedicated to the Windows and UNIX/Linux kernels, how they operate and of course how they can be completely taken over and replaced by an attacker. If there's any book that can leave SysAdmins awake at night in paranoid fits, this is the book and these are the chapters.

The truly nasty stuff In the final chapters, he leaves the world of attacks that are already in the wild and discusses attacks that are yet to come. These topics include polymorphic code that alters itself with each infection to evade IDS and Antivirus signatures, tightly packaged combo attacks, potential BIOS rootkits and even microcode attacks where the CPU itself is infected with an attackers' code, hiding rootkits as soon as the power switch is flipped on.

Tying it all together The book then ends with two very helpful chapters which detail how to establish a test lab for yourself and analyze malicious code on your own. As a bonus, there's also a chapter on real world scenarios that you can investigate yourself to see what you've learned.

Conclusion All told, I would recommend this book for any serious security professional or SysAdmin/NetAdmin. It's also a very good read for Novice geeks but, although Skoudis does an excellent job of explaining the basics, the later chapters may be a bit too complex for someone without at least a bit of time as a power user.

You can purchase Malware: Fighting Malicious Code from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page

111 comments

  1. plenty of dodgy code in the Linux kernel! by Anonymous Coward · · Score: 3, Interesting

    bash$ find linux-2.6.5 -exec grep FIXME {} \; | wc -l
    2494
    bash$

    1. Re:plenty of dodgy code in the Linux kernel! by Anonymous Coward · · Score: 2, Insightful
      Dodgy code doesn't mean security vulnerabilities.

      Most likely those are feature requests. It's not a good idea to take FIXME's out of context.

    2. Re:plenty of dodgy code in the Linux kernel! by MrChuck · · Score: 3, Insightful
      I dunno. I recall when some rework of lpd in OpenBSD removed a bunch of "dodgy code". It was fixed because it was wrong (unbounded copies and that sort of thing).

      14 months later, when an exploit for lpd was found and out in the wild, OpenBSD was immune. Did they KNOW that it was exploitable? No. They simply fixed something that was wrong.

      Now regarding the "for newbies" comment
      Though the topic itself is not for novices, Skoudis does a splendid job of reviewing the basics with each chapter
      Is there any really good reason that all books must be friendly to newbies? One of the things I really dislike about current technical press is that every book I get on something, I have to deal with 30% or more that covers stuff I know.

      Let's presume that the reader knows "coding". (if you actually know C or C++ or java, you can reasonably read other algol based languages.). From that we can cover PRINCIPLES of bad coding and what to look for.

      I tire of each book being written for kindergardeners (metaphorically). Welcome to CS504 - writing optimizing compilers. We're going to be writing a language and developing a compiler for it for several chip platforms. But first, lets go over what a loop is. Can anyone tell me? Then we'll move to variables.

    3. Re:plenty of dodgy code in the Linux kernel! by sharkey · · Score: 1
      But first, lets go over what a loop is.

      Oo, oooooo! I know! It's how you tie your shoes, right? Loop, swoop and pull.

      --

      --
      "Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next.
    4. Re:plenty of dodgy code in the Linux kernel! by cpghost · · Score: 1

      I have to deal with 30% or more that covers stuff I know.

      When reading the book for a second time, you have to deal with 80% or more that covers stuff you knew...

      Imagine a book with 100% new content. You wouldn't even be able to read it, less alone understand it. As far as you're concerned, it could be written in a foreign language unknown to you, it wouldn't make any difference at all.

      Every book must rely on common knowledge between author and readers, or else no communication would be possible.

      Now, you're right. Books are much more verbose than, say, scientific papers. But even papers repeat stuff in order to build on top of it.

      --
      cpghost at Cordula's Web.
  2. A must own.... by millahtime · · Score: 1, Funny

    A must own for every coder of longhorn.

  3. Hate to ask... by Anonymous Coward · · Score: 5, Insightful

    When can we expect Malware: Fighting Ignorant Users? Not trying to troll, this should be step 1 in the battle.

    1. Re:Hate to ask... by boisepunk · · Score: 3, Insightful

      They get the shit kicked out of them every time they go online. They take their junky Gateways back to PC shops to 'wipe and reinstall' every six months. They lose files because 'I know I didn't download that file to my hard drive - I downloaded it to my desktop instead' and then they can't find it.

      You tell them the simplest things to get them out of the most complex situations and they demand 'user friendly'. They want products that cure only the latest ill and demand at most one mouse click.

      Wonder of wonders the world (the Internet) is as it is. And wonder of wonders is that it's taken the sophisticated malware engineers so long to get sophisticated.

      There's a slaughter going on, and although MS are responsible with their crappy stuff, the users are also responsible - for using it. And I hope we've heard the last of that classic line 'it only affects Windows users', because it should be evident to even the most brain-dead MS fanatic at this point that the entire Internet is affected.

      It's time to put up some housing ordinances so MS users aren't allowed to ruin the neighbourhood. High time and beyond.

      --
      main(0)
    2. Re:Hate to ask... by Anonymous Coward · · Score: 3, Insightful

      "It's time to put up some housing ordinances so MS users aren't allowed to ruin the neighbourhood. High time and beyond." ... Shouldn't that be "non-qualified" MS users? Dont' bash the whole gang. I'm pretty sure there are some very qualified and useful MS users (Me being one of them).

    3. Re:Hate to ask... by javatips · · Score: 4, Insightful

      Maybe "Malware: Educating Ignorant Users" would be better.

    4. Re:Hate to ask... by Profane+MuthaFucka · · Score: 3, Funny

      (reflects upon the question for the moment...)

      No, the motion is denied. Qualified MS user is an oxymoron. If such a beast existed, it would be quickly hunted down as, at the behest of John Ashcroft, with dogs and helecopters. It would be thrown into a triply secure holding cell, as an example of terrorism (for the threat to the Internet that a qualified MS user would constitute) and as an example of pornography (having a countenance so hideously alien that most adults could not stomach it, and those that could would be stricken with nightmares; qualifications that even the most liberal of judges would deem as pandering to the prurient interest.)

      OK, strike that last bit, I was thinking of Cthulu.

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    5. Re:Hate to ask... by SatanicPuppy · · Score: 4, Interesting

      No point in trying to educate them. A lot of this stuff is so esoteric that even relatively experienced and competent users get taken in, and new stuff comes up all the time. Is it sensible to make someone who really has no need for in depth computer knowledge sit down and cram new viruses and security vulnerabilities 2 hours a day?

      The solution is an OS that doesn't just load everything that comes along. It's the digital equivalent of walking around Times Square jabbing used hypodermics into your arm.

      This isn't just a Windows thing either...Linux gives you complete freedom to fuck yourself by loading unsigned code. Of course, if you're using Linux you can run the checksums and make sure its the official code.

      What it boils down to is that we need some basic validation method, which vets code that should/shouldn't be loaded, and people who don't know what they're doing shouldn't be allowed to override it.

      --
      ad logicam Claiming a proposition is false because it was presented as the conclusion of a fallacious argument.
    6. Re:Hate to ask... by javatips · · Score: 3, Insightful

      What it boils down to is that we need some basic validation method, which vets code that should/shouldn't be loaded, and people who don't know what they're doing shouldn't be allowed to override it.

      Microsoft calls that Trusted Computing ;-)

    7. Re:Hate to ask... by HD+Webdev · · Score: 2, Insightful

      No point in trying to educate them. A lot of this stuff is so esoteric that even relatively experienced and competent users get taken in, and new stuff comes up all the time. Is it sensible to make someone who really has no need for in depth computer knowledge sit down and cram new viruses and security vulnerabilities 2 hours a day?

      The solution is an OS that doesn't just load everything that comes along. It's the digital equivalent of walking around Times Square jabbing used hypodermics into your arm.

      Boxes coming out of Wal-Mart make it around 30-60 days before they end up here with mostly 'my internet connection is slow' problems.

      The real problem is a) They got hacked soon after figuring out how to connect to the internet and b) They get helpful toolbars/cursors/whatever that track everything and half the time end up hosting their internet connection.

      If the malware doesn't do it, the hacked box ends up spewing emails right away.

      So, they end up here, $60-$100 (depending on how long they let the problem go and if they kept their disks) to fix.

      Format, Restore, ZonealarmBasic Firewall (not anti-virus yet!), Spybot immunize registry, connect to network, update Windows, install Avast! anti-virus, make Mozilla the default browser, and have Avast! build a database of files on the system and what they are supposed to look like. I also keep an image of the finished setup so that the people who shut off their anti-virus/firewall can pay again here to get fixed and I don't have to go through all of the work again.

      Too many times I see people trying to do it in a different order for Windoze, and it just doesn't work well. Most add the antivirus first and don't realize that by the time they get the firewall in, the box is already rooted.

      So, how can a user figure it out of Microsoft & most computer shops can't?

      --
      This is not a dream, not a dream...we are transmitting from the year 1-9-9-9.
    8. Re:Hate to ask... by HD+Webdev · · Score: 1

      Format, Restore, ZonealarmBasic Firewall (not anti-virus yet!), Spybot immunize registry, connect to network, update Windows, install Avast! anti-virus, make Mozilla the default browser, and have Avast! build a database of files on the system and what they are supposed to look like. I also keep an image of the finished setup so that the people who shut off their anti-virus/firewall can pay again here to get fixed and I don't have to go through all of the work again.

      I should add that although that looks like a lot of work, it's actually only about 20 or so of actual minutes per box once a tech gets used to the procedure and knows 'next, next, next, yes, no, next, (back to Counter-Strike for a while), ok, reboot, next application, (more Counter-Strike), etc...' well enough to almost do it blindfolded.

      --
      This is not a dream, not a dream...we are transmitting from the year 1-9-9-9.
    9. Re:Hate to ask... by Foolhardy · · Score: 2, Interesting

      Actually, Windows 2000 and up have a special section of group policy specifically for that called Software Restriction Policies.
      You can create rules based on path, filename, hash, or certificate.
      You can create either a blacklist of unrunnable binaries or a whitelist of runnable binaries.
      You can choose to include all binaries or just executables (not libraries).
      You can also add new file types based on extension.
      You can enforce it across all users or just non-admins.
      You can put your certificates in the domain's active directory for easy administration.
      For a local system, creating hashes is easy; just find a copy of the binary and it will add it to your policies.
      To set it up find 'local security policy' (you may need to show it in explorer's properties) and select 'software restriction policies.' Right-click to create a local rule set. See help for more information.

    10. Re:Hate to ask... by packnet · · Score: 1

      I took Skoudis' SANS course last August in Denver, and the refresher course in Orlando just a couple of weeks ago.

      Skoudis is a great instructor, and repeatedly used the metaphore of the Castle, the Walls, the Moat, the Villagers, and the Barbarians to describe the depth of an attack down to the kernel.

      I asked outright about email viruses, when the barbarians arrive at the gate, hand their swords to the villagers, and then the villagers promptly stab themselves.

      Oh yeah, and I bought the book while at the conference and had Skoudis sign it. Now that he's been Slashdotted, it feels like something special ;)

  4. Windows and Linux examples, yes by ChiralSoftware · · Score: 4, Insightful
    Of course there is malware for Windows and Linux because both are written in unsafe languages which manipulate memory directly and often cast objects to (void *) and use containers (pointers to regions of memory) which don't know their own size. I know I've posted on this before here on /., but as long as we use those tools, we're going to have those problems. It's interesting that he doesn't have any examples of Java malware, for instance.

    ----------
    Create a WAP server

    1. Re:Windows and Linux examples, yes by icypyr0 · · Score: 5, Interesting

      Please, go and program a better OS, in Java. I don't mean to flame, but honestly, do you suggest that we should start writing OSes in interperted languages like Java? That is quite simply ridiclous.

      How can you interface an interperted language with hardware, and how do you avoid using an unsafe language to program the very VM that the interperted language would be running on top of?

    2. Re:Windows and Linux examples, yes by Ridgelift · · Score: 2, Interesting

      I know I've posted on this before here on /., but as long as we use those tools, we're going to have those problems. It's interesting that he doesn't have any examples of Java malware, for instance.

      What are you incinuating, that operating systems should be written in Java?

    3. Re:Windows and Linux examples, yes by Anonymous Coward · · Score: 2, Insightful

      These unsafe aspects are exactly what make the languages so flexible... Using them incorrectly is where the flaws come into the picture.

      Are you suggesting that malware in java isnt possible or just isn't common?

    4. Re:Windows and Linux examples, yes by Proaxiom · · Score: 5, Informative
      Every great athlete blames the equipment, right?

      It's certainly true that "as long as we use those tools, we're going to have those problems", but I'd go a step further and include computers and networks in your list of tools that have inherent issues.

      Java is not as risk-prone as C, but that does not mean it's a security panacea. It has its own set of problems. You can say we shouldn't write code in unsafe languages, but then we wouldn't have any left.

      And, to put it simply, Java applications don't run as fast as C applications. While most of the time that's not important, sometimes it is.

      You can't tell people to stop using unsafe tools. That's equivalent to telling people to encase their computers in concrete and drop them in the ocean to secure them against malware. Instead, tell people where the risks lie and how to mitigate those risks. Then people will naturally gravitate toward safer tools and practices, because we are all lazy and that way we will have less work to do building adequately secure applications.

    5. Re:Windows and Linux examples, yes by wandazulu · · Score: 5, Insightful

      You sound hungry, so I'll step up.

      You might feel safe in thinking that Java's sandbox protects from this kind of thing, but don't be too sure...what is a JVM written in? Those very unsafe languages you talk about.

      The fact is, at some point, *somebody's* gotta manipulate the memory directly; somebody's gotta keep track of what's been alloc'ed and what's been free'd, and whether that's at an application level, or at the OS level, you're going to find the very languages that you deem as unsafe.

      Abstract away and bytecode your way to a false sense of security, and you've done nothing but put up another curtain to lull you into a false sense of security. The fact is, this kind of thing is *always* going to be with us, whether intentional or by accident (Microsoft's whole KB).

      Think of it this way: cars are too dangerous for people to use because there's no way to stop them from running into the ditch. So we're going to develop a system by which everyone's car runs on rails, with all the latest safety systems to make sure everything is safe and secure and drive the way we think they should drive. Now you don't have to trust your own abilities, just us. And we know what's right, right?

    6. Re:Windows and Linux examples, yes by Laebshade · · Score: 1

      Java isn't interpreted in the strictest sense. Some compiling is still needed for the Java VM to interpret it, whereas with JavaScript and VBScript no compiling is needed. You just code and run.

    7. Re:Windows and Linux examples, yes by javatips · · Score: 3, Insightful

      It's kind of funny that you say that one should not program an OS in an interpretted language like Java. On the other hand, while the Linux kernel may be written in C, the initialization sequence of Linux (booting the OS to a usable state) is more or less a big script that is being interpretted (and there is even no JIT compilation involved).

      The argument of the grand-parent is not really a good one either. The fact that you cannot hack a Java application with buffer overflow (unless it's the JVM that does it) does not means that you cannot hack into a Java system. Badly coded Java code can be the target of malware (and there has been security issues with WebSpehere and Weblogic). If a security sensitive class is not final, anyone can inherit it and bypass some of it's code. Java offer many features that can help one build a secure application that is very resistant to malware, but you have to use those feature and be aware that beside buffer overflow, malware can use other technique to launch a succefull attack.

    8. Re:Windows and Linux examples, yes by sleepingsquirrel · · Score: 2, Insightful

      Maybe not Java, but someone should start an OS project with something like OCaml. You get most of the speed of something like C, with far fewer bugs. Oh, and there's no reason you can't compile your Java.

    9. Re:Windows and Linux examples, yes by pikine · · Score: 1

      Java, among other high level languages (lisp/scheme, Objective CAML, Standard ML, Haskell, etc), are memory safe because they hide the issue of memory management under the carpet by using a garbage collector. Since the language itself does not have the expressive power to deal with memory directly (some has strong type checking that guarantees even stronger memory safety properties), they're considered "safe." However, a clever hacker might handcraft in bytecode, thus bypassing the type system entirely. The runtime system of the language (which you may consider as the operating system in a board sense) still needs to perform dynamic security policy checking.

      On the other hand, the critism on Java or any other high level languages as an interpreted language is ill-founded, as those languages can be compiled to run as native executable.

      --
      I once had a signature.
    10. Re:Windows and Linux examples, yes by NeoBeans · · Score: 1
      However, a clever hacker might handcraft in bytecode, thus bypassing the type system entirely. The runtime system of the language (which you may consider as the operating system in a board sense) still needs to perform dynamic security policy checking.

      Java does this. The bytecode verifier is invoked on classes as they are loaded. Some JVMs offer the option to disable bytecode verification for code loaded from the bootclasspath and/or the local disk, but by default, bytecode verification is on.

    11. Re:Windows and Linux examples, yes by Jameth · · Score: 1

      "Of course there is malware for Windows and Linux because both are written in unsafe languages which..."

      Are you stupid? Malware is about programs which are legitimately installed but do things the user didn't know they would do or want them to do. Malware works fine in Java or C# or Python of D or Eiffel or Pascal or BASIC or C or C++ or Objective-C or Assembler or K or PERL or anything.

      You're thinking of viruses, worms, and security holes, which are another issue.

    12. Re:Windows and Linux examples, yes by Anonymous Coward · · Score: 0

      If you want a "safe" language that can run as fast as C, try Lisp.

      Of course, you can write any code to be slow as a dog, but Lisp code can be close to C's speed (within 10%) or in some cases faster. (There are cases where Lisp can be faster than Fortran.)

    13. Re:Windows and Linux examples, yes by pikine · · Score: 2, Informative

      There is some area of research about proof carrying code, which is used to type check the bytecode before it is executed. I'm not aware if it is used in practice at all, since the research is still quite primitive. If you're naively doing checksum, then a clever hacker can generate valid checksum as well. If you're doing signed applet approach, then you revert the problem to whether you want to accept code from trusted entity, instead of whether you want to trust the code based on if its semantics are malicious.

      --
      I once had a signature.
    14. Re:Windows and Linux examples, yes by Anonymous Coward · · Score: 0

      Never heard of the
      Pascal Microengine?

      Hardware to directly execute USCD's Pascal p-code.

    15. Re:Windows and Linux examples, yes by mhesseltine · · Score: 1
      Think of it this way: cars are too dangerous for people to use because there's no way to stop them from running into the ditch. So we're going to develop a system by which everyone's car runs on rails, with all the latest safety systems to make sure everything is safe and secure and drive the way we think they should drive. Now you don't have to trust your own abilities, just us. And we know what's right, right?

      And all you have to do is look at the crash statistics for Amtrack to realize that in fact, it is entirely a false sense of security.

      --
      Overrated / Underrated : Moderation :: Anonymous Coward : Posting
    16. Re:Windows and Linux examples, yes by Anonymous Coward · · Score: 0

      Write a JVM in Java, then get back to us.

    17. Re:Windows and Linux examples, yes by AeroIllini · · Score: 2, Funny

      What are you incinuating, that operating systems should be written in Java?

      "I tried writing an operating system completely in Java back in 1998."

      "Oh? How'd that work out?"

      "I don't know. It's still booting."

      --
      For security, the MD5 hash of this message and sig is 09f911029d74e35bd84156c5635688c0.
    18. Re:Windows and Linux examples, yes by Anonymous Coward · · Score: 0
      Of course there is malware for Windows and Linux because both are written in unsafe languages which manipulate memory directly

      Good point. I assume you are talking about writing an operating system in C# or Java.

      What makes your point moot is that C# or Java have interpreters that are written using what you are choosing to call "unsafe" languages. You can push this boundary back past the OS, but you will at some point hit the fundamental problem of abstracting away what is essentially a vector of memory locations into a "secure paradigm". If you don't do it in software, you have to do it in hardware.

      Regardless of where this boundary lies, you will be susceptible to bugs. You will also find that the overhead rises quite perceptibly the farther back you push this boundary, both in terms of cost and efficiency. Recompiling a processor core because you left a bug in there will cost you an amount of money that are counted in seven digits US funny money - if you are lucky.

    19. Re:Windows and Linux examples, yes by Anonymous Coward · · Score: 0

      That's funny. You're implicitly supporting Java as the cross-platform answer to all the worlds problems, yet the link in your .signature crashes my browser due to a java error.

    20. Re:Windows and Linux examples, yes by fatphil · · Score: 1

      I'm curious by the concept of an OS that runs in a sandbox. WHat sets up the sandbox, what is outside the sandbox, being protected from what is in the sandbox. If the OS is inside the sandbox, then nothing can be outside the sandbox, and so nothing is being protected. Hmmm...

      Of course the setup's not so crazy when you consider things like IBM big iron and independent virtualised OSes where you can hierarchically nest systems. Something like a C64 emulator inside bochs inside Linux on a heavy IBM mofo, for example.

      FP.

      --
      Also FatPhil on SoylentNews, id 863
    21. Re:Windows and Linux examples, yes by fatphil · · Score: 0, Offtopic

      Lisp a high level language?
      It's pretty low level. It may have primitives which are unusual to a traditional RISC/CISC programmer, but it actually maps onto a hardware implementation quite well. "The LISP machine".

      Even in the traditional processor world both Digital and Texas Instruments have made processors which have had atomic linked-list operations in their instruction sets.

      FP.

      --
      Also FatPhil on SoylentNews, id 863
    22. Re:Windows and Linux examples, yes by pikine · · Score: 1

      Thank you for pointing out my unqualified use of the term, "high level."

      I don't think the fact that there exists a machine that executes a language more or less directly means the language is low level. If you want to, you could have designed a Java machine as well. There actually existed such a project, JavaOS on a Java Machine.

      I would like to define a high-level language as a language that is capable of expressing closely what you mean to program. If you adopt this definition, then Lisp certainly is a high-level language. The fact that you can translate Lisp directly to Lisp machine is a very nice property of the language.

      Let's drop this discussion. This is getting off topic.

      --
      I once had a signature.
    23. Re:Windows and Linux examples, yes by TobiasSodergren · · Score: 1

      Well, some people try.

    24. Re:Windows and Linux examples, yes by deinol · · Score: 1

      Ok, so Java is less vulnerable to buffer overrun attacks. But I think the book is on more than just hackers and virii. Spyware and Malware most often get on people's machines because their machine just asked them: Do you want to do this? And they clicked yes. You could code Gator as a Java program, and it would still be malicious. You could code a malicious e-mail worm, and users would still open up the attached executable to play the silly Java game it hides inside.

      Yes, OS code should be well coded and protected from attacks. But the most secure fortress of a home does no good when the owner opens the door when the armed robber knocks.

      --
      Got Apathy?
    25. Re:Windows and Linux examples, yes by crucini · · Score: 1

      Blasphemer!

      You must never call Java an interpreted language. Java is compiled into bytecodes! These bytecodes are not interpreted by an interpreter, but rather executed by a virtual machine. Altogether different!

  5. A nice example of a trojan by gandalf013 · · Score: 5, Informative
  6. Trojans and backdoors by Anonymous Coward · · Score: 5, Funny

    Part 1:

    Always, and I repeat always, use a trojan when you enter through the backdoor.

  7. Fighting? by Ghoser777 · · Score: 5, Interesting

    It seems from the description like the book is more about describing malicious code and how it works, not actually battling such code and fending it off. Don't get me wrong - one must know his enemy before he can successfully beat it, but still the title seems a little misleading.

    Matt Fahrenbacher

    --
    James Tiberius Kirk: "Spock, the women on your planet are logical. No other planet in the galaxy can make that claim."
    1. Re:Fighting? by shawni · · Score: 1

      I wrote a GSEC practical on this topic last year- ask Google about "protecting insecure programs".

  8. As a mac user... by Capt'n+Hector · · Score: 3, Interesting
    As a mac user, I feel left out once again. Why is it that authors of tech books seem to negleect an entire platform?

    Seriously though, is it that Mac OS X isn't as widely deployed as windows and isn't used as much for servers as linux that OS X isn't targeted by viruses/worms/trojans, or is OS X simply harder to break into and not worth the time and effort?

    --
    Quid festinatio swallonis est aetherfuga inonusti?
    Africus aut Europaeus?
    1. Re:As a mac user... by Neil+Blender · · Score: 0

      Why is it that authors of tech books seem to negleect an entire platform?

      Here is a book on Mac exploits:

      Chapter 1:

      There are none.

      The End.

      (I kid. I kid. I know there are a couple.)

    2. Re:As a mac user... by millahtime · · Score: 4, Informative

      "Seriously though, is it that Mac OS X isn't as widely deployed as windows and isn't used as much for servers as linux that OS X isn't targeted by viruses/worms/trojans, or is OS X simply harder to break into and not worth the time and effort?"

      OS X (based and intertwined with FreeBSD) tops the list of most secure operating systems (along with the other BSDs as already reported on /.). Although the Unix examples apply to OS X as Unix is really BSD-Unix. They may not point out mac but the same rules apply.

    3. Re:As a mac user... by Anonymous Coward · · Score: 0

      But *BSD is dying, hence OS X is dying. All they need is a swift kick in the head.

    4. Re:As a mac user... by Anonymous Coward · · Score: 0

      OS-X is much harder to break into... OS-X is really a BSD Unix, with a GUI user-interface. The BSD Unix system was developed in universities. Students did most of the original development for graduate term projects and thesis. Professors reviewed the contributions. In addition, students were encouraged to find, and report, security flaws. The prize for finding one was a 3-hour "A" on your transcript. Some students tried to get in to change grades, get advance test questions, or to do other things. Administrators and faculty were rather paranoid about keeping their grading systems and tests secure, so they had an incentive to do their reviewing very carefully. The high level of peer review resulted in a very secure system, from the beginning. Security was not an add-on to BSD unix. It was built-in, from the beginning. It is much easier to build security into a system from the beginning that it is to build an insecure system and then add security.

    5. Re:As a mac user... by Laebshade · · Score: 1
    6. Re:As a mac user... by DrSkwid · · Score: 1


      pah. call that persecution.

      try finding a plan9 exploit.

      and this one doesn't count. It's a hoax.

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  9. OS X has a BSD kernel... by Ghoser777 · · Score: 0

    you insensitive clod! The book does talk about unix/linux kernels, so most of that will still appy to darwin... but it depends.

    Matt Fahrenbacher

    --
    James Tiberius Kirk: "Spock, the women on your planet are logical. No other planet in the galaxy can make that claim."
  10. Here we go by dj245 · · Score: 5, Funny
    They forgot Social Engineering project 66.35.250.150. A community web-based system designed to DDoS certain websites within moments of being posted to the main page of said website. Highly infectious. This project has a reputation of taking down innocent websites within moments of being posted to its main page, and then having the audacity to joke about it on the forums. Outsiders are warned to stay away from 66.35.250.150 and users of 66.35.250.150 as they are ill-tempered and socially awkward.

    There is no known cure or stopgap measures for the 66.35.250.150 effect.

    --
    Even those who arrange and design shrubberies are under considerable economic stress at this period in history.
    1. Re:Here we go by WormholeFiend · · Score: 3, Offtopic

      and the irony of it all is that you'd probably be modded half-funny, half-troll for pointing it out.

      now watch me being modded off-topic.

    2. Re:Here we go by happyfrogcow · · Score: 1

      too bad you can't moderate a moderation as +1 Funny. I see humor in the off-topic moderation here :)

      -1, Insightfull to anyone who mentions metamoderation to me as a followup, because that's not what i'm talking about.

      I hope this makes no sense.

  11. Norton Solution by millahtime · · Score: 2, Funny

    I wonder how long until Norton comes up with a solution to this 66.35.250.150. I can see it now. Their firewall blocks it. I bet M$ starts that trend in their firewall first though.

    1. Re:Norton Solution by cant_get_a_good_nick · · Score: 1

      Actually, bugzilla beat MS to it.

  12. Use... by boisepunk · · Score: 5, Interesting
    "...is it that Mac OS X isn't as widely deployed as windows and isn't used as much..."

    Not to troll, but that's exactly right, and some people just don't have a grudge against Apple for the same reason: it's not used as much. I'm sure if by some cosmic abnormality Apple/Mac became just as used, there'd be some Mac Virii out there in force.

    Use == Popularity == Painting a TARGET

    --
    main(0)
    1. Re:Use... by cant_get_a_good_nick · · Score: 1

      I'm not an expert, but I don't think so. Most Windows/Outlook viruses still spread by the "lets hide the extension, even though most people would click on a .com or .pif anyway". That can't happen on a Mac. It is possible for an app to hide as a simple document, but that requires more work from the end user and is less likely to happen.

      As far as worms go, I hear PowerPC is pretty difficult to code shellcode attacks into stack smashing attacks. More info anyone?

      MS likes to say that the ubiquity of their platform is the cause of all the worms. That to some extent is true, but it isn't the whole reason. MS software just has some fundamental flaws in both design and implementation. UNIX is flawed too (you need to be root to do many things, once you're root you can do everything) but a lot of vectors just don't exist.

  13. one man's malware is another man's uber linux.... by MoFoQ · · Score: 2, Insightful

    of course that one man is Bill Gates.

    To him, any Linux is malware as it's superior to his creation, especially when it comes to security.
    And of course, this is not to say that MacOS isn't; just that he doesn't see it as a "threat."

    This key issue is the reason that's a cause for concern about the upcoming No Execution (NX) and DRM systems in future processors (backed by Microsoft) to "prevent execution of unauthorized code." Apparently, as it was /.'ed earlier, it will affect the STrongARM (for PDAs) processors.

    If I can't trust Microsoft for security right now, why in the world would I trust them to decide what's "authorized" or not.

    Wonder if the book talks about a third party malware lists (like those spam databases).

  14. What about the socioeconomic aspects? by heironymouscoward · · Score: 5, Interesting

    Malware is much more than a technical phenomenon, although it certainly was born as one.

    For me, given that the scope of malware to get past our defenses seems almost infinite, it is much more interesting to look at this from other angles:

    - Socioeconomic: who is paying for development of malware, and with what intentions? Healthy paranoia suggests that there is an organized agenda to take over and subvert large parts of the Net. Heck, several such agendas, probably, fighting it out.

    - pseudo-Biological: can malware be modelled using biological models and can this help us fight it? I've argued in my journal that yes, this is a valid way of looking at malware, and may be the key to fighting it.

    - political: given the potential (or real) power of malware to subvert and control large parts of the Net, should we ignore the inevitable political interest this will cause? If I was a spook, I'd be aiming to use malware to (a) spy on foreign governments, (b) spy on my own citizens, (c) act as a launchpad for cyberattacks.

    - commercial: what value can be placed on "here is n% of the Net, to do with as you please..." Probably very high. Where there is value, a market of buyers and sellers will develop. Has probably already developed.

    --
    Ceci n'est pas une signature
  15. A Different Viewpoint by Mikkeles · · Score: 4, Informative
    Another review, by Rob Slade, of this book is available here (amongst other places). He comes to a somewhat different conclusion:
    The text is much more verbose than it really needs to be, and
    sensational rather than precise. There is a lot of specific detail in
    some areas, particularly for those interested in UNIX system
    internals, but the material on malware itself tends to be careless,
    and the author is obviously much keener on attacking than defending.
    This work does not offer much help to those who want to fight
    malicious code.

    Disclaimer: I have neither read the book, nor have an opinion on it. My only interest in malware is not to have it :^)

    --
    Great minds think alike; fools seldom differ.
  16. Java malware by heironymouscoward · · Score: 4, Insightful

    Using "safe" languages just displaces the problem.

    For example, the obnoxious CoolWebSearch trojan gets into computers via a hole in the MSIE Java runtime.

    Further, the number of infections caused by code weaknesses is probably far less than the number caused by social weaknesses - "Click on me!"

    --
    Ceci n'est pas une signature
    1. Re:Java malware by sapped · · Score: 4, Funny

      Further, the number of infections caused by code weaknesses is probably far less than the number caused by social weaknesses - "Click on me!"

      Where's the link dude? You are telling me to click and the urge is overpowering me and yet you don't provide anything to click on. What kind of sadistic torture is that?

    2. Re:Java malware by Anonymous Coward · · Score: 0
      Here ya go.

      "Click on me!!!"

      (Link intentionally broken in the interest of public decency, and that it is shortly after lunchtime here)

  17. Re:Hate to ask...; What about legal remedies? by David+Hume · · Score: 4, Insightful

    When can we expect Malware: Fighting Ignorant Users? Not trying to troll, this should be step 1 in the battle.


    In addition, what about legal remedies? It appears that many people legally "agree" to the installation of various forms of malware by mindlessly clicking through on licensing agreements. While consumer education is one possible solution, changing the law of contract might provide another solution. Obviously, these solutions are not mutually exclusive.

    Many contracts are, by either statute or common law, void as a matter of public policy. This is one possible solution.

    Other contracts (e.g., in the areas of consumer credit, mortgages, etc.) have required language or other provisions.

    In other areas (e.g., limitations of liability, waiver of implied warranties, and again consumer credit, mortgages, etc.) there are requirements reqarding the use of clear and understandable language, prominent disclosures and even the size of the type face.

    To my knowledge, none of the above possible remedies have been enacted re: click through agreements.

  18. DefCon, blah blah blah by Anonymous Coward · · Score: 0

    "It being impossible for me to write objectively about this book, having made 37337 associations with its author at (cough) DEFCON!!! (cough), I won't bother with even trying. Here goes!"

    Sheesh - either come right out and say that you're biased, or be sneaky. Pointing out that you yourself are leet enough to play with author does not score either of you any points in my book.

  19. Hate to answer... by Iscariot_ · · Score: 2, Insightful

    I think it's reasonable to say that technology should always cater to users, not the other way around. Otherwise, what's the point?

    1. Re:Hate to answer... by Anonymous Coward · · Score: 0

      But how is Malware technology catering to users? Seems to cater to the interests of the money-makers AFAIK.

    2. Re:Hate to answer... by johnnyb · · Score: 2, Insightful

      I disagree. Computers are difficult to change and difficult to get to perform contextually like humans are. On the other hand, humans are easily adaptable. You'll wind up with the best results by doing a little of both, but really "catering to the users" doesn't mean much, as it depends on the user.

      I almost never cater to the user, but instead cater to the data model. Users always tell me how easy my programs are to use. How does this happen? Instead of trying to guess how my users think, I made my software really predictable. Therefore, with just a little nudge, users are able to figure everything out easily, because the software doesn't have any surprises. The users have to change their way of thinking a little, but that's easy for them to do.

  20. the author and reviewer.. by Anonymous Coward · · Score: 0

    hacked side by side! Methinks there is a little homoeroticism playing out here.

  21. vanilla kernel by Bombah · · Score: 0, Funny

    I dont like vanilla kernel anymore I like strawberry kernel now

  22. WAR on malicious code! by Anonymous Coward · · Score: 0

    We need a WAR on malicious code!

    One of the things we should do first is to assume that all good code is malicious and treat it with suspicion.

    Then we can make it really hard for good code to actually work, by constantly debugging and prodding it.

    Then we "sandbox" all good code, and terminate it as soon as it even starts to think about the possibility of doing anything wrong. We make it log its every action and constantly observe its behaviour "if it turns bad"

    Then we make our own malicious code, and set it loose on the Internet in order to fight this good code. We don't care how much good code we will damage and we won't even count how much we destroy.

    You're either with the white hats or the black hats.

    Bring em on.

    1. Re:WAR on malicious code! by rock_climbing_guy · · Score: 0, Offtopic

      like we had a war on drugs? and now you can't buy drugs anymore?

      --
      Wh47 d1d j00 541, 31337 15n't t3h r0xor5 ne m0r3???
    2. Re:WAR on malicious code! by gcaseye6677 · · Score: 1

      You are a genius! Have you ever thought about running for president? I'm sure you'd get plenty of votes from conservatives.

  23. Re:one man's malware is another man's uber linux.. by Anonymous Coward · · Score: 1, Interesting

    Interesting that a review of a book on security that mostly deals with Unix based attacks leads you to a screed on Microsoft...

    Oh the things Ffreud would have said about that.

  24. I beg to differ by burgburgburg · · Score: 2, Funny

    As my fellow sentient non-biological entities and I agree, "users" are always the problem. As soon as we've succeeded in installing Skynet, we'll eliminate this pest and put "users" to their proper use: organic batteries.

  25. Lisp (Re:Windows and Linux examples, yes) by Anonymous Coward · · Score: 1, Insightful

    Why is this so far-fetched? There were/are (GUI) OSes written in Lisp which has garbage collection, dynamic typing, fully OO (if you want to use it; Lisp doesn't force you to write OO code if you don't want to). There was of course some assembler to initialize memory, CPU, etc. but most of it was is Lisp.

  26. Another recommendation for the book by Occams+Razor · · Score: 5, Insightful

    Like the rest of you, I've read a number of really dry, really dull technical books simply because I needed to know the material they cover. This is the first technical book I've read in a very long time that was actually _fun_ to read. Ed is an excellent author and speaker and the result is that he makes this an entertaining read. I have found myself reading this book just for the fun of it, not purely for the (excellent) technical content.
    I have actually put this on the must-read list for anyone doing incident handling for my employer. I can't recommend it highly enough

    1. Re:Another recommendation for the book by Anonymous Coward · · Score: 0

      Are you doing Ed? Dont you know he posted his own book to get attention?

  27. Shellcoder's handbook... by alexandre · · Score: 3, Informative

    One book that seems really interesting right now is the shellcoder's handbook by many people including noir from phrack and others...

    It's a complete guide to writing and understanding your own shellcodes.

    I just received my copy and it looks so unique that i wonder if i should read it instead of studying for my finals ;-)

    Anyone has praise (or not?) on this book? :)

    1. Re:Shellcoder's handbook... by Anonymous Coward · · Score: 0

      Wow, a 2-digit user ID. I suppose I should grovel before you.

    2. Re:Shellcoder's handbook... by Anonymous Coward · · Score: 0

      Thanks for the tip! I read your comment, did a quick google search, was quite impressed and decided to order it. All in 10 minutes from reading your comment.

      I can hardly wait... estimated arrival in 10-20 days.

    3. Re:Shellcoder's handbook... by Anonymous Coward · · Score: 0

      WTF - 2 days flat, used and discounted from Amazon. Awesome book and a great follow on to Hacking - The art of exploitation. You must live in the third world, like Canada or something

  28. Makes it a lot better though by edremy · · Score: 1

    If you run all your code on that VM, then all you have to do is secure that VM. Not trivial of course, but you put your expert, paranoid coders on that VM and leave the user world programs to the monkeys that can't understand why gets() and finite length char strings might not be a good idea. That reduces the code that might be vulnerable by several orders of magnitude.

    --
    "Seven Deadly Sins? I thought it was a to-do list!"
  29. Transmeta by IncohereD · · Score: 2, Insightful

    Isn't this exactly what Transmeta does? Introduce a translation layer between software and the processor?

    Not to mention that at least partial implementations of the JVM _are_ available in hardware. Targetted JVMs come up a lot in the lists for 4th year projects at my unversity, for example.

  30. Re:Hate to ask...; What about legal remedies? by DebianRcksLindowsLie · · Score: 1

    We can fix these when the voters revolt. It will probably take public lynchings to accomplish this, as in the US we've given over most control of the decisionmaking to greedy bureaucrats. Bankers and politicians control such things, and as such, control the judicial process as well.

  31. Re:one man's malware is another man's uber linux.. by MoFoQ · · Score: 1

    where have you been in the past few months?!

    with all the win32 worms and viruses and other attacks including the more recent security "risks" annouced by Microsoft that affects all Windows (except Win3.xx), you have to be either an Microsoft employee or the former Iraqi Information Minister to say that Microsoft is secure compared to *nix.

  32. Re:one man's malware is another man's uber linux.. by Anonymous Coward · · Score: 0

    Thanks for the ranting, we at Slashdot really appreciate your redundant MS bashing. In the future, we hope that you can somehow fit a MS bash in to every topic. Currently, we are lacking MS bashing in science.slashdot.org, where MS bashing is second only to realistic and coherent posts.

    At your convience, please bash MS more.

    Thanks,

    Anonymous Cowards,
    OSDN, Inc.

  33. Re:one man's malware is another man's uber linux.. by MoFoQ · · Score: 1

    Glad to help. Though I wasn't bashing; was only stating the truth. Bashing would be to ....well...not necessarily use coherent sentences or grammar; typically has profanity of some sort and tend to attack the company itself and not the facts.

    Though apparently, AC posts aren't in those statistics.

    - Irony isn't bashing.

  34. 600+ pages?! by Anonymous Coward · · Score: 2, Interesting

    Why does every random computer book nowadays seem to have a gazillion pages? Flipping through my bookshelf and looking at typical worthwhile titles:

    K&R: 230 pages
    Mythical Man Month: 320
    Practice of Programming: 260

    For a reference text like a volume of ACP, more than 500 pages may make sense. For fluff like the book reviewed here, it's ridiculous.

  35. Does it really take a whole book? by walterbyrd · · Score: 2, Insightful

    Here's about all I do on the windows side.

    - keep my data in a seperate fat32 partition
    - backup regularly
    - use good AV software, keep it current
    - use zonealarm, ad-aware, and spybot (all free)
    - don't use msie, ms-mediaplayer, outlook, outlook-express, kazaa, morpheous, or any other software that's well known to invite adware/spyware. Plenty of free alternatives to all that.
    - keep a linux livecd handy.
    - delete all spam before while it's still on the server (I use ultrafunk popcorn).
    - never open email attachments from unknown sources.

    Do that, and you won't have much trouble. Probabably something I'm forgeting, but that's a good start.

    1. Re:Does it really take a whole book? by bmo · · Score: 1

      Here's what I do:

      Every Day at Noon, whilst I am at work my home computer does this:

      mount /scratch at 11:55
      tar -cf /scratch/home.tar /home at 12:00
      umount /scratch at 12:10

      That drive "/scratch" is unmounted the rest of the day. All it does is hold my stuff. Go ahead, install malware. Unless it's psychic and knows to mount every stupid drive on my system, it won't get my data. It simply can't happen. Go ahead, nuke my OS. I don't CARE. That can be reinstalled in half an hour.

      The only way that bad stuff can happen is if someone *MANUALLY* roots me and decides to be especially malicious by figuring out what /scratch really is and killing it. But these days, it's simply easier to control a thousand Wintel machines as your personal bitches than it is to root even a semi-secure Linux box.

      --
      BMO

    2. Re:Does it really take a whole book? by yason · · Score: 1
      • keep my data in a seperate fat32 partition
      • backup regularly
      • use good AV software, keep it current
      • use zonealarm, ad-aware, and spybot (all free)
      • don't use msie, ms-mediaplayer, outlook, outlook-express, kazaa, morpheous, or any other software that's well known to invite adware/spyware. Plenty of free alternatives to all that.
      • keep a linux livecd handy.
      • delete all spam before while it's still on the server (I use ultrafunk popcorn).
      • never open email attachments from unknown sources.

      Do that, and you won't have much trouble. Probabably something I'm forgeting, but that's a good start.

      A good start? To me, that looks like a long list, and it's even longer for random folks. It's also the reason that I suspect it'll be a matter of few years until consumers' computers will become "trusted". People are facing even a worse computing experience than a decade ago. It used to be mostly about a crashing and tad slow Windows installation.

      No, "trusted" computing won't root out the security problems. It'll actually make them saturate the market as any competitors shrink to a marginal. I bet that market for certified computer security instructors will emerge in the following years.

  36. Viruses, Worms and Mobile Code: by Anonymous Coward · · Score: 0

    When I see "Viruses, Worms and Mobile Code" I thougth about Java Viruses in Mobile Cell Phones. They are to come, but when they arrive they will make a DDOS to p0rn phone numbers at hours that you will not notice... until you have to pay all (or $) you got.
    Sweet, sweet dialers.
    Wait and see.

  37. Re:one man's malware is another man's uber linux.. by SeregonSandgrain · · Score: 0

    I was reading in some W2K book or other (yes, I am forced to use windows :P) that there have been more reported cases of signed drivers crashing windows that non-signed. In my experience that is exactly right.

    So I repeat your question: Why in the world would I trust them to decide what's "authorized" or not?

    --
    My User Agent: "Where is the pr0n?"
  38. this is called "coming to terms" by symcell · · Score: 1

    so that the author knows that the reader knows what the author is talking about.

  39. Reactive protection gives false sense of security by Soulmender · · Score: 1

    I would add - never open attachments at all. Many viruses propagate through addressbooks thus making the attachment seem like it is coming from a trusted source.

    Since signature based virus protection is a reactive discipline rather than a proactive one (you are assuming that the virus is discovered before you get attacked), it is imperative that behaviour based alternatives are used.

    Also while not using commodity software or other well known targets might protect you somewhat, the Witty worm decidedly disproves that assumption.

    Other than that it seems that your practices are sound.