Skip to content

Attachments and file types worth a second look

Updated

An attachment is a file that runs on your computer if you open it, so attackers use the file name and type to make a harmful file look like an ordinary document. Knowing which types deserve a second look, and how names are disguised, catches most of the common tricks.

Types that run code

Files ending in .exe, .scr, .com, .bat, .cmd, .ps1, .vbs, .js, .jar, .hta, .msi and .lnk run as programs or scripts. A genuine sender almost never emails one. Mail systems often block them, which is why attackers hide them inside the types below.

Types that can carry a program

  • Documents with macros (.docm, .xlsm, .pptm): macros are small programs, and the document asks you to enable them
  • Disk images and installers (.iso, .img, .vhd, .dmg, .pkg): they can hold a program and are often not scanned inside
  • Web pages (.html, .htm, .svg): they open in your browser and can show a fake sign-in page
  • Archives (.zip, .rar, .7z): a password-protected one hides its contents from filters, and the password is given in the message

How names are disguised

  • A double extension: invoice.pdf.exe looks like a PDF but ends in .exe, and many programs hide the last extension
  • Spaces before the real extension, which push it out of sight in a narrow list
  • A hidden direction mark that makes the end of a name read backwards, so a program looks like a document
  • A name that says one type while the sender labeled the content as another

Before you open one

  • Ask whether you were expecting it, and from this sender
  • If you are unsure, ask the sender by another route, such as a call to a number you already have
  • Preview it in a viewer instead of opening it in the program that made it, and never enable macros because a document asks
  • Report anything doubtful to your IT team or provider before opening it

Good to know. A tool can read a file's name and the label the sender gave it, but not what is inside. A normal-looking name is not a promise that the file is harmless.

Check a whole message