Fixed build insturctions; permissions should be set in permissions.config and not in build script
This commit is contained in:
parent
e8bee700be
commit
310b9eaba5
@ -10,11 +10,9 @@
|
|||||||
|
|
||||||
#flag1=$1
|
#flag1=$1
|
||||||
#flag2=$2
|
#flag2=$2
|
||||||
#flag3=$3
|
|
||||||
|
|
||||||
flag1="cc{prima_flag}"
|
flag1="cc{prima_flag}"
|
||||||
flag2="cc{seconda_flag}"
|
flag2="cc{seconda_flag}"
|
||||||
flag3="cc{terza_flag}"
|
|
||||||
password=`hexdump -n 32 -e '4/4 "%08X"' /dev/urandom`
|
password=`hexdump -n 32 -e '4/4 "%08X"' /dev/urandom`
|
||||||
|
|
||||||
echo "[+] Starting build script..."
|
echo "[+] Starting build script..."
|
||||||
@ -41,7 +39,6 @@ chmod 444 target/overlay/flag
|
|||||||
mkdir target/overlay/root
|
mkdir target/overlay/root
|
||||||
chmod 700 target/overlay/root
|
chmod 700 target/overlay/root
|
||||||
echo $flag3 > target/overlay/root/flag
|
echo $flag3 > target/overlay/root/flag
|
||||||
chmod 400 target/overlay/root/flag
|
|
||||||
|
|
||||||
echo "[+] Building the keygen"
|
echo "[+] Building the keygen"
|
||||||
mkdir -p target/overlay/usr/sbin
|
mkdir -p target/overlay/usr/sbin
|
||||||
@ -68,7 +65,6 @@ echo "[+] Generating Monitoring SSH Key"
|
|||||||
ssh-keygen -t ecdsa -f target/keys/sshkey -q -N ""
|
ssh-keygen -t ecdsa -f target/keys/sshkey -q -N ""
|
||||||
mkdir -p target/overlay/root/.ssh
|
mkdir -p target/overlay/root/.ssh
|
||||||
cp target/keys/sshkey target/overlay/root/.ssh/authorized_keys
|
cp target/keys/sshkey target/overlay/root/.ssh/authorized_keys
|
||||||
chmod -R 600 target/overlay/root/.ssh/
|
|
||||||
|
|
||||||
echo "[+] Saving the root password"
|
echo "[+] Saving the root password"
|
||||||
echo $password > target/keys/rootpassword
|
echo $password > target/keys/rootpassword
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
/var/www/html/index.php f 755 upgrade upgrade - - - - -
|
/var/www/html/index.php f 755 upgrade upgrade - - - - -
|
||||||
/var/www/html/update.php f 755 upgrade upgrade - - - - -
|
/var/www/html/update.php f 755 upgrade upgrade - - - - -
|
||||||
/var/www/html/utils.php f 755 upgrade upgrade - - - - -
|
/var/www/html/utils.php f 755 upgrade upgrade - - - - -
|
||||||
/update.sh f 755 root root
|
/update.sh f 755 root root - - - - -
|
||||||
|
/root/ d 700 root root - - - - -
|
||||||
|
/root/.ssh/ d 700 root root - - - - -
|
||||||
|
/root/.ssh/authorized_keys 644 root root - - - - -
|
||||||
|
Loading…
Reference in New Issue
Block a user