# Usbsas | Tool And Framework For Securely Reading Untrusted USB Mass Storage Devices

**URL:** <https://onehack.st/t/usbsas-tool-and-framework-for-securely-reading-untrusted-usb-mass-storage-devices/227471>\
**Category:** Tools & Scripts\
**Tags:** tools, file-management\
**Created:** [October 25, 2022, 9:07pm UTC](https://onehack.st/t/usbsas-tool-and-framework-for-securely-reading-untrusted-usb-mass-storage-devices/227471 "2022-10-25T21:07:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BlueHacker](https://onehack.st/user_avatar/onehack.st/bluehacker/32/174721_2.png) [@BlueHacker](https://onehack.st/u/BlueHacker)\
**Post date:** [October 25, 2022, 9:07pm UTC](https://onehack.st/t/usbsas-tool-and-framework-for-securely-reading-untrusted-usb-mass-storage-devices/227471/1 "2022-10-25T21:07:58Z")

</div>

[![](https://github.com/cea-sec/usbsas/raw/main/doc/usbsas-logo.svg)](https://github.com/cea-sec/usbsas/blob/main/doc/usbsas-logo.svg)

usbsas is a free and open source (GPLv3) tool and framework for securely reading untrusted USB mass storage devices.

## Description

Following the concept of defense in depth and the principle of least privilege, usbsas’s goal is to reduce the attack surface of the USB stack. To achieve this, most of the USB related tasks (parsing USB packets, SCSI commands, file systems etc.) usually executed in (privileged) kernel space has been moved to user space and separated in different processes (microkernel style), each being executed in its own restricted [secure computing mode](https://en.wikipedia.org/wiki/Seccomp).

The main purpose of this project is to be deployed as a kiosk / [sheep dip](https://en.wikipedia.org/wiki/Sheep_dip_(computing)) station to securely transfer files from an untrusted USB device to a trusted one.

It works on GNU/Linux and is written in Rust.

## Features

usbsas can:

- read files from an untrusted USB device (without using kernel modules like `uas`, `usb_storage` and the file system ones). Supported file systems are `FAT`, `exFat`, `ext4`, `NTFS` and `ISO9660`
- analyze files with a remote antivirus
- copy files on a new file system to a trusted USB device. Supported file systems are `FAT`, `exFAT` and `NTFS`
- upload files to a remote server
- make an image of a USB device
- wipe a USB device

## Applications

Applications built on top of usbsas:

- **Web client / server** : This is the main application of usbsas, for deploying a secure USB to USB file transfer kiosk.
- **[Fuse](https://en.wikipedia.org/wiki/Filesystem_in_Userspace) implementation**: mount USB devices (read-only) with usbsas.
- **Python** : usbsas can also be used with Python, a script that copies everything from a device to another is given as example.

## Documentation

- [Architecture and technical](https://github.com/cea-sec/usbsas/blob/main/doc/architecture.md) documentation
- [Build and usage](https://github.com/cea-sec/usbsas/blob/main/doc/build_usage.md) documentation
- [Kiosk deployment](https://github.com/cea-sec/usbsas/blob/main/doc/kiosk.md) documentation
- [Live ISO](https://github.com/cea-sec/usbsas/blob/main/doc/live-iso.md) documentation
- Developer documentation can be generated with `$ cargo doc`

## Contributing

Any contribution is welcome, be it code, bug report, packaging, documentation or translation.

## License

Dependencies included in this project:

- `ntfs3g` is GPLv2 (see ntfs3g/src/ntfs-3g/COPYING).
- `FatFs` has a custom BSD-style license (see ff/src/ff/LICENSE.txt)
- `fontawesome` is CC BY 4.0 (icons), SIL OFL 1.1 (fonts) and MIT (code) (see client/web/static/fontawesome/LICENSE.txt)
- `bootstrap` is MIT (see client/web/static/bs/LICENSE)
- `Lato` font is SIL OFL 1.1 (see client/web/static/fonts/LICENSE.txt)

usbsas is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

usbsas is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License [along with usbsas](https://github.com/cea-sec/usbsas/blob/main/LICENSE). If not, see [the gnu.org web site](http://www.gnu.org/licenses/).

## GitHub:

[https://github.com/cea-sec/usbsas](https://github.com/cea-sec/usbsas)
