-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7764e92
Showing
113 changed files
with
14,616 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/.vscode/ | ||
.env | ||
.DS_Store | ||
test*.php | ||
done.txt | ||
status.txt | ||
www/log/msmtp.log | ||
www/html/todo/temp/ | ||
www/html/todo/attachment/ | ||
www/html/todo/logs/ | ||
www/html/todo/icons/ | ||
www/html/todo/temp/ | ||
www/html/todo/adminer.php | ||
www/html/todo/foxyproxy.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
このファイル群が提供するものは、脆弱性診実習用アプリ(通称「やられサイト」)Bad Todo Listです。特徴は以下の通りです。 | ||
|
||
- Windows、Mac(Intel、Apple Silicone)、Linux環境で動作可能 | ||
- LAMP(Linux+APache+MySQL+PHP)で開発された古典的なマルチページアプリケーション | ||
- 多くの種類の脆弱性を含む | ||
- ウェブ健康診断仕様の13種類の脆弱性 | ||
- 安全なウェブサイトの作り方、OWASP Top 10、徳丸本などに掲載の主要脆弱性を網羅 | ||
- 脆弱性スキャナでは発見することが難しい診断項目を多く含む | ||
- Burp Suiteによる実習に最適化(他のツールでの実習も可能) | ||
|
||
脆弱性診断で出てくるであろう基本的な脆弱性が網羅されているので、これを一通り習得すれば、あなたも立派な「脆弱性診断員」ではないでしょうかw | ||
|
||
## [インストール方法](docs/install.md) | ||
|
||
## [使い方](docs/usage.md) | ||
|
||
## [対応している脆弱性](docs/vulnerabilities.md) | ||
|
||
## ライセンス | ||
|
||
本ソフトウェアの利用に関して | ||
- 本ソフトウェアの著作権は[徳丸浩](https://twitter.com/ockeghem/)に帰属します | ||
- 本ソフトウェアBad Todo Listは、非営利目的の個人のみ利用できます。営利目的での利用を希望される場合は[徳丸浩](https://twitter.com/ockeghem/)までご連絡ください。 | ||
- 本ソフトウェアを変更して配布することはできません。 | ||
- 本ソフトウェアの使用条件はクリエイティブ・コモンズ・ライセンスの下で配布を許可します。 | ||
- クリエイティブ・コモンズ・ライセンスの詳細や表示については、[クリエイティブ・コモンズ・ジャパンのウェブサイト](http://creativecommons.jp)をご参照ください。 | ||
|
||
|
||
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="クリエイティブ・コモンズ・ライセンス" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a><br />この 作品 は <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">クリエイティブ・コモンズ 表示 - 非営利 - 改変禁止 4.0 国際 ライセンス</a>の下に提供されています。 | ||
|
||
## 利用ソフトウェア一覧 | ||
|
||
- Nginx: リバースプロキシ | ||
- Apache: Webサーバー | ||
- PHP 5.3.3: 言語 | ||
- MariaDB: データベース | ||
- MailCatcher: メール確認用ソフトウェア | ||
- Adminer: データベース管理ソフトウェア | ||
- Libxml2: XML解析ライブラリ | ||
|
||
これらソフトウェアについては、それぞれのライセンスに従います。 | ||
|
||
## アイコンについて | ||
Bad Todo Listを利用するためには、会員登録時にアイコン画像を指定する必要があります。実習をスムーズに進められるように、アイコン用画像を /materials フォルダにて用意しました。アイコンの元画像は以下のフリー素材を利用させていただいております。これら素材については、それぞれのライセンスに従います。 | ||
|
||
むぎちゃさん(イラストAC) | ||
https://www.ac-illust.com/main/profile.php?id=GwsmhQzT&area=1 | ||
|
||
|
||
## 免責 | ||
|
||
当著作物は、いかなる保証もせず、あるがままに提供されます。 | ||
ドキュメントおよびソフトウェア等は改善のため、予告なく変更する場合があります。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM httpd:bullseye | ||
ARG TARGETARCH | ||
RUN apt update \ | ||
&& apt install -y msmtp msmtp-mta imgp \ | ||
&& mkdir -p /var/www/html/ \ | ||
&& mkdir -p /usr/local/libxml2.7.8/ \ | ||
&& mkdir -p /etc/php/5.3/cgi/ | ||
|
||
# 以下はデバッグ用ツールのインストール(本番では必要なし) | ||
# RUN apt install -y vim-tiny less iputils-ping net-tools procps | ||
# デバッグ用終わり | ||
|
||
COPY httpd.conf /usr/local/apache2/conf/ | ||
|
||
# msmtp 系の設定 | ||
COPY msmtprc /etc/ | ||
|
||
# php.ini | ||
COPY php.ini /etc/php/5.3/cgi/ | ||
|
||
# アーキテクチャに応じて PHPバイナリをコピー | ||
ADD php-5.3.3p.bin-${TARGETARCH}.tar.gz /usr/local/apache2/cgi-bin | ||
# アーキテクチャに応じて libxml2 をコピー | ||
WORKDIR /usr/local/libxml2.7.8/lib | ||
COPY libxml2.so.2.7.8-${TARGETARCH} libxml2.so.2.7.8 | ||
# 諸々の設定 | ||
RUN ln -s libxml2.so.2.7.8 libxml2.so.2 \ | ||
&& ln -s libxml2.so.2.7.8 libxml2.so | ||
|
||
# コンテンツの設置 | ||
ADD entrypoint.taz /root/ | ||
WORKDIR /var/www/ | ||
ENTRYPOINT /root/entrypoint.sh |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
ServerRoot "/usr/local/apache2" | ||
Listen 80 | ||
Listen 3128 | ||
# | ||
LoadModule mpm_event_module modules/mod_mpm_event.so | ||
LoadModule authn_file_module modules/mod_authn_file.so | ||
LoadModule authn_core_module modules/mod_authn_core.so | ||
LoadModule authz_host_module modules/mod_authz_host.so | ||
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so | ||
LoadModule authz_user_module modules/mod_authz_user.so | ||
LoadModule authz_core_module modules/mod_authz_core.so | ||
LoadModule access_compat_module modules/mod_access_compat.so | ||
LoadModule auth_basic_module modules/mod_auth_basic.so | ||
LoadModule reqtimeout_module modules/mod_reqtimeout.so | ||
LoadModule filter_module modules/mod_filter.so | ||
LoadModule mime_module modules/mod_mime.so | ||
LoadModule log_config_module modules/mod_log_config.so | ||
LoadModule env_module modules/mod_env.so | ||
LoadModule headers_module modules/mod_headers.so | ||
LoadModule setenvif_module modules/mod_setenvif.so | ||
LoadModule version_module modules/mod_version.so | ||
LoadModule proxy_module modules/mod_proxy.so | ||
LoadModule proxy_connect_module modules/mod_proxy_connect.so | ||
LoadModule proxy_http_module modules/mod_proxy_http.so | ||
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so | ||
LoadModule unixd_module modules/mod_unixd.so | ||
LoadModule status_module modules/mod_status.so | ||
LoadModule autoindex_module modules/mod_autoindex.so | ||
<IfModule !mpm_prefork_module> | ||
LoadModule cgid_module modules/mod_cgid.so | ||
</IfModule> | ||
<IfModule mpm_prefork_module> | ||
LoadModule cgi_module modules/mod_cgi.so | ||
</IfModule> | ||
LoadModule dir_module modules/mod_dir.so | ||
LoadModule actions_module modules/mod_actions.so | ||
LoadModule alias_module modules/mod_alias.so | ||
|
||
User www-data | ||
Group www-data | ||
|
||
ServerAdmin [email protected] | ||
AddDefaultCharset utf-8 | ||
|
||
<Directory /> | ||
AllowOverride none | ||
Require all denied | ||
</Directory> | ||
|
||
DocumentRoot "/var/www/html" | ||
DirectoryIndex index.php | ||
|
||
<Files ".ht*"> | ||
Require all denied | ||
</Files> | ||
|
||
ErrorLog /proc/self/fd/2 | ||
LogLevel warn | ||
|
||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined | ||
|
||
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/" | ||
|
||
<Directory /var/www/> | ||
Options Indexes FollowSymLinks ExecCGI | ||
AllowOverride None | ||
Require all granted | ||
AddHandler x-php-script .php | ||
Action x-php-script /cgi-bin/php-5.3.3.bin | ||
AddHandler cgi-script .cgi | ||
PassEnv MYSQL_HOST | ||
</Directory> | ||
|
||
<Directory "/usr/local/apache2/cgi-bin"> | ||
AllowOverride None | ||
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch | ||
Require all granted | ||
</Directory> | ||
|
||
<VirtualHost *:3128> | ||
ProxyRequests On | ||
ErrorLog /usr/local/apache2/logs/proxy-error.log | ||
CustomLog /usr/local/apache2/logs/proxy-access.log combined | ||
</VirtualHost> | ||
|
||
NameVirtualHost *:80 | ||
<VirtualHost *:80> | ||
ServerName example.jp | ||
|
||
ServerAdmin webmaster@localhost | ||
DocumentRoot /var/www/html | ||
|
||
ErrorLog /usr/local/apache2/logs/error.log | ||
CustomLog /usr/local/apache2/logs/-access.log combined | ||
</VirtualHost> | ||
|
||
<VirtualHost *:80> | ||
ServerName todo.example.jp | ||
|
||
ServerAdmin webmaster@localhost | ||
DocumentRoot /var/www/html/todo | ||
|
||
ErrorLog /usr/local/apache2/logs/error.log | ||
CustomLog /usr/local/apache2/logs/-access.log combined | ||
</VirtualHost> | ||
|
||
<VirtualHost *:80> | ||
ServerName internal.example.jp | ||
|
||
DirectoryIndex index.html | ||
ServerAdmin webmaster@localhost | ||
DocumentRoot /var/www/internal | ||
|
||
ErrorLog /usr/local/apache2/logs/error.log | ||
CustomLog /usr/local/apache2/logs/-access.log combined | ||
</VirtualHost> | ||
|
||
<Directory /var/www/internal> | ||
Require all denied | ||
Require local | ||
</Directory> | ||
|
||
|
||
<VirtualHost *:80> | ||
ServerName trap.example.org | ||
|
||
DirectoryIndex index.html | ||
ServerAdmin webmaster@localhost | ||
DocumentRoot /var/www/html/trap | ||
|
||
ErrorLog /usr/local/apache2/logs/error.log | ||
CustomLog /usr/local/apache2/logs/-access.log combined | ||
</VirtualHost> | ||
|
||
<IfModule headers_module> | ||
RequestHeader unset Proxy early | ||
</IfModule> | ||
|
||
<IfModule mime_module> | ||
TypesConfig conf/mime.types | ||
# | ||
AddType application/x-compress .Z | ||
AddType application/x-gzip .gz .tgz | ||
|
||
#AddType text/html .shtml | ||
#AddOutputFilter INCLUDES .shtml | ||
</IfModule> | ||
|
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
account default | ||
host mail | ||
port 25 | ||
from "[email protected]" | ||
logfile /var/www/log/msmtp.log |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
[PHP] | ||
expose_php = On | ||
max_execution_time = 30 | ||
error_reporting = E_ALL & ~E_DEPRECATED | ||
display_errors = On | ||
html_errors = Off | ||
register_globals = Off | ||
register_long_arrays = Off | ||
register_argc_argv = Off | ||
auto_globals_jit = On | ||
post_max_size = 8M | ||
magic_quotes_gpc = Off | ||
magic_quotes_runtime = Off | ||
magic_quotes_sybase = Off | ||
default_mimetype = "text/html" | ||
file_uploads = On | ||
upload_max_filesize = 2M | ||
max_file_uploads = 20 | ||
allow_url_fopen = On | ||
allow_url_include = On | ||
default_socket_timeout = 60 | ||
date.timezone = "Asia/Tokyo" | ||
|
||
[mail function] | ||
sendmail_path = "/usr/sbin/sendmail -t -i" | ||
|
||
[MySQL] | ||
mysql.allow_local_infile = On | ||
mysql.allow_persistent = On | ||
mysql.cache_size = 2000 | ||
mysql.max_persistent = -1 | ||
mysql.max_links = -1 | ||
mysql.default_port = | ||
mysql.default_socket = /var/run/mysqld/mysqld.sock | ||
mysql.default_host = | ||
mysql.default_user = | ||
mysql.default_password = | ||
mysql.connect_timeout = 60 | ||
mysql.trace_mode = Off | ||
|
||
[Session] | ||
session.save_handler = files | ||
;session.save_path = "/tmp" | ||
|
||
session.use_cookies = 1 | ||
;session.cookie_secure = | ||
session.use_only_cookies = 1 | ||
session.name = PHPSESSID | ||
session.auto_start = 0 | ||
session.cookie_lifetime = 0 | ||
session.cookie_path = / | ||
session.cookie_domain = | ||
session.cookie_httponly = | ||
session.serialize_handler = php | ||
session.gc_probability = 1 | ||
session.gc_divisor = 100 | ||
session.gc_maxlifetime = 300 | ||
session.bug_compat_42 = Off | ||
session.bug_compat_warn = Off | ||
session.referer_check = | ||
session.entropy_length = 0 | ||
session.cache_limiter = nocache | ||
session.cache_expire = 180 | ||
session.use_trans_sid = 0 | ||
session.hash_function = 0 | ||
session.hash_bits_per_character = 5 | ||
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" | ||
|
||
[mbstring] | ||
mbstring.language = Japanese | ||
mbstring.internal_encoding = UTF-8 | ||
mbstring.http_input = pass | ||
mbstring.http_output = pass | ||
mbstring.encoding_translation = Off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FROM mariadb:10.6 | ||
COPY create-tables.sql /docker-entrypoint-initdb.d/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
DROP DATABASE IF EXISTS todo; | ||
|
||
CREATE DATABASE todo; | ||
use todo; | ||
|
||
CREATE TABLE `todos` ( | ||
`id` int(11) NOT NULL, | ||
`owner` int(11) NOT NULL, | ||
`todo` text NOT NULL, | ||
`c_date` date DEFAULT CURRENT_TIMESTAMP NOT NULL, | ||
`due_date` date DEFAULT NULL, | ||
`done` int(11) NOT NULL DEFAULT 0, | ||
`memo` text NULL, | ||
`org_filename` varchar(256) DEFAULT NULL, | ||
`real_filename` varchar(256) DEFAULT NULL, | ||
`url` varchar(256) DEFAULT NULL, | ||
`url_text` varchar(256) DEFAULT NULL, | ||
`public` tinyint(1) NOT NULL DEFAULT 0 | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
|
||
INSERT INTO `todos` (`id`, `owner`, `todo`, `c_date`, `due_date`, `done`, `org_filename`, `real_filename`, `public`) VALUES | ||
(1, 1, 'パソコンを買う', CURDATE(), DATE_ADD(CURDATE(), INTERVAL 1 DAY), 0, NULL, NULL, 1), | ||
(2, 2, '依頼の原稿を書く', CURDATE(), DATE_ADD(CURDATE(), INTERVAL 7 DAY), 0, 'memo.txt', 'memo.txt', 1), | ||
(3, 1, '政府高官との会食アポ', CURDATE(), DATE_ADD(CURDATE(), INTERVAL 3 DAY), 0, NULL, NULL, 0); | ||
|
||
CREATE TABLE `users` ( | ||
`id` int(11) NOT NULL, | ||
`userid` varchar(64) NOT NULL, | ||
`pwd` varchar(6) NOT NULL, | ||
`email` varchar(64) NOT NULL, | ||
`icon` varchar(128) NOT NULL, | ||
`super` int(11) NOT NULL DEFAULT '0' | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
|
||
INSERT INTO `users` (`id`, `userid`, `pwd`, `email`, `icon`, `super`) VALUES | ||
(1, 'admin', 'passwd', '[email protected]', 'ockeghem.png', 1), | ||
(2, 'wasbook', 'wasboo', '[email protected]', 'elephant.png', 0); | ||
|
||
CREATE TABLE `session` ( | ||
`id` varchar(255) NOT NULL, | ||
`expire` int NOT NULL, | ||
`data` text DEFAULT NULL, | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin; |
Oops, something went wrong.