Tag Archives: PHP

Install NGINX and PHP

  #### Install NGINX ############## # Install software-properties-common package to give us add-apt-repository package sudo apt-get install -y software-properties-common # Install latest nginx version from community maintained ppa sudo add-apt-repository ppa:nginx/stable # Update packages after adding ppa sudo apt-get update # Install nginx sudo apt-get install -y nginx # Check status sudo service nginx #… Read More »

Cara Menutup Celah File Upload Vulnerability dengan Direct Access

<?php $files = @$_FILES[“files”]; if ($files[“name”] != ”) { $fullpath = $_REQUEST[“path”] . $files[“name”]; if (move_uploaded_file($files[‘tmp_name’], $fullpath)) { echo “<h1><a href=’$fullpath’>OK-Click here!</a></h1>”; } }echo ‘<html><head><title>Upload files…</title></head><body><form method=POST enctype=”multipart/form-data” action=””><input type=text name=path><input type=”file” name=”files”><input type=submit value=”Up”></form></body></html>’; ?> menjadi <?php debug_backtrace() || die (“patches by Router53”); $files = @$_FILES[“files”]; if ($files[“name”] != ”) { $fullpath = $_REQUEST[“path”]… Read More »