#filesystem-integirty #file-integrity #usb-device #change-detection

app 陷阱程序

检测并对来自任何来源的任何类型的未授权访问进行操作

3 个版本

0.1.3 2024 年 5 月 7 日
0.1.2 2024 年 5 月 7 日
0.1.0 2024 年 5 月 6 日

#15 in #usb-device

每月 39 次下载

MIT 许可证

34KB
792

陷阱程序

(进行中)

检测并对来自任何来源的任何类型的未授权访问进行操作

检测和操作;

- an increase of USB devices
- network issues or network failure
- filesystem changes
- ssh "burn file"

观测内存使用 <100MB 到 ~1GB

安装

$ sudo bash -e install.sh
or
$ cargo install boobytrap

设置

创建 config/Settings.toml

## General settings
tick_delay_seconds = "5"
fs_tick_delay_seconds = "60"

### File System Integrity
fs_mon_enabled = "true"
fs_mon_dir = ["/etc", "/bin", "$PATH"]
fs_mon_hash_type = "blake3"

### USB Monitor
usb_mon_enabled = "true"
reboot_on_increase_of_usb_devices = "false"
notify_on_increase_of_usb_devices = "true"
unmount_crypt_on_increase_of_usb_devices = "true"

### Burn File Monitor
burn_file_mon_enabled = "false"
unmount_crypt_on_file_burn = "true"
ssh_check_burn_host = "hostname"
ssh_check_burn_user = "root"
ssh_check_burn_key = "/home/user/.ssh/id_rsa"
ssh_check_burn_path = "/root/.cache/burn"
ssh_check_burn_check_interval = "30"
burn_path_1 = "/root/test/"

### Network Monitor
net_mon_enabled = "false"

######## Notification settings
discord_webhook_url = "https://discord.com/api/webhooks/"
discord_webhook_avatar_name = "Lazarus"

开发和协作

请随意提交拉取请求,请在提交前运行以下命令!

echo "Run clippy"; cargo clippy -- -D clippy::all
echo "Format source code"; cargo fmt -- --check

依赖

~13–25MB
~386K SLoC