I rarely, if ever, download copyrighted media these days however I do possess flash drives, DVDs, CDs, floppys, tapes, hard-disks (with and without file-systems installed) etc. with a plenty of media that I have hesitated to put on my system.

How does BSD handle such items? My concern is that one of the aforementioned devices could have something harmful or infectious, that may auto-execute when I connect it even...

Just the other day I recall my friend plugged his ipod-like device into my computer to charge. The next day he asked me to put music on it, which I did, at work...but when I plugged it into my work computer, OfficeScan said it was infectious!

In either case, it got me wondering how OpenBSD handles these sorts of things. Anyone know?

No virus identification is perfect. False positives can be found in most AV products.

Quote:

How does BSD handle such items? My concern is that one of the aforementioned devices could have something harmful or infectious, that may auto-execute when I connect it even...

You are making the assumption that an executable from the Windows world can run on OpenBSD. Both operating systems do not require the same signature of startup code placed at the beginning of binaries, so the chances of successfully running another operating system's binaries on OpenBSD is most likely impossible unless some form of emulation has been configured. At one time when OpenBSD's ports tree didn't contain common & popular applications, emulation was important, but now that many popular applications are natively available, emulation is much less used and/or maintained. In fact, a number of older emulation layers have been removed in -current.

Here's the thing: Windows will take a file and attempt to execute it based on extension. Try it sometime. Create a file in notepad. Name it omg.exe. Double click on it.

Every other operating system on the planet (especially OpenBSD and other Unix/Unix-like systems) actually check what's called the magic number at the beginning of the file that stamps the file as executable. Look:

Note how the result is the same for each executable...they're all ELF format executables (ELF stands for Executable and Linkable Format). The exception to these magic numbers is executable shell scripts, which list the interpreter that should be used to read and execute the text of the script:

See how the numbers are different (They match each other because they're Windows executables (PE executables, i.e. "Portable Executable" format), but they differ from OpenBSD's "magic numbers" (in other words, they aren't ELF format executables))? Now look: