KOTH
General and advanced tips for winning King of the Hill!

Flag Finder
The following script will search for a number of file name formats to get possible flag entries.
Remove SUID
A quick way to root is utilizing SUID bits. After attaining root, remove the SUID bit using the -s option on the command used to root.
Protecting KING.TXT
With CHATTR Loop
The chattr command is very useful for making files and folders immutable. The i attribute means a file cannot be modified, deleted, or renamed. It also means no link can be created to the file, the file's metadata cannot be modified, and the file cannot be opened in write mode. The a attribute makes a file only openable in append mode. Generally to make a file immutable, use the command chattr -ia $FILE.
The following script runs
One line version:
With Mounting
This method creates a second file system and links a folder to it. Then the file system gets mounted read only and mounted over the original king file. Then the file system gets deleted leaving the link. The king file can be unmounted using the command umount -l king.txt. The file system can be mounted to be writable again using the command mount -o rw,remount /dev/shm/sqashfs.
With Symbolic Link
Creates a clever way of hiding the king file by making a symbolic file to it as a hidden directory.
Prevent Rootkits
To prevent others from using rootkits, use the following kill switch:
Last updated