(c) 2025 Robert Strutts, LIC: MIT

main
Robert 7 months ago
parent ea1e29b4bd
commit dc68aca96a
  1. 2
      README.md
  2. 4
      core/alert/alert.go
  3. 4
      core/configure/configure.go
  4. 4
      core/hasher/hasher.go
  5. 4
      core/make_key/make_key.go
  6. 4
      core/monitor_running_bins/monitor_running_bins.go
  7. 4
      core/new_file_monitor/new_file_monitor.go
  8. 4
      core/scanner/scanner.go
  9. 4
      core/sys_database/sys_database.go
  10. 3
      docs/SystemD.md
  11. 4
      execguard.go
  12. 3
      execguard@.service
  13. 4
      export.sh
  14. 5
      install.sh
  15. 5
      reBuild.sh
  16. 6
      startExecguard.sh
  17. 5
      stopExecguard.sh
  18. 5
      sys_update.sh
  19. 4
      update_bins.sh
  20. 4
      vscan_bins.sh

@ -100,7 +100,7 @@ If not using apt, change the script to use your package manager.
# 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 execguard@init
sudo systemctl disable --now execguard@init
sudo systemctl execguard@init status
sudo systemctl enable --now execguard@enforce

@ -1,5 +1,9 @@
package alert
// Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
// License: MIT
// GIT: https://git.mysnippetsofcode.com/bobs/execguard
import (
"execguard/core/sys_database"
"execguard/core/configure"

@ -1,5 +1,9 @@
package configure
// Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
// License: MIT
// GIT: https://git.mysnippetsofcode.com/bobs/execguard
import (
"os"
"encoding/json"

@ -1,5 +1,9 @@
package hasher
// Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
// License: MIT
// GIT: https://git.mysnippetsofcode.com/bobs/execguard
import(
"execguard/core/configure"
"encoding/base64"

@ -1,5 +1,9 @@
package make_key
// Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
// License: MIT
// GIT: https://git.mysnippetsofcode.com/bobs/execguard
import (
"io"
"crypto/rand"

@ -1,5 +1,9 @@
package monitor_running_bins
// Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
// License: MIT
// GIT: https://git.mysnippetsofcode.com/bobs/execguard
import (
"execguard/core/alert"
"execguard/core/configure"

@ -1,5 +1,9 @@
package new_file_monitor
// Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
// License: MIT
// GIT: https://git.mysnippetsofcode.com/bobs/execguard
import (
"execguard/core/alert"
"fmt"

@ -1,5 +1,9 @@
package scanner
// Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
// License: MIT
// GIT: https://git.mysnippetsofcode.com/bobs/execguard
import (
"execguard/core/alert"
"execguard/core/configure"

@ -1,5 +1,9 @@
package sys_database
// Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
// License: MIT
// GIT: https://git.mysnippetsofcode.com/bobs/execguard
import (
"execguard/core/hasher"
"bufio"

@ -1,3 +1,5 @@
# execguard.service:
```
[Unit]
Description=Executable Guardian for %I
After=network.target
@ -35,3 +37,4 @@ RestrictRealtime=yes
[Install]
WantedBy=multi-user.target
```

@ -1,5 +1,9 @@
package main
// Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
// License: MIT
// GIT: https://git.mysnippetsofcode.com/bobs/execguard
import (
"execguard/core/alert"
"execguard/core/configure"

@ -1,4 +1,7 @@
[Unit]
# Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
# License: MIT
# GIT: https://git.mysnippetsofcode.com/bobs/execguard
Description=Executable Guardian for %i
After=network.target
StartLimitIntervalSec=60

@ -1,3 +1,7 @@
#!/bin/bash
# Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
# License: MIT
# GIT: https://git.mysnippetsofcode.com/bobs/execguard
/usr/bin/sudo /usr/bin/sqlite3 /etc/execguard/system.db "SELECT path FROM allowed;" > migrated_apps.txt
echo "On the remote PC: \$ sudo execguard --initFile migrated_apps.txt"

@ -1,4 +1,9 @@
#!/bin/bash
# Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
# License: MIT
# GIT: https://git.mysnippetsofcode.com/bobs/execguard
export CGO_ENABLED=1
# See if the User can become ROOT user
if [ "$EUID" -eq 0 ]; then

@ -1,4 +1,9 @@
#!/bin/bash
# Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
# License: MIT
# GIT: https://git.mysnippetsofcode.com/bobs/execguard
export CGO_ENABLED=1
./stopExecguard.sh
/usr/local/bin/go build -o execguard

@ -1,4 +1,10 @@
#!/bin/bash
# Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
# License: MIT
# GIT: https://git.mysnippetsofcode.com/bobs/execguard
if [ -z "$1" ]; then
/usr/bin/echo "Which mode to start: init or enforce?"
exit 1

@ -1,4 +1,9 @@
#!/bin/bash
# Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
# License: MIT
# GIT: https://git.mysnippetsofcode.com/bobs/execguard
/usr/bin/echo "Stopping execguard service if on..."
/usr/bin/sudo /usr/bin/systemctl stop execguard@init
/usr/bin/sudo /usr/bin/systemctl stop execguard@enforce

@ -1,4 +1,9 @@
#!/bin/bash
# Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
# License: MIT
# GIT: https://git.mysnippetsofcode.com/bobs/execguard
/usr/bin/echo "This script will update a computer that uses apt package manager."
# Prompt the user
read -p "Do you want to do a full system upgrade using apt? [y/N] " choice

@ -1,5 +1,9 @@
#!/bin/bash
# Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
# License: MIT
# GIT: https://git.mysnippetsofcode.com/bobs/execguard
# Directories to search for executables
DIRS=("/usr/bin" "/usr/sbin" "/usr/local/bin" "/usr/local/sbin/")

@ -1,4 +1,8 @@
#!/bin/bash
# Copyright (c) 2025 Robert Strutts <bobs@NewToFaith.com>
# License: MIT
# GIT: https://git.mysnippetsofcode.com/bobs/execguard
./stopExecguard.sh
/usr/bin/echo "Dumping contents of Database to file..."

Loading…
Cancel
Save