diff --git a/build-tgr.sh b/build-tgr.sh index e38f19d..378646a 100755 --- a/build-tgr.sh +++ b/build-tgr.sh @@ -10,11 +10,9 @@ #flag1=$1 #flag2=$2 -#flag3=$3 flag1="cc{prima_flag}" flag2="cc{seconda_flag}" -flag3="cc{terza_flag}" password=`hexdump -n 32 -e '4/4 "%08X"' /dev/urandom` echo "[+] Starting build script..." @@ -41,7 +39,6 @@ chmod 444 target/overlay/flag mkdir target/overlay/root chmod 700 target/overlay/root echo $flag3 > target/overlay/root/flag -chmod 400 target/overlay/root/flag echo "[+] Building the keygen" 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 "" mkdir -p target/overlay/root/.ssh cp target/keys/sshkey target/overlay/root/.ssh/authorized_keys -chmod -R 600 target/overlay/root/.ssh/ echo "[+] Saving the root password" echo $password > target/keys/rootpassword diff --git a/buildroot/board/tiesse/tgr/permissions.config b/buildroot/board/tiesse/tgr/permissions.config index 913839d..d326a35 100644 --- a/buildroot/board/tiesse/tgr/permissions.config +++ b/buildroot/board/tiesse/tgr/permissions.config @@ -1,4 +1,7 @@ /var/www/html/index.php f 755 upgrade upgrade - - - - - /var/www/html/update.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 - - - - -