This isn't an issue with the USB protocol. The software has to be installed manually, and should not even have been included (why do you need special software to charge batteries?)
It's the same with printers. They always want you to install some stupid software that "manages" printing for you. Um no, I just want the printer driver thanks.
There is still a remaining issue with plugging in devices, especially cameras and phones, where the charger has the opportunity to inappropriately, given the context, access the filesystem: software can maliciously be installed a result.
When wanting to charge a camera on an airplane, for instance, the user shouldn't be left to guess if his photos are going to be copied off the device.
You can easily solve this problem by getting a usb cable without data wires. A few things I have came with these included with the charger. It pissed me off at first because they look like regular usb cables and I tried to hook up a disk drive. I marked them with a big X but soon realized how handy they could be when I wanted to charge a media player from a laptop I knew had some issues.
I've done surgery with a razor and some good shrink tube twice now to make more of these little gems.
Smarter devices like my Palm Pre actually ask if you want to let the host connect to them or just take power.
If I understand the USB spec right, getting more than 100mA of power requires a negotiation with the host, thus data wires. There might be a market for a USB data blocker, a device that negotiates the 500mA output with the host and with the guest but does not pass through any data.
You are right. That's what the spec says. In reality, I've never found a single hub or host that actually does this. They mostly just dump somewhere between 300ma and 700ma right on the wire. The really advanced ones don't crash the all the ports on the whole machine if you short or overdraw a port. Actually, I think my macbook may get it right (i don't plug homemade usb junk into my macbook), but my toshiba I know for certain does not.
You've got a great idea though. A simple micro like a PIC or an arduino (atmel) could do this and get all kinds of neat data on the power flow as well.
See, a blocker and a sniffer would have almost entirely opposite functions. Both are cool devices that could be built from essentially the same hardware, so you do have a point there, but I wouldn't combine the two. Too easy to end up doing the wrong thing and compromising your data.
If your OS allows that, you need a better OS. Seriously, that's practically like having an OS that lets anyone on your LAN just SSH into your machine as root without a password just because they happen to be on the same subnet.
Plugging in your device, with the intent of charging, shouldn't implicitly grant the host the right to install software or access files on the guest.
The USB protocol doesn't seem properly designed for this use case: I should be able to plug in to charge without having to worry about security holes.