Juice Shop: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| (8 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) | |||
| Zeile 3: | Zeile 3: | ||
= Installation = | = Installation = | ||
| − | * | + | * die Anwendung lässt sich über [[Docker]] installieren |
* '''apt install docker.io''' | * '''apt install docker.io''' | ||
* '''docker pull bkimminich/juice-shop''' | * '''docker pull bkimminich/juice-shop''' | ||
| Zeile 21: | Zeile 21: | ||
</pre> | </pre> | ||
*docker compose up -d | *docker compose up -d | ||
| + | |||
| + | ==node pm2== | ||
| + | <pre> | ||
| + | xinux@juiceshop:~$ git clone https://github.com/juice-shop/juice-shop.git --depth 1 | ||
| + | Cloning into 'juice-shop'... | ||
| + | remote: Enumerating objects: 1256, done. | ||
| + | remote: Counting objects: 100% (1256/1256), done. | ||
| + | remote: Compressing objects: 100% (1007/1007), done. | ||
| + | remote: Total 1256 (delta 333), reused 567 (delta 230), pack-reused 0 (from 0) | ||
| + | Receiving objects: 100% (1256/1256), 45.77 MiB | 37.49 MiB/s, done. | ||
| + | Resolving deltas: 100% (333/333), done. | ||
| + | |||
| + | xinux@juiceshop:~$ cd juice-shop/ | ||
| + | xinux@juiceshop:~/juice-shop$ npm install | ||
| + | |||
| + | xinux@juiceshop:~/juice-shop$ pm2 start npm --name "juiceshop" -- start | ||
| + | [PM2] Starting /usr/bin/npm in fork_mode (1 instance) | ||
| + | [PM2] Done. | ||
| + | ┌────┬──────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐ | ||
| + | │ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │ | ||
| + | ├────┼──────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤ | ||
| + | │ 0 │ juiceshop │ default │ N/A │ fork │ 88256 │ 0s │ 0 │ online │ 0% │ 30.6mb │ xinux │ disabled │ | ||
| + | └────┴──────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘ | ||
| + | xinux@juiceshop:~/juice-shop$ pm2 startup | ||
| + | [PM2] Init System found: systemd | ||
| + | [PM2] To setup the Startup Script, copy/paste the following command: | ||
| + | sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u xinux --hp /home/xinux | ||
| + | xinux@juiceshop:~/juice-shop$ pm2 save | ||
| + | [PM2] Saving current process list... | ||
| + | [PM2] Successfully saved in /home/xinux/.pm2/dump.pm2 | ||
| + | xinux@juiceshop:~/juice-shop$ pm2 list | ||
| + | ┌────┬──────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐ | ||
| + | │ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │ | ||
| + | ├────┼──────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤ | ||
| + | │ 0 │ juiceshop │ default │ N/A │ fork │ 88256 │ 48s │ 0 │ online │ 0% │ 64.2mb │ xinux │ disabled │ | ||
| + | └────┴──────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘ | ||
| + | xinux@juiceshop:~/juice-shop$ sudo ss -tlpn | ||
| + | State Recv-Q Send-Q Local Address:Port Peer Address:Port Process | ||
| + | LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=40865,fd=13)) | ||
| + | LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=710,fd=3)) | ||
| + | LISTEN 0 128 [::]:22 [::]:* users:(("sshd",pid=710,fd=4)) | ||
| + | LISTEN 0 511 *:3000 *:* users:(("node",pid=88272,fd=19)) | ||
| + | |||
| + | </pre> | ||
| + | |||
= Juice Shop Challenges = | = Juice Shop Challenges = | ||
| Zeile 27: | Zeile 72: | ||
; Finden Sie das versteckte Score Board | ; Finden Sie das versteckte Score Board | ||
| − | * Netzwerkanalyse Tool im Browser öffnen (<F12>) und auf Sources gehen | + | <!-- * Netzwerkanalyse Tool im Browser öffnen (<F12>) und auf ''Sources'' gehen --> |
| − | * Die '''main.js''' Datei herunterladen... | + | <!-- * Die '''main.js''' Datei herunterladen... --> |
| − | [[Bild:juice-shop-01.png]] | + | <!-- [[Bild:juice-shop-01.png]] --> |
<!-- * ... und formatieren, falls alles in einer Zeile steht --> | <!-- * ... und formatieren, falls alles in einer Zeile steht --> | ||
| Zeile 37: | Zeile 82: | ||
<!-- * '''grep "path: " main.js''' --> | <!-- * '''grep "path: " main.js''' --> | ||
| − | ... | + | <!-- ... --> |
| − | path: "administration", | + | <!-- path: "administration", --> |
| − | ... | + | <!-- ... --> |
| − | path: "score-board", | + | <!-- path: "score-board", --> |
| − | ... | + | <!-- ... --> |
<!-- * URL: http://10.0.10.104:83/#/score-board --> | <!-- * URL: http://10.0.10.104:83/#/score-board --> | ||
| Zeile 129: | Zeile 174: | ||
<!-- * Diese liegt unter dem ''ftp''-Ordner, der öffentlich zugänglich ist --> | <!-- * Diese liegt unter dem ''ftp''-Ordner, der öffentlich zugänglich ist --> | ||
<!-- * Wenn man nur den Ordnerpfad aufruft, sieht man die Datei, welche die Challenge löst --> | <!-- * Wenn man nur den Ordnerpfad aufruft, sieht man die Datei, welche die Challenge löst --> | ||
| + | |||
| + | == Fortschritt zurücksetzen == | ||
| + | <pre> | ||
| + | Cookies im Browser löschen | ||
| + | |||
| + | xinux@juiceshop:~/juice-shop$ pm2 restart juiceshop | ||
| + | Use --update-env to update environment variables | ||
| + | [PM2] Applying action restartProcessId on app [juiceshop](ids: [ 0 ]) | ||
| + | [PM2] [juiceshop](0) ✓ | ||
| + | ┌────┬──────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐ | ||
| + | │ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │ | ||
| + | ├────┼──────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤ | ||
| + | │ 0 │ juiceshop │ default │ N/A │ fork │ 88426 │ 0s │ 2 │ online │ 0% │ 20.6mb │ xinux │ disabled │ | ||
| + | └────┴──────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘ | ||
| + | </pre> | ||
=Links= | =Links= | ||
*https://epub.jku.at/obvulihs/download/pdf/7639791?originalFilename=true | *https://epub.jku.at/obvulihs/download/pdf/7639791?originalFilename=true | ||
*https://www.youtube.com/watch?v=AIUhCdOMrmc | *https://www.youtube.com/watch?v=AIUhCdOMrmc | ||
Aktuelle Version vom 6. Mai 2025, 13:39 Uhr
- Der Juice Shop (dt. Saftladen) von OWASP ist eine Webapplikation, die speziell dazu gebaut wurde, um das Hacking von Web Schwachstellen zu lernen
- Es enthält ein Scoreboard, um die gelösten Challenges zu tracken und weitere potentielle Schwachstellen aufzulisten
Installation
- die Anwendung lässt sich über Docker installieren
- apt install docker.io
- docker pull bkimminich/juice-shop
- docker run -d -p 0.0.0.0:80:3000 bkimminich/juice-shop
- Nun sollte die Webseite über http://localhost erreichbar sein
- oder
docker-compose.yml
services:
foo:
privileged: true
image: bkimminich/juice-shop
restart: always
ports:
- 83:3000
- docker compose up -d
node pm2
xinux@juiceshop:~$ git clone https://github.com/juice-shop/juice-shop.git --depth 1
Cloning into 'juice-shop'...
remote: Enumerating objects: 1256, done.
remote: Counting objects: 100% (1256/1256), done.
remote: Compressing objects: 100% (1007/1007), done.
remote: Total 1256 (delta 333), reused 567 (delta 230), pack-reused 0 (from 0)
Receiving objects: 100% (1256/1256), 45.77 MiB | 37.49 MiB/s, done.
Resolving deltas: 100% (333/333), done.
xinux@juiceshop:~$ cd juice-shop/
xinux@juiceshop:~/juice-shop$ npm install
xinux@juiceshop:~/juice-shop$ pm2 start npm --name "juiceshop" -- start
[PM2] Starting /usr/bin/npm in fork_mode (1 instance)
[PM2] Done.
┌────┬──────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├────┼──────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ juiceshop │ default │ N/A │ fork │ 88256 │ 0s │ 0 │ online │ 0% │ 30.6mb │ xinux │ disabled │
└────┴──────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
xinux@juiceshop:~/juice-shop$ pm2 startup
[PM2] Init System found: systemd
[PM2] To setup the Startup Script, copy/paste the following command:
sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u xinux --hp /home/xinux
xinux@juiceshop:~/juice-shop$ pm2 save
[PM2] Saving current process list...
[PM2] Successfully saved in /home/xinux/.pm2/dump.pm2
xinux@juiceshop:~/juice-shop$ pm2 list
┌────┬──────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├────┼──────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ juiceshop │ default │ N/A │ fork │ 88256 │ 48s │ 0 │ online │ 0% │ 64.2mb │ xinux │ disabled │
└────┴──────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
xinux@juiceshop:~/juice-shop$ sudo ss -tlpn
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=40865,fd=13))
LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=710,fd=3))
LISTEN 0 128 [::]:22 [::]:* users:(("sshd",pid=710,fd=4))
LISTEN 0 511 *:3000 *:* users:(("node",pid=88272,fd=19))
Juice Shop Challenges
Score Board / Admin Seite Challenge
- Finden Sie das versteckte Score Board
Admin Challenge
- Loggen Sie sich als Administrator an
Cross Site Scripting
- Erzeugen Sie einen Link, der dem Opfer warnt, dass er gehackt wurde
Brute Force Coupon
- Nerven Sie den Chatbot solange bis er einen Coupon rausrückt
0 Sterne Feedback
- Geben Sie mithilfe von Burp ein 0 Sterne Feedback
Geheimes Dokument ansehen
- Finden die geheime acquisitions.md-Datei
- Tipp: Ein Ordner wird nicht richtig mit Zugriffskontrollen geschützt. Suchen Sie diesen über die auf der Webseite verfügbaren Links
Fortschritt zurücksetzen
Cookies im Browser löschen xinux@juiceshop:~/juice-shop$ pm2 restart juiceshop Use --update-env to update environment variables [PM2] Applying action restartProcessId on app [juiceshop](ids: [ 0 ]) [PM2] [juiceshop](0) ✓ ┌────┬──────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐ │ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │ ├────┼──────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤ │ 0 │ juiceshop │ default │ N/A │ fork │ 88426 │ 0s │ 2 │ online │ 0% │ 20.6mb │ xinux │ disabled │ └────┴──────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