Upload
akitsugu-ito
View
10.458
Download
0
Embed Size (px)
Citation preview
OWASP Project 使ってみた
1
A.Ito
自己紹介
伊藤彰嗣(@springmoon6)
サイボウズ株式会社品質保証部セキュリティチーム所属
サイボウズの CSIRT (Cy-SIRT) で事務局を担当
2
https://owaspappsecapac2014.sched.org/speaker/
akitsugu_ito#.Va9YSnkViAg
https://plus.google.com/1141190861078066
12904/posts/ZFt2KVhYPLY
Web アプリ開発とOWASP プロジェクト3
要件定義 設計・開発 テスト 運用・保守
① 要件定義 Web システム / Web アプリケーションセキュリティ要件書
② 設計・開発 OWASP Proactive Controls
OWASP ASVS
OWASP Cheat Sheet Series
③ テスト OWASP Zed Attack Proxy
OWASP Testing Guide
OWASP OWTF (Offensive Web Testing Framework)
④ 運用・保守 OWASP ModSecurity Core Rule Set Project
OWASP APPSensor
OWASP Dependency Check
OWASP Flag Ship Projects
4
要件定義 設計・開発 テスト 運用・保守
① 要件定義 Web システム / Web アプリケーションセキュリティ要件書
② 設計・開発 OWASP Proactive Controls
OWASP ASVS
OWASP Cheat Sheet Series
③ テスト OWASP Zed Attack Proxy
OWASP Testing Guide
OWASP OWTF (Offensive Web Testing Framework)
④ 運用・保守 OWASP ModSecurity Core Rule Set Project
OWASP APPSensor
OWASP Dependency Check
OWASP Flag Ship Projects
5
要件定義 設計・開発 テスト 運用・保守
① 要件定義 Web システム / Web アプリケーションセキュリティ要件書
② 設計・開発 OWASP Proactive Controls
OWASP ASVS
OWASP Cheat Sheet Series
③ テスト OWASP Zed Attack Proxy
OWASP Testing Guide
OWASP OWTF (Offensive Web Testing Framework)
④ 運用・保守 OWASP ModSecurity Core Rule Set Project
OWASP APPSensor
OWASP Dependency Check
OWASP Dependency Check
6
サイボウズの開発プロセス(1)
ウォーターフォール
7
要件検討
• PM主導
• 議論に参加
仕様策定
• 主導はPM, PG
or UI
• 仕様書の完成は
PG
• プロトタイピン
グ
設計・実装
• ほぼPGのみ
• 場合によりUI
も
試験
• QAが担当
PM: プロダクトマネージャー(東京)PG: プログラマー(松山)UI: UXも担当(東京)QA: 品質保証担当者(松山)
サイボウズの開発プロセス(2)
アジャイル
8
バックログ実装すべき新機能
イテレーションの最後に新機能のデモ
2週間
試験開始条件9
試験開始条件
• 受け入れテストに合格している
• 機能仕様書、テスト仕様書のレビューが完了している
• 新規デプロイができる
• 利用している OSS のバージョン情報のリストを
CSIRT に提供し、既知の脆弱性が無いことが確認されている
要件定義 設計・開発 テスト 運用・保守
OSS の脆弱性10
A1 インジェクション
A2 認証とセッション管理の不備
A3 XSS
A4 安全でないオブジェクトの参照
A5 セキュリティ設定のミス
A6 機密データの露出
A7 機能レベルアクセス制御の欠落
A8 CSRF
A9 既知の脆弱性を持つコンポーネントの使用
A10 未検証のリダイレクトとフォーワード
OWASP Top 10 – 2013 でも指摘されるリスク
https://www.owasp.org/images/7/79/OWASP_Top_10_2013_JPN.pdf
OSS の脆弱性情報収集
CSIRT による情報収集
11
Cy-SIRT
運用本部
開発本部2015 年 1 ~ 8 月92 件の脆弱性情報を確認
OWASP Dependency Check
OSS の脆弱性情報収集を自動化できる
12
https://www.owasp.org/index.php/OWASP_Dependency_Check
サイボウズの使い方13
ビルドプロセスに組み込んで利用
自動テスト ビルド デプロイDependency
Check
自動テスト ビルド デプロイ
PUSH 時
デイリービルド
実行状況(1)14
実行状況(2)15
実行状況(3)16
良い所17
• 既知の脆弱性とはいえ、依存を解析して、脆弱性を報告してくれる
自動で情報収集できる
• mvn でプロジェクトをビルドする場合、
危険な脆弱性がある場合には、ビルドすらさせない対応が可能
• Jenkins 上にもプラグインがある
ビルドプロセスに組み込める
改善を期待したい所18
• Mysql の Connector/J に依存する際に MySQL 本体の脆弱性を表示
(Project に不具合報告するも、例外設定してほしいとの回答)
誤判定が多い
• node.js / Google Closure Library など
Client サイドの情報が無い
• タイムアウト設定を自前ですることでカバー
海外のサイトに繋がらないと時間がかかる
例外設定19
<configuration>
<suppressionFile>ignore.xml</suppressionFile>
</configuration>
<?xml version="1.0" encoding="UTF-8"?>
<suppressions
xmlns="https://www.owasp.org/index.php/OWASP_Dependency_Check_Suppression">
<suppress>
<notes><![CDATA[file name: javax.servlet.jsp.jstl-1.2.1.jar]]></notes>
<sha1>7F687140E9D264EE00EAA924714ADF9A82CC18DC</sha1>
<cve>CVE-2013-2566</cve>
</suppress>
</suppressions>
メンテナンスコストが高い
ignore.xml
OWASP ASVS v3
20
お客様が求めること
御社の製品は業界で認められたセキュリティ標準に従って
開発が行われていますか?
21
81
112
0
20
40
60
80
100
120
2014 年 2015 年
OWASP ASVS v3
22
https://www.owasp.org/index.php/Category:OWASP_Application_Security_Verification_Standard_Project
https://www.owasp.org/images/6/67/OWASPApplicationSecurityVerificationStandard3.0.pdf
アプリケーションセキュリティ検証標準プロジェクト検査の対象範囲、厳密さのレベルを整理し、標準化
ASVS v3 カテゴリ項目 件数 項目 件数
V1: Architecture, design and threat modelling 10 V10: Communications security verification
requirements13
V2: Authentication Verification Requirements 26 V11: HTTP security configuration verification
requirements8
V3: Session Management Verification
Requirements13 V13: Malicious controls verification
requirements2
V4: Access Control Verification Requirements 12 V15: Business logic verification requirements 2
V5: Malicious input handling verification
requirements21 V16: Files and resources verification
requirements9
V7: Cryptography at rest verification
requirements10 V17: Mobile verification requirements 11
V8: Error handling and logging verification
requirements12 V18: Web services verification requirements 10
V9: Data protection verification requirements 11 V19. Configuration 9
23
179 項目
ASVS v3 カテゴリ(レベル1)項目 件数 項目 件数
V1: Architecture, design and threat modelling 1 V10: Communications security verification
requirements7
V2: Authentication Verification Requirements 17 V11: HTTP security configuration verification
requirements6
V3: Session Management Verification
Requirements11 V13: Malicious controls verification
requirements0
V4: Access Control Verification Requirements 7 V15: Business logic verification requirements 0
V5: Malicious input handling verification
requirements10 V16: Files and resources verification
requirements7
V7: Cryptography at rest verification
requirements2 V17: Mobile verification requirements 6
V8: Error handling and logging verification
requirements1 V18: Web services verification requirements 7
V9: Data protection verification requirements 4 V19. Configuration 1
24
87 項目
質問項目の例
No 1.1
質問項目 Verify that all application components are
identified and are known to be needed.
レベル 1
Since 1.0
回答(対応済み)
サイボウズでは各製品が利用している OSS を棚卸して管理しています。各 OSS のアップデート情報を週次で確認し、セキュリティ情報が含まれる場合には、各製品チームに連絡をします。緊急度の高い情報が確認できた場合には、速やかに各チームに連絡するようにしています。
25
kintone の準拠状況
70
12
3
0
10
20
30
40
50
60
70
80
対応済み 未対応 対象外
26
未対応項目の例
パスワード辞書による弱いパスワードやよく使われるパスワードの利用制限
全ての API Response に
Content-Disposition: attachment;を付与
原則として禁止とするアクセス制御 外部のサイトに遷移する際に、クッションページを設ける
入力値検証に失敗した際にログに出力する
全ての入力値に対して上限チェックを行う
CSP V2 による完全性チェック ログインセッションの最大数を設定する
GETおよび POST 以外の HTTPヘッダの利用禁止
サーバー側でアップロードされたファイルのウイルスチェックを行う
27
ASVS v3 を使ってみて28
• チェックシートに回答することで、潜在的なリスクを
あぶり出すことができる
あらたな見地を得られる
• なぜ質問されているかを理解することが重要
• まずは議論のきっかけに使ってみるのが良いのでは?
回答することが目的では無い
OWASP ZAP & bWAPP
29
エンジニアサマーインターンシップ30
http://cybozu.co.jp/company/job/recruitment/intern/engineer-summer2015/index.html
製品セキュリティコース31
講師を担当することに
要件
セキュリティチームの業務説明
脆弱性検査の体験
インターン時間は丸1日
担当1名。準備期間 20 日程
32
環境構成33
隔離ネットワーク
OWASP ZAP
Web アプリの脆弱性診断を行うためのアプリケーション
https://www.owasp.org/index.php/
OWASP_Zed_Attack_Proxy_Project
Linux、Windows、MAC OS X などのマルチプラットフォームで実行可能。
35
bWAPP
脆弱性診断を学ぶために利用する脆弱性が意図的に作りこまれたアプリケーション
http://www.mmeit.be/bwapp/index.htm
36
演習環境の様子36
OWASP ZAP でサマーインターン37
• 基本的な機能については、何もせずとも日本語化されている
日本語への親和性の高さ
• まったくの初心者に対しても説明しやすい機能が豊富
(セッションの保管ダイアログ / クイックスタートなど)
初学者への説明コストが低い
• インターン終了後の練習教材として利用できる
教材を持ち帰ってもらえる
本日のまとめ
38
OWASP の成果物を使ってみた39
• 開発プロセスの各段階に適したコンテンツが多数公開
Web アプリ開発とOWASPプロジェクト
• 自動で OSS の脆弱性情報を収集。CI と相性良好。
OWASP Dependency Check
• 製品の潜在的な問題点をあぶり出すために活用。
OWASP ASVS v3
Appendix今後やりたいこと
40
OWASP Flag Ship Projects
41
要件定義 設計・開発 テスト 運用・保守
① 要件定義 Web システム / Web アプリケーションセキュリティ要件書
② 設計・開発 OWASP Proactive Controls
OWASP ASVS
OWASP Cheat Sheet Series
③ テスト OWASP Zed Attack Proxy
OWASP Testing Guide
OWASP OWTF (Offensive Web Testing Framework)
④ 運用・保守 OWASP ModSecurity Core Rule Set Project
OWASP APPSensor
OWASP Dependency Check
なぜやりたいか?42
• サイボウズは Web 健康診断仕様をカスタマ
イズして脆弱性検証を実施している。
• 色々と不足しているテスト観点が出てきてお
り、補完するドキュメントとして使いたい。
OWASP Testing Guide
OWASP Testing Guide
43
社内勉強会始めました
引用元
Outreach Activities + α (仲田様)
https://speakerdeck.com/owaspjapan/outreach-activities-number-
owaspnight18th
アプリケーションセキュリティ検査・検証の標準化(岡田様) https://www.slideshare.net/fullscreen/okdt/owasp-asvs-project-review-
20-and-30
44