WebGoat Cheat Blatt¶
Überblick¶
WebGoat ist eine bewusst unsichere Web-Anwendung, die vom Open Web Application Security Project (OWASP) entwickelt wurde, um Web Application Security Konzepte interaktiv und ansprechend zu lehren. Im Gegensatz zu herkömmlichen Sicherheitstrainingsmaterialien bietet WebGoat eine praktische Lernumgebung, in der Nutzer die Möglichkeit nutzen können, Web Application Schwachstellen in einem sicheren, kontrollierten Umfeld zu identifizieren und auszunutzen. Die Anwendung ist als umfassende Bildungsplattform konzipiert, die die OWASP Top 10 Schwachstellen und viele zusätzliche Sicherheitskonzepte durch interaktive Lektionen und Herausforderungen abdeckt.
Die Plattform zeichnet sich durch ihren stundenbasierten Ansatz aus, bei dem jedes Sicherheitskonzept als strukturiertes Lernmodul mit klaren Zielen, Hintergrundinformationen und Schritt für Schritt Anleitung präsentiert wird. WebGoat enthält detaillierte Erläuterungen zu Schwachstellenmechanik, real-world-Kontext und Abhilfestrategien, so dass es für beide Anfänger, die Sicherheitsgrundsätze und erfahrene Profis lernen, um spezifische Angriffstechniken zu verstehen. Die Anwendung verfolgt den Nutzerfortschritt, liefert Hinweise bei Bedarf und bietet sofortiges Feedback zu bewährten Lösungen.
WebGoats Architektur ist auf modernen Web-Technologien aufgebaut und nutzt Spring Boot für das Backend und zeitgenössische Frontend-Rahmen für die Benutzeroberfläche. Diese moderne Grundlage stellt sicher, dass die nachgewiesenen Schwachstellen und Angriffstechniken für aktuelle Web-Anwendungsentwicklungspraktiken relevant sind. Die Plattform umfasst sowohl geführte Lektionen mit spezifischen Lernzielen als auch offene Herausforderungen, die es Benutzern ermöglichen, verschiedene Angriffsvektoren zu erkunden und zu experimentieren.
Der Bildungswert von WebGoat erstreckt sich über individuelles Lernen bis hin zu Unterrichts- und Unternehmenstrainingsprogrammen. Die Plattform unterstützt mehrere Benutzerkonten, Fortschrittsverfolgung und administrative Funktionen, die es für strukturierte Trainingsumgebungen geeignet machen. Viele Cybersicherheitserziehungsprogramme, Bootcamps und Corporate Security Sensibiling-Initiativen nutzen WebGoat als Kernbestandteil ihres Hand-on-Trainingslehrplans.
Installation¶
Docker Installation (empfohlen)¶
```bash
Pull WebGoat Docker image¶
docker pull webgoat/webgoat-8.0
Run WebGoat container¶
docker run -d -p 8080:8080 -p 9090:9090 --name webgoat webgoat/webgoat-8.0
Access WebGoat¶
Navigate to http://localhost:8080/WebGoat¶
WebWolf (support application): http://localhost:9090/WebWolf¶
Run with persistent data¶
docker run -d -p 8080:8080 -p 9090:9090 -v webgoat_data:/home/webgoat/.webgoat --name webgoat webgoat/webgoat-8.0
Stop container¶
docker stop webgoat
Remove container¶
docker rm webgoat
View logs¶
docker logs webgoat ```_
Docker komponiert Installation¶
```yaml
Create docker-compose.yml¶
cat << 'EOF' > docker-compose.yml version: '3.8'
services: webgoat: image: webgoat/webgoat-8.0 container_name: webgoat ports: - "8080: 8080" - "9090: 9090" volumes: - webgoat_data: /home/webgoat/.webgoat environment: - WEBGOAT_PORT=8080 - WEBWOLF_PORT=9090 restart: unless-stopped
volumes: webgoat_data: EOF
Start WebGoat¶
docker-compose up -d
View logs¶
docker-compose logs -f webgoat
Stop WebGoat¶
docker-compose down
Stop and remove volumes¶
docker-compose down -v ```_
Stehend JAR Installation¶
```bash
Download WebGoat JAR¶
wget https://github.com/WebGoat/WebGoat/releases/download/v8.2.2/webgoat-server-8.2.2.jar
Install Java (if not already installed)¶
Ubuntu/Debian¶
sudo apt update sudo apt install openjdk-11-jdk -y
CentOS/RHEL¶
sudo yum install java-11-openjdk -y
macOS¶
brew install openjdk@11
Run WebGoat¶
java -jar webgoat-server-8.2.2.jar
Run with custom port¶
java -jar webgoat-server-8.2.2.jar --server.port=9001
Run with custom configuration¶
java -jar webgoat-server-8.2.2.jar --server.address=0.0.0.0 --server.port=8080
Access WebGoat at http://localhost:8080/WebGoat¶
```_
Quellcode Installation¶
```bash
Install prerequisites¶
Java 11+, Maven 3.6+, Git¶
Clone repository¶
git clone https://github.com/WebGoat/WebGoat.git cd WebGoat
Build WebGoat¶
mvn clean install
Run WebGoat¶
mvn spring-boot:run
Build standalone JAR¶
mvn clean package java -jar webgoat-server/target/webgoat-server-*.jar
Run WebWolf separately¶
cd webwolf mvn spring-boot:run ```_
Kubernetes Bereitstellung¶
```yaml
Create webgoat-deployment.yaml¶
cat << 'EOF' > webgoat-deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: webgoat labels: app: webgoat spec: replicas: 1 selector: matchLabels: app: webgoat template: metadata: labels: app: webgoat spec: containers: - name: webgoat image: webgoat/webgoat-8.0 ports: - containerPort: 8080 - containerPort: 9090 env: - name: WEBGOAT_PORT value: "8080" - name: WEBWOLF_PORT value: "9090"
apiVersion: v1 kind: Service metadata: name: webgoat-service spec: selector: app: webgoat ports: - name: webgoat port: 8080 targetPort: 8080 - name: webwolf port: 9090 targetPort: 9090 type: LoadBalancer EOF
Deploy to Kubernetes¶
kubectl apply -f webgoat-deployment.yaml
Check deployment status¶
kubectl get pods kubectl get services
Access WebGoat¶
kubectl port-forward service/webgoat-service 8080: 8080 ```_
Initial Setup und Konfiguration¶
Erst-Zeit-Setup¶
```bash
Access WebGoat¶
Navigate to http://localhost:8080/WebGoat¶
Create user account¶
Click "Register new user"¶
Username: your_username¶
Password: your_password¶
Login to WebGoat¶
Use created credentials¶
Access WebWolf (support application)¶
Navigate to http://localhost:9090/WebWolf¶
Use same credentials as WebGoat¶
```_
Benutzermanagement¶
```bash
Default admin account (if enabled)¶
Username: admin¶
Password: admin¶
Create additional users¶
Each user has separate progress tracking¶
Suitable for classroom environments¶
Reset user progress¶
Delete user data directory¶
Or use admin interface (if available)¶
Backup user progress¶
Copy .webgoat directory¶
Contains user data and progress¶
```_
Konfigurationsoptionen¶
```bash
Custom server configuration¶
Create application.properties¶
cat << 'EOF' > application.properties server.port=8080 server.address=0.0.0.0 logging.level.org.owasp.webgoat=DEBUG webgoat.user.directory=/custom/path EOF
Run with custom configuration¶
java -jar webgoat-server-*.jar --spring.config.location=application.properties
Environment variables¶
export WEBGOAT_PORT=8080 export WEBWOLF_PORT=9090 export WEBGOAT_SSLENABLED=false
JVM options¶
java -Xmx1024m -Xms512m -jar webgoat-server-*.jar ```_
Unterrichtskategorien und Module¶
Sicherheitsbewusstsein¶
```bash
HTTP Basics¶
- Understanding HTTP protocol¶
- Request/response structure¶
- Headers and methods¶
- Status codes¶
HTTP Proxies¶
- Proxy configuration¶
- Intercepting requests¶
- Modifying traffic¶
- Burp Suite integration¶
Developer Tools¶
- Browser developer tools¶
- Network tab analysis¶
- Console manipulation¶
- Source code inspection¶
```_
Authentication Flaws¶
```bash
Authentication Bypasses¶
Lesson: Bypass authentication mechanisms¶
Method 1: SQL Injection in login¶
Username: admin' -- Password: anything
Method 2: Logic flaws¶
Analyze authentication logic¶
Find bypass conditions¶
Method 3: Session manipulation¶
Modify session tokens¶
Predict session values¶
Password Reset Flaws¶
Lesson: Exploit password reset functionality¶
Method 1: Parameter manipulation¶
Change user parameter in reset request¶
Reset other users' passwords¶
Method 2: Token prediction¶
Analyze reset token generation¶
Predict valid tokens¶
Secure Passwords¶
Lesson: Password security concepts¶
- Password complexity¶
- Common passwords¶
- Brute force attacks¶
- Password storage¶
```_
Zugriffskontrolle Flaws¶
```bash
Insecure Direct Object References¶
Lesson: Access unauthorized resources¶
Method 1: Parameter manipulation¶
Change user ID in requests¶
Access other users' data¶
Method 2: Path traversal¶
Modify file paths¶
Access system files¶
Missing Function Level Access Control¶
Lesson: Access restricted functions¶
Method 1: URL manipulation¶
Access admin functions directly¶
Bypass menu restrictions¶
Method 2: Role manipulation¶
Modify role parameters¶
Escalate privileges¶
```_
Cross-Site Scripting (XSS)¶
```bash
Reflected XSS¶
Lesson: Execute JavaScript in victim's browser¶
Basic payload¶
Advanced payloads¶