Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

Can my computer get a virus from my camera?

Question:

Can my computer get a virus from my camera? I got a nasty virus on
my computer and I couldn’t send photos because the photos were failing
the virus scan. I plugged my camera into my laptop thinking it was safe
to send the photos through that computer to someone else in email but
again I couldn’t send the photos that I just took because they were
infected. So my camera must now be infected. Does this mean I need a
new camera and have to discard my memory card with all my photos of my
son for the past 2 years. Is there any way to save them?

I’m actually going to reverse a statement I made in an article over
4 years ago.

Yes.

Yes, it is possible that your computer can catch a virus from your
camera’s memory card.

We need to understand that, though, because I didn’t say
from the camera, I said from the memory card.

]]>

First, it’s incredibly unlikely that your camera has been infected. Theoretically it’s possible, I suppose, but I’ve not heard of it happening. There are so many different cameras with so many different versions of firmware on the camera, there’s simply no way to write a virus that would infect any significant number of them. Heck, most of them never ever even “run programs” that you could supply via a memory card, all they do is write and read pictures.

There’s simply no reasonable vector over which a camera could itself be infected.

“There’s simply no reasonable vector over which a camera could itself be infected.”

So hang on to your camera, it’s fine.

It’s the memory card we need to look at.

Memory cards are one way that viruses travel from computer to computer. And that can be any memory card – a USB stick, an SD RAM or Compact Flash card – whether you use it in a camera or not.

Here’s the scenario that most people think of when they think of cameras and memory cards:

  • You use your camera and take pictures onto your new memory card.

  • You take that memory card and insert it into a card reader to transfer the pictures to your PC.

Seems quite simple. Here’s the scenario we need to worry about:

  • You use your camera and take pictures onto your new memory card.

  • You insert that memory card into a reader on someone else’s computer. Perhaps you wanted to show or share them prior to coming home, perhaps you were traveling and needed to off-load your memory card or whatever.

  • That computer had been infected with a virus, and that virus has now, unbeknownst to you, infected your memory card.

  • You put the memory card back into your camera, and keep taking pictures. The virus does not harm or infect your camera in any way.

  • You get home, and you insert the memory card into your own computer, where the virus you didn’t realize was on the card infects your machine.

Note: this applies to direct connections as well. I use removable memory cards as the example above, but if you connect your camera to your computer via a cable, the virus can still spread to your computer, particularly if your camera appears as another drive on your computer.

The camera itself is not infected, it’s simply a carrier – a host if you will – for the memory card that is.

How do you prevent it?

One: turn off auto-run, also known as auto-play. This is a feature of Windows that detects that removable media such as a CD, DVD or memory card has been attached to a computer, and follows instructions on that media to automatically run a program. This is how some installation programs automatically run when you insert a CD, for example. Note that the program which is run automatically is on the removable media. That makes it trivial for a virus to add those instructions to any memory card so that it will infect any computer that it comes in contact with.

I’d call it auto-infect, if you asked me.

Two: trust no one. OK, maybe trust a few, but be skeptical. That means think twice before you connect your camera or insert your memory card into someone else’s computer. How likely are they to understand and stay on top of internet safety procedures? How do you know you’re not picking up a virus that you’ll then take home with you?

Three: Back Up! Do I really understand from your question that the only place you keep your pictures – two years of pictures – is on your camera? To be blunt, that’s asking for problems. Besides this whole infection scenario, cameras are easy to lose; memory cards “wear out”, there are dozens of reasons that you might lose the pictures that are kept only in your camera. If you honestly value your photos you should copy them to your computer as soon as you can, and then make sure that the computer itself is backed up. My approach is to actually backup my photos automatically to two different machines, until I have the chance to backup to CD-ROM manually.

The golden rule is simple: always have two copies of your valuable pictures. Camera and PC, PC and a backup, PC and CD-ROM, it doesn’t matter. As long as it’s always ok for one to disappear (at which point you then quickly make a new second copy), then you’re taking appropriate precautions.

How do you recover?

The answers here aren’t as clear. The problem is that there are many different viruses, and they do many different things.

Some won’t affect your pictures at all. You can copy them off and reformat the memory card and you’re done.

Some mark your files and folders as hidden, which might cause you to think that they were gone. Exploring your memory card looking for hidden files might well turn up your photos, which you could then copy off.

In your case, though, it sounds like the virus has, in fact, modified or even erased your photos and replaced them with something else – probably itself in an attempt to maximize its ability to infect other machines. I honestly can’t say whether or not the photos are recoverable, but I’m guessing not.

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

