Slashdot Mirror


Trojan Found in libpcap and tcpdump

msolnik writes "Members of The Houston Linux Users Group discovered that the newest sources of libpcap and tcpdump available from tcpdump.org were contaminated with trojan code. HLUG has notified the maintainers of tcpdump.org. See our reports here or here."

34 of 486 comments (clear)

  1. Eventually, this would happen by Rotten · · Score: 5, Insightful

    And if I don't remember, this happened befrore. Of course this is one of the biggest strenghts of the Open Source Model.
    Code is constantly audited, checked and corrected. If your closed source software has backdoors or trojans...well....who knows but on Open Source is easyly detected.

    1. Re:Eventually, this would happen by khendron · · Score: 5, Informative

      Easily detected? I wonder about this. If you look at the date stamp on the trojaned configure script, it is December 10th, 2001.

      Does that mean that this trojan has been around for almost a year before anybody noticed? If that's true, it does not meet my definition of "easily detected".

      --
      Life is like a web application. Sometime you need cookies just to get by.
    2. Re:Eventually, this would happen by r55man · · Score: 5, Informative
      Does that mean that this trojan has been around for almost a year before anybody noticed? If that's true, it does not meet my definition of "easily detected".

      I downloaded libpcap/0.7.1 from tcpdump.org on September 2 of this year (just 2 months ago), and it was not trojaned (I keep a record of md5 sums, and was able to check this just now).

      Probably whoever modified the file just touched it to resotre the original timestamp. This is trivial to do.

    3. Re:Eventually, this would happen by Melantha_Bacchae · · Score: 5, Interesting

      An AC wrote:

      > closed src doesn't have its src on some
      > webserver for some kiddie to trojan in the first
      > place. sure the possibility of some employee or
      > the employer itself to trojan the src, but most
      > open source trojans are someone breaking into
      > the web server and uploading modified src. by
      > definition this wont happen with closed src
      > since closed src doesn't release src, so your
      > argument is irrelevant.

      Oh, no? Look here:

      http://news.zdnet.co.uk/story/0,,s2082221,00.htm l

      Microsoft had their source available to some cracker for three months back in 2000. Of course they later spun it down to "one day and we were watching them all the time".

      Point is, closed source can be vunerable too. Only Microsoft knows if any damage was really done, and they aren't telling us squat.

      "At this moment, it has control of systems all over the world.
      And...we can't do a damn thing to stop it."
      Miyasaka, "Godzilla 2000 Millennium" (Japanese version)

    4. Re:Eventually, this would happen by Bruce+Perens · · Score: 5, Informative
      Remember Interbase? It came with a trojan from Borland. The Open Source folks found it only AFTER the program was made open source. It had the trojan for at least 6 years before it became Open Source. It was running airplane reservation systems. Somebody got a lot of free flights.

      Why do you think only an employee can trojan a binary, anyway? Most viruses modify binaries. Certainly many virus-infected binaries have been distributed professionally.

      Bruce

    5. Re:Eventually, this would happen by Bruce+Perens · · Score: 5, Insightful
      In handling the press and public perception for this, it's important that we make the point that binary programs are trojaned all of the time. In fact, most viruses have as their sole purpose the modification of binaries to insert a trojan copy of the virus into the binary, and to execute the virus payload. Much proprietary software has been distributed in infected state.

      The difference is that with Open Source you have an additional means of detecting the corruption - not only by its effects (as with the binary), but by reading the source.

      Bruce

    6. Re:Eventually, this would happen by Bruce+Perens · · Score: 5, Insightful
      Also, we need to get better about signing our archives and heeding the signatures. Com'on folks! I wrote about this in the old linuxworld.com webzine in 1996!

      Bruce

  2. Re:This Trojan thing... by JamesO · · Score: 5, Informative

    Its Denis Ritchie

    And he only might have done it (can you tell?)

    See http://www.acm.org/classics/sep95/ for more details

  3. Re:MD5 checksums by diamondc · · Score: 5, Insightful

    if someone breaks into an ftp server, they might as well replace the md5 signatures, too. a better solution would be signing the sources with a gpg key.

    --
    "I keep looking in the want-ads under 'revolutionary' but there don't seem to be any listings.. "
  4. Re:This is dreadful by jimand · · Score: 5, Insightful

    there's no-one to pay me to pay my staff for the lost man-hours caused by this

    Did Microsoft pay you for lost man-hours when your staff battled Nimda or Code Red? Didn't think so.

  5. Re:Glad I use Gentoo by dohcvtec · · Score: 5, Interesting

    How did it get into tcpdump.org's sources exactly?
    Presumably the tcpdump.org FTP server got 0wned, and the trojan was planted, but the people that found the trojan aren't the server admins - they just found it in the source they downloaded. And I doubt we will find out how the perpetrators got in, either. It would have been nice to find out in more detail what happened when the OpenBSD FTP server was compromised, but people are usually tight-lipped in these cases.

    --
    -- Never hit a man with glasses. Hit him with a baseball bat.
  6. Don't jump to conclusions by astrashe · · Score: 5, Insightful

    The good blackhats have lots of compromised machines at their disposal, and are generally way too clever to leave such an obvious clue behind.

    It's possible that this guy has something to do with it, but it's more likely that his machine is owned by the same person who managed to put the trojan out there.

  7. Re:One too many? by LostCluster · · Score: 5, Insightful

    As Linux becomes more popular, the dumber system admins who never patched their Windows systems now have Linux systems. All it takes is a small handful of people to not know there is a wide-open back door, or worse yet know but be too lazy to take the corrective action, and there's enough zombies to cause headaches.

  8. Reply from a mirror site to HLUG and tcpdump.org by Dogcow · · Score: 5, Informative

    This was just sent ~1 min ago:

    To : msolnik@hlug.org
    Cc : wt-changes@wiretapped.net,
    tcpdump-workers@tcpdump.org,
    mcr@sandelman.ottawa.on.ca
    Subject : tcpdump.org mirrors
    ----- Message Text -----
    Hi guys,

    I run the main mirror of tcpdump at wiretapped.net (no relation to wiretapped.us) in Australia. We rsync from cvs.tcpdump.org, and have removed the entire tcpdump.org tree and disabled rsync updates until we hear from Michael Richardson at tcpdump.org.

    You may like to add this info to your Updates area, as the unavailability of the main mirror site may seem suspicious. It is not, as described above.

    Because wiretapped.net itself is mirrored to a few other sites, it may take between 1 hour and 24 hours for this removal (and any subsequent re-addition) to take effect. We'll note when it goes back online at http://www.wiretapped.net/changelog.html

    Hope this assists in preventing any further spread,

    Grant
    www.wiretapped.net

  9. Re:Seems by paranoos · · Score: 5, Insightful

    If some malicious coder could upload manipulated software, do you not think they could also spoof the MD5 sum also? From what I've seen, the checksum is usually just stored in a text file in the same directory.

  10. Re:This is dreadful by gowen · · Score: 5, Insightful
    I run a successful London-based dot com
    Wow. And just minutes ago you were a succesful lawyer. I'm so jealous.
    --
    Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
  11. Isn't this the whole point of Open Source? by elliotj · · Score: 5, Funny

    I thought the whole idea of the GPL was that you could take a program and modify it to your own needs so long as you release the source back to the community under the same license.

    Sounds like that's what happened here!

  12. Uncommented trojan by magi · · Score: 5, Insightful

    The trojan code seems somewhat complex and unreadable at first glance. The variable names don't express much of the semantics. It even doesn't have any comments. No wonder no one notices if this kind of stuff is written into code. And this is very clear code.

    Even (or especially) free software developers should use more descriptive variable names and comment their code well. It makes the code much more readable for analysis, both security or quality reviews.

    Well, ok, crackers probably want to obfuscate their code with /* Here's stuff for the trojan. */, but if all code is well documented, it's generally easier to understand and intentional obfuscation might be easier to spot.

    I'd recommend the rule: "One comment per statement, except when really unnecessary." Many people think it's silly, but those people haven't had to read a lot of other people's code.

    Hmm, I wonder why they used port 1963...author's birth year? Nah, that would be too old for a typical cracker.

  13. Re:So much for peer auditing? by Anonymous Coward · · Score: 5, Informative

    I'm going to try to walk you through this with baby steps.
    let me make sure to put pillows over the sharp corners of the table.

    this was found, just last night, because of the change in the md5 checksum.
    this md5 checksum changed because the file changed.
    this file changed because someone changed it
    so in conclusion, this file has not been like this for a year

    hope you were able to keep up

  14. Re:This is dreadful by Hostile17 · · Score: 5, Insightful

    "It's the one problem with the open-source community - there's no-one to pay me to pay my staff for the lost man-hours caused by this. "

    And this is different from Closed Source how ?

    Doesn't the money come from the money you`ve saved by not having to pay for any software? What did your business plan mention about this? Just a blank page, right? Try it out and see what happens? Well, it's your money!

    Same place it will come from if you use Closed Source software, using Open Source products does not mean zero cost IT, it means lower cost IT. If your company did plan for these things, then it will make no difference what products you are using.

    --
    Fascism should more properly be called corporatism, since it is the merger of state and corporate power - Benito Mussoli
  15. Re:as soon as this evening... by Megane · · Score: 5, Informative
    If you suspect your binaries to be trjanized, you'd want to sniff your own machine but if (and it is the case) the sniffer is trojanized, then it could possible hide such "activities"... I actually read the article and it however seems that it was not the case here...

    If you read the article more carefully, you will notice that the binaries aren't trojaned. This is a trojan in the build scripts only. So ironically, only the paranoids who build from source (but aren't paranoid enough to demand an MD5) got hit by this.

    --
    #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
  16. Re:Glad I use Gentoo by elrond1999 · · Score: 5, Informative

    Emerge Does get sources from TCPDump if all other mirrors are down. Excerpt from ebuild:
    SRC_URI="http://www.tcpdump.org/release/$ {P}.tar.g z
    http://www.jp.tcpdump.org/release/${P}.tar.gz"

    SRC_URI is a last resort mirror..
    Lucily the MD5 sum catched the trojan: (From the gentoo ebuild digest)
    MD5 03e5eac68c65b7e6ce8da03b0b0b225e tcpdump-3.7.1.tar.gz 428737

  17. DEMAND PGP SIGNATURES!!!! by aphor · · Score: 5, Insightful

    The reason this is a problem is that nebulous shrug of an answer to the question "Who are you trusting to provide this code which you execute?" It could be an anonymous PGP/GPG key, but to violate people's trust would mean that trusted token is no longer trusted, and thus it would identify the other risks out there.

    Imagine the tcpdump distributions were signed by an anonymous key. We could look over the code, and decide to trust that key. Later, people would be able to tacitly trust that key to sign tcpdump tarballs. One day, the tcpdump code will fail to match the signature: it will be caught before being executed, and the trojan will be discovered quickly. Later, another trojan will appear, but the signature will match. A few people will be bit, but the key will be exposed and others will be able to quickly identify their risk.

    At the VERY LEAST, use MD5 sums on the files like FreeBSD ports!

    --
    --- Nothing clever here: move along now...
    1. Re:DEMAND PGP SIGNATURES!!!! by jonabbey · · Score: 5, Insightful

      And for god's sake, keep your private signing key encrypted in your gpg keyring, or offline.

  18. facts, not fiction. by F2F · · Score: 5, Informative

    the article is called 'reflections on trusting trust' and Ken Thompson wrote it upon inception of the ACM distinguished scientist award. now, we all know you are full of shit (since you can't even spell his name right) but claiming that 'each version of login was compromised' is so far off base that it't not even funny.

    follow the link posted already, read it and try to understand what he fundamentally tries to tell you. then go and read aleph1's 'smashing the stack for fun and profit' and try to get a glimpse of what 'hacking' was considered in the 80s.

  19. Re:This Trojan thing... by F2F · · Score: 5, Informative

    It's Ken Thompson. How do I know? His name is right beneath the title of the article you linked.

  20. How is this fair? by kiwimate · · Score: 5, Insightful

    This apparently misleading (albeit well-intentioned) comment gets modded +4 interesting, meaning that almost everyone will see this poor guy's name.

    All the replying posts pointing out that it's a phone company/ISP and it's almost certainly nothing to do with this chap are at 2 or below, meaning that many people won't see them and this individual's name is now besmirched.

    And, by the way, this happens all the bl**dy time on /. An early poster makes assumptions and gets modded way the hell up, then all the rebuttals pointing out he's talking out of an unreliable orifice wallow in the low point range.

    Yeah, I know it's off-topic. Just wanted to rant about something that irritates me. Return to your normally-scheduled bits and pieces.

  21. NO!!!! NO!!! NO!!! by AxelTorvalds · · Score: 5, Informative
    md5 checksums are nice but if I was going to put a trojan in to something, I'd probably rebuild the md5sum too. Basically md5sum is a glorified CRC at the end of the gzip, nothing more and nothing less.

    Do this: Download gpg from gnupg.org. Build it. Generate yourself a key. Try to get some of your friends to sign it. submit it to keyserver.net. Sign your code with that key. While you're at it, start using kmail, evolution, or mozilla with enigmail and start signing your emails too. Do it religiously.

    Check sigs when you download code too.

  22. Re:This is dreadful by djtack · · Score: 5, Funny

    And looking through his user profile, he's also a rocket scientist. Wow.

  23. Sandbox Your Applications by gehirntot · · Score: 5, Informative
    Lately, we have seen many trojaned distributions. To prevent these problems from affecting us in the future, we need to use cryptographic signatures as part of software distribution. Otherwise, we never know if a particular piece of software is authentic or not. Signature checking needs to be part of the installation process. I believe that Debian's aptget is one of the few tools that actually does this.

    In the meanwhile, I suggest that you run all your untrusted software in a sandbox like Systrace which is available for the BSDs and Linux.

    This screenshot shows Dug Song detecting the trojan in the Fragroute distribution. Systrace allows you to run completely untrusted applications in a sandbox. The security policy is created on the fly with the user deciding what an application is allowed to do.

    We need to be much more careful about the software that we run.

  24. Re:as soon as this evening... by harlows_monkeys · · Score: 5, Insightful
    The funny thing about the paranoids who build from source is that, unless they actually look at the source, it doesn't gain them anything. There are three ways to build from source.

    1. Just grab the source and build it. This is no better than grabbing a binary and running it, as far as security goes.

    2. Grab the source, check the MD5 sum, and then build it. This is no better than grabbing the binary, checking the binary's MD5 sum, and then running it.

    3. Grab the source, diff it against the previous source you were running, and at least glance at the diffs to see if anything looks suspicious. This is the only way that using source gives you more security than using the binary.

    People using source for security who are in category 1 or 2 are just fooling themselves.

  25. Early news from tcpdump.org by fenner · · Score: 5, Informative

    I moved the binaries on the tcpdump.org web site, so that the "download" links won't work.

    "ls -c" says that the modified binaries were installed at Nov 11 10:14:00 2002 GMT.

    Preliminary inspection says that the CVS repository is O.K.

  26. Re:as soon as this evening... by kevinank · · Score: 5, Informative
    Okay, I've been confused about this MD5 thing. Most often, the MD5s are either in a file in the ftproot, or in the readme if you've owned the server enough to stick a trojan in the source code, can't you just put in the MD5s of your altered source?

    To be useful the MD5 file should be signed, and the GPG key that signed it should be one that you know and trust. Even that may not be enough if the key owner can be tricked into revealing his private key, or the trojan horse can be introduced into the code on the code owners development machine, but it does add one layer of depth to your security.

    The first time I had a server hacked (mountd exploit, xmas '99) the machine details were sold on IRC, probably in exchange for credit card numbers, to a somewhat clueless Singapore exchange student who proceeded to delete all of my syslog files so that when I logged in remotely the root mailbox was full of complaints about missing logfiles. The rooted system was up for about a week, during which time it probed several thousand IPs for basic exploits, hosted an IRC channel through eggdrop (together with names of the hacker's friends and passwords), all on a machine with no rootkit installed and very little attempt to hide activity.

    Basically I got lucky the first time, and ever since then I've been paranoid, in hopes there won't be a second time. But with a smart hacker and a good root kit, I think even with my paranoia that I could miss a hacker on my machine for a long time, so I suspect it is only a matter of time before some well known developer gets hacked and has signed sources distributed with a trojan horse inside.

    --
    LibBT: BitTorrent for C - small - fast - clean (Now Versio
  27. Date of Trojan is after Nov 1, 2002 by Skjellifetti · · Score: 5, Informative

    I downloaded and installed libpcap and tcpdump on Nov 1. The versions I have came from tcpdump.org. md5sum shows that they have the correct checksum and not the trojaned checksum as reported on the Houston LUG page. A grep of the sources for the port number and ip found in the trojan reports null. It looks like the trojan files were placed on tcpdump.org after Nov 1, 2002.