はじめに
安全なウェブサイトの作り方 というものがIPA(独立行政法人 情報処理推進機構) から公開されています
しかし、利用者側から見た 安全なウェブサイトの見抜き方 というものはあまり存在しないように思えます
もちろん外部から特定のサイトが安全かどうかはわかるわけもありません
しかし、HTTPのレスポンスヘッダーにはそのサイト運営者側のセキュリティ意識をある程度読み取ることができると思っています
注意事項
- 2019/07/20 時点での調査結果です
- 調査方法とスコアリングは独断と偏見です
- 筆者はセキュリティの専門家ではありません(一般的なITエンジニアレベルの知識です)
- 記載されている企業等の誹謗中傷を目的とはしていません
- 各企業の偉い人が記事をみて対策をしてくれること(継続的な対策をいれること)を願っています
調査方法
各サイトのログインページのHTTPレスポンスを調べる
その中に最近のウェブサイトでいれておくべきと言われているヘッダー情報が含まれているか、正しく設定されているかを調査し、スコアリングする
スコアリング方法
-
Strict-Transport-Security(HSTS)に関して-
Strict-Transport-Securityが設定されている (10点) -
max-ageが 1年以上 (10点) -
includeSubDomainsが含まれている (10点)
-
-
Content-Security-Policyに関して-
Content-Security-Policyが設定されている (10点) -
script-srcにunsafe-inlineが設定されている (10点) -
script-srcにunsafe-evalが設定されている (10点) -
style-srcにunsafe-inlineが設定されている (10点) - または上記同等の設定 (30点)
- ※metaの場合はスコアリングの対象外
-
-
X-Content-Type-Options: nosniffが設定されている (10点) -
X-Frame-Optionsに関して-
DENYが設定されている (10点) -
SAMEORIGINが設定されている (5点)
-
-
X-XSS-Protectionが設定されている (10点)
他にも Set-Cookie 時に HttpOnlyとかSecureとかの設定がありますが、ログインページへのアクセス だけなので
スコアリングから外しています
任天堂クオリティ : 90点
-
Content-Security-Policy(CSP)の導入って非常に大変なのに入っている! - (中の偉い人は担当者をちゃんと褒めてあげて欲しい)
-
Strict-Transport-Security(HSTS)のmax-ageがちょっと短いのが気になる -
My Nintendo Storeなどは入っていないのでそっち方面も頑張ってほしい
$ curl -s -D - https://accounts.nintendo.com/login -o /dev/null
HTTP/1.1 200 OK
Cache-Control: no-store,no-cache,must-revalidate,private
Content-Security-Policy: default-src 'self' https://www.googletagmanager.com https://www.google.com/recaptcha/; connect-src 'self'; style-src 'self' 'unsafe-inline' *.accounts.nintendo.com; script-src 'self' *.accounts.nintendo.com 'unsafe-inline' 'unsafe-eval' https://www.googletagmanager.com https://www.google-analytics.com https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/; img-src 'self' *.accounts.nintendo.com *.baas.nintendo.com https://www.google-analytics.com https://stats.g.doubleclick.net https://www.google.com https://www.google.co.jp data:; font-src 'self' *.accounts.nintendo.com;
Content-Type: text/html; charset=UTF-8
Date: Fri, 19 Jul 2019 11:53:14 GMT
P3P: CP="NON CUR OUR NOR ONL UNI"
Pragma: no-cache
Server: nginx
Set-Cookie: NATID=27fcee5469a0d0c5ae240efdcca2f7a457251ee2; path=/; expires=Sun, 07 Feb 2106 06:28:15 GMT
Set-Cookie: NLAA=1563537194; path=/; expires=Sun, 07 Feb 2106 06:28:15 GMT
Strict-Transport-Security: max-age=2592000; includeSubDomains
X-Content-Security-Policy: default-src 'self' https://www.googletagmanager.com https://www.google.com/recaptcha/; connect-src 'self'; style-src 'self' 'unsafe-inline' *.accounts.nintendo.com; script-src 'self' *.accounts.nintendo.com 'unsafe-inline' 'unsafe-eval' https://www.googletagmanager.com https://www.google-analytics.com https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/; img-src 'self' *.accounts.nintendo.com *.baas.nintendo.com https://www.google-analytics.com https://stats.g.doubleclick.net https://www.google.com https://www.google.co.jp data:; font-src 'self' *.accounts.nintendo.com;
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Content-Length: 42045
Connection: keep-alive
日本の銀行(店舗あり)
| 銀行名 | CSP | HSTS | その他 | 合計 |
|---|---|---|---|---|
| みずほ銀行 | 0 | 0 | 0 | 0 |
| 三菱UFG銀行 | 0 | 0 | 0 | 0 |
| 三井住友銀行 | 0 | 0 | 0 | 0 |
| ゆうちょ銀行 | 0 | 0 | 0 | 0 |
| 横浜銀行 | 0 | 0 | 5 | 5 |
| 静岡銀行 | 0 | 0 | 0 | 0 |
| 千葉銀行 | 0 | 0 | 0 | 0 |
| 八十二銀行 | 0 | 0 | 0 | 0 |
| スルガ銀行 | 0 | 0 | 0 | 0 |
- きっとほぼ0なんだろうな
- 横浜銀行は
X-Frame-Options: SAMEORIGINが入っていた
日本の銀行(非店舗)
| 銀行名 | CSP | HSTS | その他 | 合計 |
|---|---|---|---|---|
| イオン銀行 | 0 | 0 | 5 | 5 |
| 楽天銀行 | 0 | 0 | 5 | 5 |
| 住信SBIネット銀行 | 0 | 0 | 5 | 5 |
| ジャッパンネット銀行 | 0 | 0 | 0 | 0 |
| GMOあおぞらネット銀行 | 0 | 20 | 30 | 50 |
| じぶん銀行 | 0 | 0 | 0 | 0 |
- GMOはさすがインターネット系の会社といったところか
- SAMEORIGINをいれているところは多い印象
- イオン銀行は 千葉銀行と同じシステムの様子だが、SAMEORIGINが入っている
アメリカの銀行
| 銀行名 | CSP | HSTS | その他 | 合計 |
|---|---|---|---|---|
| CHASE | 10 | 30 | 30 | 70 |
| WELLS FARGO | 0 | 30 | 30 | 60 |
| Bank of America | 0 | 20 | 5 | 25 |
| Citi Bank | 0 | 10 | 0 | 10 |
- あまり詳しくない
- CitiBank は HSTSの
max-ageが300だったので移行期間中か? - アメリカはHSTSは基本になっている様子(フリーWifiが多い関係か?)
ECサイト
| サイト名 | CSP | HSTS | その他 | 合計 |
|---|---|---|---|---|
| 楽天市場 | 0 | 0 | 20 | 20 |
| Amazon | 0 | 30 | 25 | 55 |
| Yahoo!ショッピング | 0 | 0 | 25 | 25 |
| ポンパレモール | 0 | 20 | 10 | 30 |
| Wowma! | 40 | 30 | 30 | 100 |
- Wowma! は au IDのサイト, ちゃんと意識している様子
- ちなみにdアカウントのログインは
SAMEORIGINだけだった
- ちなみにdアカウントのログインは
暗号通貨(仮想通貨)取引所
| サイト名 | CSP | HSTS | その他 | 合計 |
|---|---|---|---|---|
| bitFlyer | 10 | 20 | 25 | 55 |
| coincheck | 0 | 0 | 25 | 25 |
| DMMビットコイン | 0 | 0 | 25 | 25 |
| GMOコイン | 0 | 0 | 0 | 0 |
| bitbank | 40 | 30 | 25 | 95 |
| zaif | 0 | 0 | 5 | 0 |
| binance | 40 | 30 | 25 | 95 |
| Poloniex | 0 | 30 | 20 | 50 |
考察
- ○○Pay系はスマートフォンに入れるのが面倒なので調べていない
- アメリカの銀行はHSTSが設定されていっている様子
- 日本の銀行は2週遅れぐらいか...?
- 1週遅れ = XSS-Protection 等入っているがHSTS等がない
- オンラインバンクは
GMOあおぞらネット銀行が良いかもしれない