Compare commits
2 Commits
feat_packa
...
398e16e724
| Author | SHA1 | Date | |
|---|---|---|---|
| 398e16e724 | |||
| e93346f646 |
82
README.md
82
README.md
@@ -1,40 +1,37 @@
|
|||||||
# gokill
|
# gokill
|
||||||
|
|
||||||
gokill is aimed at activists, journalists and others that need to protect their data against access under all circumstances.
|
|
||||||
gokill falls under the category of anti-forensic tools, helping you to protect yourself against repression.
|
gokill is designed for activists, journalists, and individuals who require robust protection for their data, ensuring it remains inaccessible under any circumstances. It belongs to the category of anti-forensic tools, providing a means to safeguard against potential repression. gokill is a [software dead man's switch](https://en.wikipedia.org/wiki/Dead_man%27s_switch#Software) that empowers users to configure various events. If these events occur, they trigger predefined actions. It is specifically crafted for worst-case scenarios, such as when intruders gain physical access to a device. In these intense situations, gokill automatically performs tasks to enhance your security:
|
||||||
It is built for worst case scenarios when intruders physical gaining access to a device.
|
|
||||||
In such heated situations gokill helps you automatically executing tasks like:
|
|
||||||
- locking the screen
|
- locking the screen
|
||||||
- sending a chat message
|
- sending chat messages
|
||||||
- deleting data
|
- deleting data
|
||||||
- encrypting partitions
|
- encrypting partitions
|
||||||
- destroying encrypted partitions
|
- destroying encrypted partitions
|
||||||
- and many more
|
- ect
|
||||||
|
|
||||||
the tasks gokill executes could be done by hand using shellscripts, cronjobs, daemons ect.
|
## usage
|
||||||
but that means everyone needs to figure it out for themselves, and eventually make mistakes.
|
|
||||||
the idea of gokill is to provide a wide variarity of possibilities out of the box while making sure they are well tested.
|
|
||||||
|
|
||||||
gokill aims to be highly configurable and easily extendable.
|
``` bash
|
||||||
|
# Clone the gokill repository
|
||||||
|
git clone https://github.com/k4lipso/gokill
|
||||||
|
cd gokill
|
||||||
|
|
||||||
'gokill' is a tool that completes some actions when a certain event occurs.
|
# Build gokill
|
||||||
actions can vary from shuting down the machine to sending mails over erasing data.
|
go build github.com/k4lipso/gokill
|
||||||
actions can be triggert by certain conditions like specific outcomes of unix
|
|
||||||
comands or not having internet connection.
|
|
||||||
|
|
||||||
actions and triggers should be easy to extend and handled like plugins. they
|
# Create a config.json and run gokill
|
||||||
also should be self documenting.
|
./gokill -c config.json
|
||||||
every action and trigger should be testable at anytime as a 'dry-run'.
|
```
|
||||||
actions can have a 'stage' defined. the lowest stage is started first,
|
|
||||||
and only when all actions on that stage are finished next stage is triggered
|
|
||||||
|
|
||||||
gokill should run as daemon. config should be read from /etc/somename/config.json
|
|
||||||
|
|
||||||
## Config Example
|
## Config Example
|
||||||
|
|
||||||
|
gokill is configured using a json file. it consists of a list of triggers, where each of the triggers as a list of
|
||||||
|
actions that will be executed once triggered.
|
||||||
|
|
||||||
``` json
|
``` json
|
||||||
[ //list of triggers
|
[ //list of triggers
|
||||||
{
|
{
|
||||||
"type": "UsbDisconnect",
|
"type": "UsbDisconnect", //triggers when the given device is disconnected
|
||||||
"name": "First Trigger",
|
"name": "First Trigger",
|
||||||
"options": {
|
"options": {
|
||||||
"deviceId": "ata-Samsung_SSD_860_EVO_1TB_S4AALKWJDI102",
|
"deviceId": "ata-Samsung_SSD_860_EVO_1TB_S4AALKWJDI102",
|
||||||
@@ -72,7 +69,7 @@ gokill should run as daemon. config should be read from /etc/somename/config.jso
|
|||||||
{
|
{
|
||||||
"name": "unixCommand",
|
"name": "unixCommand",
|
||||||
"options": {
|
"options": {
|
||||||
"command": "env DISPLAY=:0 sudo su -c i3lock someUser"
|
"command": "env DISPLAY=:0 sudo su -c i3lock someUser" //example of locking someUser's screen as root
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -112,25 +109,54 @@ Here is a small example config:
|
|||||||
|
|
||||||
This will automatically configure and enable a systemd running gokill as root user in the background
|
This will automatically configure and enable a systemd running gokill as root user in the background
|
||||||
|
|
||||||
## actions
|
## --
|
||||||
|
|
||||||
|
the tasks gokill executes could be done by hand using shellscripts, cronjobs, daemons ect.
|
||||||
|
but that means everyone needs to figure it out for themselves, and eventually make mistakes.
|
||||||
|
the idea of gokill is to provide a wide variarity of possibilities out of the box while making sure they are well tested
|
||||||
|
and relatively easy to setup.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
actions and triggers should be easy to extend and handled like plugins. they
|
||||||
|
also should be self documenting.
|
||||||
|
every action and trigger should be testable at anytime as a 'dry-run'.
|
||||||
|
actions can have a 'stage' defined. the lowest stage is started first,
|
||||||
|
and only when all actions on that stage are finished next stage is triggered
|
||||||
|
|
||||||
|
gokill should run as daemon. config should be read from /etc/somename/config.json
|
||||||
|
|
||||||
|
|
||||||
|
## todos
|
||||||
|
|
||||||
|
- export snap
|
||||||
|
- export ppa
|
||||||
|
|
||||||
|
### actions
|
||||||
- [x] shutdown
|
- [x] shutdown
|
||||||
- [ ] wipe ram
|
- [ ] wipe ram
|
||||||
- [ ] send mail
|
- [ ] ~~send mail~~
|
||||||
|
- send chat message
|
||||||
|
- [x] telegram
|
||||||
|
- [x] matrix
|
||||||
- [ ] delete data
|
- [ ] delete data
|
||||||
- [ ] shred area
|
- [ ] shred area
|
||||||
- [x] random command
|
- [x] run command
|
||||||
- [ ] wordpress post
|
- [ ] wordpress post
|
||||||
- [ ] ipfs command
|
- [ ] ipfs command
|
||||||
- [ ] [buskill 'triggers'](https://github.com/BusKill/awesome-buskill-triggers)
|
- [buskill 'triggers'](https://github.com/BusKill/awesome-buskill-triggers)
|
||||||
- [x] [lock-screen](https://github.com/BusKill/buskill-linux/tree/master/triggers)
|
- [x] [lock-screen](https://github.com/BusKill/buskill-linux/tree/master/triggers)
|
||||||
- [x] shutdown
|
- [x] shutdown
|
||||||
- [ ] luks header shredder
|
- [ ] luks header shredder
|
||||||
- [ ] veracrypt self-destruct
|
- [ ] veracrypt self-destruct
|
||||||
|
|
||||||
## Triggers
|
### triggers
|
||||||
- [ ] no internet
|
- [ ] no internet
|
||||||
- [x] [pull usb stick](https://github.com/deepakjois/gousbdrivedetector/blob/master/usbdrivedetector_linux.go)
|
- [x] [pull usb stick](https://github.com/deepakjois/gousbdrivedetector/blob/master/usbdrivedetector_linux.go)
|
||||||
- [x] ethernet unplugged
|
- [x] ethernet unplugged
|
||||||
|
- receive specific chat message
|
||||||
|
- [x] telegram
|
||||||
|
- [ ] matrix
|
||||||
- [ ] power adapter disconnected
|
- [ ] power adapter disconnected
|
||||||
- [ ] unix command
|
- [ ] unix command
|
||||||
- anyOf
|
- anyOf
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
|
|
||||||
"type": "Timeout",
|
|
||||||
"name": "example trigger",
|
|
||||||
"options": {
|
|
||||||
"duration": 5
|
|
||||||
},
|
|
||||||
"actions": [
|
|
||||||
{
|
|
||||||
"type": "Print",
|
|
||||||
"options": {
|
|
||||||
"message": "hello world"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
6
flake.lock
generated
6
flake.lock
generated
@@ -2,11 +2,11 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698553279,
|
"lastModified": 1699343069,
|
||||||
"narHash": "sha256-T/9P8yBSLcqo/v+FTOBK+0rjzjPMctVymZydbvR/Fak=",
|
"narHash": "sha256-s7BBhyLA6MI6FuJgs4F/SgpntHBzz40/qV0xLPW6A1Q=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "90e85bc7c1a6fc0760a94ace129d3a1c61c3d035",
|
"rev": "ec750fd01963ab6b20ee1f0cb488754e8036d89d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
62
flake.nix
62
flake.nix
@@ -21,12 +21,10 @@
|
|||||||
gotools
|
gotools
|
||||||
mdbook
|
mdbook
|
||||||
olm
|
olm
|
||||||
|
|
||||||
dpkg
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = rec {
|
packages = {
|
||||||
gokill = pkgs.buildGoModule rec {
|
gokill = pkgs.buildGoModule rec {
|
||||||
pname = "gokill";
|
pname = "gokill";
|
||||||
version = "1.0";
|
version = "1.0";
|
||||||
@@ -38,7 +36,6 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
cp -r ./etc $out/ #for .deb packages
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -57,16 +54,6 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
gokillSnap = pkgs.snapTools.makeSnap {
|
|
||||||
meta = {
|
|
||||||
name = "gokill";
|
|
||||||
summary = "simple but efficient";
|
|
||||||
description = "this should be longer";
|
|
||||||
architectures = [ "amd64" ];
|
|
||||||
confinement = "classic";
|
|
||||||
apps.gokill.command = "${gokill}/bin/gokill";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
docs = pkgs.callPackage (import ./docs/default.nix) { self = self; };
|
docs = pkgs.callPackage (import ./docs/default.nix) { self = self; };
|
||||||
|
|
||||||
@@ -74,52 +61,12 @@
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bundlers.gokillDeb = pkg: pkgs.stdenv.mkDerivation {
|
|
||||||
name = "deb-single-${pkg.name}";
|
|
||||||
buildInputs = [
|
|
||||||
pkgs.fpm
|
|
||||||
];
|
|
||||||
|
|
||||||
unpackPhase = "true";
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
export HOME=$PWD
|
|
||||||
mkdir -p ./nix/store/
|
|
||||||
for item in "$(cat ${pkgs.referencesByPopularity pkg})"
|
|
||||||
do
|
|
||||||
cp -r $item ./nix/store/
|
|
||||||
done
|
|
||||||
|
|
||||||
mkdir -p ./bin
|
|
||||||
cp -r ${pkg}/bin/* ./bin/
|
|
||||||
|
|
||||||
mkdir -p ./etc
|
|
||||||
cp -r ${pkg}/etc/* ./etc/
|
|
||||||
|
|
||||||
chmod -R a+rwx ./nix
|
|
||||||
chmod -R a+rwx ./bin
|
|
||||||
chmod -R a+rwx ./etc
|
|
||||||
fpm -s dir -t deb --name ${pkg.name} nix bin etc
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out
|
|
||||||
cp -r *.deb $out
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
apps = {
|
apps = {
|
||||||
docs = {
|
docs = {
|
||||||
type = "app";
|
type = "app";
|
||||||
program = builtins.toString (pkgs.writeScript "docs" ''
|
program = builtins.toString (pkgs.writeScript "docs" ''
|
||||||
${pkgs.python3}/bin/python3 -m http.server --directory ${self.packages."${system}".docs}/share/doc'');
|
${pkgs.python3}/bin/python3 -m http.server --directory ${self.packages."${system}".docs}/share/doc'');
|
||||||
};
|
};
|
||||||
|
|
||||||
exportDEB = {
|
|
||||||
type = "app";
|
|
||||||
program = builtins.toString (pkgs.writeScript "docs" ''
|
|
||||||
${pkgs.nix}/bin/nix bundle --bundler .#bundlers.${system}.gokillDeb .#packages.${system}.gokill'');
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
})) ({
|
})) ({
|
||||||
@@ -143,6 +90,12 @@
|
|||||||
duration = 10;
|
duration = 10;
|
||||||
};
|
};
|
||||||
actions = [
|
actions = [
|
||||||
|
{
|
||||||
|
type = "Shutdown";
|
||||||
|
options = {
|
||||||
|
};
|
||||||
|
stage = 2;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -150,6 +103,7 @@
|
|||||||
virtualisation.vmVariant.virtualisation.graphics = false;
|
virtualisation.vmVariant.virtualisation.graphics = false;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
nixos.config.system.build.vm;
|
nixos.config.system.build.vm;
|
||||||
|
|||||||
Reference in New Issue
Block a user