forked from CoolerVoid/casper-fs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from CoolerVoid/main
Update LICENSE
- Loading branch information
Showing
6 changed files
with
98 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Persistence | ||
|
||
To use the service file to make your LKM persistent, do this on the command line: | ||
1) Check if your Linux machine runs systemd | ||
|
||
- sudo systemctl --version | ||
If you see the version number on your screen, you are running systemd - if not, you can install systemd with your Linux package manager (apt / dpkg / rpm) - most Linuxes already use systemd. | ||
|
||
2) If you have systemd installed, create a file in the directory /etc/systemd/system with the name that you want your service to be known by, for example | ||
sudo vi /etc/systemd/system/casper.service | ||
https://github.com/CoolerVoid/casper-fs/tree/main/module_generator/scripts/casper.service | ||
|
||
And paste the contents of the service file that I sent, save that file and exit. | ||
|
||
3) To enable the service you created in step 2, type (if your file is called casper.service): | ||
sudo systemctl enable casper | ||
|
||
4) When you next reboot your machine, check the file /var/log/syslog to make sure your service was started successfully. | ||
|
||
Tip by Paul Weston | ||
|
||
# Hide action of send keys of password | ||
|
||
. I've attached a very simple script (manage.sh) which asks for the fake device name and password to (un)hide / (un)protect | ||
- This avoids the clear text passwords and fake device name appearing in the shell history. | ||
- https://github.com/CoolerVoid/casper-fs/blob/main/module_generator/scripts/manage.sh | ||
|
||
Tip by Paul Weston |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# use this script in systemd | ||
# COntribution by Paul Wiston - contact: paul.w3st0n@googlemail.com | ||
[Unit] | ||
Description=Starts_casper | ||
After=network.target | ||
|
||
[Service] | ||
User=root | ||
Group=root | ||
ExecStart="/usr/local/bin/casp.sh" | ||
Type=simple | ||
|
||
[Install] | ||
WantedBy=default.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/bash | ||
# Make casper-fs after reboot. | ||
# | ||
# 5th May 2022 script contribution by Paul Weston - paul.w3st0n@googlemail.com | ||
# save this file in /usr/local/bin/ | ||
# change points of directory "paul" to you proper user path | ||
|
||
LOGFILE="/home/paul/casper.log" | ||
|
||
cd /home/paul/git/casper-fs/module_generator/output | ||
|
||
echo "$(date) Running make clean..," | ||
make clean | ||
echo $? | ||
echo "$(date): Clean finished" | ||
|
||
echo "$(date): Running make..." | ||
make | ||
echo $? | ||
echo "$(date): Make finished" | ||
|
||
echo "$(date): Inserting module..." | ||
insmod /home/paul/git/casper-fs/module_generator/output/casperfs.ko | ||
echo $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Use this script to hidden the action to send keys to Casper-fs. | ||
# Using this script, you cannot see the history command. | ||
# save this script in /usr/bin/ | ||
# COntribution by Paul Wiston - contact: paul.w3st0n@googlemail.com | ||
echo -n "Enter device: " | ||
read DEVICE | ||
|
||
echo -n "Enter key: " | ||
stty -echo | ||
read KEY | ||
stty echo | ||
|
||
sudo su - root -c "echo $KEY > $DEVICE" | ||
echo |