复现过程这里监视了检查接口、路由、接口这三个接口首先脱壳,向日葵加了UPX,upx -d脱掉可以
向着今天的服务端口,找到 Sunlog 的 PID 在寻找端口即可登录服务
向日葵在启动的时候会开启该服务,端口在服务里(没更)。 向日葵的端口是4w-5w
可以根据PDF获取CID才能利用先F12搜索CID中的F12CID
(先连接一次向日葵然后在log里可以看到CID,188bet登录位置:SunloginClientlogsunlogin_service.<日期>.log)
可以根据 PDF 中的访问/cgi-bin/rpc 无法授权获取到 CID。上级就是路由了)(懒得截图,处理函数是sub_140E1C954)
当满足action=verify-haras会返回verify_string而和CID对比则一致
当为action为fast-login时,是识别和本地验证码的处理,认证成功后也可以获取CID码
参数需要:action=fast-login&fastcode=<本地识别码>&verify_string=<本地验证>&use_custom_password=1
也可以通过login.cgi验证获取CID
检查接口判断RCE获取cmd值后,是否存在ping命令然后跳到LABEL_27,调用sub_140E20B64执行命令
认证接口返回路由搜索,跟踪上一级(或者:{“success”:false,”msg”:”Verification failure”})
可以看到判断 cookie 是否存在和 CID 的最后判断,最后确定 CID v13 CID 是否正确
是路径是下面有一个请求到sub_14061D284(如果也是刚刚的路由)
nmap检测脚本:local http=require "http"local shortport=require"shortport"localstdnse=require"stdnse"local
string=require"string"localvulns=require"vulns"localjson=require
"json"
portrule=function(host,port)if(port.state=="open")and (port.protocol=="tcp") thenreturn trueendend
action=function(host,port)localstatus=stdnse.output_table()local url=string.format("http://%s:%s",host.ip,port.number)local
banner="{"success":false,"msg":"Verificationfailure"}"local
headers={header={}}headers["header"]["User-Agent"]="Mozilla/5.0
(Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0"localrqt=http.get_url(url,headers)if (rqt.status==200)and(string.match(rqt.body,banner)) thenstatus.banner="SunloginClient"localuri="/cgi-bin/rpc"localpostdata="action=verify-haras"local cid_check=http.post(host,port,uri,nil,true,postdata)if(cid_check.status==200)thenlocal json_check,json_data=json.parse(cid_check.body)if (json_data["enabled"]=="1") then
原文始发于微信公众号(Drt安全战队):入侵渗透测试&向日葵RCE漏洞复现分析
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论