@ -15,16 +15,14 @@ Please look at the go code, etc...
- Boot into some form of Recovery Mode:
- Boot into a Linux Live USB disk.
- Then mount your hard drive, open the folder to etc, right click and open in new Terminal.
- From the etc folder...
- change directory to systemd/system.
- Make sure that --init is turned on...
- Once recovered and loaded all normal programs, so they are added to the allowed system Database, you may remove the --init to go back to enforce mode...
- From the etc folder: change directory to systemd/system, edit execguard@.service
- Remove the %I and replace it with --init so it's in init mode...
```
cd systemd/system/
sudo nano execguard.service
sudo nano execguard@.service
ExecStart=/usr/local/bin/execguard --init
# If, the program still does not work: sudo rm /etc/systemd/system/execguard.service
# If, the program still does not work: sudo rm /etc/systemd/system/execguard@.service
reboot
```
### About execgaurd --init
@ -38,12 +36,6 @@ It is in Leaning mode... All program will run as normal.
* You should monitor the output of the log file:
- tail -F /var/log/execguard.log
## Make a key for xxtea
This is done automatically in install.sh.
```
execguard --newKey
```
## /etc/execgaurd/config.json
scan_interval is the number of minutes to delay before scanning the protected_dirs for executables that are not allowed to run, it will chmod -x those programs. If 0, disables the scan for executables to remove the executution (x) bit. DO NOT ADD system bin paths to the Protected Dirs!!! As your system will fail to Boot!! skip_dirs are directories to skip inside of the protected_dirs. alert_email is where to send alerts besides the /var/log/execgaurd.log file. If the alert_email is an empty string, that will not send any emails... hash_encryption takes one of the following: none, xor, or xxtea. Passphrase is used on xor or xxtea to provide security against people injecting hashes into the database to make a bad program run. hash_type is either sha256, or sha512. Sha512 is better for security and sha256 is better on perforance, maybe...Be sure to UPDATE your downloads folders, to YOURS!!!
```
@ -62,7 +54,7 @@ scan_interval is the number of minutes to delay before scanning the protected_di
"hash_type": "sha512"
}
```
## To get root mail
## FYI - To get root mail from Alerts
```
sudo mail -u root
OR
@ -73,14 +65,13 @@ sudo mutt -f /var/mail/root
cd execgaurd
./install.sh
```
# Run a Service
Kind of Dangerious!!:
# Running as a Daemon
Kind of Dangerious when in enforce mode!!:
```
sudo systemctl enable --now execguard
sudo service execguard status
startExecguard.sh init
To Switch to Enforcement more: $ startExecguard.sh enforce
```
Reboot, to have all Boot programs, load into learning mode.
Make sure that --init is running on the service file.
## Check the Logs!
```
@ -93,18 +84,6 @@ Look out for - Found unauthorized executable: /path/to/program
sudo execguard --update /path/to/program
REPLACE /path/to/program with that found in the Log file.
```
# Once done initializing the System, BEWARE....doing this...:
If you have not allowed all the things needed for your system, it will HANG-UP and stop working!!!!
```
sudo nano /etc/systemd/system/execguard.service
[Service]
ExecStart=/usr/local/bin/execguard --init
REMOVE the --init from ExecStart command
```
Reboot.
# Disable Auto-Updates
Any unknown update will make changes to your bin files, as such they will get BLOCKED!!!!
```
@ -120,15 +99,26 @@ If not using apt, change the script to use your package manager.
```
./sys_update.sh
```
# Migrations
# Once done initializing the System, BEWARE....doing this...:
If you have not allowed all the things needed for your system, it will HANG-UP and stop working!!!!
```
sudo systemctl disable --now execguard@init
sudo systemctl execguard@init status
sudo systemctl enable --now execguard@enforce
sudo systemctl execguard@enforce status
```
Reboot.
# Migrations ONLY after changes on config.json
Note: It's best to set the config.json before Installing....! However, you can do it...
Changes made to passwords, hashes on system with existing data on system.db database...need to be migrated.