
CVE-2018-9995脆弱性に対するDVRバッチスキャンスクリプト
##CVE-2018-9995のオリジナルエクスプロイトコード
##環境準備
python3、ubuntu
user@ubuntu:~$ sudo pip3 install grequests
user@ubuntu:~$ sudo pip3 install tableprint
##使用方法
スキャン対象のデバイスを「ip:port」の形式でCSVファイルの最初の列に保存します。
The equipment to be scanned is stored in "ip:port" form in the first column of CSV file.
csv_file = csv.reader(open('66b2f74b75457f73347f6a840bebc339.csv','r'))
上記のデバイスリストファイルのパスを現在使用中のディレクトリに変更します。
Change the list of device list files to the current directory.
user@ubuntu:~$ sudo python3 CVE-2018-9995_Batch_scanning_exp.py
プログラムを実行します。
run
-----------------------------------501-------------------------------------------------------------
-----------------------------------501-------------------------------------------------------------
-----------------------------------501-------------------------------------------------------------
-----------------------------------NO.1-------------------------------------------------------------
[+] Users List: 1
[+] Users List: 1
[+] Users List: 1
[+] Users List: 1
[+] Users List: 1
[+] Users List: 1
[+] Users List: 2
[+] Users List: 1
501 IPごとに1回出力されます。「NO」はラウンド数を示し、「[+] Users List:」は脆弱性を悪用されたデバイスに含まれるユーザー数を示します。
Every 501 IP output is once, "NO" indicates the number of rounds, and "[+] Users List:" indicates the number of users contained in the device that successfully exploited the vulnerability.
出力はpass.csvというCSVファイルです。
output pass.csv
--------+-----+----+-------+----.......
ip:port |uid1 |pwd1 |role1 |uid2.......
--------+-----+----+-------+----.......
| | | | .......
| | | | .......
##オリジナルプログラムからの改良点
1. 一部のデバイスで401エラーが発生し情報を返せない問題を解決しました(Solved the problem that part of the equipment 401 error can not return information.)
2. 一部のデバイスで返されるJSON形式が不正である問題を解決しました(The problem of incorrect JSON format for some devices is solved.)
3. 非同期HTTPリクエストを採用し、スキャン効率を大幅に向上させました(Using asynchronous HTTP request greatly improves scanning efficiency.)
##既知の状況説明
1. 各Webデバイス検索エンジンのクエリ結果によると、今回の脆弱性の影響を受けるデバイスは約50000台あります。現時点では、接続応答があるデバイスはすべてこの脆弱性を利用してログインアカウントの平文情報を取得できます。
1.There are about 50000 devices designed for this vulnerability from the results of the search engine query for web equipment. At present, any device with connection response can take advantage of the vulnerability to obtain information on the login account.
2. 中国国内のスキャンでは応答するデバイスは6000台強のみでした。
2.There are only more than 6000 devices in response to the scan in china
3. 脆弱性の悪用による被害は予想ほど深刻ではなく、単に映像ストリームへのアクセス権限を取得するだけであり、デバイスシステムの制御権をさらに取得するには今後の研究が必要です。
3.The harm of vulnerability is not as serious as expected. It is only the right of access to the screen. Further access to control of the device system remains to be studied.
4. 弱いパスワードが非常に多く、スキャン結果の80%が弱いパスワードを使用していました。
4.There are many weak passwords, and 80% of the scan results use weak passwords.
脆弱性のあるデバイスのリストは各自で入手してください。少し考えれば簡単に取得できます。楽しんでください! XD have fun! XD