LoginSignup
4
1

More than 5 years have passed since last update.

ほどよく手を抜きつつ複数サイトの安全性を確かめる

Posted at

サイトのセキュリティ診断

McAfeeのセキュリティ診断サイト
http://www.siteadvisor.com/sites/

◆いざ、セキュリティチェック

cat survey_target_urls.csv | xargs -I URL sh -c '{ wget http://www.siteadvisor.com/sites/URL; sleep 15; }'

※url数が多い場合は、tmuxやscreenなどでバックグランドで実行するのがおすすめです。

cat

調査対象のurlが1つずつ渡せれば、ファイル形式等は何でも良いです。
調査対象のサイトが多くないのであれば、echoで出力してしまっても良いです。
例) echo 'http://hoge/,http://hogehoge/,http://hogehogehoge/'

xargs

xargsをかませることで、url1つ1つを実行していきます。

wget

今回は調査結果のhtmlファイルをローカルに取得します。

sleep

DoS攻撃に間違われないように、一定時間置いてコンテンツを取得するというマナーを守ります。

判定パターン

1: This link is safe. We tested it and didn't find any significant security issues.
2: This link isn't rated. Either we don't have enough information, or we haven't tested it yet. Proceed with caution.
3: This link might be dangerous. We tested it and found security risks. Beware.
4: We have no data for the page you requested. You can check another site using the look up box below.

判定パターン別の集計

◆全体リンク数
cat survey_target_urls.csv | wc
(行数 = リンク数)

◆1: Safeの数
grep -l 'This link is safe' * | wc

◆2: Not Ratedの数
grep -l "This link isn't rated" * | wc

◆3: Might be dangerousの数
grep -l 'This link might be dangerous' * | wc

◆4: No dataの数
grep -l 'We have no data' * | wc

その他セキュリティ診断サイト

  • Norton Safe Web https://safeweb.norton.com/
     https://safeweb.norton.com/report/show?url={URL}
     ※60秒おきにコンテンツ取得を試みても、一定時間回すとリミット超過でロボット扱いされてしまいエラーとなってしまった。

  • Google Safe Browsing
    http://www.google.com/safebrowsing/diagnostic?site={URL}
     ※特定のフォームは用意されておらず、

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1