SwiftGuard
Anti-forensic macOS tray application designed to safeguard your system by monitoring USB ports.
Install / Use
/learn @Lennolium/SwiftGuardREADME
Contents
- Features
- Screenshots
- Why should you care?
- Installation
- Usage
- Development
- Roadmap
- Security & Code Quality
- Contributors
- Credits
- License
<!--- Features -->
Features
- Monitoring: Continuously monitors USB ports for device activity, even in sleep mode.
- Whitelisting: Allows users to whitelist authorized devices, ensuring hassle-free connectivity.
- Discrete: Operates in the macOS system tray, minimizing interruptions.
- Customizable: Allows users to configure various settings, including action (shutdown/hibernate), countdown timer and auto start.
- Lightweight: Designed to consume minimal system resources for optimal performance.
- Privacy: Only connects to the internet to check for updates at startup.
- Open Source: Provides transparency and allows community contributions for continuous development.
<!--- Screenshots -->
Screenshots
<div align="center"> <picture> <source srcset="./img/screenshots/screenshots.png" width="600vw"> <img alt="Application Screenshots" src="./img/screenshots/screenshots.png" width="600vw"> </picture>Left: Manipulation button to defuse the alarm. Right: Whitelist and Settings menu.
</div> <br><!--- Why -->
Why should you care?
A few reasons to use this tool:
- Anti-Forensic Measures: In case the police or other thugs break in. The police often use a mouse jiggler to prevent the screen saver or sleep mode from being activated.
- Prevent Data Exfiltration: You do not want someone adding or copying documents to or from your computer via USB.
- Public Environments: If you frequently use your Mac in public places like libraries or cafés, swiftGuard acts as an additional layer of security against physical attacks in a potentially vulnerable setting.
- Server Protection: You want to improve the security of your home or company server (e.g. your Raspberry Pi, NAS, etc.).
- Data Protection Regulations: Many industries and organizations are subject to strict data protection regulations. swiftGuard helps maintain compliance by preventing unauthorized data transfers and access through USB ports.
Tip: You might also want to use a cord to attach a USB key to your wrist. Then plug the key into your computer and run swiftGuard. If your computer is robbed, the USB is removed and the computer shuts down immediately.
<!--- Installation -->
Installation
- Obtain the most recent version by downloading it from Releases tab (Apple Silicon M1/M2/M3/M4:
swiftGuard_arm64.dmg, Intel:swiftGuard.dmg). - Open the downloaded
swiftGuard.dmgfile. - Drag the swiftGuard application into the Applications folder.
- Open the swiftGuard application from the Applications folder (by right-clicking and selecting
Open, see Note below) - swiftGuard should now appear in the macOS system tray.
- Test at least once if the shutdown or hibernation is executed correctly. On first run you will be asked to grant the necessary permissions by macOS.
- Automatic startup at login can be enabled in the app's settings menu.
Important: Make sure you use FileVault, macOS's built-in disk encryption feature, to encrypt your entire disk, ensuring that your data remains secure even if your device falls into the wrong hands. Otherwise, unauthorized users may gain access to your data easily:
System Preferences > Security & Privacy > Security > FileVault> Do NOT enable iCloud Recovery!
Note: If you get a warning that the application is from an unidentified developer, you have to open
System Preferences > Security & Privacy > Securityand clickOpen Anywayto allow the application to run.
See INSTALL.md for further details and instructions if you are upgrading from an older version.
<!--- Usage -->Usage
GUI
- Open the swiftGuard application from the Applications folder.
- Click on the application icon in the macOS system tray to open the main menu.
- Click the
Guarding/Inactiveentry to start or pause the guarding of your USB ports. - The
Devicesmenu displays all allowed and connected devices. Allowed devices are indicated with a checkmark, even if they are not connected. - To add or remove a device from the whitelist, simply click on the corresponding device entry.
- If manipulation is detected, an alert (
Manipulation) will appear in the main menu. Clicking on it will reset the alarm. TheExitbutton will not work. - In the
Settingsmenu you can set a delay (0 - 60 seconds) and an action (ShutdownorHibernate). The delay determines how long swiftGuard will wait for you to reset/defuse the alarm before executing the action.
Notes:
- swiftGuard alerts you if devices are removed that were connected before or while the application was started, except you add them to the whitelist.
- Connecting new devices will always trigger an alert, if these devices are not whitelisted.
- If you encounter any problems, please check the log file in the
~/Library/Logs/swiftGuardfolder.- Your settings and whitelisted devices are stored in the
~/Library/Preferences/swiftGuard/swiftguard.inifile.
CLI
You can run swiftGuard as a simple Python script from the command line without a graphical user interface (GUI). This is useful when operating swiftGuard on a headless system or saving system resources. However, you will lose the ability to defuse the shutdown process via the GUI, but you can kill the swiftGuard process from the command line instead. The preferences and whitelists are stored in the same location as the GUI version and can be edited manually. For further information, please refer to the src/swiftguard/cli.py file.
-
Open a terminal and navigate to the desired install directory.
cd ~/Desktop -
Clone the repository.
git clone https://github.com/Lennolium/swiftGuard.git -
Navigate to the swiftGuard directory.
cd swiftGuard -
Create a virtual environment and activate it.
python3 -m venv venv source venv/bin/activate pip install poetry -
Install
poetryin the venv.pip install poetry -
Install
swiftguardin development mode.poetry installThis installs swiftguard and its python packages in the vir
Related Skills
healthcheck
334.1kHost security hardening and risk-tolerance configuration for OpenClaw deployments
tmux
334.1kRemote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
prose
334.1kOpenProse VM skill pack. Activate on any `prose` command, .prose files, or OpenProse mentions; orchestrates multi-agent workflows.
Writing Hookify Rules
82.1kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
