Compare commits

...

24 Commits
v1.6 ... main

Author SHA1 Message Date
SleepingBag945
4c428a7c17 v2.0.2 2024-06-07 19:18:11 +08:00
SleepingBag945
33b6e2876b v2.0.2 2024-06-07 19:17:14 +08:00
SleepingBag945
1d08496a68 端口阈值过滤逻辑 2024-05-24 10:30:19 +02:00
SleepingBag945
ac8c808af2
Update Update.md 2024-05-18 06:03:15 +02:00
SleepingBag945
d57a5e234c 修改描述错误 2024-05-15 09:12:08 +02:00
SleepingBag945
1c39db9480
修复金蝶EAS匹配问题,感谢fengbenjianmo
修复金蝶EAS匹配问题,感谢fengbenjianmo
2024-04-27 19:02:27 +02:00
SleepingBag945
20888bd3f3 修复括号匹配问题 2024-04-27 18:55:20 +02:00
SleepingBag945
516fbd5c6a 修复hunter状态码显示错误 2024-04-08 10:52:51 +02:00
SleepingBag945
26f23b8aea 修复2.0版本poc参数不生效 2024-04-08 10:44:41 +02:00
SleepingBag945
b8e9126c4a 修复模板过滤问题 2024-04-03 08:33:55 +02:00
SleepingBag945
c33b23a379 补充说明 2024-04-03 06:38:20 +02:00
SleepingBag945
9a83a1b39f dddd v2.0 2024-04-03 06:32:26 +02:00
SleepingBag945
9f8f4de4ad nuclei v3.1.8 2024-02-01 09:30:33 +01:00
SleepingBag945
817704a0fb
Update README.md 2024-01-15 08:20:48 +01:00
SleepingBag945
c793792d67 v1.8 2024-01-15 08:19:45 +01:00
SleepingBag945
95ac44115a 更新nuclei至v3.1.3 2024-01-08 04:19:07 +01:00
SleepingBag945
50e721158f
Update README.md 2024-01-04 04:04:24 +01:00
SleepingBag945
c653fb541f
Update Update.md 2024-01-03 03:38:51 +01:00
SleepingBag945
90af47e044
Update Update.md 2024-01-03 03:38:29 +01:00
SleepingBag945
2a8b733051
Update Update.md 2024-01-03 03:37:57 +01:00
SleepingBag945
b939e7f114 update.md 2024-01-03 02:57:00 +01:00
SleepingBag945
685c0a4b34 时区异常处理 2024-01-03 02:55:33 +01:00
SleepingBag945
c95164a81d 修复读空指针 2024-01-03 02:40:04 +01:00
SleepingBag945
93fa4e85ac
Update Update.md 2024-01-03 01:33:08 +01:00
2702 changed files with 25161 additions and 21099 deletions

View File

