// Function to execute system commands and capture outputfunction runCommand($command) { $output = shell_exec($command); return nl2br($output);}// Check PHP Versionecho "

PHP Version:

";echo runCommand("php -v");// Check Kernel Versionecho "

Kernel Version:

";echo runCommand("uname -r");// Check for Sudo Misconfigurations (e.g., any user running sudo without a password)echo "

Checking sudo privileges:

";echo runCommand("sudo -l");// List Running Processesecho "

Running Processes:

";echo runCommand("ps aux");// Check for known privilege escalation tools (e.g., LinPEAS or GTFOBins)echo "

Checking for LinPEAS and GTFOBins:

";echo runCommand("which linpeas");echo "
";echo runCommand("which gtfobins");// Checking if /etc/shadow exists (this file holds user passwords and should be protected)echo "

Checking if /etc/shadow exists:

";if (file_exists('/etc/shadow')) { echo "Shadow file exists! It's important this file is protected!";} else { echo "Shadow file not found, which is unusual.";}