Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile, Man-pages and some cleaning #68

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Sabri 'pwnsdx' Haddouche <[email protected]>
David 'deekayen' Norman <[email protected]>
Tobin 'Brobin' Brown <[email protected]>
Nadav 'nadavge' Geva <>
Raúl 'rsrdesarrollo' Sampedro <[email protected]>
Mads 'MadsRC' Christensen <[email protected]>
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
PREFIX = /usr/local
BINPREFIX = $(PREFIX)/bin
MANPREFIX = /usr/share/man
ETCPREFIX = $(PREFIX)/etc/usbkill

install:
cp usbkill.py $(BINPREFIX)/usbkill.py
mkdir -p $(ETCPREFIX)
cp settings.ini $(ETCPREFIX)/settings.ini
cp doc/man1/usbkill.1 $(MANPREFIX)/man1/
cp doc/man5/usbkill-settings.ini.5 $(MANPREFIX)/man5/

uninstall:
rm -rf $(BINPREFIX)/usbkill.py
rm -rf $(ETCPREFIX)
rm -rf $(MANPREFIX)/man1/usbkill.1
rm -rf $(MANPREFIX)/man/usbkill-settings.ini.5
110 changes: 110 additions & 0 deletions doc/man1/usbkill.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
.TH usbkill 1 "1.0-rc.3 (June 2014)" "usbkill" "usbkill manual"

.SH NAME
usbkill - anti-forensic kill-switch
.SH SYNOPSIS
.B usbkill
.I "[OPTION]"
.SH DESCRIPTION
usbkill is an anti-forensic kill-switch that waits for a change on your
USB ports and then immediately shuts down your computer.

Some reasons to use this tool:

* In case the police or other thugs come busting in (or steal your laptop
from you when you are at a public library as happened to Ross). The police
commonly uses a « mouse jiggler » to keep the screensaver and sleep mode
from activating.
.P
* You don’t want someone to retrieve documents (such as private keys) from
your computer or install malware/backdoors via USB.
.P
* You want to improve the security of your (Full Disk Encrypted) home or
corporate server (e.g. Your Raspberry).
.P
.B "[!] Important:"
Make sure to use (partial) disk encryption! Otherwise they will get in
anyway.

.B "Tip:"
Additionally, you may use a cord to attach a USB key to your
wrist. Then insert the key into your computer and start
.I usbkill.
If they steal your computer, the USB will be removed and the computer
shuts down immediately.

.SS Feature List
* Compatible with Linux, *BSD and OS X.
.P
* Shutdown the computer when there is USB activity.
.P
* Customizable. Define which commands should be executed just before shut
down.
.P
* Ability to whitelist a USB device.
.P
* Ability to change the check interval (default: 250ms).
.P
* Ability to melt the program on shut down.
.P
* Works with sleep mode (OS X).
.P
* No dependency except srm iff you want
.I usbkill
to delete files/folders
for you.
.P
* Sensible defaults.

.SH OPTIONS

.TP
\f3-h --help\f1
Show help message, exit.
.TP
\f3--version\f1
Show version of the program, exit.
.TP
\f3--no-shut-down\f1
If a malicious change on the USB ports is detected,
execute all the (destructive) commands you defined in settings.ini,
but don’t turn off the computer.
.TP
\f3--cs\f1
Copy program folder settings.ini to /etc/usbkill/settings.ini.

.SH PLATFORMS
.TP
.I usbkill
is known to work on Linux, *BSD and OSX.

.SH FILES
.TP
.IP "/usr/local/etc/usbkill/settings.ini"
Configuration file for
.I usbkill.
Use this to define log file placement, device whitelist etc.

.SH BUGS
.TP
None that we know of.

.SH AUTHORS
.I usbkill
was written by
.B hephaest0s <[email protected]>.
See file
.I AUTHORS
for a list of people contributing to this project.
.P
The
.I git
repository of
.I usbkill
can be found at
.BI https://github.com/hephaest0s/usbkill
.P
This manual page was written by Mads 'MadsRC' Christensen <[email protected]>.

