Hackszine Screencast: HOW TO - Infect your computer on purpose


Check it out, Brian shows you how to infect your own computer to test virus software - nice screencast!

Last week, Hackszine fielded a reader request to come up with a way to infect a computer without letting too much heck break loose. This procedure was so much fun that we decided to use it for our first Hackszine screencast. Check it out for a little surprise near the end: I managed to sneak the test malware past the virus protection, but it kicked in as soon as I tried to actually run it.

Related/Featured:

  • Reader Request: Make Sure Your Anti Virus is Working -- Link
  • Cygwin -- Link
  • Avast! -- Link
  • EICAR test file -- Link


Recent Entries

Comments

Oldest comments listed first.

Posted by: weirdguy on February 10, 2007 at 10:56 AM

I can't seem to sneak it past kaspersky at all, not even in .txt ;)


Posted by: J0ker on February 10, 2007 at 9:09 PM

nice try to advertise antivirus... and nice try to show us that u r stupid enough to not understand how ANY antivirus works... or u r thinking we r stupid? It was very funny when u used sygwin (just wrapper on win API).
lol


Posted by: japroach on February 10, 2007 at 9:50 PM

eh way to much visual + audio feedback with avast.

A VIRUS HAS BEEN DETECTED, WHOOP WHOOP WHOOP.

:P


Posted by: bjepson on February 11, 2007 at 2:38 PM

J0ker, the point of using Cygwin was to show that there's an interesting difference between the way that Cygwin's mv and Windows's ren are implemented. They are different enough that the Avast! software did not notice the .com file being created by mv (as it did with ren).


Posted by: J0ker on February 11, 2007 at 4:44 PM

BOOL MoveFileEx(
LPCTSTR lpExistingFileName,
LPCTSTR lpNewFileName,
DWORD dwFlags
);

dwFlags

MOVEFILE_COPY_ALLOWED If the file is to be moved to a different volume, the function simulates the move by using the CopyFile and DeleteFile functions.

So some antiviruses may or may not detect creation or/and renaming of files to the system detectable executional extension. Actually using windows API u can execute ANY byte sequence. But it actually doesn't matter - any antivirus MUST intercept creation of any process and check it for viruses, so it's impossible to run infected file anyway.


Posted by: bjepson on February 11, 2007 at 5:19 PM

Thanks for the background on that, J0ker. What you said confirms my belief that the system is safe even though the infected file exists on the filesystem (and it's definitely going to get caught on the next full scan). Still, I would rather that Avast had caught it on the move (weirdguy mentioned in the first comment that he couldn't get it past Kaspersky).

That said, I didn't set out to point out flaws in the antivirus software I was testing; one of our readers wrote in and wanted to know how to infect a computer so his students could learn how to disinfect it.


Posted by: acidrain69 on February 11, 2007 at 9:42 PM

No flaws have really been pointed out. You just have some data sitting in storage that happens to be malicious (or in this case, a harmles eicar file that does nothing). Code can only be malicious when it is being executed somehow, natively or by interpretation or whatever.

You faked us out. This video didn't show you how to purposefully infect a computer with anything. It showed how to test if your AV software was active and catching things as they run. Nothing was ever infected. Even if you turned off the AV software, nothing was in danger of infection, because eicar is not really a virus.

You haven't shown anyone how to "disinfect" anything. You've shown how to take an already protected system, and see if the system THINKS it is protected (Lets face it, it's possible for a virus to fake it's own eicar warning, but it would be a lot of work). Actually disinfecting a machine would consist of some way of shutting it down, scanning and removing the actual virus, which in this case, there wasn't one.


Posted by: bjepson on February 12, 2007 at 6:19 AM

acidrain69, you are right! The whole point of this was to show how to use EICAR to plant a harmless bit of text that will be recognized as malware so that the reader's students can have the experience of removing it from their computer. There is nothing more to it than that.

Everything shown in the video demonstrated how an active antivirus system would react to EICAR. To make his actual exercise effective, the reader who requested this information would need to go further, and do exactly what you suggest. He'd disable his antivirus before planting this string in a variety of places: as a .txt file on the system, in a .com file, embedded in the middle of a .dll, and so forth, and then shut the system down, scan, and remove.


Leave a comment


Subscribe to MAKE!Subscribe to MAKE Magazine!

Subscribe today, save 42% and get web access to MAKE free. MAKE Digital Edition is available only to subscribers.

$34.95 / 1 year
(4 Quarterly Issues)

Subscribe now


Void your warranty, violate a user agreement, fry a circuit, blow a fuse, poke an eye out. Make: The risk-takers, the doers, the makers of things... Welcome to Make: Online!


CRAFT Maker Shed Maker Faire MAKE television
Holiday Gift Guides from MAKE
Gifts for Dads
Science and Chemistry
Gifts Under $20
More guides: Santa Claus Machines, Geek Toys for Grown Up Girls & Boys


Check out all of the episodes of Make: television

Alex Rider Dream Gadget Contest
Make: Science Room

Connect with MAKE

Be a MAKE fan on Facebook MAKE on Facebook
Visit our Facebook page and become a fan of MAKE!
MAKE on Twitter MAKE on Twitter
Follow our MAKE tweets!
MAKE Flickr Pool MAKE on Flickr
Join our MAKE Flickr Pool!
    make_tips on Twitter




    Maker SHED

    Advertise here with FM.

    Why advertise on MAKE?
    Read what folks are saying about us!

    Click here to advertise on MAKE!



    Subscribe to MAKE Magazine!

    Make: Online authors!

    Gareth BranwynGareth Branwyn
    Senior Editor


    Phillip TorronePhillip Torrone
    Senior Editor
    | AIM | Twitter


    Becky SternBecky Stern
    Associate Editor
    | AIM | Twitter


    Marc de VinckMarc de Vinck
    Contributing Writer
    | AIM | Twitter


    John ParkJohn Park
    Contributing Writer
    | Twitter


    Sean RaganSean Ragan
    Contributing Writer
    | Twitter


    Matt MetsMatt Mets
    Contributing Writer
    | AIM | Twitter


    Dale DoughertyDale Dougherty
    Editor & Publisher
    | Twitter


    Shawn ConnallyShawn Connally
    Managing Editor
    | Twitter


    Goli MohammadiGoli Mohammadi
    Associate Managing Editor

    Kip KayKip Kay
    Weekend Projects
    | AIM | Twitter


    Collin CunninghamCollin Cunningham
    Contributing Writer
    | AIM | Twitter

    Adam FlahertyAdam Flaherty
    Contributing Writer
    | AIM | Twitter



    More contributors: Mark Frauenfelder (Editor-in-Chief, MAKE magazine), Kipp Bradford (Technical Consultant/Writer), Chris Connors (Education), Diana Eng (Guest Author), Peter Horvath (Intern), Brian Jepson (O'Reilly Media), Robert Bruce Thompson (Science Room)

    Suggest a Site!

    Current Podcast

    itunesdl.gif Weekend Project: Beetlebot Simple robot from your parts bin that avoids obstacles. Thanks go to Jerome Demers for the original article in MAKE, Volume 12. To download the Beetlebot video, click here or subscribe in iTunes. Check out the complete Beetlebot article... More...

    Get the Make: Online sent via email
    Enter your email to receive Make: Online each day:



    MAKE Fascination video series brought to you by Dow

    Make: Education
    MAKE: en EspaƱol MAKE: Japan
    Important please read


    Subscribe to MAKE Magazine!

    Recent Posts from the Craft: Blog