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

能给一个struts2漏洞检测的配置的demo吗? #32

Open
Kaide0521 opened this issue Mar 19, 2019 · 2 comments
Open

能给一个struts2漏洞检测的配置的demo吗? #32

Kaide0521 opened this issue Mar 19, 2019 · 2 comments

Comments

@Kaide0521
Copy link

能给一个struts2漏洞检测的配置的demo吗?

@ywolf
Copy link
Member

ywolf commented Mar 19, 2019

{
"type": "web",
"netloc": "http://xxx.com",
"target": "struts2",
"meta":{
"filelist":["http://xxx.com/xxx.action","http://xxx.com/222.action","http://xxx.com/asdas/123.action"]
}
}

@0xlwoe21k
Copy link

0xlwoe21k commented Dec 13, 2019

filelist 必须以 http://xxx.com/asdas/123.action 这种格式,不然匹配不到。

源码中的正则如下:
r, err := regexp.Compile(/(\w+)/\S+.(do|action)$)

测试如下:
`func main() {

url := "http://xxx.com/123/actionChain1.action"
r, err := regexp.Compile(`\/(\w+)\/\S+\.(do|action)$`)
if err != nil {
	return
}
if ok := r.MatchString(url); ok {
	m := r.FindStringSubmatch(url)
	fmt.Println("m:", m)
}

}`

输出:
m: [/123/actionChain1.action 123 action]

http://xxx.com/actionChain1.action 中间的值去掉

无输出。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants