# Is it possible to have a PDF virus?

**URL:** <https://boards.straightdope.com/t/is-it-possible-to-have-a-pdf-virus/411079>\
**Category:** Factual Questions\
**Created:** [July 9, 2007, 7:04pm UTC](https://boards.straightdope.com/t/is-it-possible-to-have-a-pdf-virus/411079 "2007-07-09T19:04:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Khadaji](https://avatars.discourse-cdn.com/v4/letter/k/9e8a1a/32.png) [@Khadaji](https://boards.straightdope.com/u/Khadaji)\
**Post date:** [July 9, 2007, 7:04pm UTC](https://boards.straightdope.com/t/is-it-possible-to-have-a-pdf-virus/411079/1 "2007-07-09T19:04:01Z")

</div>

I am getting a lot of spam lately with PDF files attached. Is there a way to attach a virus to a PDF file?

---

<div class="post-metadata">

**Author:** ![Nanoda](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@Nanoda](https://boards.straightdope.com/u/Nanoda)\
**Post date:** [July 9, 2007, 7:27pm UTC](https://boards.straightdope.com/t/is-it-possible-to-have-a-pdf-virus/411079/2 "2007-07-09T19:27:05Z")

</div>

You can embed VBScript in a pdf file using the full version of Adobe, which can then be run in other full versions of Adobe. Otherwise everyone is fairly sure no.

But the reason you’re getting spam in pdfs is that few to no spam filters can tell that the pdf is an ad for Viagra vs. the latest TPS report.

---

<div class="post-metadata">

**Author:** ![SailedTheOceanBlue](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@SailedTheOceanBlue](https://boards.straightdope.com/u/SailedTheOceanBlue)\
**Post date:** [July 9, 2007, 7:51pm UTC](https://boards.straightdope.com/t/is-it-possible-to-have-a-pdf-virus/411079/3 "2007-07-09T19:51:21Z")

</div>

THANK YOU for asking this! The .pdf spam has been driving me bonkers.

---

<div class="post-metadata">

**Author:** ![Mr.Slant](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Mr.Slant](https://boards.straightdope.com/u/Mr.Slant)\
**Post date:** [July 9, 2007, 8:04pm UTC](https://boards.straightdope.com/t/is-it-possible-to-have-a-pdf-virus/411079/4 "2007-07-09T20:04:25Z")

</div>

Should be possible based on what I’ve read. Not sure if VBS is the only thing that can be embedded in PDFs, either, you might want to try looking it up further if you can’t get more Doper feedback.  
I wish app developers would segregate data space from app space. Stupid.

---

<div class="post-metadata">

**Author:** ![scm1001](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@scm1001](https://boards.straightdope.com/u/scm1001)\
**Post date:** [July 10, 2007, 3:11am UTC](https://boards.straightdope.com/t/is-it-possible-to-have-a-pdf-virus/411079/5 "2007-07-10T03:11:38Z")

</div>

and depending on your computers setting an executable file can call itself a pdf e.g. virus.pdf.exe might appear as virus.pdf if you have the setting which turns off common program extensions. Of course it wont have the acrobat icon, but you might miss that in your hurry to open growyourpenis.pdf

---

<div class="post-metadata">

**Author:** ![Mr.Slant](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Mr.Slant](https://boards.straightdope.com/u/Mr.Slant)\
**Post date:** [July 10, 2007, 4:19am UTC](https://boards.straightdope.com/t/is-it-possible-to-have-a-pdf-virus/411079/6 "2007-07-10T04:19:27Z")

</div>

[QUOTE=scm1001]  
and depending on your computers setting an executable file can call itself a pdf e.g. virus.pdf.exe might appear as virus.pdf if you have the setting which turns off common program extensions. Of course it wont have the acrobat icon, but you might miss that in your hurry to open growyourpenis.pdf  
[/QUOTE]

My recollection is that file icons based on file type are in fact based on filename extension, rather than headers internal to the file types. I’m also recalling that while some MS Windows systems use ‘file forks’ in some filesystems, icons are in no sense based on file forks.  
May I ask for a cite for “Of course it wont have the acrobat icon” ?

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [July 10, 2007, 5:05am UTC](https://boards.straightdope.com/t/is-it-possible-to-have-a-pdf-virus/411079/7 "2007-07-10T05:05:08Z")

</div>

A program can have any icon its creators want. And if someone’s going to go to the trouble to disguise a program as an acrobat file, they’re going to put the acrobat icon on it.

That said, I’ve been getting a lot of PDF spams as well, and they’re actually .pdf , not .exe . Not that it would matter at all for me, being on a Mac.

---

<div class="post-metadata">

**Author:** ![scm1001](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@scm1001](https://boards.straightdope.com/u/scm1001)\
**Post date:** [July 10, 2007, 10:12pm UTC](https://boards.straightdope.com/t/is-it-possible-to-have-a-pdf-virus/411079/8 "2007-07-10T22:12:27Z")

</div>

[QUOTE=Mr. Slant]

May I ask for a cite for “Of course it wont have the acrobat icon” ?  
[/QUOTE]

true, MAY not have the acrobat icon. :smack:
