
ZEROScan はマルチスレッド脆弱性検出フレームワークです。これを利用することで、脆弱性検出プラグインを簡単に入手または開発し、対象に対してペネトレーションテストを実施できます。インターフェースと使い方は metasploit-framework を参考にしており、プラグインの使用と開発が容易です。
$ git clone https://github.com/zer0yu/ZEROScan.git
または、最新のzipソースコードをダウンロードして解凍・インストールすることもできます:
$ wget https://codeload.github.com/zer0yu/ZEROScan/zip/master
$ unzip ZEROScan-master.zip
➜ ZEROScan git:(master) ✗ python z-console.py
____________ _____ ____ _____
|___ / ____| __ \ / __ \ / ____|
/ /| |__ | |__) | | | | (___ ___ __ _ _ __
/ / | __| | _ /| | | |\___ \ / __/ _` | '_ \
/ /__| |____| | \ \| |__| |____) | (_| (_| | | | |
/_____|______|_| \_\\____/|_____/ \___\__,_|_| |_|
+ -- --=[ ZEROScan - 1.0 ]
# help コマンドを実行すると各パラメータの説明を確認できます。
ZEROScan > help
Core Commands
=============
Command Description
------- -----------
run Run current plugin
help Help menu
use <plugin> Select a plugin by name
update Update the framework
search <keyword> Search plugin names and descriptions
set <option> <value> Set a variable to a value
info <plugin> Display information about one plugin
list List all plugins
version Show the framework version numbers
exit Exit the console
options Display options for current plugin
# list コマンドで現在の全プラグインを表示
ZEROScan > list
\Modules
=======
expName appName appVersion description
--------- --------- ------------ -----------------------------
demo PHP 1230 PH1424/down.php SQL Injection
# info コマンドで該当プラグインの詳細情報を確認できます
ZEROScan > info demo
appName: PHP
appVersion: 1230
Author:
123
Description:
PH1424/down.php SQL Injection
Reference:
http://124.xyz/
# use コマンドで呼び出すプラグインを指定
ZEROScan > use demo
# options コマンドでこのプラグインに設定が必要な項目を確認
ZEROScan exploit(demo) > options
# バッチスキャン用のファイルは target ディレクトリに配置してください
# バッチスキャン時は url パラメータにファイル名を指定します(.txt の拡張子は不要)
Name Current Setting Required Description
------ ----------------- ---------- --------------------------
URL 1 URL or URL file
Thread 1 0 Threads
Cookie 0 Cookie
Report False 0 do you need a html report?
# set コマンドで設定
ZEROScan exploit(demo) > set URL ww.baidu.com
URL => ww.baidu.com
# run コマンドで該当プラグインを実行
ZEROScan exploit(demo) > run
[!]exploit target:'ww.baidu.com'
[!]Requesting target site:ww.baidu.com
+--------------+------------+-------------+
| target-url | poc-name | status |
+==============+============+=============+
| ww.baidu.com | demo | test_plugin |
+--------------+------------+-------------+
success : 1
# 最終結果は output ディレクトリ内の txt ファイルに保存されます
ZEROScan exploit(demo) >
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import re
from lib.core import log
# thirdparty から requests ライブラリをインポート可能
#from thirdparty import requests
# expInfo() は必須の関数。ここに以下の情報を記述
def expInfo():
expInfo={}
expInfo["appName"] = "PHP"
expInfo["appVersion"] = "123"
expInfo["author"] = "Z3r0yu"
expInfo["description"] = "PHPxxx/down.php SQL Injection"
expInfo["references"] = "http://zeroyu.xyz/"
expInfo["options"] = [
{
"Name": "URL",
"Current Setting": "",
"Required": True,
"Description": "URL or URL file"
},
{
"Name": "Thread",
"Current Setting": "1",
"Required": False,
"Description": "Threads"
},
{
"Name": "Cookie",
"Current Setting": "",
"Required": False,
"Description": "cookie"
},
{
"Name": "Report",
"Current Setting": "",
"Required": False,
"Description": "do you need a html report?"
},
]
return expInfo
# プラグイン内で必要な関数は自由に定義可能
def yourDefinition():
return "test_plugin"
# exploit(target, headers=None) は実行関数で必須。2つのパラメータを取る
# target パラメータで対象を指定、headers でランダムUAなどを実現可能
def exploit(target, headers=None):
log.process("Requesting target site:"+ target)
# 返したい情報を return する
# フレームワークは return 値があるスキャンを成功とみなし表示する
return yourDefinition()
本ソフトウェアは学習・交流目的のみで提供されます。不正な目的で使用しないでください。使用によって生じた結果について作者は一切の責任を負いません。