OWASP Juice Shopを動かそう!

セキュリティ

さて、今回は今更と思われるかもしれませんが、「OWASP Juice Shop」を構築しようかと思います。

脆弱性の検証やセキュリティをやってみたいんだけどどうやったら良いかわからない。といった人は是非構築して遊んでみてください。

OWASP Juice Shopとは?

OWASP(Open Web Application Security Project)で管理されている脆弱性を含んだWebアプリケーションです。

以下、「OWASP Juice Shop」のページの説明です。

OWASP Juice Shop is probably the most modern and sophisticated insecure web application! It can be used in security trainings, awareness demos, CTFs and as a guinea pig for security tools! Juice Shop encompasses vulnerabilities from the entire OWASP Top Ten along with many other security flaws found in real-world applications!

CTFでも使用できるということです。また、よくセキュリティ業界で話題になる「OWASP Top Ten」の脆弱性とアプリケーションで多く見られる脆弱性を含んでいるようです。

今回は「GitHub」で公開されているこちらのページを参考に「Docker Container」を使用して動作させる方法をやりますので、自分の環境に合わせた形で動かしてみてください。

「Docker Container」を使用

まずはDockerを動作させる環境が必要です。

直接メインマシンのOSに構築してもいいですが、私はVM上に環境を構築しています。

Linux上に構築したい方は以下を参照してください。

Dockerを使ってCVE-2021-41773を検証する

使いまわしができるので一個作っておくと良いですね!

以下がGitHubに記載されているので、こちらのとおりにやっていきます。

1のDokerのインストールは先ほど紹介した記事のとおりです。

次にdocker pullします。私の環境ではコマンド入力後すべてcompleteするまで2、3分かかりました。

# docker pull bkimminich/juice-shop
Using default tag: latest
latest: Pulling from bkimminich/juice-shop
59bf1c3509f3: Pull complete
b616ac4a64bf: Pull complete
3b9e1e8ab9ce: Pull complete
3507ddbf3909: Pull complete
a9b17afd4200: Pull complete
782a957d4abe: Pull complete
80ebf3f9178e: Pull complete
6809e40e2d57: Pull complete
Digest: sha256:6378a1cb15168d8ac6fcd86e6b184d86fbdefbd5b3a53ce6ab64628e840ca064
Status: Downloaded newer image for bkimminich/juice-shop:latest
docker.io/bkimminich/juice-shop:latest

次にdocker runします。

# docker run --rm -p 3000:3000 bkimminich/juice-shop

> juice-shop@13.2.2 start
> node build/app

info: All dependencies in ./package.json are satisfied (OK)
info: Chatbot training data botDefaultTrainingData.json validated (OK)
info: Detected Node.js version v16.13.2 (OK)
info: Detected OS linux (OK)
info: Detected CPU x64 (OK)
info: Configuration default validated (OK)
info: Required file server.js is present (OK)
info: Required file index.html is present (OK)
info: Required file styles.css is present (OK)
info: Required file main.js is present (OK)
info: Required file tutorial.js is present (OK)
info: Required file polyfills.js is present (OK)
info: Required file runtime.js is present (OK)
info: Required file vendor.js is present (OK)
(node:18) [DEP0152] DeprecationWarning: Custom PerformanceEntry accessors are deprecated. Please use the detail property.
(Use `node --trace-deprecation ...` to show where the warning was created)
info: Port 3000 is available (OK)
info: Server listening on port 3000

上記のとおり、ポート3000で待ち受けているみたいなので、アクセスします。

http://(vmのIPアドレス):3000/

上記にアクセスします。私の場合は「http://192.168.119.129:3000/」でした。

以下のようにOWASP Juice Shopの画面が表示されればOKです。

これで環境構築はOKです。めっちゃ簡単ですね!

最初はスコアボードにアクセスすることを目指すみたいですね。

きっと、ブラウザに読み込まれているどこかの「.js」ファイルを確認すれば確認できるかと思います!

それでは環境を使って楽しんでみてください!

コメント