Is it possible to disable auto mount of external devices? [duplicate]

How can I disable the auto mount of usb/firewire devices or basically any external disk in MacOSX?

My motivation for this is that in Windows there have been possible attacks via USB trojans that would copy to the internal hard drive just after the auto mount. I thought that disabling auto mount of external devices is a good counter measure. But I'm be open to solutions that protect from such a threat using other methods.

Edit

I assume that a solution to my problem would have to look like the following:

  1. Auto mount disabled for all devices.
  2. Opt-in of auto mount for my private devices.

Solution 1:

You should be able to use Disk Arbitrator to do most of what you want. Certainly requirement 1 is met and you should be able to achieve most of 2 with it too.

Solution 2:

As far as I know, such attacks rely on the auto-run feature, not the auto-mount feature, meaning that even manually mounting a disk will trigger the auto-run program.

However, OS X doesn't support auto-run at all, so even if a volume auto-mounts and it does have a trojan on it, the trojan will not start automatically.