A ‘USB Condom’ has been invented by an American engineer to protect mobile devices from being infected with malware and viruses.

The digital prophylactic has already sold out on the inventor’s website, where the product blurb cheerful advises customers that “If you're going to run around plugging your phone into strange USB ports, at least be safe about it.”

The condom is a response to fears over ‘Juice Jacking’ and other hacking methods that use your phone’s USB port as a point of entry for malicious software.

Download the new Independent Premium app Sharing the full story, not just the headlines

Several techniques of this sort were demonstrated at hacker conference Black Hat earlier this year, with researchers from the Georgia Institute of Technology showing off a counterfeit Apple charger capable of compromising any iOS device.

The charger, called ‘Mactans’, looks identical to an authentic Apple product and hides malicious software from the victim “in the same way Apple hides its own built-in applications.”

Another method of attack is ‘Juice Jacking’, which takes advantage of the rise of public charging stations at places like airports and train stations. These may be a blessed relief for the traveller whose phone has lost its battery and who needs to check train times or emails, but the travellers’ need makes them an easy target.

Most phones are configured to go into data transfer mode once a USB cable is connected, and hackers can take advantage of this, setting up fake charging stations to siphon off unsuspecting individuals’ data.

The USB Condom prevents against these sort of attacks by blocking the USB connectors data pins (used to transfer information on and off the phone) but leaving the power pins free (these are the ones that do the actual charging).