diff --git a/build.sh b/build.sh index 0731040..0745c8e 100755 --- a/build.sh +++ b/build.sh @@ -27,6 +27,8 @@ echo "[+] Writing flags" sed -i "s/##FLAG1##/$flag1/g" target/overlay/var/www/html/include/config.php echo $flag2 > target/overlay/flag 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 @@ -54,8 +56,7 @@ mkdir -p target/overlay/root/.ssh cp target/keys/sshkey target/overlay/root/.ssh/authorized_keys chmod -R 600 target/overlay/root/.ssh/ -echo "[+] Generating the root password" -hash=`mkpasswd $password` +echo "[+] Saving the root password" echo $password > target/keys/rootpassword echo "[+] Building the image"