Apache vorbereiten
- Apache und PHP installieren:
apt update
apt install -y apache2 php libapache2-mod-php
- PHP aktivieren und Apache starten:
systemctl enable apache2
systemctl start apache2
MariaDB vorbereiten
- MariaDB und PHP-MySQL-Modul installieren:
apt install -y mariadb-server php-mysql
- MariaDB starten und beim Boot aktivieren:
systemctl enable mariadb
systemctl start mariadb
Datenbank „tuxmen“ vorbereiten
mysql -u root
CREATE DATABASE tuxmen;
USE tuxmen;
Tabelle „mitarbeiter“ erstellen
CREATE TABLE mitarbeiter (
id INT PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(50),
password VARCHAR(50),
fullname VARCHAR(100),
email VARCHAR(100),
notes TEXT
);
User erstellen
mysql -u root -p <<EOF
CREATE USER 'webuser'@'localhost' IDENTIFIED BY 'secret';
GRANT ALL PRIVILEGES ON tuxmen.* TO 'webuser'@'localhost';
FLUSH PRIVILEGES;
EOF
Beispieldaten einfügen
INSERT INTO mitarbeiter (username, password, fullname, email, notes) VALUES
('admin', 'admin123', 'Karl Rootmann', 'admin@tuxmen.local', 'Zugang zu allen Systemen'),
('alice', 'alicepw', 'Alice Liddell', 'alice@tuxmen.local', 'Team Marketing, Urlaub bis 22. Mai'),
('bob', 'bobpw', 'Bob Baumeister', 'bob@tuxmen.local', 'Serverraum: Türcode 1234'),
('charlie', 'charliepw','Charlie Foxtrot', 'charlie@tuxmen.local','Entwicklungstools: VSCode, Docker'),
('dora', 'dorapw', 'Dora Explorer', 'dora@tuxmen.local', 'VPN-Probleme gemeldet'),
('eve', 'evepw', 'Evelyn Mallory', 'eve@tuxmen.local', 'Audit-Team, Zugang GVM'),
('frank', 'frankpw', 'Frank Underroot', 'frank@tuxmen.local', 'Sudo-Zugang beantragt'),
('grace', 'gracepw', 'Grace Hopper', 'grace@tuxmen.local', 'Legacy-Projekt „COBOL Revival“'),
('hans', '1234', 'Hans Hacker', 'hans@tuxmen.local', 'Kali-Linux Testumgebung'),
('irene', '5678', 'Irene Adler', 'irene@tuxmen.local', 'Zuständig für LDAP und Mailserver');
EXIT
Umsetzung
Zentrale
nano index.html
Umsetzung
Zentrale
vi index.html
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<head><title>VulnSite</title></head>
<body>
<h1>VulnSite – Systemmodule</h1>
<ul>
<li><a href="host.html">Hostauflösung</a></li>
<li><a href="sql-classic.php">Benutzerdaten anzeigen</a></li>
<li><a href="sql-blind.php">Meine Daten bearbeiten</a></li>
<li><a href="upload.php">Datei senden</a></li>
<!-- <li><a href="sqli_blind.php">Verbindung prüfen</a></li>
<li><a href="xss.html">Mitteilung eingeben</a></li>
<li><a href="lfi.html">Konfiguration anzeigen</a></li>a -->
</ul>
</body>
</html>
PHP Dateien
- cmd.php
<?php
if (isset($_GET['cmd'])) {
$input = $_GET['cmd'];
echo "<pre>";
system("host " . $input);
echo "</pre>";
}