Skip to content

Commit ea4fcc3

Browse files
committed
up scripts 2022-09-18
1 parent a18c0de commit ea4fcc3

File tree

5 files changed

+323
-20
lines changed

5 files changed

+323
-20
lines changed

.github/scripts/README.tmpl

Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
[![Tweet](https://img.shields.io/twitter/url/http/Hktalent3135773.svg?style=social)](https://twitter.com/intent/follow?screen_name=Hktalent3135773) [![Follow on Twitter](https://img.shields.io/twitter/follow/Hktalent3135773.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=Hktalent3135773) [![GitHub Followers](https://img.shields.io/github/followers/hktalent.svg?style=social&label=Follow)](https://github.com/hktalent/)
2+
<p align="center">
3+
<a href="/README.md">README_EN</a> •
4+
<a href="/static/Installation.md">编译/安装/运行</a> •
5+
<a href="/static/usage.md">参数说明</a> •
6+
<a href="/static/running.md">如何使用</a> •
7+
<a href="/static/scenario.md">使用场景</a> •
8+
<a href="/static/pocs.md">POC列表</a> •
9+
<a href="/static/development.md">自定义扫描</a> •
10+
<a href="/static/NicePwn.md">最佳实践</a>
11+
</p>
12+
13+
# 特性
14+
Vulnerabilities Scan;15000+PoC漏洞扫描;[ 23 ] 种应用弱口令爆破;7000+Web指纹;146种协议90000+规则Port扫描;Fuzz、HW打点、BugBounty神器...
15+
<h1 align="center">
16+
<img width="928" alt="image" src="https://user-images.githubusercontent.com/18223385/175768227-098c779b-6c5f-48ee-91b1-c56e3daa9c87.png">
17+
</h1>
18+
19+
- 什么是scan4all:集成 vscan、nuclei、ksubdomain、subfinder等,充分自动化、智能化
20+
并对这些集成的项目进行代码级别优化、参数优化,个别模块,如 vscan filefuzz部分进行了重写
21+
原则上不重复造轮子,除非存在bug、问题
22+
- 跨平台:基于golang实现,轻量级、高度可定制、开源,支持Linux、windows、mac os等(go tool dist list)46种不同芯片架构、14种操作系统
23+
- 支持[ 23 ] 种密码爆破,支持自定义字典, 通过 "priorityNmap": true 开启
24+
* RDP
25+
* VNC
26+
* SSH
27+
* Socks5
28+
* rsh-spx
29+
* Mysql
30+
* MsSql
31+
* Oracle
32+
* Postgresql
33+
* Redis
34+
* FTP
35+
* Mongodb
36+
* SMB,同时检测 MS17-010(CVE-2017-0143、CVE-2017-0144、CVE-2017-0145、CVE-2017-0146、CVE-2017-0147、CVE-2017-0148)、SmbGhost(CVE-2020-0796)、DCOM(msrpc, port 135, Oxid Scan)
37+
* Telnet
38+
* Snmp
39+
* Wap-wsp(Elasticsearch)
40+
* RouterOs
41+
* HTTP BasicAuth(HttpBasic,Authorization), contains Webdav、SVN(Apache Subversion) crack
42+
* Weblogic,同时通过 enableNuclei=true 开启nuclei,支持T3、IIOP等检测
43+
* Tomcat
44+
* Jboss
45+
* Winrm(wsman)
46+
* POP3
47+
- 默认开启http密码智能爆破,需要 HTTP 密码时才会自动启动,无需人工干预
48+
- 检测系统是否存在 nmap ,存在通过 priorityNmap=true 启用 nmap 进行快速扫描,默认开启,优化过的 nmap 参数比 masscan 快
49+
使用 nmap 的弊端:网络不好的是否,因为流量网络包过大可能会导致结果不全
50+
使用 nmap 另外需要将 root 密码设置到环境变量
51+
```bash
52+
export PPSSWWDD=yourRootPswd
53+
```
54+
更多参考:config/doNmapScan.sh
55+
默认使用 naabu 完成端口扫描 -stats=true 可以查看扫描进度
56+
能否不扫描端口 ? 跳过端口扫描,意外做基于端口指纹进行密码爆破的检测将失效,密码破解功能也一并被跳过
57+
```bash
58+
noScan=true ./scan4all -l list.txt -v
59+
```
60+
- 支持直接使用 nmap xml结果输入:
61+
```bash
62+
./scan4all -l nmapScanResults.xml -v
63+
```
64+
65+
<img src="/static/nmap.gif" width="400">
66+
67+
- 快速 15000+ POC 检测功能,PoCs包含:
68+
* nuclei POC
69+
70+
{get_top10()}
71+
72+
**{command(["tree" "config/nuclei-templates"], -2, None)}**.
73+
74+
* vscan POC
75+
* vscan POC包含了:xray 2.0 300+ POC、 go POC等;特别注意,xray POC检测需要有指纹命中后才会触发检测
76+
* scan4all POC
77+
78+
- 支持 7000+ web 指纹扫描、识别:
79+
* httpx 指纹
80+
* vscan 指纹
81+
* vscan 指纹:包含 eHoleFinger、 localFinger等
82+
* scan4all 指纹
83+
84+
- 支持146种协议90000+规则port扫描
85+
* 依赖nmap支持的协议、指纹
86+
- 快速HTTP敏感文件检测,可以自定义字典
87+
- 登陆页面检测
88+
- 支持多种类型的输入 - STDIN/HOST/IP/CIDR/URL/TXT
89+
- 支持多种输出类型 - JSON/TXT/CSV/STDOUT
90+
- 高度可集成:可配置将结果统一存储到 Elasticsearch【强烈推荐】
91+
- 智能SSL分析:
92+
* 深入分析,自动关联SSL信息中域名的扫描,如*.xxx.com,并根据配置完成子域遍历,结果自动添加目标到扫描列表
93+
* 支持开启智能SSL信息中*.xx.com子域遍历功能, export EnableSubfinder=true,或者在配置文件中调整
94+
- 自动识别域(DNS)关联多个IP的情况,并自动扫描关联的多个IP
95+
- 智能处理:
96+
* 1、当列表中多个域名的ip相同时,合并端口扫描,提高效率
97+
* 2、智能处理http异常页面、及指纹计算和学习
98+
- 自动化供应链识别、分析和扫描
99+
- 联动 python3 <a href=https://github.com/hktalent/log4j-scan>log4j-scan</a>
100+
* <a href=https://github.com/fullhunt/log4j-scan/pull/128/files>该版本屏蔽你目标信息传递到 DNS Log Server 的bug,避免暴露漏洞</a>
101+
* 增加了将结果发送到 Elasticsearch 的功能,便于批量、盲打
102+
* 未来有时间了再实现golang版本
103+
如何使用?
104+
```bash
105+
mkdir ~/MyWork/;cd ~/MyWork/;git clone https://github.com/hktalent/log4j-scan
106+
```
107+
- 智能识别蜜罐,并跳过目标,默认该功能是关闭的,可设置EnableHoneyportDetection=true开启
108+
- 高度可定制:允许通过config/config.json配置定义自己的字典,或者控制更多细节,包含不限于:nuclei、httpx、naabu等
109+
- 支持HTTP请求走私漏洞检测: CL-TE、TE-CL、TE-TE、CL_CL、BaseErr
110+
<img width="968" alt="image" src="https://user-images.githubusercontent.com/18223385/182503765-1307a634-61b2-4f7e-9631-a4184ec7ac25.png">
111+
112+
- 支持 通过参数 Cookie='PHPSession=xxxx' ./scan4all -host xxxx.com, 兼容 nuclei、httpx、go-poc、x-ray POC、filefuzz、http Smuggling等
113+
114+
# 工作流程
115+
116+
<img src="static/workflow.jpg">
117+
118+
# 如何安装
119+
download from
120+
<a href=https://github.com/hktalent/scan4all/releases>Releases</a>
121+
```bash
122+
go install github.com/hktalent/[email protected]
123+
scan4all -h
124+
```
125+
# 如何使用
126+
To install libcap on Linux:
127+
```bash
128+
sudo apt install -y libpcap-dev
129+
```
130+
on Mac:
131+
```bash
132+
brew install libpcap
133+
```
134+
## docker ubuntu
135+
```bash
136+
apt update;apt install -yy libpcap0.8-dev
137+
```
138+
## centos
139+
```bash
140+
yum install -yy glibc-devel.x86_64
141+
```
142+
### linux
143+
too many open files
144+
查看当前打开的文件数
145+
```
146+
awk '{print $1}' /proc/sys/fs/file-nr
147+
ulimit -a
148+
ulimit -n 819200
149+
```
150+
- 1、启动 Elasticsearch, 当然你可以使用传统方式输出、结果
151+
```bash
152+
mkdir -p logs data
153+
docker run --restart=always --ulimit nofile=65536:65536 -p 9200:9200 -p 9300:9300 -d --name es -v $PWD/logs:/usr/share/elasticsearch/logs -v $PWD/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml -v $PWD/config/jvm.options:/usr/share/elasticsearch/config/jvm.options -v $PWD/data:/usr/share/elasticsearch/data hktalent/elasticsearch:7.16.2
154+
# 初始化es 索引,每种工具的结果结构不一样,分开存储
155+
./config/initEs.sh
156+
157+
# 搜索语法,更多的查询方法,自己学 Elasticsearch
158+
http://127.0.0.1:9200/nmap_index/_doc/_search?q=_id:192.168.0.111
159+
其中92.168.0.111 是要查询的目标
160+
161+
```
162+
- 使用前请自行安装nmap
163+
<a href=https://github.com/hktalent/scan4all/discussions>使用帮助</a>
164+
```bash
165+
go build
166+
# 精准扫描 url列表 UrlPrecise=true
167+
UrlPrecise=true ./scan4all -l xx.txt
168+
# 关闭适应nmap,使用naabu端口扫描其内部定义的http相关端口
169+
priorityNmap=false ./scan4all -tp http -list allOut.txt -v
170+
```
171+
172+
# Work Plan
173+
- 基于爬虫更多安全信息收集,解决、回答:
174+
```
175+
1、你知道一个url(Target)后端有多少个Server吗?
176+
a、不同的端口,可能对应内部不同的内网ip
177+
b、不同的上下文,可能对应内部不同的内网ip
178+
c、不同的http响应server头,可能对应内部不同的内网ip
179+
c、极端的情况下,不同的参数跳转后端不同的server,也就是对应内部不同的内网ip
180+
```
181+
- 重构 naabu、httpx的集成方式,解决vscan嵌入代码集成方式,导致无法升级依赖包的弊端
182+
- 联动 metasploit-framework,在系统已经安装好对前提条件下,配合tmux,并以 macos 环境为最佳实践完成联动
183+
- 整合 更多 fuzzer <!-- gryffin -->,如 联动 sqlmap
184+
- 整合 chromedp 实现对登陆页面截图,以及对纯js、js架构前端登陆页面进行检测、以及相应爬虫(敏感信息检测、页面爬取)
185+
- 整合 nmap-go 提高执行效率,动态解析结果流,并融合到当前任务瀑布流中
186+
- 整合 ksubdomain 实现更快子域名爆破
187+
- 整合 spider 以便发现更多漏洞
188+
- 半自动化指纹学习,提高精准度;指定指纹名称,通过配置
189+
- 加载osvdb 并驱动执行
190+
191+
# Q & A
192+
- how use Cookie?
193+
- libpcap related question
194+
more see: <a href=https://github.com/hktalent/scan4all/discussions>discussions</a>
195+
196+
# 变更日志
197+
- 2022-07-28 为 nuclei 添加 substr、 aes_cbc DSL 函数<a href="https://github.com/projectdiscovery/nuclei/releases/tag/v2.7.7">nuclei v2.7.7</a>
198+
- 2022-08-03 fixed nuclei Multiple instances cache goroutine leaks PR<a href=https://github.com/projectdiscovery/nuclei/issues/2386>#2386</a>
199+
- 2022-07-20 fix and PR nuclei <a href=https://github.com/projectdiscovery/nuclei/issues/2301>#2301</a> 并发多实例的bug
200+
- 2022-07-20 add web cache vulnerability scanner
201+
- 2022-07-19 PR nuclei <a href=https://github.com/projectdiscovery/nuclei/pull/2308>#2308</a> add dsl function: substr aes_cbc
202+
- 2022-07-19 添加dcom Protocol enumeration network interfaces
203+
- 2022-06-30 嵌入式集成私人版本nuclei-templates 共3000+个YAML POC;
204+
1、集成Elasticsearch存储中间结果
205+
2、嵌入整个config目录到程序中
206+
- 2022-06-27 优化模糊匹配,提高正确率、鲁棒性;集成ksubdomain进度
207+
- 2022-06-24 优化指纹算法;增加工作流程图
208+
- 2022-06-23 添加参数ParseSSl,控制默认不深度分析SSL中的DNS信息,默认不对SSL中dns进行扫描;优化:nmap未自动加.exe的bug;优化windows下缓存文件未优化体积的bug
209+
- 2022-06-22 集成 N 种协议弱口令检测、密码爆破:ftp、mongodb、mssql、mysql、oracle、postgresql、rdp、redis、smb、ssh、telnet,同时优化支持外挂密码字典
210+
- 2022-06-21 决然做scan4all
211+
<!--
212+
- 2022-06-20 集成Subfinder,域名爆破,启动参数导出EnableSubfinder=true,注意启动后很慢; ssl证书中域名信息的自动深度钻取
213+
允许通过 config/config.json 配置定义自己的字典,或设置相关开关
214+
- 2022-06-17 优化一个域名多个IP的情况,所有IP都会被端口扫描,然后按照后续的扫描流程
215+
- 2022-06-15 此版本增加了过去实战中获得的几个weblogic密码字典和webshell字典
216+
- 2022-06-10 完成核的整合,当然包括核模板的整合
217+
- 2022-06-07 添加相似度算法来检测 404
218+
- 2022-06-07 增加http url列表精准扫描参数,根据环境变量UrlPrecise=true开启
219+
-->
220+
221+
# 交流群(微信、QQ、Tg)
222+
| Wechat | Or | QQchat | Or | Tg |
223+
| --- |--- |--- |--- |--- |
224+
|<img width=166 src=https://github.com/hktalent/scan4all/blob/main/static/wcq.JPG>||<img width=166 src=https://github.com/hktalent/scan4all/blob/main/static/qqc.jpg>||<img width=166 src=https://github.com/hktalent/scan4all/blob/main/static/tg.jpg>|
225+
226+
227+
## 💖Star
228+
[![Stargazers over time](https://starchart.cc/hktalent/scan4all.svg)](https://starchart.cc/hktalent/scan4all)
229+
230+
# Donation
231+
| Wechat Pay | AliPay | Paypal | BTC Pay |BCH Pay |
232+
| --- | --- | --- | --- | --- |
233+
|<img src=https://github.com/hktalent/myhktools/blob/master/md/wc.png>|<img width=166 src=https://github.com/hktalent/myhktools/blob/master/md/zfb.png>|[paypal](https://www.paypal.me/pwned2019) **[email protected]**|<img width=166 src=https://github.com/hktalent/myhktools/blob/master/md/BTC.png>|<img width=166 src=https://github.com/hktalent/myhktools/blob/master/md/BCH.jpg>|

.github/scripts/update-readme.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env python3
2+
import glob
3+
import subprocess
4+
5+
def countTpl(path):
6+
return len(glob.glob(path + "/*.*"))
7+
8+
def command(args, start=None, end=None):
9+
return "\n".join(subprocess.run(args, text=True, capture_output=True).stdout.split("\n")[start:end])[:-1]
10+
11+
def get_top10():
12+
HEADER = "## Nuclei Templates Top 10 statistics\n\n"
13+
TOP10 = command(["cat", "config/nuclei-templates/TOP-10.md"])
14+
return HEADER + TOP10 if len(TOP10) > 0 else ""
15+
16+
if __name__ == "__main__":
17+
version = command(["git", "describe", "--tags", "--abbrev=0"])
18+
template = eval(open(".github/scripts/README.tmpl", "r").read())
19+
20+
print(template)
21+
f = open("README_CN.md", "w")
22+
f.write(template)
23+
f.close()

.github/workflows/readme-update.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: 📝 Readme Update
2+
3+
on:
4+
workflow_run:
5+
workflows: ["🗒 update reade me"]
6+
types:
7+
- completed
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
if: github.repository == 'hktalent/scan4all'
14+
steps:
15+
- name: Install tree
16+
run: sudo apt-get install tree -y
17+
18+
- name: Check out code
19+
uses: actions/checkout@master
20+
with:
21+
persist-credentials: false
22+
fetch-depth: 0
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: "3.8"
28+
29+
- name: Update README
30+
id: readme-update
31+
run: |
32+
python .github/scripts/update-readme.py
33+
echo "::set-output name=changes::$(git status -s | wc -l)"
34+
35+
- name: Commit files
36+
if: steps.readme-update.outputs.changes > 0
37+
run: |
38+
git config --local user.email "[email protected]"
39+
git config --local user.name "GitHub Action"
40+
git commit -m "Auto README Update [$(date)] :robot:" -a
41+
42+
- name: Push changes
43+
if: steps.readme-update.outputs.changes > 0
44+
uses: ad-m/github-push-action@master
45+
with:
46+
github_token: ${{ secrets.GITHUB_TOKEN }}
47+
branch: ${{ github.ref }}

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,16 @@ noScan=true ./scan4all -l list.txt -v
7070

7171
| TAG | COUNT | AUTHOR | COUNT | DIRECTORY | COUNT | SEVERITY | COUNT | TYPE | COUNT |
7272
|-----------|-------|---------------|-------|------------------|-------|----------|-------|---------|-------|
73-
| cve | 1294 | daffainfo | 605 | cves | 1277 | info | 1352 | http | 3554 |
74-
| panel | 591 | dhiyaneshdk | 503 | exposed-panels | 600 | high | 938 | file | 76 |
75-
| lfi | 486 | pikpikcu | 321 | vulnerabilities | 493 | medium | 766 | network | 50 |
76-
| xss | 439 | pdteam | 269 | technologies | 266 | critical | 436 | dns | 17 |
77-
| wordpress | 401 | geeknik | 187 | exposures | 254 | low | 211 | | |
78-
| exposure | 355 | dwisiswant0 | 169 | misconfiguration | 207 | unknown | 7 | | |
79-
| cve2021 | 322 | 0x_akoko | 154 | token-spray | 206 | | | | |
80-
| rce | 313 | princechaddha | 147 | workflows | 187 | | | | |
81-
| wp-plugin | 297 | pussycat0x | 128 | default-logins | 101 | | | | |
82-
| tech | 282 | gy741 | 126 | file | 76 | | | | |
73+
| cve | 1430 | daffainfo | 631 | cves | 1407 | info | 1474 | http | 3858 |
74+
| panel | 655 | dhiyaneshdk | 584 | exposed-panels | 662 | high | 1009 | file | 76 |
75+
| edb | 563 | pikpikcu | 329 | vulnerabilities | 509 | medium | 818 | network | 51 |
76+
| lfi | 509 | pdteam | 269 | technologies | 282 | critical | 478 | dns | 17 |
77+
| xss | 491 | geeknik | 187 | exposures | 275 | low | 225 | | |
78+
| wordpress | 419 | dwisiswant0 | 169 | misconfiguration | 237 | unknown | 11 | | |
79+
| exposure | 407 | 0x_akoko | 165 | token-spray | 230 | | | | |
80+
| cve2021 | 352 | princechaddha | 151 | workflows | 189 | | | | |
81+
| rce | 337 | ritikchaddha | 137 | default-logins | 103 | | | | |
82+
| wp-plugin | 316 | pussycat0x | 133 | file | 76 | | | | |
8383

8484
**281 directories, 3922 files**.
8585
* vscan POC

README_CN.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,16 @@ noScan=true ./scan4all -l list.txt -v
7070

7171
| TAG | COUNT | AUTHOR | COUNT | DIRECTORY | COUNT | SEVERITY | COUNT | TYPE | COUNT |
7272
|-----------|-------|---------------|-------|------------------|-------|----------|-------|---------|-------|
73-
| cve | 1294 | daffainfo | 605 | cves | 1277 | info | 1352 | http | 3554 |
74-
| panel | 591 | dhiyaneshdk | 503 | exposed-panels | 600 | high | 938 | file | 76 |
75-
| lfi | 486 | pikpikcu | 321 | vulnerabilities | 493 | medium | 766 | network | 50 |
76-
| xss | 439 | pdteam | 269 | technologies | 266 | critical | 436 | dns | 17 |
77-
| wordpress | 401 | geeknik | 187 | exposures | 254 | low | 211 | | |
78-
| exposure | 355 | dwisiswant0 | 169 | misconfiguration | 207 | unknown | 7 | | |
79-
| cve2021 | 322 | 0x_akoko | 154 | token-spray | 206 | | | | |
80-
| rce | 313 | princechaddha | 147 | workflows | 187 | | | | |
81-
| wp-plugin | 297 | pussycat0x | 128 | default-logins | 101 | | | | |
82-
| tech | 282 | gy741 | 126 | file | 76 | | | | |
73+
| cve | 1430 | daffainfo | 631 | cves | 1407 | info | 1474 | http | 3858 |
74+
| panel | 655 | dhiyaneshdk | 584 | exposed-panels | 662 | high | 1009 | file | 76 |
75+
| edb | 563 | pikpikcu | 329 | vulnerabilities | 509 | medium | 818 | network | 51 |
76+
| lfi | 509 | pdteam | 269 | technologies | 282 | critical | 478 | dns | 17 |
77+
| xss | 491 | geeknik | 187 | exposures | 275 | low | 225 | | |
78+
| wordpress | 419 | dwisiswant0 | 169 | misconfiguration | 237 | unknown | 11 | | |
79+
| exposure | 407 | 0x_akoko | 165 | token-spray | 230 | | | | |
80+
| cve2021 | 352 | princechaddha | 151 | workflows | 189 | | | | |
81+
| rce | 337 | ritikchaddha | 137 | default-logins | 103 | | | | |
82+
| wp-plugin | 316 | pussycat0x | 133 | file | 76 | | | | |
8383

8484
**281 directories, 3922 files**.
8585
* vscan POC

0 commit comments

Comments
 (0)