News for hackers. Stuff that matters.
Re:CIRCLean – USB key sanitizer by ckastner on Tuesday March 14, 2017 @03:31AM (#13865722)
This seems a bit misleading to me. From README.md:

  This project aims to be useful when you get/find a USB key
  that you can't trust, and you want to look at its contents
  without taking the risk of plugging it into your computer
  directly.
Its method of operation is given as:

  The content of the untrusted key will be copied or/and
  converted to the second (blank) key following these rules
  (based on the mime type as determined by libmagic)
This process does not make the key trustworthy. From the BadUSB intro:

  Once reprogrammed, benign devices can turn malicious in
  many ways, including:

    1. A device can emulate a keyboard and issue commands on
       behalf of the logged-in user [...]

    2. A modified thumb drive or external hard disk
       can [...] boot a small virus, which infects the
       computer’s operating system prior to boot.
Assuming that the first USB stick can infect the second USB stick, CIRClean will not protect you against these attacks.
Re:CIRCLean – USB key sanitizer by leni536 on Tuesday March 14, 2017 @03:56AM (#13865802)
They can mitigate against badUSB by only whitelisting the generic USB mass storage class driver. No keyboard, no mouse, etc... I am not confident they do this though.
Re:CIRCLean – USB key sanitizer by A1kmm on Tuesday March 14, 2017 @05:26AM (#13866135)
Looks like they don't, but they turn off usbhid on that particular port: https://github.com/CIRCL/Circlean/blob/master/circlean_fs/ro...

However, that could be bypassed if the USB key acted like a USB hub with a keyboard attached.

If you do get a keyboard working, it looks like you can just log in with raspberry / raspberry and then full privileged access since sudo from the raspberry user, and /dev/kmem from root is enabled. That would allow arbitrary content to be copied on to the user supplied USB, and depending on the device, possibly firmware reprogramming.

Re:CIRCLean – USB key sanitizer by leni536 on Tuesday March 14, 2017 @05:43AM (#13866185)
Huh, at least it seems that they care about this attach vector. Blacklisting seems to be the wrong approach.
Re:CIRCLean – USB key sanitizer by lucb1e on Tuesday March 14, 2017 @06:06AM (#13866272)
> They can mitigate against badUSB by only whitelisting

I'd say just don't run a graphical environment or, if you do, lock it. With a normal password, good luck to the USB thumb drive that pretends to be a keyboard.

As for booting, well, don't have it in there at boot time.

As for malware in the files itself -- I don't think that's the point of this project. It says "if you don't trust the transport medium (i.e. USB)", it's not about the contents.

Re:CIRCLean – USB key sanitizer by jaclaz on Tuesday March 14, 2017 @04:06AM (#13865843)
But it's the assumption that is in itself inaccurate. Case #1 is about a modified firmware of the USB controller in the USB stick, case #2 assumes that a boot is initiated from the USB stick. What the Circlean thingy does is more similar to an antivirus, it examines the contents (files) on the USB stick filesystem and only copies to the second stick those files of known type, according to the given rules. Whether this is effective against everything is another thing, of course.

Only "plain" files are directly copied, other supported ones are analyzed and converted, some more detiled info is here:

https://github.com/CIRCL/Circlean/blob/master/README.md

The thing is not really "new":

https://news.ycombinator.com/item?id=8216853

Re:CIRCLean – USB key sanitizer by leni536 on Tuesday March 14, 2017 @04:20AM (#13865885)
No, I think the assumption is entirely correct. If you can't trust a USB stick's contents then you probably can't trust its controller itself.

But your OS doesn't have to say "Oh, you are a keyboard? Here, open a terminal and type arbitrary commands." It can say "Sorry, I only talk to USB mass storage class devices."

Re:CIRCLean – USB key sanitizer by jaclaz on Tuesday March 14, 2017 @05:34AM (#13866154)
Yes, this is how I believe the RPi works, we are by now too used to the "automagic" features of the common OS's (and BIOSes/UEFI's), I presume that the same effect could be obtained by using an old DOS machine with (say) the Panasonic driver, or something like that.
Re:CIRCLean – USB key sanitizer by ckastner on Tuesday March 14, 2017 @04:25AM (#13865899)
What about the pre-boot phase, before the OS is loaded?
Re:CIRCLean – USB key sanitizer by leni536 on Tuesday March 14, 2017 @04:38AM (#13865951)
1. You can avoid inserting anything before the OS boots up.

2. You can disable booting from USB in the BIOS. However I think you can't disable keyboards there, so a badUSB device can potentially enter the bios, enable USB booting then infect the machine by booting into the virus. Disabling USB booting and setting a strong BIOS password can be safe, I would still prefer the first option though.

Re:CIRCLean – USB key sanitizer by Piskvorrr on Tuesday March 14, 2017 @05:20AM (#13866109)
Circlean seems to run on RPi - that won't boot off USB by default. In fact, you have to jump through extra hoops to get a similar effect, such as "bootloader runs from SD card, then explicitly switches to USB". So unless the makers of this have deliberately implemented this vulnerability, it's not there.
Re:CIRCLean – USB key sanitizer by ckastner on Tuesday March 14, 2017 @05:05AM (#13866052)
Agreed, but in this specific case, CIRCLean depends on the keys being inserted before boot (see steps 2 - 4).
Re:CIRCLean – USB key sanitizer by leni536 on Tuesday March 14, 2017 @05:15AM (#13866090)
Oh, you are right, this can be bad. But I doubt that CIRCLean does any of the badUSB mitigations. They could fix all of these including the instructions. But that they copy unrecognised binaries ("Octet-stream" in their readme) without marking them dangerous is the most worrisome for me [1]. It seems to be useful only for office documents.

[1] https://github.com/CIRCL/Circlean

Re:CIRCLean – USB key sanitizer by SteveClement on Tuesday March 14, 2017 @05:46AM (#13866195)
> They could fix all of these including the instructions.

Where "They" could be anyones pull-request

Re:CIRCLean – USB key sanitizer by ckastner on Tuesday March 14, 2017 @04:23AM (#13865892)
> What the Circlean thingy does is more similar to an antivirus

This is also how I would characterize it.

> Whether this is effective against everything is another thing, of course.

The homepage states:

  In the worst case, only the CIRCLean would be compromised,
  but not the computer reading the target (trusted) USB
  key/stick.
which (at least to me) seems to imply complete effectiveness, which is what irks me.
Re:CIRCLean – USB key sanitizer by JohnStrange on Tuesday March 14, 2017 @05:17AM (#13866093)
Not necessarily, it should be possible to do this correctly, although I doubt this specific device does so. The device itself needs to be hardened against USB attacks, otherwise it would be pointless, of course. Then it copies the contents of the malicious USB stick into a buffer storage, analyses the buffer and cleans up the documents on it, and then it unmounts the first device, mounts the second device and copies the contents of the buffer to it.

If it also allows for write-protection, then it might be interesting for forensic work. (AFAIK, USB write protectors cost a few hundred bucks, and maybe this device is the cost range.)

The crucial question is, of course, how well the device is hardened against targeted attacks. Just using some seemingly secure Linux won't suffice.

Re:CIRCLean – USB key sanitizer by _pmf_ on Tuesday March 14, 2017 @04:32AM (#13865930)
Keep in mind that it is completely feasible for the µC to activate malicious payloads only after the n-th usage. Kind of like a PS3 exploit worked, albeit not on the descriptor layer, but the MSC layer.
Re:CIRCLean – USB key sanitizer by sathackr on Tuesday March 14, 2017 @11:31AM (#13868305)
> In the worst case, only the CIRCLean would be compromised, but not the computer reading the target (trusted) USB key/stick.

If the CIRClean device is compromised, I don't see how the trusted USB stick, which is connected to the now compromised CIRClean, can be guaranteed to not be infected.

Re:CIRCLean – USB key sanitizer by trqx on Tuesday March 14, 2017 @04:53AM (#13866009)
How about sharing the output via WiFi / Bluetooth?

That seems quite risky tho, once the device is infected, that would be like washing all your dishes with the toilet sponge.

What is the goal of having to reboot at each cycle?

Re:CIRCLean – USB key sanitizer by striking on Tuesday March 14, 2017 @10:12AM (#13867606)
To guarantee, in theory, that there isn't any contamination between two different flash drives.

But in practice, I'm pretty sure that with the right privileges you could just write to the SD card...

Re:CIRCLean – USB key sanitizer by mbreese on Tuesday March 14, 2017 @10:29AM (#13867717)
Isn't there also a physical switch on the SD card to mark it as write-protected? I'm sure that could be bypassed, but it would make it more difficult to hide the contamination.
Re:CIRCLean – USB key sanitizer by XorNot on Tuesday March 14, 2017 @10:41AM (#13867824)
The physical switch is entirely software implemented.
Re:CIRCLean – USB key sanitizer by undersuit on Tuesday March 14, 2017 @12:26PM (#13868895)
Also for Raspberry Pis the connection pin the switch relies on is un-wired.
Re:CIRCLean – USB key sanitizer by fluxsauce on Tuesday March 14, 2017 @03:22AM (#13865686)
> The code runs on a Raspberry Pi (a small hardware device), which also means it is not required to plug the original USB key into a computer.

This may be splitting hairs, but a Raspberry Pi is a computer. From https://www.raspberrypi.org/

> The Raspberry Pi is a tiny and affordable computer that you can use to learn programming through fun, practical projects.

The actual project page - https://github.com/CIRCL/Circlean

Re:CIRCLean – USB key sanitizer by partycoder on Tuesday March 14, 2017 @04:00AM (#13865816)
Not all USB keys can be sanitized. e.g: USB Killer
Re:CIRCLean – USB key sanitizer by flipp3r on Tuesday March 14, 2017 @04:18AM (#13865873)
Though it's probably cheaper/better to destroy a CIRCLean than to destroy something else
Re:CIRCLean – USB key sanitizer by leni536 on Tuesday March 14, 2017 @04:18AM (#13865875)
One can carefully short its terminals first then pry open the enclosure. Too much capacitors is a no-no.
Re:CIRCLean – USB key sanitizer by JulianMorrison on Tuesday March 14, 2017 @06:13AM (#13866300)
What even is the use case for USB sticks these days? Compared to just putting the files in Dropbox.

If I found a USB stick, I would just bin it.

Re:CIRCLean – USB key sanitizer by adrianN on Tuesday March 14, 2017 @09:14AM (#13867215)
I can buy a USB stick with 32 gigs of memory for a couple of Euros and fill it in minutes. My friends can read the stick in minutes, without having to install software.
Re:CIRCLean – USB key sanitizer by onirom on Tuesday March 14, 2017 @08:01AM (#13866748)
Owning your data and not letting any third parties its access
Re:CIRCLean – USB key sanitizer by DanBC on Tuesday March 14, 2017 @06:59AM (#13866465)
Not everyone has decent Internet connectivity.

You can dump a bunch of films and tv shows on a USB stick and use that with a cheap laptop for travelling.

Re:CIRCLean – USB key sanitizer by aymenim on Tuesday March 14, 2017 @09:14AM (#13867209)
>plug a headset and listen to the music that is played during the conversion. When the music stops, the conversion is finished.

Bad UX but I guess it works,

I would have preferred an LED, on the Raspberry Pi GPIO ports to indicate ready, processing and finished.

Re:CIRCLean – USB key sanitizer by sleepychu on Tuesday March 14, 2017 @10:01AM (#13867511)
> If you have a Raspberry Pi with a diode, wait until the blinking stops