.SH SEE ALSO
.BR usbkill-settings.ini (5)
116 changes: 116 additions & 0 deletions doc/man5/usbkill-settings.ini.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
.TH usbkill-settings-ini 5 "1.0-rc.3 (June 2014)" "settings.ini" "usbkill manual"
.SH NAME
settings.ini - usbkill configuration file
.SH SYNOPSIS
.B /usr/local/etc/usbkill/settings.ini
.SH DESCRIPTION
.I usbkill(1)
reads configuration data from
.B /usr/local/etc/settings.ini
.P
The possible settings, case-sensitive, are:
.SS whitelist = []
Whitelist command lists the USB ids that you want whitelisted. How to get
the correct usbid for your trusted USB device?
.P
.B BSD/Linux
.P
run "lsusb", the usbid will looks like this:
.B 0123:9abc
.P
.B Mac OS X
.P
run "system_profiler SPUSBDataType" in the terminal and find the
Vendor/Product ID, it will looks like this:
.P
> Product ID: 0x8403
.P
> Vendor ID: 0x05ac (Apple Inc.)
.P
Take the 4 characters after the 0x and merge them (Vendor ID first), it
will look like:
.B 05ac:8403
.P
Other parties can copy your trusted usbid to another usb device!
Use whitelist command and single space separation as follows:
.P
.B whitelist = ["4c2a:d2b0", "0b2d:a2c4"]
.P
To allow multiple (2 and 4) USBs with same id:
[("4c2a:d2b0":2), ("0b2d:a2c4":4)]

.SS sleep = 0.25
Allow for a certain amount of sleep time between checks, e.g. 0.25 seconds

.SS double_usbid_detection = True
Perform USB id copy detection?
This option does not work on all platforms, and can therefore be turned
off.

.SS log_file = /var/log/usbkill/usbkill.log
Log file location

.SS melt_usbkill = False
Remove log (folder) and settings (folder) and usbkill program (folder)
upon kill?
This might be usefull if you only encrypt portions of your disk (home
folder or volumes).
Make sure to sync the system (using do_sync=True) if this is a critical
feature for you.
(True/False)

.SS remove_file_command = srm
use srm to remove files.
try srm --help or [x] to see what options are available
[x] http://srm.sourceforge.net/srm.html
Example: remove_file_command = srm -zlf

.SS files_to_remove = []
What files should be removed upon a kill?
Provide absolute paths to the files (paths that start with '/' or '~').
Use " not ' to define the strings, e.g.:
files_to_remove = ["~/Desktop/contacts.txt",
"~/Desktop/dpr_journal.txt"]

.SS folders_to_remove = [ ]
What folders should be removed upon a kill?
Provide absolute paths to the files (paths that start with '/' or '~').
Content in folders will be removed recursively
Use " not ' to define the strings, e.g.:
folders_to_remove = ["~/Desktop/sensitive/",
"~/Desktop/dpr_journal_entries/"]

.SS do_sync = True
Should usbkill sync the file system for you?
This should not be a problem on most computers.
Sync will save some of your work to disk before killing your computer.

.SS kill_commands = [ ]
Custom kill commands that can not be specified using above described
mechanisms.
This is where you want to release volumes, etc.
These commands will run in order and as root, as the last commands.
Sync should be activated once more if you want to sync
Use " not ' to define the strings, e.g.:
kill_commands = [ "bash ~/scripts/destroy.sh", "sync" ]

.SH FILES
.B /usr/local/etc/usbkill/settings.ini

.SH AUTHORS
.I usbkill
was written by
.B hephaest0s <[email protected]>.
See file
.B AUTHORS
for a list of people
contributing to this project.

The git repository of usbkill can be found at
.I https://github.com/hephaest0s/usbkill

This manual page was written by Mads 'MadsRC' Christensen <[email protected]>

.SH SEE ALSO
.B usbkill(1)

Loading