18 comments on “Can my computer get a virus from my camera?”

  1. Thanks.I could probably still get the photos if i take the card to walmart to get them printed, right? thank very much for such a quick response!

    Honestly don’t know – if the virus destroyed the photos, then not. If the virus did not destroy them, then you would be just as likely to be able to copy/recover them yourself.

    – Leo
    20-Dec-2008
    Reply
  2. If your card/camera is seen as a drive such as e: f: etc. then it can be scanned for viruses by your anti virus program and possibly cleaned. I have never heard of the scenario given but I have heard of infections from stray jump drives.

    Here’s why I’m uncomfortable relying on that: you had to plug it in to scan it. Thus if infected, it could have transmitted that infection to your computer before you had a chance to scan. You’re also assuming that the scanner will catch every possible virus, which is simply not the case. Prevention is much, much preferable to the risks of getting an infection.

    – Leo
    20-Dec-2008
    Reply
  3. Just write-protect the memory card before inserting in another computer. It can then read the pictures but the virus cannot write to the card.

    A good suggestion for those cards that support being write protected. Not all do.

    – Leo
    20-Dec-2008
    Reply
  4. What about a file recovery utility such as Recuva which says, “It will even bring back files that have been deleted by bugs, crashes and viruses!”

    http://www.recuva.com/

    Coincidentally I was just looking at / evaluating recuva yesterday. It’s done by the same people who do ccleaner. It, and file un-delete utilities, may be able to help if the files have simply been deleted. But of they’ve been damaged then they cannot. In the case of the questioner, he seems to have files that appear to be image files present, not deleted, but they appear to have been modified or damaged.

    – Leo
    21-Dec-2008
    Reply
  5. Download an Ubuntu live ISO, burn it, boot it, bang the card into the computer, drag any valid picture files you can find onto the desktop, format the card and put the images back on. Job done.

    Reply
  6. This past summer I took a few pictures with a relatives camera. I inserted the SD card in my computer (Vista) and after downloading, the top line when I open Internet Explorer says “Hacked by Godzilla”. Nothing seems to be affected. After that I switched to Firefox. I’m running AGV anti-virus.

    Reply
  7. What about inserting a camera card in the card machine at Wal-Mart to make prints? Can I pick up a virus by doing that? I use Wal-Mart because I can’t print on my own computer for anywhere near their cost, for paper and ink alone.

    I don’t know. I would assume that those dedicated single-purpose devices are not prone to infection, and I’ve not heard of it happening, but … it seems like it could if the particular device is poorly architected or configured. Right now I consider the risk very low, but would be interested to hear from others if they’ve heard of or experienced an infection from a photo-printing kiosk.

    – Leo
    24-Dec-2008
    Reply
  8. yes, these solutions are effective, but stopping the autorun.ini is not the actual solution. i think that the computer should have a firewall( other than windows default) and the system should be kept in the show hidden files system, because by which anyone can these autorun.ini files and can delete the same. 2nd most imporatant thing is if there is any risk of virus then we can prefer to log on to the computer as a guest, after that the virus cat get intrusion in the registry of HKmachine hives.

    Reply
  9. I agree with the suggestion to boot a linux live cd. Linux wont get infected by this virus you speak of and will safely allow you to retrieve any images (or anything else for that matter) then safely restore your card to how it was when new. The best tool for the job is often not Windows….

    Reply
  10. 2 comments:
    I once looked into photo recovery, and there are dedicated programs out there which can recover damaged picture files. I will admit that they didn’t work for me, but they are meant to. Google it, I can’t remember names.

    Also I remember reading an online article on how you CAN get viruses from dedicated kiosks. They come from other people’s cards, and then to yours, then to either your camera (yes, you can damage the firmware) or computer.
    I asked my local photo shop, and they have antivirus on their setups, but some places DON’T have anything.
    Sorry for being vague about names/article links; its been a while since I found this out.

    Reply
  11. I currently have a virus which causes my my pictures folder to crash whenever I try to access the files. I always develop my pics at Wal Mart. Until now I hadn’t considered the possibility of getting the virus from there. Hmmmm…… Does anyone know of a virus that attacks the my pictures folder on XP?

    Reply
  12. I’ve read article that Photo Frame had been shipped from a factory containing viruses. I don’t know if it’s true but it’s definitely possible for any device such as a photo frame, usb stick, SD card external hard drive etc. to even come preinstalled with a virus if for some reason it was tested in a factory on an infected computer. If you have a good AV on your computer it should detect it and quarantine it. But it’s best to turn off auto-runs as Leo saiad.

    Reply
  13. In an explorer window go to Tools->Folder options->view and un-check “hide extensions for known file types” option. This is one of the most dangerous defaults settings of all time.

    It’s possible to name an executable file as for example picture.jpg.exe and if the extension is hidden you might be fooled into thinking you have a picture file. If you have a file with a double extension where the final extension is executable odds are high its a virus.

    Also beware of screen saver files .scr. The name means screen saver but your computer handles it exactly the same as an .exe file.

    Reply
  14. A virus is a sequence of 1’s and 0’s stored in memory. a photo is 1’s and 0’s stored in memory, therefore, in theory would it not be possible to take a photos of something that would write the exact sequence of 1’s and 0’s into memory that is in itself the exact coding of a computer virus?

    While theoretically possible the odds are so astronomically against it I’d never consider it a real possibility.

    Leo
    02-Nov-2010

    Reply
  15. Deja vu,

    This can happen and does happen: to me for instance! I had to upload some pictures from my camera to a common-use computer located at one on my company’s training facilities. The computers there, to put it kindly, are very poorly maintained.

    When I returned to the office to upload pictures from my camera onto my office computer I suddenly got the ‘devil with a pitchfork and red anti-circle mark’ depicting a viral infection. I reported it to the information systems people and they had me disconnect my computer from the LAN and run a full virus scan.

    The moral of this story is to NEVER plug your camera into an untested computer. If you have to transfer picture files, either use a file sharing site or load them onto a portable memory device.

    I use a portable 40GB HD which for some reason seems to be virus-proof.

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.