Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create 小白问答.md #180

Merged
merged 4 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21.3
go-version: 1.21.4
- name: Install Dependences
run: |
brew install libpcap upx
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21.3
go-version: 1.21.4
- name: Install Dependences
run: |
sudo apt install -yy --fix-missing libpcap-dev upx
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21.3
go-version: 1.21.4
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
path = config/jaeles-signatures
url = https://github.com/jaeles-project/jaeles-signatures
branch=master
[submodule "config/nuclei-templates"]
path = config/nuclei-templates
url = https://github.com/projectdiscovery/nuclei-templates.git
branch=main
[submodule "config/fuzzing-templates"]
path = config/fuzzing-templates
url = https://github.com/projectdiscovery/fuzzing-templates.git
Expand Down
2 changes: 1 addition & 1 deletion Formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class scan4all < Formula
desc "Official repository vuls Scan: 15000+PoCs; 23 kinds of application password crack; 7000+Web fingerprints; 146 protocols and 90000+ rules Port scanning; Fuzz, HW, awesome BugBounty( ͡° ͜ʖ ͡°)..."
homepage "https://github.com/GhostTroops/scan4all"
url "https://github.com/GhostTroops/scan4all/releases/download/2.9.0/scan4all_2.9.0_macOS_amd64.zip"
sha256 "ccd874a283defad6a0deb11377cb9d6024cb5946b46f61f36008e0afe9db4950"
sha256 "542f26a2cbcbd37318d8cbb6e40607cfbff91f6c3a2ea945e143833c1a6aca19"
version "V2.9.0"

def install
Expand Down
2 changes: 1 addition & 1 deletion config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"enableMultNuclei": false,
"enableNuclei": true,
"enableByWaf": true,
"enableDevDebug": true,
"enableDevDebug": false,
"enableEmbedYaml": true,
"enableFileFuzz": true,
"httpx": {
Expand Down
1 change: 0 additions & 1 deletion config/nuclei-templates
Submodule nuclei-templates deleted from 9cd351
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/GhostTroops/scan4all

go 1.21
go 1.21.4

require (
github.com/PuerkitoBio/goquery v1.8.1
Expand Down
28 changes: 17 additions & 11 deletions lib/util/checkerImp.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ var (
)

// 检查器的设计:解耦、规范、统一,各类专注实现自己
// 1、允许未响应header、body、js、css等构建不同的检查器
// 2、每个检查器都有缓存
// 3、避免重复检查
// 4、具有自动释放缓存的机制,程序退出时自动消费(内存缓存)
//
// 1、允许未响应header、body、js、css等构建不同的检查器
// 2、每个检查器都有缓存
// 3、避免重复检查
// 4、具有自动释放缓存的机制,程序退出时自动消费(内存缓存)
type CheckerTools struct {
Name string `json:"name"` // RespHeader,RespBody,RespJs,RespCss,RespTitle,ReqHeader
checkFunc []func(*CheckerTools, ...interface{}) `json:"check_func"` // 注册的检查器
Expand Down Expand Up @@ -78,8 +79,10 @@ func (r *CheckerTools) GetBodyStr(a ...interface{}) string {
// 检查
func (r *CheckerTools) Check(parm ...interface{}) {
for _, f := range r.checkFunc {
log.Printf("Check %+v\n", parm)
f(r, parm...)
if nil != f {
log.Printf("Check %+v\n", parm)
f(r, parm...)
}
}
}

Expand Down Expand Up @@ -112,12 +115,15 @@ func CheckRespHeader(parm ...interface{}) {
}

// 检查 response 对象
// 1、包括头的检查
// 2、包括body的检查
//
// 1、包括头的检查
// 2、包括body的检查
func CheckResp(szU string, resp ...*http.Response) {
for _, r := range resp {
CheckRespHeader(&r.Header, szU)
GetInstance(RespBody).Check(&r, szU)
if nil != resp && 0 < len(resp) {
for _, r := range resp {
CheckRespHeader(&r.Header, szU)
GetInstance(RespBody).Check(&r, szU)
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ var Version string
/*
go tool pprof -seconds=180 -http=:9999 http://127.0.0.1:6060/debug/pprof/heap
no leak
go tool pprof http://127.0.0.1:6060/debug/pprof/profile

http://localhost:9999/ui/
*/
func main() {
Expand Down
5 changes: 3 additions & 2 deletions projectdiscovery/nuclei_Yaml/nuclei_yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ func RunNuclei(buf *bytes.Buffer) {
szP := util.SzPwd + "/config/"
os.MkdirAll(szP+"tools/"+runtime.GOOS, os.ModePerm)
a := []string{
szP + "tools/" + runtime.GOOS + "/" + szCmd,
"-t", szP + "nuclei-templates",
//szP + "tools/" + runtime.GOOS + "/" +
szCmd,
//"-t", szP + "nuclei-templates",
"-sa",
"-duc", "-silent", "-nc",
}
Expand Down
2 changes: 0 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,6 @@ github.com/golang/glog/internal/stackdump
# github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
## explicit
github.com/golang/groupcache/lru
# github.com/golang/mock v1.6.0
## explicit; go 1.11
# github.com/golang/protobuf v1.5.3
## explicit; go 1.9
github.com/golang/protobuf/proto
Expand Down
53 changes: 53 additions & 0 deletions 小白问答.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 你好我问一下scan4all可以进行poc扫描吗
```
1、开源的啊,开源自己加
2、也可以加到nuclei中
3、scan4all 集成nuclei了
4、scan4all 也自集成了很多poc
```

# 调用poc扫描的命令你知道是什么吗
```
scan4all 工作流程
1、web扫描,得到指纹信息,根据指纹调用不同的poc
2、端口扫描,根据指纹,调用不同的多任务进行密码破解,默认情况我记得是关闭了的

也就是说,如果没有捕获到指纹,poc不会运行
```

# 端口扫描是不会进行poc扫描的是吧
```
要的,如果端口是web http服务,会走上面 1 的流程
开源版本scan4all,poc比较单一,依赖指纹的命中
没有开源的版本,跳过指纹,全fuzz,而且采用多种技术混淆poc
```

# 还有没有开源的版本吗
```
1、目前自己用的
2、未来可能会开源,欢迎关注
```

# 这个指纹是指的是含有某个漏洞的特征吗
```
指纹: 识别后端的特征,例如中间件weblogic、java、php、或者某种框架、产品等
通过这些特征筛选出特定的poc对目标进行扫描、渗透

优点:发包量小,精准度高
缺点:一旦系统没有暴露特征,很难筛选出精准的poc。目前很多CDN、WAF都会努力屏蔽这些指纹特征。

最新的scan4all、自用版本,则跳过指纹,每个目标、每个子目录都迭代若干次poc
缺点:发包量巨大,容易被WAF识别、拦截
优点:在没有WAF、隐藏了指纹的情况,成功率会提高

```

# 最新、未开源版本 scan4all 特点都有哪些
最大的变化是,这个版本 主要以 RCE 攻击、渗透为主,抛弃无法GET Shell的一些poc
```
1、全fuzz
2、每个web子目录都会分别发包
3、每个poc除非指定不多重编码,否则每个poc会 * 多种命令 * 多种编码(各种ByPass),最后发包
每种命令:适应不同场景,例如,目标没有wget、curl、bash、nc等情况等RCE;不同的组合,解决目标的各种刁钻古怪苛刻的环境
多种编码:目的是绕过WAF
```
Loading