@ -4,18 +4,29 @@
# 特点
## 特点
* 自动识别输入类型,无需手动分类
* 便于拓展的主动/被动指纹识别
* 指纹支持复杂 与/或/非/括号 逻辑运算。人类友好。
* Nuclei v3支持
* 便于拓展的指纹漏洞映射数据库,尽量避免发送无效发包
* 便于拓展的指纹漏洞映射数据库,尽量避免无效发包
* 高效的子域名枚举/爆破,精准的泛解析过滤
* Hunter、Fofa、Quake支持
* Hunter 低感知模式
* 低依赖,多系统开箱即用
* 高效的HTML报表
* 审计日志
* 高效的HTML报表包含漏洞请求响应
* 审计日志,敏感环境必备
@ -23,17 +34,12 @@
### 安装
```
任意文件夹:
- config
- ...
- dddd.exe
```
Release中下载config.zip与您操作系统对应的二进制文件。将config.zip中的config文件夹解压至二进制文件相同的目录即可。
Release中下载config.zip与您操作系统对应的二进制文件。直接命令行运行即可。
PS: dddd v2.0起可以独立于config文件夹运行。
### 最简使用
扫描IP
@ -54,13 +60,55 @@ Release中下载config.zip与您操作系统对应的二进制文件。将config
### 输出文件
默认漏洞输出结果文件名为 `当前时间戳.html`
dddd存在三种文件输出
日志保存在 `log.txt`
1. txt格式输出默认选择
2. html格式默认选择
3. 审计日志(可选)
**-a** 参数开启审计日志功能,记录详细扫描行为。
**扫描可以随时终止**,当有指纹识别、漏扫结果输出时,会实时保存在文件内。
所有结果默认输出在 `result.txt`,可通过`-o`参数更改输出文件,`-ot`参数更改输出格式(json)默认为text。
默认HTML格式漏洞输出为 `当前时间戳.html`,可通过`-ho`参数更改输出文件。
**-a** 参数开启审计日志功能,日志保存在 `audit.log`,记录详细扫描行为。
**扫描可以随时终止**,当有指纹识别、漏扫结果等输出时,会实时保存在文件内。
### 应用场景命令速查
红队外网 (Hunter)
`dddd -t 'icp.name="xxxx有限公司"' -hunter -oip`
红队外网 (Hunter查询备案,Fofa补充端口高效梳理资产
`dddd -t 'icp.name="xxxx有限公司"' -hunter -fofa -oip`
红队外网 (本机枚举子域名)
`dddd -t xxx.com -sd`
红队内网
`./dddd -t 172.16.100.0/24`
安服测试/敏感环境 (开启审计日志~~,便于事后甩锅~~)
`./dddd -t 172.16.100.1 -a`
仅指纹识别
`./dddd -t http://www.xxx.com -npoc`
`./dddd -t 172.16.100.11 -npoc`
`./dddd -t 172.16.120.11:3307 -npoc`

View File

@ -1,6 +1,91 @@
# 更新日志
## 2023.1.2
## 2024.4.2
迟来的一次大更新。没有config文件夹也能跑也支持adb未授权检测咯。祝各位师傅演练顺利
修复协议识别时超时参数不生效的问题。
协议识别时,端口开放,但未匹配到协议的资产会显示为 tcp://127.0.0.1:8333的格式。
默认扫描线程Windows改为1000Linux默认4000。
默认Nmap协议识别线程改为500。
新增Nmap协议识别超时一个探针参数默认为5s。
默认Web探针线程改为200超时时间改为10s
-h的参数提示功能分组化方便查看。
本次更新有大量参数修改,使用时-h看下新的参数配置。
subfinder模块更新至v2.6.5,解决报错问题
-t 参数支持导入dddd指纹识别历史(json/text均可),直接开始漏洞扫描。如-t result.txt
-t 参数支持直接导入fscan的端口扫描结果result.txt中的"ip:port open"格式复用端口扫描结果。内网中经常能遇到其他队伍的fscan结果能直接拿来用。。哈哈
支持识别ADB协议、发现未授权adb
指纹识别线程按cpu逻辑核心数*2设置而不是默认100降低少核心cpu频繁切换协程的成本。
输出格式化。-ot参数可选输出Json,text。
API配置文件更名 subfinder-config.yaml => api-config.yaml
config配置内置化有就读取没有就用默认内置的原来的config文件夹不影响。
当api配置文件不存在且调用了需要api配置的功能dddd会在指定的地方生成api配置模板。
默认用内置的poc当外置poc名称和内置重复时优先使用外置的。
添加upf和up参数
./dddd -t -up 'root : 123456'
能指定服务爆破的字典了。upf是up的文件版本一行一个
跑web的时候新加了一个进度1000次尝试输出一次总体进度
跑gopoc也加了一个100个输出一次总体进度
新增-et参数用于排除指定tags的模板。
新增-s参数用于限定指定的nuclei模板严重程度。
## 2024.2.1
更新nuclei版本至v3.1.8可以用最新特性写poc了。
## 2024.1.15
添加-oip参数选择后将以ip:port的形式从网络空间搜索引擎中拉取资产,但消耗的积分不会变少。fofa,hunter,quake通用
如果遇到几百个域名都解析到一个ip的情况那就可以使用虽然可能会漏掉一些绑定域名的资产但能少掉不少重复的测试节省网络、时间资源。
添加-ac 参数默认关闭不进行带有CDN/WAF资产的探测这么做的原因是实战中大部分存在漏洞的资产都是没有CDN/WAF的不探测这些资产能有效节省时间。使用ac参数后将不再过滤CDN/WAF资产。
添加 -nh 参数,默认关闭。开启后将禁用域名绑定资产的探测。
现在HTML报告支持多数据包顺序输出了之前只有最后一个数据包确实很蛋疼。https://github.com/SleepingBag945/dddd/issues/27
## 2024.1.8
将内嵌的nuclei更新至v3.1.3版本有新的nuclei模板需要最新的nuclei引擎支持
将审计日志修改至基于nuclei debug功能更全一点。1.6版本的审计日志会漏掉dns和javascript类的poc。
## 2024.1.3
紧急修复一个因为resp为空导致读空指针的问题。
嘎掉log.txt的记录有审计日志就没必要存在了。
修复时区异常处理的问题。(https://github.com/SleepingBag945/dddd/issues/25)
## 2024.1.2
更新到1.6版本
@ -9,8 +94,8 @@
2. 更新了 **-ni** 参数,用于禁用反连平台。不出网的内网就没必要用反连平台了,容易拖慢扫描速度,且在敏感环境建议开启避免外连至国外地址造成不必要的麻烦。(敏感肌也能用!)
3. 新增审计日志输出。默认关闭,使用 **-a** 参数(audit)开启。时间、请求地址、响应包、请求包等写至audit.log (可以通过 **-alf** 参数自定义名称)~~便于甩锅~~ 。避免日志过大,**Golang Poc中爆破不会显示详细数据包只显示时间、目标、账号与密码。**在敏感环境建议开启,尽管会占用一些磁盘,但能让自己安全一点总归是好事。
4. 审计功能可以当做debug使用。会在日志中写入详细的运行过程/数据包。便于调试poc/workflow。
5. 启动时可通过 **-pt** 参数开启代理验证,验证失败程序退出。**-ptu** 参数指定访问的代理测试url默认为https://www.baidu.com。https://github.com/SleepingBag945/dddd/issues/24
6. 修复了fofa请求的base64编码问题。 https://github.com/SleepingBag945/dddd/issues/23
5. 启动时可通过 **-pt** 参数开启代理验证,验证失败程序退出。**-ptu** 参数指定访问的代理测试url默认为https://www.baidu.com。 (https://github.com/SleepingBag945/dddd/issues/24)
6. 修复了fofa请求的base64编码问题。 (https://github.com/SleepingBag945/dddd/issues/23)
7. 更新53个热点Poc。

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

@ -1,12 +1,14 @@
package callnuclei
import (
"embed"
"fmt"
"github.com/projectdiscovery/nuclei/v3/pkg/output"
"os"
"os/signal"
"runtime"
"runtime/pprof"
"strings"
"time"
"github.com/projectdiscovery/goflags"
@ -16,7 +18,6 @@ import (
"github.com/projectdiscovery/nuclei/v3/pkg/exportrunner"
"github.com/projectdiscovery/nuclei/v3/pkg/operators/common/dsl"
"github.com/projectdiscovery/nuclei/v3/pkg/types"
"github.com/projectdiscovery/nuclei/v3/pkg/utils/monitor"
errorutil "github.com/projectdiscovery/utils/errors"
fileutil "github.com/projectdiscovery/utils/file"
)
@ -27,19 +28,29 @@ var (
options = &types.Options{}
)
func CallNuclei(TargetAndPocsName map[string][]string,
proxy string,
callBack func(result output.ResultEvent),
nameForSearch string,
NoInteractsh bool) []output.ResultEvent {
type NucleiParams struct {
TargetAndPocsName map[string][]string
Proxy string
CallBack func(result output.ResultEvent)
NameForSearch string
NoInteractsh bool
Fs embed.FS
NP string
ExcludeTags []string
Severities []string
InteractshServer string
InteractshToken string
}
func CallNuclei(param NucleiParams) []output.ResultEvent {
// 设置结果回调
output.AddResultCallback = callBack
output.AddResultCallback = param.CallBack
if err := exportrunner.ExportRunnerConfigureOptions(); err != nil {
gologger.Fatal().Msgf("Could not initialize options: %s\n", err)
}
readConfig(TargetAndPocsName, proxy, nameForSearch, NoInteractsh)
readConfig(param)
// configPath, _ := flagSet.GetConfigFilePath()
if options.ListDslSignatures {
@ -68,11 +79,6 @@ func CallNuclei(TargetAndPocsName map[string][]string,
exportrunner.ExportRunnerParseOptions(options)
if options.HangMonitor {
cancel := monitor.NewStackMonitor(10 * time.Second)
defer cancel()
}
nucleiRunner, err := exportrunner.ExportRunnerNew(options)
if err != nil {
gologger.Fatal().Msgf("Could not create runner: %s\n", err)
@ -81,6 +87,9 @@ func CallNuclei(TargetAndPocsName map[string][]string,
return []output.ResultEvent{}
}
nucleiRunner.EmbedPocsFS = param.Fs
nucleiRunner.EnableSeverities = param.Severities
// Setup graceful exits
resumeFileName := types.DefaultResumeFilePath()
c := make(chan os.Signal, 1)
@ -94,7 +103,7 @@ func CallNuclei(TargetAndPocsName map[string][]string,
}
}()
if err := nucleiRunner.RunEnumeration(TargetAndPocsName); err != nil {
if err := nucleiRunner.RunEnumeration(param.TargetAndPocsName); err != nil {
if options.Validate {
gologger.Fatal().Msgf("Could not validate templates: %s\n", err)
} else {
@ -109,18 +118,20 @@ func CallNuclei(TargetAndPocsName map[string][]string,
return output.Results
}
func readConfig(TargetAndPocsName map[string][]string, proxy string, nameForSearch string, NoInteractsh bool) {
func readConfig(param NucleiParams) {
pwd, _ := os.Getwd()
// target URLs/hosts to scan
// 扫描目标
var targets []string
for k, _ := range TargetAndPocsName {
for k, _ := range param.TargetAndPocsName {
targets = append(targets, k)
}
options.Targets = targets
options.ExcludeTargets = []string{}
// path to file containing a list of target URLs/hosts to scan (one per line)
// 包含要扫描的目标URL/主机列表的文件路径(每行一个)
options.TargetsFilePath = ""
@ -153,8 +164,16 @@ func readConfig(TargetAndPocsName map[string][]string, proxy string, nameForSear
// list of template or template directory to run (comma-separated, file)
// 要运行的模板或模板目录列表(逗号分隔,文件) -t 指定的模板目录
// 不嵌入可执行文件是为了方便增删poc。内网版本嵌入
options.Templates = []string{pwd + "/config/pocs/"}
// 不嵌入可执行文件是为了方便增删poc。
// dddd v2.0开始默认支持内嵌此文件夹内的pocs做补充处理
if strings.HasPrefix(param.NP, "/") || param.NP[1] == ':' {
// unix绝对路径windows绝对路径
options.Templates = []string{param.NP}
} else {
// 相对路径转绝对路径
options.Templates = []string{pwd + "/" + param.NP}
}
// list of template urls to run (comma-separated, file)
// 要运行的模板url列表(逗号分隔,文件)
@ -198,7 +217,7 @@ func readConfig(TargetAndPocsName map[string][]string, proxy string, nameForSear
// templates to exclude based on tags (comma-separated, file)
// 排除执行带有标记的模板(逗号分隔,文件)
options.ExcludeTags = nil
options.ExcludeTags = param.ExcludeTags
// tags to be executed even if they are excluded either by default or configuration
// 执行默认或者配置排除的标记模板
@ -226,6 +245,7 @@ func readConfig(TargetAndPocsName map[string][]string, proxy string, nameForSear
// templates to run based on severity
// 根据严重程度运行模板可候选的值有info,low,medium,high,critical
// 不好使,不走这里了
options.Severities = nil
// templates to exclude based on severity
@ -376,10 +396,10 @@ func readConfig(TargetAndPocsName map[string][]string, proxy string, nameForSear
options.TlsImpersonate = false
// 使用interactsh反连检测平台默认为oast.pro,oast.live,oast.site,oast.online,oast.fun,oast.me
options.InteractshURL = ""
options.InteractshURL = param.InteractshServer
// 指定反连检测平台的身份凭证
options.InteractshToken = ""
options.InteractshToken = param.InteractshToken
// 指定保存在交互缓存中的请求数默认5000
options.InteractionsCacheSize = 5000
@ -394,7 +414,7 @@ func readConfig(TargetAndPocsName map[string][]string, proxy string, nameForSear
options.InteractionsCoolDownPeriod = 5
// 禁用反连检测平台,同时排除基于反连检测的模板
options.NoInteractsh = NoInteractsh
options.NoInteractsh = param.NoInteractsh
// overrides fuzzing type set in template (replace, prefix, postfix, infix)
// 覆盖模板中设置的模糊类型(替换、前缀、后缀、中缀)
@ -472,16 +492,16 @@ func readConfig(TargetAndPocsName map[string][]string, proxy string, nameForSear
options.ShowActions = false
// 显示所有请求和响应
options.Debug = false
options.Debug = gologger.Audit
// 显示所有请求
options.DebugRequests = false
// 显示所有响应
options.DebugResponse = false
// 使用http/socks5代理逗号分隔文件
if proxy == "" {
if param.Proxy == "" {
options.Proxy = nil
} else {
options.Proxy = []string{proxy}
options.Proxy = []string{param.Proxy}
}
// 代理所有请求
options.ProxyInternal = false
@ -522,50 +542,23 @@ func readConfig(TargetAndPocsName map[string][]string, proxy string, nameForSear
// 更改Nuclei默认端口默认9092
options.MetricsPort = 9092
// run scan on nuclei cloud
options.Cloud = false
// add specified data source (s3,github)
options.AddDatasource = ""
// add target(s) to cloud
options.AddTarget = ""
// add template(s) to cloud
options.AddTemplate = ""
// list previous cloud scans
options.ScanList = false
// list scan output by scan id
options.ScanOutput = ""
// list cloud target by id
options.ListTargets = false
// list cloud template by id
options.ListTemplates = false
// list cloud datasource by id
options.ListDatasources = false
// list reporting sources
options.ListReportingSources = false
// delete cloud scan by id
options.DeleteScan = ""
// delete target(s) from cloud
options.RemoveTarget = ""
// delete template(s) from cloud
options.RemoveTemplate = ""
// delete specified data source
options.RemoveDatasource = ""
// disable specified reporting source
options.DisableReportingSource = ""
// enable specified reporting source
options.EnableReportingSource = ""
// get target content by id
options.GetTarget = ""
// get template content by id
options.GetTemplate = ""
// disable scan/output storage on cloud
options.NoStore = false
// do not display pretty-printed tables
options.NoTables = false
// limit the number of output to display
options.OutputLimit = 100
options.OmitTemplate = false
options.PocNameForSearch = nameForSearch
// network请求超时时间
options.DialerTimeout = 0
// network请求的keep-alive持续时间
options.DialerKeepAlive = 0
// 启用加载基于代码协议的模板
options.EnableCodeTemplates = false
// 将扫描结果上传到pdcp仪表板 敏感环境高危
options.EnableCloudUpload = false
options.SignTemplates = false
options.PocNameForSearch = param.NameForSearch
gologger.DefaultLogger.SetTimestamp(options.Timestamp, levels.LevelDebug)

View File

@ -39,3 +39,5 @@ MINIO-Browser:
- "/minio/"
Tomcat-Login:
- "/manager/html"
Jenkins:
- "/jenkins/login"

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More