2025-04-17 19:57:14 +02:00
# PandoraBox
2022-06-11 16:26:40 +02:00
2025-04-17 19:57:14 +02:00
PandoraBox is a USB scanning station designed to detect and remove malware from USB disks. It is based on [Pandora ](https://github.com/pandora-analysis ) by [CIRCL ](https://www.circl.lu ) and is distributed under the [GPLv3 license ](https://www.gnu.org/licenses/licenses.html ).
2023-03-08 09:46:21 +01:00
2025-04-17 19:57:14 +02:00
## Key Features
2023-03-08 09:46:21 +01:00
2025-04-17 19:57:14 +02:00
- Detects USB insertion/removal in real time
- Automatically or manually mounts USB devices
2025-04-18 12:21:07 +02:00
- Multithreaded scanning using [pypandora ](https://github.com/pandora-analysis/pypandora )
2025-04-17 19:57:14 +02:00
- Automatic quarantine of infected files
- Manual file removal after user confirmation
- Interactive terminal interface (curses) or graphical feedback using images
- Uses well-known malware detection tools:
- [ClamAV ](http://www.clamav.net/ )
- [Comodo Antivirus ](https://antivirus.comodo.com/ )
- [Hashlookup ](https://circl.lu/services/hashlookup/ )
- [Yara Rules ](https://github.com/Neo23x0/signature-base )
2023-03-08 09:46:21 +01:00
2025-04-17 19:57:14 +02:00
Other malware detection tools can be configured using [Pandora antivirus-workers ](https://github.com/pandora-analysis/pandora#antivirus-workers ).
2023-03-08 08:59:53 +01:00
2022-07-06 22:37:19 +02:00
## Interface
2025-04-17 19:57:14 +02:00
PandoraBox supports:
### Graphical Feedback
2022-07-06 22:14:51 +02:00
2022-07-25 01:04:59 +02:00
[<img src="images/key1.png" width="400"> ](images/key1.png )
[<img src="images/wait1.png" width="400"> ](images/wait1.png )
[<img src="images/ok.png" width="400"> ](images/ok.png )
[<img src="images/bad.png" width="400"> ](images/bad.png )
2022-07-06 22:14:51 +02:00
2025-04-17 19:57:14 +02:00
### Text Interface (Advanced Users)
2022-07-06 22:14:51 +02:00
2022-07-06 23:50:13 +02:00
[<img src="images/pandora-curses.png" width="400"> ](images/pandora-curses.png )
2022-07-06 22:14:51 +02:00
2025-04-17 19:57:14 +02:00
## Installation
PandoraBox runs on [Ubuntu 24.04 server LTS ](https://ubuntu.com/download/server ).
### Dependencies
- Python 3.8+
- Python modules: `psutil` , `pyudev` , `pypandora` , `curses` , `logging` , `subprocess`
Install dependencies:
```bash
pip install psutil pyudev pypandora
```
### Configuration
Edit `pandora-box.ini` at the root of the project:
```ini
[DEFAULT]
2025-04-22 11:43:00 +02:00
; Curses mode (full text)
CURSES = False
; Set USB_AUTO_MOUNT to True is if the OS automaticaly mount USB keys
USB_AUTO_MOUNT = False
; Set PANDORA_ROOT_URL to the URL of the Pandora server
; the default value is "http://127.0.0.1:6100"
PANDORA_ROOT_URL = http://127.0.0.1:6100
; Set FAKE_SCAN to true to fake the scan process (used during developement only)
FAKE_SCAN = False
; Set to true to copy infected files to the quarantine folder
; in the USB scanning station
QUARANTINE = True
; Set quarantine folder
2025-04-17 19:57:14 +02:00
QUARANTINE_FOLDER = /var/quarantine
2025-04-22 11:43:00 +02:00
; Number of threads used by Pandora
THREADS = 8
; Max File Size (1G)
MAX_FILE_SIZE = 1080000000
2025-04-17 19:57:14 +02:00
```
### Setup & Usage
More details in the [installation guide ](INSTALL.md ).
## Application States
- `START` : Initialization and config loading
- `WAIT` : Wait for USB insertion
- `SCAN` : Scan device contents
- `CLEAN` : Prompt for infected file removal
- `STOP` : Application ends or error
2022-07-06 22:42:14 +02:00
## Roadmap
2025-04-17 19:57:14 +02:00
If you'd like to contribute, check the [roadmap ](ROADMAP.md ).
2022-07-06 22:42:14 +02:00
2025-04-17 19:57:14 +02:00
## Architecture
PandoraBox is implemented as a Python class (`PandoraBox` ) which handles:
- Configuration parsing
- Device detection with `pyudev`
- File scanning using `pypandora`
- Logging and progress tracking
- Interactive interface handling
## Security and Customization
- Uses a system lock to prevent multiple instances
- Can be integrated with additional tools or security measures
- Easily extendable to new malware detection engines or logging systems
## Author
2022-07-06 22:37:19 +02:00
2025-04-17 19:57:14 +02:00
- Didier Barzin — [@dbarzin ](https://github.com/dbarzin )
2022-07-06 22:37:19 +02:00
## License
2025-04-17 19:57:14 +02:00
PandoraBox is open source software released under the [GPLv3 license ](https://www.gnu.org/licenses/licenses.html ).