USB Wrapper - Page 1
Forum section: electronics / general

author: scasagrande
author_rank: Contributor
timestamp: March 21, 2014, 12:18:03 am
content: Hey everybody, I've got another project of mine to show today.Inspired by the USB Condom, the USB Wrapper helps protect your device against untrusted USB ports by severing the USB data lines and only allowing the power lines to connect through. This ensures that no data information can be transfered between the power source and your device. This helps against known attacks such as juice jacking:http://krebsonsecurity.com/2011/08/beware-of-juice-jacking/] http://krebsonsecurity.com/2011/08/beware-of-juice-jacking/This however does present a problem. In legitimate USB chargers, the data lines are used to communicate to your device how much power they are capable of sourcing. The exact means by which they do vary between manufacturers. The standard calls for the D+ and D- lines to be shorted together, while companies like Apple will apply specific voltages on both lines depending on the charger. By entirely disconnecting these data lines, your device does not know any information about the charger, and will thus assume it is a standard USB2.0 port. This limits means the device will self-limit the charging rate to 2.5W (or not charge at all!), even if the charger can in fact handle more.To deal with this, the USB Wrapper has two slider switches allowing you to tell your device what kind of charger it is connected to. This also allows you to mix and match chargers and device manufacturers which don't follow the same signalling rules. For example, an iPhone with a Samsung charger cube. It features selections for dedicated charger port (D+ & D- shorted), Apple, Sony, and open circuit. For Apple, there are 4 options, 500mA, 1A, 2.1A, and 2.5A.The project is open source hardware and the sources can be found athttps://github.com/Galvant/usb_wrapper-pcbHere is a video I made for the USB Wrapper:As with all my projects, you can find it on my website athttp://galvant.ca/shop/usb-wrapper/. I just graduated from my MSc so your support goes a long way to allow me to keep working on open source hardware full time!As usual, questions/comments/concerns/etc are welcome and appreciated. Thanks!

author: rr100
author_rank: Frequent Contributor
timestamp: March 21, 2014, 03:01:40 pm
content: This is a nice project but in practical terms it has to fit in a connector. The way it is you just can't drop it in any ol' pocket or man-purse and expect it to work day after day. If you add a case (and also that you need one extra cable) you have already something as big as a nice AC adapter.

author: scasagrande
author_rank: Contributor
timestamp: March 21, 2014, 03:35:53 pm
content: I tried to fit a microUSB connector on the device side but the boards from oshpark are just slightly too thick for a board-edge connector. With enough interest I can go with someone else for a thinner PCB.

author: linux-works
author_rank: Super Contributor
timestamp: March 21, 2014, 04:31:42 pm
content: was reading HAD today and saw your project. noticed the name; hey I know that guy!congrats on getting on HAD today. I'll have to see what this wrapper is all about.

author: ConKbot
author_rank: Super Contributor
timestamp: March 21, 2014, 05:06:37 pm
content: I'd put a few high value inductors on the data lines, along with some capacitors to gnd, and some zeners to clamp the line to < 5V in case there are any inductive spikes on connecting/disconnecting. Make a pi- filter with a 1mH inductor (doesnt have to be big, seehttp://www.digikey.com/product-detail/en/LB2518T102K/587-2509-1-ND/2230375) and some 100uF capacitorshttp://www.digikey.com/product-detail/en/C1210C107M9PACTU/399-4697-1-ND/992222and I dont think any actual USB data is going to get though with the filter at 500Hz like that, just DC levels for charger signalling. I dont know enough about the USB standard to be sure though.

author: scasagrande
author_rank: Contributor
timestamp: March 21, 2014, 06:12:42 pm
content: Quote from: linux-works on March 21, 2014, 04:31:42 pmThanks!Quote from: ConKbot on March 21, 2014, 05:06:37 pmI can think of a bunch of improvements I'll make for rev2, this definitely being one of them. If I can do something about a case I might throw a rev2 up on kickstarter!

author: rr100
author_rank: Frequent Contributor
timestamp: March 22, 2014, 07:17:57 am
content: There must be a way to make this somehow "cable contained", is just too big for a bunch of SMD resistors.I have am old Motorola phone, probably one of the first with mini-usb (mini not micro) connector (and J2ME). It would not charge from the PC without some charging drivers!!! However it did charge with the included wall-charger and guess what, there was a small 1/4W normal resistor wired inside the plastic part of the mini-usb connector!!! The phone wouldn't charge with the normal "short the data lines" standard that appeared years later, this was the first thing I checked.Anyway, the point is that you should be able to fit enough inside a USB connector and THAT would be really interesting.

author: scasagrande
author_rank: Contributor
timestamp: March 23, 2014, 03:40:10 pm
content: Quote from: rr100 on March 22, 2014, 07:17:57 amYeah I don't have those sorts of skills. Plus then you'd still need the switches and everything.