Author Topic: USB Wrapper  (Read 5545 times)

0 Members and 1 Guest are viewing this topic.

Offline scasagrande

  • Contributor
  • Posts: 45
  • Country: ca
    • My Blog
USB Wrapper
« on: March 21, 2014, 12:18:03 am »
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/] [url]http://krebsonsecurity.com/2011/08/beware-of-juice-jacking/[/url]

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 at https://github.com/Galvant/usb_wrapper-pcb

Here is a video I made for the USB Wrapper:


As with all my projects, you can find it on my website at http://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!
 

Offline rr100

  • Frequent Contributor
  • **
  • Posts: 339
Re: USB Wrapper
« Reply #1 on: March 21, 2014, 03:01:40 pm »
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.
 

Offline scasagrande

  • Contributor
  • Posts: 45
  • Country: ca
    • My Blog
Re: USB Wrapper
« Reply #2 on: March 21, 2014, 03:35:53 pm »
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.
 

Offline linux-works

  • Super Contributor
  • ***
  • Posts: 1945
  • Country: us
    • netstuff
Re: USB Wrapper
« Reply #3 on: March 21, 2014, 04:31:42 pm »
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.

 

Offline ConKbot

  • Super Contributor
  • ***
  • Posts: 1167
Re: USB Wrapper
« Reply #4 on: March 21, 2014, 05:06:37 pm »
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, see http://www.digikey.com/product-detail/en/LB2518T102K/587-2509-1-ND/2230375 ) and some 100uF capacitors http://www.digikey.com/product-detail/en/C1210C107M9PACTU/399-4697-1-ND/992222 and 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.
« Last Edit: March 21, 2014, 06:11:00 pm by ConKbot »
 

Offline scasagrande

  • Contributor
  • Posts: 45
  • Country: ca
    • My Blog
Re: USB Wrapper
« Reply #5 on: March 21, 2014, 06:12:42 pm »
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.

Thanks! :D

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, see http://www.digikey.com/product-detail/en/LB2518T102K/587-2509-1-ND/2230375 ) and some 100uF capacitors http://www.digikey.com/product-detail/en/C1210C107M9PACTU/399-4697-1-ND/992222 and 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.

I 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!
 

Offline rr100

  • Frequent Contributor
  • **
  • Posts: 339
Re: USB Wrapper
« Reply #6 on: March 22, 2014, 07:17:57 am »
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.
 

Offline scasagrande

  • Contributor
  • Posts: 45
  • Country: ca
    • My Blog
Re: USB Wrapper
« Reply #7 on: March 23, 2014, 03:40:10 pm »
Anyway, the point is that you should be able to fit enough inside a USB connector and THAT would be really interesting.

Yeah I don't have those sorts of skills. Plus then you'd still need the switches and everything.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf