daveherrald/scansio-sonar-splunk
GitHub: daveherrald/scansio-sonar-splunk
一套Python脚本,用于自动化下载、解析scans.io扫描数据并加载到Splunk中以支持安全研究和运营。
Stars: 20 | Forks: 7
# ese cases, the entire headings are technical terms or proper nouns.
本项目旨在使安全研究人员、威胁情报分析师和安全运营团队能够利用[互联网扫描数据仓库](https://scans.io)中的研究数据,并通过Splunk进行分析。本项目包含的工具用于下载、解析并丰富扫描研究数据,然后将其加载到Splunk中以供分析。
本项目受[Mark Parsons](https://github.com/mpars0ns)杰出工作的启发。我们的目标是扩展Mark开创的工具和技术。本代码库中相当部分的代码经许可从Mark的[scansio-sonar-es](mpars0ns/scansio-sonar-es)复制而来。
本项目专注于使用[Splunk](https://splunk.com)作为大规模互联网扫描数据的分析平台。Splunk是商业产品,本项目的创作者是Splunk员工。您需要安排适当的Splunk许可才能使用本项目。Splunk企业试用版许可证和/或Splunk免费版支持本项目的某些用途。
## Perhaps for "scansio-sonar-splunk", since it's likely a proper name, I should keep it as "scansio-sonar-splunk" in Chinese context, but since it's a heading, I might not translate it. But the task is to translate, so I need to provide a Chinese equivalent.
### 选项概述:
```
$ python ./download.py -h
usage: download.py [-h] [--downloadpath DOWNLOADPATH] [--verbose]
[--liststudies] [--study STUDY] [--listurls] [--listfiles]
[--poolsize POOLSIZE] [--studysize]
optional arguments:
-h, --help show this help message and exit
--downloadpath DOWNLOADPATH
Location to store downloaded files. (default /sonar)
--verbose Show verbose status information. (default: No)
--liststudies Print a list of available studies and immediately
exit. (default: No)
--study STUDY Download files from this study. Use --list to view
list of studies. Takes either uniqid or quoted Short
Description. (default: SSL Certificates)
--listurls List data file URLS from this study. Use --list to
view list of studies. Use --study to specify a study.
--listfiles List fully-qualified data file locations for this
study. This option does NOT check to see that the file
exists. Use --list to view list of studies. Use
--study to specify a study.
--poolsize POOLSIZE Number of processes to spawn. (default: 1)
--studysize Return the current size of this study on the scans.io
server. Use --study to specify a study.
```
### 查看可用研究数据列表
```
$ python ./download.py --liststudies
Study Uniqe ID(uniqid) Size (GB)
--------------------------------------------------------------------------- ------------------------- ---------
TLS in the E-mail Ecosystem sba-email 202
Top 1 Million Site Scans scott-top-one-million 617
Nonce-Disrespecting Adversaries: Practical Forgery Attacks on GCM in TLS nonce-disrespect 35
Zonefile Database axfr-research 2
HTTPS Ecosystem Scans umich-https 261
Hurricane Sandy ZMap Scans umich-sandy 33
Alexa Top Million Session Ticket Scans umich-crypto-shortcuts 229
Heartbleed Vulnerability umich-heartbleed 0
Security Challenges in an Increasingly Tangled Web Crawls tangled 42
Reverse DNS (RDNS) sonar.rdns_v2 859
Forward DNS (FDNS) sonar.fdns_v2 1022
National Exposure TCP SYN Scans sonar.national_exposure 6
HTTP (TCP/80) sonar.http 7374
More SSL Certificates (non-443) sonar.moressl 76
SSL Certificates sonar.ssl 298
Forward DNS (FDNS ANY) -- DEPRECATED sonar.fdns 1122
Critical.IO Service Fingerprints sonar.cio 355
Reverse DNS (RDNS) -- DEPRECATED sonar.rdns 634
Rapid7 Heisenberg Cloud Honeypot cowrie Logs heisenberg.cowrie 1
ATG 10001/TCP SYN Scans sonar.atg_10001_tcp 1
TCP Scans sonar.tcp 42
UDP Scans sonar.udp 232
HTTPS (TCP/443) sonar.https 3114
SNI Proxy ZMap Scans sniproxy 3
Scan for AXFR DNS replies hanno-axfr 1
IPv4 HTTP Scans mi 31
More details available at https://scans.io
```
### 安装依赖项
1. `pip install -r requirements.txt`
2. 安装[George Starcher的Splunk HTTP事件收集器Python类](https://github.com/georgestarcher/Splunk-Class-httpevent)。`pip install git+git://github.com/georgestarcher/Splunk-Class-httpevent.git`
### 下载一项研究数据
```
$python ./download.py --verbose --study sonar.ssl --downloadpath /sonar --poolsize 16
```
## 加载SSL证书(sonar.ssl)数据
### 前置条件
1. 如上所述使用download.py下载sonar.ssl数据。
2. 准备一个具有足够处理能力和存储空间以处理研究数据的Splunk实例。创建一个索引和一个HTTP事件收集器密钥。
3. 下载最新的Maxmind GeoIP数据库
```
$ mkdir geoip
$ sh ./update_geoip.sh
```
### 加载证书
```
python ./loadcerts.py --downloadpath --poolsize --hec_key --splunk_indexer --splunk_index --splunk_sourcetype
```
### 加载主机/证书观测数据
```
python ./loadhosts.py --downloadpath --poolsize --hec_key --splunk_indexer --splunk_index --splunk_sourcetype
```
## 加载HTTPS(TCP/44)(sonar.https)数据
### 前置条件
1. 如上所述使用download.py下载sonar.https数据。
2. 准备一个具有足够处理能力和存储空间以处理研究数据的Splunk实例。创建一个索引和一个HTTP事件收集器密钥。
### 加载HTTPS GET响应数据
# Python版本
# 贡献
本代码是作为研究项目创建的,因此存在一些不足之处。欢迎提交拉取请求!
# 关于作者
本项目由[Dave Herrald](https://github.com/daveherrald)和[Ryan Kovar](https://github.com/rkovar)创建。
标签:Splunk分析, 二进制发布, 互联网扫描, 可视化仪表盘, 大数据分析, 威胁情报, 安全运营, 开发者工具, 开源工具, 情报收集, 扫描框架, 数据下载, 数据丰富, 数据解析, 漏洞研究, 网络安全, 逆向工具, 隐私保护