<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>腾讯代码安全检查Xcheck</title>
    <link>https://wechat2rss.xlab.app/feed/267f1258101e978e4cc8507724579217adf600cf.xml</link>
    <description>腾讯代码安全检查Xcheck，是一个腾讯公司自研的静态应用安全测试(SAST，Static application security testing)工具，致力于挖掘代码中隐藏的安全风险，提升代码安全质量。&#xA;(wechat feed made by @ttttmr https://wechat2rss.xlab.app)</description>
    <managingEditor> (腾讯代码安全检查Xcheck)</managingEditor>
    <image>
      <url>https://wx.qlogo.cn/mmhead/Q3auHgzwzM4ST1sLMxsskkIAmQHu7rVuaric6m7NACjkqf2YqRGTX6w/0</url>
      <title>腾讯代码安全检查Xcheck</title>
      <link>https://wechat2rss.xlab.app/feed/267f1258101e978e4cc8507724579217adf600cf.xml</link>
    </image>
    <item>
      <title>【腾讯云代码分析】TCA融合工具Xcheck（试用版）</title>
      <link>https://mp.weixin.qq.com/s?__biz=Mzg2ODQ3ODE1NA==&amp;mid=2247486404&amp;idx=1&amp;sn=c5dbb0295f59014dd2229566a8670655</link>
      <description>TCA融合工具Xcheck，致力于挖掘代码中隐藏的安全风险，提升代码安全质量。</description>
      <content:encoded><![CDATA[<p>
原创 <span>腾讯云代码分析</span> <span>2024-12-31 17:30</span> <span style="display: inline-block;">广东</span>
</p>

<p>TCA融合工具Xcheck，致力于挖掘代码中隐藏的安全风险，提升代码安全质量。</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=175705b6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F8SDYbMEObOIuh5LjEbGE4HaibJfS2LWDEL3b1ibh6vPaXpog2SLTYlianNZ2v0pyLHduBygicYiaOlZYHI2YGIWyrew%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<p style="margin-bottom: 0em;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;font-family: system-ui, -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;color: rgb(34, 34, 34);background-color: rgb(255, 255, 255);text-align: center;visibility: visible;"><img class="rich_pages wxw-img __bg_gif" data-backh="56" data-backw="578" data-cropselx1="0" data-cropselx2="562" data-cropsely1="0" data-cropsely2="104" data-galleryid="" data-imgfileid="100002748" data-ratio="0.09749670619235837" style="-webkit-tap-highlight-color: transparent;outline: 0px;display: initial;width: 578.182px;visibility: visible !important;" data-type="gif" data-w="759" src="https://wechat2rss.xlab.app/img-proxy/?k=b11c37c0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FWl5fxRNUSKiaoCK7j6treg7xfJhppNTSZOoSzpDTEibraPImqqNA7vWiaMfZ0ESQia2LkdicckqgDol89xOYWCVsUaw%2F640%3Fwx_fmt%3Dother%26from%3Dappmsg%26wxfrom%3D10005%26wx_lazy%3D1%26wx_co%3D1%26tp%3Dwebp"/></p><section style="margin-right: 8px;margin-bottom: 0px;margin-left: 8px;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;color: rgb(34, 34, 34);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;background-color: rgb(255, 255, 255);visibility: visible;text-align: left;line-height: 1.5em;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgb(136, 136, 136);font-family: &#34;San Francisco&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;PingFang SC&#34;, &#34;Microsoft Yahei&#34;, 微软雅黑, &#34;Hiragino Sans GB&#34;, STHeiTi, sans-serif;font-size: 14px;letter-spacing: 1.5px;visibility: visible;">官网地址：<span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;">（点击最下方【阅读原文】可直达）</span><a href="https://tca.tencent.com/" target="_blank">https://tca.tencent.com/</a></span><br style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;"/></section><section style="margin-right: 8px;margin-bottom: 0px;margin-left: 8px;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;color: rgb(34, 34, 34);text-align: left;font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;background-color: rgb(255, 255, 255);visibility: visible;line-height: 1.5em;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgb(136, 136, 136);font-family: &#34;San Francisco&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;PingFang SC&#34;, &#34;Microsoft Yahei&#34;, 微软雅黑, &#34;Hiragino Sans GB&#34;, STHeiTi, sans-serif;font-size: 14px;letter-spacing: 1.5px;visibility: visible;">官网介绍：<a href="https://cloud.tencent.com/product/tcap" target="_blank">https://cloud.tencent.com/product/tcap</a><br style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;"/>官方开源：<a href="https://github.com/Tencent/CodeAnalysis" target="_blank">https://github.com/Tencent/CodeAnalysis</a></span></section><p style="margin-right: 8px;margin-left: 8px;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;color: rgb(34, 34, 34);text-align: left;font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;background-color: rgb(255, 255, 255);visibility: visible;line-height: 1.5em;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;color: rgb(136, 136, 136);font-family: &#34;San Francisco&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;PingFang SC&#34;, &#34;Microsoft Yahei&#34;, 微软雅黑, &#34;Hiragino Sans GB&#34;, STHeiTi, sans-serif;font-size: 14px;letter-spacing: 1.5px;visibility: visible;">国内镜像：<a href="https://git.code.tencent.com/Tencent_Open_Source/CodeAnalysis" target="_blank">https://git.code.tencent.com/Tencent_Open_Source/CodeAnalysis</a></span></p><h2 style="margin-right: 16px;margin-left: 16px;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;color: rgb(34, 34, 34);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;background-color: rgb(255, 255, 255);text-align: center;visibility: visible;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;background-color: rgb(0, 82, 255);color: rgb(255, 255, 255);font-family: PingFangSC-light;letter-spacing: 1px;text-align: left;caret-color: rgb(96, 96, 96);visibility: visible;font-size: 17px;">  TCA介绍  </span></h2><p style="margin: 4px 16px 8px;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;color: rgb(34, 34, 34);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;background-color: rgb(255, 255, 255);text-align: center;line-height: 22.1px;visibility: visible;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;font-size: 15px;">▼</span></p><p style="margin: 3pt 0pt;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);font-family: 等线;font-size: 12pt;visibility: visible;text-align: left;text-indent: 2em;line-height: 1.6em;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;color: rgb(0, 0, 0);letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);font-size: 16px;">腾讯云代码分析于 2013 年从个别独立代码分析工具开始，持续逐步迭代强化，至今发展成集众多分析工具的云原生、分布式、高性能的代码综合分析跟踪子系统，支持三十余种编程语言的分析。</span></p><section style="margin: 3pt 0pt;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);font-family: 等线;font-size: 12pt;visibility: visible;text-align: left;text-indent: 2em;line-height: 1.6em;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;color: rgb(0, 0, 0);letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);font-size: 16px;">代码分析是运用词法分析、语法分析、控制流、数据流分析等技术，对代码进行综合分析，查找代码中的规范性、结构性、安全漏洞等问题，进而输出代码的详细分析报告，帮助项目持续跟踪管理项目代码质量。</span></section><section style="margin: 3pt 0pt;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);font-family: 等线;font-size: 12pt;visibility: visible;text-align: left;text-indent: 2em;line-height: 1.6em;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;color: rgb(0, 0, 0);letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);font-size: 16px;">腾讯云代码分析可以“左移”至CI门禁或本地桌面，从而尽早以低成本、高效率发现代码问题，减少修复成本，缩短修复时间。</span></section><p style="line-height: 1.6em;text-align: left;margin: 4px 0px;text-indent: 2em;"><span style="color: rgb(0, 0, 0);letter-spacing: 0px;text-decoration: none solid rgb(0, 0, 0);font-size: 16px;"><br/></span></p><h2 style="margin-right: 16px;margin-left: 16px;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;color: rgb(34, 34, 34);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;background-color: rgb(255, 255, 255);text-align: center;visibility: visible;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;font-family: PingFangSC-light;letter-spacing: 1px;text-align: left;caret-color: rgb(96, 96, 96);color: rgb(255, 255, 255);background-color: rgb(0, 82, 255);visibility: visible;font-size: 17px;">   TCA优势  </span></h2><section style="margin: 4px 16px;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;color: rgb(34, 34, 34);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;background-color: rgb(255, 255, 255);text-align: center;line-height: 22.1px;visibility: visible;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;font-size: 15px;">▼</span></section><section style="margin: 3pt 0pt;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);font-family: 等线;font-size: 12pt;visibility: visible;text-align: left;text-indent: 2em;line-height: 1.6em;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;color: rgb(0, 0, 0);letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);font-size: 16px;"></span></section><section style="margin: 3pt 0pt;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);font-family: 等线;font-size: 12pt;visibility: visible;text-align: left;text-indent: 2em;line-height: 1.6em;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;color: rgb(0, 0, 0);letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);font-size: 16px;">腾讯云代</span><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;color: rgb(0, 0, 0);letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);font-size: 16px;">码分析拥有稳定可</span><span style="color: rgb(0, 0, 0);letter-spacing: normal;text-indent: 2em;">靠的架构，采用云原生的微服务架构，支持资源弹性调度。它还采用分布式客户端模式，可以自适应优化分析效率。此外，腾讯云代码分析还国产化ARM64<span style="color: rgb(0, 0, 0);font-family: 等线;font-size: 16px;letter-spacing: normal;text-align: left;text-indent: 32px;background-color: rgb(255, 255, 255);">适配</span>支持信创。它采用服务分层设计，支持灵活扩展适配，并具备高效的数据存储能力，可以支持大规模的并发分析。</span></section><section style="margin: 3pt 0pt;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);font-family: 等线;font-size: 12pt;visibility: visible;text-align: left;text-indent: 2em;line-height: 1.6em;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;color: rgb(0, 0, 0);letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);font-size: 16px;">腾讯云代码分析支持对接业内常见的Git/SVN/Perforce仓库，并开放了标准化的API，可以快速对接主流的</span><strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);font-size: 16px;color: rgb(0, 82, 255);">CI和DevOps</span></strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;color: rgb(0, 0, 0);letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);font-size: 16px;">平台。它还支持</span><strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);font-size: 16px;color: rgb(0, 82, 255);">GitHub action和Jenkins</span></strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;color: rgb(0, 0, 0);letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);font-size: 16px;">插件的快速接入。</span></section><section style="margin: 3pt 0pt;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);font-family: 等线;font-size: 12pt;visibility: visible;text-align: left;text-indent: 2em;line-height: 1.6em;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;color: rgb(0, 0, 0);letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);font-size: 16px;">同时支持</span><strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);font-size: 16px;color: rgb(0, 82, 255);">248款工具和2500+高价值规则（总量超2.5万规则）</span></strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;color: rgb(0, 0, 0);letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);font-size: 16px;">，可以轻松扫描各种类型的代码。用户可以接入自定义工具和规则，可以根据自身业务定义业务逻辑规则，也可以集成自研工具和商业工具，以满足项目的需求。</span></section><p style="margin: 3pt 0pt 24px;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);font-family: 等线;font-size: 12pt;visibility: visible;text-align: left;text-indent: 2em;line-height: 1.6em;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;color: rgb(0, 0, 0);letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);font-size: 16px;">目前，腾讯云代码分析覆盖了业内主流的</span><strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);font-size: 16px;color: rgb(0, 82, 255);">33门语言</span></strong><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;color: rgb(0, 0, 0);letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);font-size: 16px;">，并支持自动识别语言，同时也支持扫描多种框架。</span></p><section style="margin: 3pt 0pt;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);font-family: 等线;font-size: 12pt;visibility: visible;text-align: left;text-indent: 2em;line-height: 1.6em;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;color: rgb(0, 0, 0);letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);font-size: 16px;"></span></section><h2 style="margin-right: 16px;margin-left: 16px;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;color: rgb(34, 34, 34);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;background-color: rgb(255, 255, 255);text-align: center;visibility: visible;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;font-family: PingFangSC-light;letter-spacing: 1px;text-align: left;caret-color: rgb(96, 96, 96);color: rgb(255, 255, 255);background-color: rgb(0, 82, 255);visibility: visible;font-size: 17px;">  使用说明  </span></h2><section style="margin: 4px 16px;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;color: rgb(34, 34, 34);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;background-color: rgb(255, 255, 255);text-align: center;line-height: 22.1px;visibility: visible;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;font-size: 15px;">▼</span></section><p style="margin: 3pt 0pt 8px;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);font-family: 等线;font-size: 12pt;line-height: 1.3;visibility: visible;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;font-size: 11pt;letter-spacing: 0pt;vertical-align: baseline;color: rgb(0, 0, 0);visibility: visible;">在方案页面，TCA官方体验分析方案内可以看到Xcheck安全规则包已启用。进入官方方案-&gt;选择分析的代码库-&gt;启动分析。</span></p><p style="margin: 3pt 0pt 8px;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);font-family: 等线;font-size: 12pt;line-height: 1.3;visibility: visible;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;font-size: 11pt;letter-spacing: 0pt;vertical-align: baseline;color: rgb(0, 0, 0);visibility: visible;">提示：Xcheck安全规则</span><span style="font-size: 15px;-webkit-tap-highlight-color: transparent;outline: 0px;visibility: visible;color: rgb(0, 0, 0);letter-spacing: normal;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);">包目前只支持在官方体验分析方案中试用。</span></p><p style="margin-bottom: 8px;letter-spacing: 0.578px;text-align: center;"><img class="rich_pages wxw-img" data-backh="335" data-backw="578" data-galleryid="" data-imgfileid="100002751" data-ratio="0.5796296296296296" data-s="300,640" style="width: 100%;height: auto;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=7949be80&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FWl5fxRNUSKg3eWfy0Tma2BJwVzUSFBRicsOgWV2gfYm9Hult06xC8s3TuwKfQMDkMh7YPIwxBJZviaxMgaqVibnZg%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></p><p style="letter-spacing: 0.578px;text-align: center;"><img class="rich_pages wxw-img" data-backh="218" data-backw="578" data-galleryid="" data-imgfileid="100002750" data-ratio="0.37777777777777777" data-s="300,640" style="font-size: var(--articleFontsize);letter-spacing: 0.034em;width: 100%;height: auto;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=1768fc2e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FWl5fxRNUSKg3eWfy0Tma2BJwVzUSFBRicmGMzQsvjqA9ycMgtp9hLhrFNia40fI85tticHoB8JCGTqFicXicWJX79Hg%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></p><p style="letter-spacing: 0.578px;-webkit-tap-highlight-color: transparent;outline: 0px;font-family: system-ui, -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;background-color: rgb(255, 255, 255);"><img class="rich_pages wxw-img" data-backh="246" data-backw="578" data-cropselx1="0" data-cropselx2="578" data-cropsely1="0" data-cropsely2="246" data-galleryid="" data-imgfileid="100002752" data-ratio="0.4255555555555556" data-s="300,640" style="height: auto;-webkit-tap-highlight-color: transparent;outline: 0px;letter-spacing: 0.578px;text-align: center;font-size: var(--articleFontsize);border-radius: 8px;width: 100%;background-size: 16px !important;visibility: visible !important;" data-type="png" data-w="900" src="https://wechat2rss.xlab.app/img-proxy/?k=15d38104&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FWl5fxRNUSKg3eWfy0Tma2BJwVzUSFBRicdHAhV3JOBRKhxxvWibwJA9jicJ2YtMfX4G6h7HicSl9xr18UvicW9gribqQ%2F640%3Fwx_fmt%3Djpeg%26from%3Dappmsg"/><br/></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="https://tca.tencent.com/">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=70255924&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzg2ODQ3ODE1NA%3D%3D%26mid%3D2247486404%26idx%3D1%26sn%3Dc5dbb0295f59014dd2229566a8670655%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Tue, 31 Dec 2024 17:30:00 +0800</pubDate>
    </item>
    <item>
      <title>惊艳过后，谈谈GPT技术在代码安全分析领域的应用前景</title>
      <link>https://mp.weixin.qq.com/s?__biz=Mzg2ODQ3ODE1NA==&amp;mid=2247486394&amp;idx=1&amp;sn=08687b34c05af8c132bd39e06e80e4a1</link>
      <description></description>
      <content:encoded><![CDATA[<p>
<span>xcheck团队</span> <span>2023-05-23 16:01</span> <span style="display: inline-block;">广东</span>
</p>

<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=55373646&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F8SDYbMEObOKWl1ssC95UyjSgTOJx2l1PgzqU4ia2lRH0teb8XBl8r08XMKibKYXF88tDfrWTlPYKrC3orwXwR59A%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<section style="outline: 0px;font-family: system-ui, -apple-system, &#34;system-ui&#34;, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);font-size: 16px;visibility: visible;"><section powered-by="xiumi.us" style="margin-top: 10px;margin-bottom: 10px;outline: 0px;visibility: visible;"><section style="padding: 10px;outline: 0px;display: inline-block;width: 677px;border-width: 1px;border-style: solid;border-color: rgba(230, 240, 255, 0.49);background-color: rgb(247, 247, 247);visibility: visible;"><section powered-by="xiumi.us" style="padding-right: 16px;padding-left: 16px;outline: 0px;color: rgb(255, 255, 255);line-height: 2;letter-spacing: 1px;visibility: visible;"><p style="outline: 0px;visibility: visible;"><span style="outline: 0px;font-family: PingFangSC-light;background-color: rgb(1, 82, 217);visibility: visible;">引言</span></p><p style="outline: 0px;visibility: visible;"><span style="outline: 0px;font-family: PingFangSC-light;color: rgb(89, 89, 89);visibility: visible;">前段时间，</span><span style="outline: 0px;font-family: PingFangSC-light;color: rgb(89, 89, 89);visibility: visible;">GPT</span><span style="outline: 0px;font-family: PingFangSC-light;color: rgb(89, 89, 89);visibility: visible;">技术的重大突破引起了业界的广泛关注，其对于代码的解析及分析能力更是让人叹为观止。许多安全研究者都在尝试将</span><span style="outline: 0px;font-family: PingFangSC-light;color: rgb(89, 89, 89);visibility: visible;">GPT</span><span style="outline: 0px;font-family: PingFangSC-light;color: rgb(89, 89, 89);visibility: visible;">技术应用在静态代码分析（</span><span style="outline: 0px;font-family: PingFangSC-light;color: rgb(89, 89, 89);visibility: visible;">SAST</span><span style="outline: 0px;font-family: PingFangSC-light;color: rgb(89, 89, 89);visibility: visible;">）领域，截至目前，已经有很多安全媒体和厂商发表过相关的研究结果。</span></p><p style="outline: 0px;visibility: visible;"><br style="outline: 0px;visibility: visible;"/></p><p style="outline: 0px;visibility: visible;"><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">腾讯</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">Xcheck</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">团队作为专注在</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">SAST</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">领域十余年的技术团队，我们基于自身的专业积累，对</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">ChatGPT</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">进行了深度的分析评测，我们认为：</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">当前的</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">GPT</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">技术已具备基本的静态代码分析能力，但在代码安全风险检测方面，</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">GPT</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">在技术能力上还存在较大的缺陷和差距，其可在一些细分场景下提高</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">SAST</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">工具的用户体验，但不能对专业</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">SAST</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">工具实现替换。</span></p><p style="outline: 0px;visibility: visible;"><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;"><br style="outline: 0px;visibility: visible;"/></span></p><p style="outline: 0px;visibility: visible;"><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">类比一下，</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">GPT</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">技术与</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">SAST</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">的关系就像是基因检测技术和抽血化验技术的关系</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">。</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">就像</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">GPT</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">技术一样，基因检测技术是更为前沿和新兴的检测手段，能够应用在生命科学的各个领域。</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">但如果针对个人健康检查这一细分场景，已有的抽血化验技术能够更加简单直观的检测人体各项健康指标。</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;">我们相信，飞速发展的基因检测技术能在某些细分场景有较大价值，但一定不会在医院或体检机构里对抽血化验技术形成替换。</span><span style="outline: 0px;color: rgb(89, 89, 89);font-family: PingFangSC-light;visibility: visible;"></span></p></section></section></section><section powered-by="xiumi.us" style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;visibility: visible;"><p style="outline: 0px;visibility: visible;"><br style="outline: 0px;visibility: visible;"/></p><p style="outline: 0px;visibility: visible;"><span style="outline: 0px;visibility: visible;">聊完观点，以下是我们关于GPT技术在代码安全分析领域应用前景的详细分析报告：</span></p><p style="outline: 0px;visibility: visible;"><span style="outline: 0px;visibility: visible;"><br style="outline: 0px;visibility: visible;"/></span></p><section style="outline: 0px;visibility: visible;"><section powered-by="xiumi.us" style="outline: 0px;will-change: transform;visibility: visible;"><section style="margin-top: 10px;margin-bottom: 10px;outline: 0px;display: flex;flex-flow: row nowrap;text-align: center;justify-content: center;visibility: visible;"><section style="outline: 0px;display: inline-block;vertical-align: middle;width: auto;flex: 0 0 0%;align-self: center;height: auto;line-height: 0;z-index: 1;visibility: visible;"><section powered-by="xiumi.us" style="outline: 0px;display: flex;flex-flow: row nowrap;justify-content: center;visibility: visible;"><section style="outline: 0px;display: inline-block;width: auto;vertical-align: top;line-height: 0;flex: 0 0 0%;align-self: flex-start;height: auto;visibility: visible;"><svg viewBox="0 0 1 1" style="float: left;line-height: 0;width: 0px;vertical-align: top;visibility: visible;"></svg></section></section></section><section style="outline: 0px;display: inline-block;vertical-align: middle;width: auto;min-width: 10%;flex: 0 0 auto;height: auto;align-self: center;background-color: rgba(255, 255, 255, 0);visibility: visible;"><section powered-by="xiumi.us" style="padding-right: 10px;padding-left: 10px;outline: 0px;font-size: 20px;color: rgb(1, 82, 217);line-height: 1.6;visibility: visible;"><p style="outline: 0px;visibility: visible;"><strong style="outline: 0px;visibility: visible;"><em style="outline: 0px;visibility: visible;">为什么GPT不能</em></strong></p><p style="outline: 0px;visibility: visible;"><strong style="outline: 0px;visibility: visible;"><em style="outline: 0px;visibility: visible;">直接替代SAST工具</em></strong></p></section><section powered-by="xiumi.us" style="outline: 0px;visibility: visible;"><section style="outline: 0px;width: 201.922px;height: 5px;background-color: rgba(34, 87, 246, 0.11);visibility: visible;"><svg viewBox="0 0 1 1" style="float: left;line-height: 0;width: 0px;vertical-align: top;visibility: visible;"></svg></section></section></section></section></section></section></section><section powered-by="xiumi.us" style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;visibility: visible;"><p style="outline: 0px;visibility: visible;"><br style="outline: 0px;visibility: visible;"/></p><p style="outline: 0px;"><span style="outline: 0px;background-color: rgb(1, 82, 217);color: rgb(255, 255, 255);text-indent: -16.8pt;">1、技术原理层面的局限性</span></p><p style="outline: 0px;"><br style="outline: 0px;"/></p><p style="outline: 0px;"><strong style="outline: 0px;"><span style="outline: 0px;color: rgb(1, 82, 217);">a)  分析能力不足：不能支持复杂的代码场景</span></strong></p><p style="outline: 0px;">GPT 是一种基于自然语言处理的技术，在静态代码分析时，会对代码进行 Token 化和语法分析来识别潜在的安全漏洞和代码缺陷。然而，由于代码的和自然语言的语法结构存在差异，在复杂的代码场景下，GPT 往往无法正确理解代码中的变量、函数、类等结构的含义和作用，从而无法正确发现漏洞或输出完全不相关的结果。<br style="outline: 0px;"/></p><p style="outline: 0px;"><br style="outline: 0px;"/></p><p style="outline: 0px;">因此，对于复杂的代码场景，GPT 仍然需要人的指导和支持，才能更好地发挥作用。</p><p style="outline: 0px;"><br style="outline: 0px;"/></p><p style="outline: 0px;">以 ChatGPT 为例：输入简单的 PHP 命令执行代码，ChatGPT 能很好的发现问题。</p><p style="outline: 0px;"><br style="outline: 0px;"/></p><p style="outline: 0px;text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.7305555555555555" data-s="300,640" style="outline: 0px;width: 677px !important;visibility: visible !important;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=6ae67ff6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FochHNIreibta6MIgQndD3gwTe7V7ibtC4wvo1orkuYo90pQZeBjRWsqIB7vbZpVAOX1970Qq2P8RLWqhbe6qlJhw%2F640%3Fwx_fmt%3Dpng%26wxfrom%3D5%26wx_lazy%3D1%26wx_co%3D1"/></p><p style="outline: 0px;text-align: center;"><br style="outline: 0px;"/></p><p style="outline: 0px;">然而，增加变量作用域之后，由于代码解析能力的局限，GPT 无法正确识别代码，出现了明显的误报，此处应该没有命令注入问题。<span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;"><span lang="EN-US" style="outline: 0px;"><o:p style="outline: 0px;"></o:p></span></span></p><p style="outline: 0px;"><br style="outline: 0px;"/></p><p style="outline: 0px;"><img class="rich_pages wxw-img js_insertlocalimg" data-cropselx1="0" data-cropselx2="546" data-cropsely1="0" data-cropsely2="458" data-ratio="0.8379629629629629" data-s="300,640" style="outline: 0px;width: 546px !important;visibility: visible !important;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=5d93fe99&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FochHNIreibtYc8lqqRhRn5GAwYJPM9UTUqvN5IyBDWVJdIoCULuW34UbXpGAxricpyVuukgY1pKIf0BLTDuoqRWA%2F640%3Fwx_fmt%3Dpng%26wxfrom%3D5%26wx_lazy%3D1%26wx_co%3D1"/></p><p style="outline: 0px;"><br style="outline: 0px;"/></p><p style="outline: 0px;"><span style="outline: 0px;">再进一步测试，我们发现，在没有调用函数的情况下，</span><span style="outline: 0px;">GPT </span><span style="outline: 0px;">由于缺少识别能力再次误报，需要人工指导后修正。</span></p><p style="outline: 0px;"><span style="outline: 0px;"><br style="outline: 0px;"/></span></p><p style="outline: 0px;text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="1.125925925925926" data-s="300,640" style="outline: 0px;width: 677px !important;visibility: visible !important;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=6603aeee&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FochHNIreibta6MIgQndD3gwTe7V7ibtC4wRxcBhp6NlExTqd5GgpFicP5sfAVr6liaUPibr1KEgibSA8Xv8VUMVFoXjg%2F640%3Fwx_fmt%3Dpng%26wxfrom%3D5%26wx_lazy%3D1%26wx_co%3D1"/></p><p style="outline: 0px;"><br style="outline: 0px;"/></p><p style="outline: 0px;"><span style="outline: 0px;">以上是 GPT 分析能力不足的示例，经过Xcheck团队的测试，我们系统的整理了 GPT 对于各类代码结构的识别情况，从下表中我们可以得出结论：虽然 GPT 可以理解代码，但它无法像 SAST 工具那样深入分析代码的结构和逻辑。在处理复杂的代码场景时，Xcheck 仍然是更可靠和有效的选择。</span><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;"><span lang="EN-US" style="outline: 0px;"><o:p style="outline: 0px;"></o:p></span></span></p><p style="outline: 0px;"><br style="outline: 0px;"/></p><table cellspacing="0" cellpadding="0" width="645"><tbody style="outline: 0px;"><tr style="outline: 0px;height: 33.3pt;"><td width="94" height="33" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-width: 1pt;border-color: rgb(203, 205, 209);"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 12px;"><span style="outline: 0px;">代码结构</span><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;"><o:p style="outline: 0px;"></o:p></span></span></p></td><td width="152" height="33" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top-width: 1pt;border-top-color: rgb(203, 205, 209);border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">详细分类<o:p style="outline: 0px;"></o:p></span></p></td><td width="87" height="33" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top-width: 1pt;border-top-color: rgb(203, 205, 209);border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">GPT支持情况<o:p style="outline: 0px;"></o:p></span></p></td><td width="113" height="33" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top-width: 1pt;border-top-color: rgb(203, 205, 209);border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">Xcheck支持情况<o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;height: 16.05pt;"><td width="123" rowspan="3" height="16" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left-width: 1pt;border-left-color: rgb(203, 205, 209);"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 12px;"><span style="outline: 0px;">变量<br style="outline: 0px;"/></span><span lang="EN-US" style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;"><o:p style="outline: 0px;"></o:p></span></span></p></td><td width="152" height="16" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">变量赋值<o:p style="outline: 0px;"></o:p></span></p></td><td width="87" height="16" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td><td width="113" height="16" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;height: 16.05pt;"><td width="172" height="16" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">变量作用域<o:p style="outline: 0px;"></o:p></span></p></td><td width="134" height="16" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">不支持<o:p style="outline: 0px;"></o:p></span></p></td><td width="117" height="16" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;height: 16.05pt;"><td width="172" height="16" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">数据类型<o:p style="outline: 0px;"></o:p></span></p></td><td width="134" height="16" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td><td width="117" height="16" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;height: 19.9pt;"><td width="123" rowspan="3" height="19" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left-width: 1pt;border-left-color: rgb(203, 205, 209);"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">分支<o:p style="outline: 0px;"></o:p></span></p></td><td width="152" height="19" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">if语句<o:p style="outline: 0px;"></o:p></span></p></td><td width="79" height="19" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td><td width="113" height="19" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;height: 20.55pt;"><td width="172" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">switch语句<o:p style="outline: 0px;"></o:p></span></p></td><td width="134" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">不支持<o:p style="outline: 0px;"></o:p></span></p></td><td width="117" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;height: 22.8pt;"><td width="172" height="22" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">循环语句<o:p style="outline: 0px;"></o:p></span></p></td><td width="134" height="22" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">部分支持<o:p style="outline: 0px;"></o:p></span></p></td><td width="117" height="22" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;height: 19pt;"><td width="123" rowspan="3" height="19" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left-width: 1pt;border-left-color: rgb(203, 205, 209);"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">函数<br style="outline: 0px;"/><o:p style="outline: 0px;"></o:p></span></p></td><td width="152" height="19" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">直接调用<o:p style="outline: 0px;"></o:p></span></p></td><td width="79" height="19" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">部分支持<o:p style="outline: 0px;"></o:p></span></p></td><td width="113" height="19" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;height: 15.25pt;"><td width="172" height="15" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">回调函数<o:p style="outline: 0px;"></o:p></span></p></td><td width="131" height="15" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">不支持<o:p style="outline: 0px;"></o:p></span></p></td><td width="117" height="15" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;height: 19.75pt;"><td width="148" height="19" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">递归调用<o:p style="outline: 0px;"></o:p></span></p></td><td width="134" height="19" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">不支持<o:p style="outline: 0px;"></o:p></span></p></td><td width="117" height="19" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;height: 20pt;"><td width="123" rowspan="5" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left-width: 1pt;border-left-color: rgb(203, 205, 209);"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 12px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;">类<o:p style="outline: 0px;"></o:p></span></p></td><td width="152" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">类的实例化<o:p style="outline: 0px;"></o:p></span></p></td><td width="79" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td><td width="113" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;height: 20pt;"><td width="172" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">属性访问和修改<o:p style="outline: 0px;"></o:p></span></p></td><td width="134" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">部分支持<o:p style="outline: 0px;"></o:p></span></p></td><td width="117" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;height: 20pt;"><td width="172" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">方法的调用<o:p style="outline: 0px;"></o:p></span></p></td><td width="134" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">部分支持<o:p style="outline: 0px;"></o:p></span></p></td><td width="117" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;height: 20pt;"><td width="172" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">继承和多态<o:p style="outline: 0px;"></o:p></span></p></td><td width="134" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">不支持<o:p style="outline: 0px;"></o:p></span></p></td><td width="117" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;height: 20pt;"><td width="172" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">构造函数和析构函数<o:p style="outline: 0px;"></o:p></span></p></td><td width="134" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">不支持<o:p style="outline: 0px;"></o:p></span></p></td><td width="117" height="20" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;height: 17.1pt;"><td width="123" rowspan="2" height="17" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left-width: 1pt;border-left-color: rgb(203, 205, 209);"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">包<br style="outline: 0px;"/><o:p style="outline: 0px;"></o:p></span></p></td><td width="152" height="17" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">包的导入/使用<o:p style="outline: 0px;"></o:p></span></p></td><td width="79" height="17" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">部分支持<o:p style="outline: 0px;"></o:p></span></p></td><td width="113" height="17" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;height: 17.1pt;"><td width="172" height="17" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">包的导出<o:p style="outline: 0px;"></o:p></span></p></td><td width="134" height="17" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">不支持<o:p style="outline: 0px;"></o:p></span></p></td><td width="117" height="17" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;height: 16.05pt;"><td width="123" height="16" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left-width: 1pt;border-left-color: rgb(203, 205, 209);"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">文件<o:p style="outline: 0px;"></o:p></span></p></td><td width="156" height="16" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">跨文件<o:p style="outline: 0px;"></o:p></span></p></td><td width="87" height="16" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">不支持<o:p style="outline: 0px;"></o:p></span></p></td><td width="113" height="16" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;"><span style="outline: 0px;line-height: 15.6px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-size: 12px;">支持<o:p style="outline: 0px;"></o:p></span></p></td></tr></tbody></table><p style="outline: 0px;"><br style="outline: 0px;"/></p><p style="outline: 0px;"><strong style="outline: 0px;"><span style="outline: 0px;color: rgb(1, 82, 217);">b)  Token长度限制：真实项目扫描受限</span></strong></p><p style="outline: 0px;">GPT 在处理输入时，会将将输入文本分解成单个单词或符号来，这些单词或符号被称为“Token”。目前的 GPT 通常都有最大 Token 数量的限制，例如，GPT-3.5 的最大输入长度为 4k 个 Token，而 GPT-4 的最大输入长度为 32k 个 Token。<br style="outline: 0px;"/></p><p style="margin-right: 0cm;margin-left: 0cm;outline: 0px;"><br style="outline: 0px;"/></p><p style="outline: 0px;text-align: center;"><span style="outline: 0px;font-size: 14px;">OpenAI 模型 Token 限制</span></p><table cellspacing="0" cellpadding="0" width="645"><tbody style="outline: 0px;"><tr style="outline: 0px;"><td width="290" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-width: 1pt;border-color: rgb(203, 205, 209);"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><strong style="outline: 0px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;">Model</span></strong><o:p style="outline: 0px;"></o:p></span></p></td><td width="259" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top-width: 1pt;border-top-color: rgb(203, 205, 209);border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><strong style="outline: 0px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;">Max Tokens</span></strong><o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;"><td width="290" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left-width: 1pt;border-left-color: rgb(203, 205, 209);"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;">text-davinci-003</span><o:p style="outline: 0px;"></o:p></span></p></td><td width="259" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;">4,097</span><o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;"><td width="265" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left-width: 1pt;border-left-color: rgb(203, 205, 209);"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;">code-davinci-002</span><o:p style="outline: 0px;"></o:p></span></p></td><td width="239" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;">8,001</span><o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;"><td width="290" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left-width: 1pt;border-left-color: rgb(203, 205, 209);"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;">gpt-3.5-turbo</span><o:p style="outline: 0px;"></o:p></span></p></td><td width="259" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;">4,096</span><o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;"><td width="290" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left-width: 1pt;border-left-color: rgb(203, 205, 209);"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;">gpt-4</span><o:p style="outline: 0px;"></o:p></span></p></td><td width="259" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;">8,192</span><o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;"><td width="290" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left-width: 1pt;border-left-color: rgb(203, 205, 209);"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;">gpt-4-32k</span><o:p style="outline: 0px;"></o:p></span></p></td><td width="259" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;">32,768</span><o:p style="outline: 0px;"></o:p></span></p></td></tr></tbody></table></section><section powered-by="xiumi.us" style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;"><br style="outline: 0px;"/></section><section powered-by="xiumi.us" style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;">对于真实项目来说，代码量很容易就超过 32k 个 Token，以WordPress 项目为例，所有 PHP 代码的 Token数量为 5,260,275，远超 Token 上限。即使用 Embedding 向量化处理代码，也无法保证单次查询时代码上下文的完整性，这就意味着 GPT 每次只能处理项目或者文件中的一部分，这会直接导致分析结果的不准确。</section><section powered-by="xiumi.us" style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;"><strong style="outline: 0px;text-indent: -16.8pt;font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;letter-spacing: 0.034em;"><span style="outline: 0px;color: rgb(1, 82, 217);"><br style="outline: 0px;"/></span></strong></section><section powered-by="xiumi.us" style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;"><strong style="outline: 0px;text-indent: -16.8pt;font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;letter-spacing: 0.034em;"><span style="outline: 0px;color: rgb(1, 82, 217);">c)  稳定性问题：结果波动、API不稳定</span></strong></section><section powered-by="xiumi.us" style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;">由于 GPT 是一种基于神经网络的模型，其内部结构非常复杂，包含大量的参数和层级，还有一些随机性因素，这些随机性可以在对话场景下输出不一样的结果，提升真实性。而在 SAST 场景下，不稳定的结果意味着漏报和误报，即使可以通过调整参数来减少随机性，但结果仍然存在波动。</section><section powered-by="xiumi.us" style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;"><br style="outline: 0px;"/></section><section powered-by="xiumi.us" style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;">此外，GPT 的 API 也可能存在不稳定的问题。由于 GPT 目前多是以 API 形式提供服务，在进行静态代码分析时，可能会由于 API 服务的速率限制、负载、网络延迟、服务器故障等原因，导致分析结果的不准确性和稳定性问题。</section><section powered-by="xiumi.us" style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;"><br style="outline: 0px;"/></section><p style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;"><span style="outline: 0px;color: rgb(255, 255, 255);background-color: rgb(1, 82, 217);">2、实际落地场景层面的局限性</span></p><p style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;"><span style="outline: 0px;color: rgb(255, 255, 255);background-color: rgb(1, 82, 217);"><br style="outline: 0px;"/></span></p><p style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;">除了技术层面，数据安全、法律合规和成本等因素也使得 GPT 难以用于生产：<o:p style="outline: 0px;"></o:p></p><p style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;"><br style="outline: 0px;"/></p><h2 style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;"><strong style="outline: 0px;text-indent: -16.8pt;font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;letter-spacing: 0.034em;"><span style="outline: 0px;color: rgb(1, 82, 217);">a)  企业内部数据安全问题</span></strong><o:p style="outline: 0px;"></o:p></h2><p style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;">GPT 这类大型模型目前不支持私有化部署，只能通过 API 接口将代码发送到远程服务进行分析。由于代码是相对敏感的数据，一旦数据出了内网，就有可能造成不可控的数据泄露问题。这就意味着，对于很多行业客户来说，使用 GPT 进行代码安全检测是完全不合规的<o:p style="outline: 0px;"></o:p></p><h2 style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;"><br style="outline: 0px;"/></h2><h2 style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;"><strong style="outline: 0px;text-indent: -16.8pt;font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;letter-spacing: 0.034em;"><span style="outline: 0px;color: rgb(1, 82, 217);">b)  计算成本问题</span></strong><o:p style="outline: 0px;"></o:p></h2><p style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;">GPT 的每个请求都需要一定的计算资源和时间来得出结果，使用 GPT 进行代码安全检测的成本可能会比现有的 SAST 工具更高。为了弥补这些成本，OpenAI 的 API 是需要付费使用的，收费模式如下表所示，一个大项目每次扫描可能就需要几美元。因此，使用 GPT 进行代码安全检测时，需要考虑高额的 API 成本问题。</p><section powered-by="xiumi.us" style="padding-right: 16px;padding-left: 16px;outline: 0px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;"><p style="outline: 0px;text-align: center;"><span style="outline: 0px;font-size: 14px;"><br style="outline: 0px;"/></span></p><p style="outline: 0px;text-align: center;"><span style="outline: 0px;font-size: 14px;">OpenAI 模型定价</span></p><table cellspacing="0" cellpadding="0" width="645"><tbody style="outline: 0px;"><tr style="outline: 0px;"><td width="211" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-width: 1pt;border-color: rgb(203, 205, 209);"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><strong style="outline: 0px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;">Model</span></strong><o:p style="outline: 0px;"></o:p></span></p></td><td width="310" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top-width: 1pt;border-top-color: rgb(203, 205, 209);border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><strong style="outline: 0px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;"><strong style="outline: 0px;letter-spacing: 0.578px;">Usage</strong></span></strong><o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;"><td width="211" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left-width: 1pt;border-left-color: rgb(203, 205, 209);"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;"><span style="outline: 0px;letter-spacing: 0.578px;">gpt-3.5-turbo</span></span><o:p style="outline: 0px;"></o:p></span></p></td><td width="290" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;"><span style="outline: 0px;letter-spacing: 0.578px;">$0.002 / 1K  tokens</span></span><o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;"><td width="211" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left-width: 1pt;border-left-color: rgb(203, 205, 209);"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;"><span style="outline: 0px;letter-spacing: 0.578px;">gpt-4</span></span><o:p style="outline: 0px;"></o:p></span></p></td><td width="310" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;"><span style="outline: 0px;letter-spacing: 0.578px;">$0.03 - $0.06  / 1K tokens</span></span><o:p style="outline: 0px;"></o:p></span></p></td></tr><tr style="outline: 0px;"><td width="211" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left-width: 1pt;border-left-color: rgb(203, 205, 209);"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;"><span style="outline: 0px;letter-spacing: 0.578px;">gpt-4-32k</span></span><o:p style="outline: 0px;"></o:p></span></p></td><td width="310" style="padding: 0cm 5.4pt;outline: 0px;word-break: break-all;hyphens: auto;border-top: none;border-right-width: 1pt;border-right-color: rgb(203, 205, 209);border-bottom-width: 1pt;border-bottom-color: rgb(203, 205, 209);border-left: none;"><p style="outline: 0px;line-height: normal;"><span style="outline: 0px;font-size: 14px;"><span lang="EN-US" style="outline: 0px;font-family: -apple-system;color: rgb(36, 41, 47);background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;"><span style="outline: 0px;letter-spacing: 0.578px;">$0.06 - $0.12  / 1K tokens</span></span><o:p style="outline: 0px;"></o:p></span></p></td></tr></tbody></table></section></section><h2 style="padding-right: 16px;padding-left: 16px;outline: 0px;white-space: normal;background-color: rgb(255, 255, 255);font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;"><strong style="outline: 0px;text-indent: -16.8pt;font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;letter-spacing: 0.034em;"><span style="outline: 0px;color: rgb(1, 82, 217);">c)  法律合规问题</span></strong><o:p style="outline: 0px;"></o:p></h2><p style="margin-bottom: 0px;padding-right: 16px;padding-left: 16px;outline: 0px;white-space: normal;background-color: rgb(255, 255, 255);font-size: 16px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;"><span style="outline: 0px;">使用 GPT 进行代码安全检测还存在一些法律合规问题。</span><span style="outline: 0px;">由于 GPT 是一种新兴的技术，目前相关的法律法规还在陆续出台和完善。</span><span style="outline: 0px;">因此，在使用 GPT 进行代码安全检测时，还需要注意遵守相关的法律法规，以避免可能的法律风险。</span></p><p style="margin-bottom: 0px;padding-right: 16px;padding-left: 16px;outline: 0px;white-space: normal;background-color: rgb(255, 255, 255);font-size: 16px;font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;"><span style="outline: 0px;"><br style="outline: 0px;"/></span></p><section style="outline: 0px;font-family: system-ui, -apple-system, &#34;system-ui&#34;, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);font-size: 16px;"><section powered-by="xiumi.us" style="outline: 0px;will-change: transform;"><section style="margin-top: 10px;margin-bottom: 10px;outline: 0px;display: flex;flex-flow: row nowrap;text-align: center;justify-content: center;"><section style="outline: 0px;display: inline-block;vertical-align: middle;width: auto;flex: 0 0 0%;align-self: center;height: auto;line-height: 0;z-index: 1;"><section powered-by="xiumi.us" style="outline: 0px;display: flex;flex-flow: row nowrap;justify-content: center;"><section style="outline: 0px;display: inline-block;width: auto;vertical-align: top;line-height: 0;flex: 0 0 0%;align-self: flex-start;height: auto;"><svg viewBox="0 0 1 1" style="float:left;line-height:0;width:0;vertical-align:top;"></svg></section></section></section><section style="outline: 0px;display: inline-block;vertical-align: middle;width: auto;min-width: 10%;flex: 0 0 auto;height: auto;align-self: center;background-color: rgba(255, 255, 255, 0);"><section powered-by="xiumi.us" style="padding-right: 10px;padding-left: 10px;outline: 0px;font-size: 20px;color: rgb(1, 82, 217);letter-spacing: 1px;line-height: 1.6;font-family: PingFangSC-light;"><p style="outline: 0px;"><strong style="outline: 0px;"><em style="outline: 0px;">GPT技术在代码安全分析领域</em></strong></p><p style="outline: 0px;"><strong style="outline: 0px;"><em style="outline: 0px;">可落地的应用前景</em></strong><br style="outline: 0px;"/></p></section><section powered-by="xiumi.us" style="outline: 0px;"><section style="outline: 0px;width: 294.523px;height: 5px;background-color: rgba(34, 87, 246, 0.11);"><svg viewBox="0 0 1 1" style="float:left;line-height:0;width:0;vertical-align:top;"></svg></section></section></section></section></section></section><section powered-by="xiumi.us" style="padding-right: 16px;padding-left: 16px;outline: 0px;white-space: normal;background-color: rgb(255, 255, 255);font-family: PingFangSC-light;line-height: 2;letter-spacing: 1px;"><p style="outline: 0px;"><br style="outline: 0px;"/></p><p style="outline: 0px;"><span style="outline: 0px;font-size: 16px;">虽然</span><span style="outline: 0px;font-size: 16px;">GPT</span><span style="outline: 0px;font-size: 16px;">技术不能直接替代</span><span style="outline: 0px;font-size: 16px;">SAST</span><span style="outline: 0px;font-size: 16px;">工具，但利用其能力可以很好的提高</span><span style="outline: 0px;font-size: 16px;">SAST</span><span style="outline: 0px;font-size: 16px;">产品的使用效果和体验。</span></p><p style="outline: 0px;"><span style="outline: 0px;font-size: 16px;"><br style="outline: 0px;"/></span></p><p style="outline: 0px;"><span style="outline: 0px;font-size: 16px;">基于我们的测试结果，我们认为GPT</span><span style="outline: 0px;font-size: 16px;">技术可以在以下场景有较为明确的落地机会，</span><span style="outline: 0px;font-size: 16px;">Xcheck</span><span style="outline: 0px;font-size: 16px;">产品在后续的迭代中也会新增相关的功能和能力，敬请期待。</span></p><p style="outline: 0px;"><span style="outline: 0px;background-color: rgb(1, 82, 217);color: rgb(255, 255, 255);font-size: 16px;"><br style="outline: 0px;"/></span></p><p style="outline: 0px;"><span style="outline: 0px;background-color: rgb(1, 82, 217);color: rgb(255, 255, 255);font-size: 16px;">1、</span><span style="outline: 0px;background-color: rgb(1, 82, 217);color: rgb(255, 255, 255);font-size: 16px;">面向SAST产品用户</span></p><p style="outline: 0px;"><span style="outline: 0px;font-size: 16px;"><br style="outline: 0px;"/></span></p><p style="outline: 0px;"><strong style="outline: 0px;"><span style="outline: 0px;font-size: 16px;color: rgb(1, 82, 217);">a)  提供最佳修复建议</span></strong></p><p style="outline: 0px;"><span style="outline: 0px;font-size: 16px;">GPT 可以基于 SAST </span><span style="outline: 0px;font-size: 16px;">工具发现的漏洞，分析实际漏洞，并根据代码结构、漏洞类型等因素，提供更贴合实际情况的修复代码和指引。相比固定的修复建议和样例代码，这种个性化的修复建议可以帮助研发人员更快地解决漏洞，提高工作效率。</span></p><p style="outline: 0px;"><span style="outline: 0px;font-size: 16px;"><br style="outline: 0px;"/></span></p><p style="outline: 0px;"><strong style="outline: 0px;font-size: 16px;"><span style="outline: 0px;color: rgb(1, 82, 217);">b)  智能审计助理</span></strong></p><p style="outline: 0px;"><span style="outline: 0px;font-size: 16px;">在使用 SAST 工具缺陷审计时，可以嵌入 GPT </span><span style="outline: 0px;font-size: 16px;">作为审计助理，通过内置的一系列提示词，既可以智能分析漏洞，提供详细的解释和分析，并确定漏洞是否真实有效，也可以让用户和</span><span style="outline: 0px;font-size: 16px;"> GPT </span><span style="outline: 0px;font-size: 16px;">进行交互式对话，例如，开发人员可以询问有关漏洞的危害、常见的利用方式等问题，从而更好地理解漏洞，并快速解决问题。这种智能化的审计助理可以帮助用户更好地掌握漏洞信息，提高审计的准确性和效率，提升用户体验。</span></p><p style="outline: 0px;"><strong style="outline: 0px;font-size: 16px;"><span style="outline: 0px;color: rgb(1, 82, 217);"><br style="outline: 0px;"/></span></strong></p><p style="outline: 0px;"><strong style="outline: 0px;font-size: 16px;"><span style="outline: 0px;color: rgb(1, 82, 217);">c)  辅助编写自定义规则</span></strong></p><p style="outline: 0px;"><span style="outline: 0px;font-size: 16px;">GPT 可以根据要求提取出代码中的关键信息，并按照指定格式生成 SAST 工具可用的规则。</span><span style="outline: 0px;font-size: 16px;">帮助用户更快地生成规则，提高规则的准确性和可用性，降低规则编写的工作量，从而更好地检测潜在的漏洞或者降低误报。</span><span style="outline: 0px;font-size: 16px;"></span></p><p style="outline: 0px;"><strong style="outline: 0px;font-size: 16px;"><span style="outline: 0px;color: rgb(1, 82, 217);"><br style="outline: 0px;"/></span></strong></p><p style="outline: 0px;"><strong style="outline: 0px;font-size: 16px;"><span style="outline: 0px;color: rgb(1, 82, 217);">d)  辅助开发安全培训与教育</span></strong></p><p style="outline: 0px;"><span style="outline: 0px;font-size: 16px;">GPT 技术可以帮助开发安全团队建设企业内部的开发安全知识库及规范，用于为开发人员提供编码规范和安全编程的实践教程</span><br style="outline: 0px;"/></p><p style="outline: 0px;"><span style="outline: 0px;background-color: rgb(1, 82, 217);color: rgb(255, 255, 255);font-size: 16px;"><br style="outline: 0px;"/></span></p><p style="outline: 0px;"><span style="outline: 0px;background-color: rgb(1, 82, 217);color: rgb(255, 255, 255);font-size: 16px;">2、</span><span style="outline: 0px;background-color: rgb(1, 82, 217);color: rgb(255, 255, 255);font-size: 16px;">面向 SAST 厂商</span></p><p style="outline: 0px;"><br style="outline: 0px;"/></p><p style="outline: 0px;"><strong style="outline: 0px;font-size: 16px;"><span style="outline: 0px;color: rgb(1, 82, 217);">a)  提高检测能力</span></strong></p><p style="outline: 0px;"><span style="outline: 0px;font-size: 16px;">虽然在复杂的代码场景中  GPT 的能力不足，但是在简单的代码片段中，它可以准确地理解代码中的语义内容，包括变量类型、函数调用关系、变量值的含义等，相比根据专家经验来提取信息，GPT 给出的信息更为贴合实际情况。</span><span style="outline: 0px;font-size: 16px;">SAST 产品可以基于这些信息，在漏洞分析过程中更好地理解代码，从而减少漏报和误报。</span><br style="outline: 0px;"/></p><p style="outline: 0px;"><br style="outline: 0px;"/></p><p style="outline: 0px;"><strong style="outline: 0px;font-size: 16px;"><span style="outline: 0px;color: rgb(1, 82, 217);">b)  生成漏洞样本</span></strong><br style="outline: 0px;"/></p><p style="outline: 0px;"><span style="outline: 0px;font-size: 16px;">GPT </span><span style="outline: 0px;font-size: 16px;">可以根据代码的结构和特征，自动化地生成各种语言、框架和库的漏洞代码，并作为数据集用于</span><span style="outline: 0px;font-size: 16px;"> SAST </span><span style="outline: 0px;font-size: 16px;">产品能力评测、算法优化或模型训练等方面。相比传统的数据集构造方式，</span><span style="outline: 0px;font-size: 16px;">GPT </span><span style="outline: 0px;font-size: 16px;">生成的样本更贴近真实代码，并且成本更低。</span></p><p style="outline: 0px;"><span style="outline: 0px;font-size: 16px;"></span></p><section style="outline: 0px;font-size: 16px;"><section powered-by="xiumi.us" style="outline: 0px;will-change: transform;"><section style="margin-top: 10px;margin-bottom: 10px;outline: 0px;will-change: transform;"><section style="padding: 10px;outline: 0px;display: inline-block;width: 645px;border-width: 1px;border-style: solid;border-color: rgba(230, 240, 255, 0.49);background-color: rgb(247, 247, 247);"><section powered-by="xiumi.us" style="padding-right: 16px;padding-left: 16px;outline: 0px;color: rgb(255, 255, 255);line-height: 2;"><p style="outline: 0px;"><span style="outline: 0px;background-color: rgb(1, 82, 217);">附录：腾讯Xcheck介绍</span></p><p style="outline: 0px;"><span style="outline: 0px;color: rgb(89, 89, 89);">Xcheck是腾讯自研的新一代开发安全工具，拥有SAST、SCA、制品扫描三大模块。</span><span style="outline: 0px;color: rgb(89, 89, 89);">SAST模块采用创新的技术路线，摒弃了传统SAST工具主要依赖规则匹配的技术原理，基于成熟的污点分析技术与对抽象语法树的精准剖解，实现了快速精准的识别代码风险。</span></p></section><section powered-by="xiumi.us" style="padding-right: 16px;padding-left: 16px;outline: 0px;line-height: 2;color: rgb(89, 89, 89);"><p style="outline: 0px;"><br style="outline: 0px;"/></p><p style="outline: 0px;">作为新一代的SAST工具，Xcheck解决了传统白盒扫描速度慢、误报高的通病，非常适合集成到DevOps的流水线当中使用。当前腾讯内部已全面使用Xcheck作为DevOps开发环节中的必备检测工具。</p><p style="outline: 0px;"><br style="outline: 0px;"/></p><p style="outline: 0px;">针对Golang、Java、Nodejs、PHP、Python等常用语言，Xcheck引擎算法具有非常明显优势，能够实现每秒万行的扫描，速度是同类工具的几十倍。同时，Xcheck产品经过每年数百万个真实项目统计，工具自身误报率可控制在10%以下，远低于同类工具。</p></section></section></section></section></section></section><p><br/></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247486394">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=f2608e29&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzg2ODQ3ODE1NA%3D%3D%26mid%3D2247486394%26idx%3D1%26sn%3D08687b34c05af8c132bd39e06e80e4a1%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Tue, 23 May 2023 16:01:00 +0800</pubDate>
    </item>
    <item>
      <title>Xcheck通过中国信通院SAST能力评估，体验环境正式开放！</title>
      <link>https://mp.weixin.qq.com/s?__biz=Mzg2ODQ3ODE1NA==&amp;mid=2247486380&amp;idx=1&amp;sn=d2ab503ab41e6d3434b1140a142d3357</link>
      <description></description>
      <content:encoded><![CDATA[<p>
原创 <span>xcheck团队</span> <span>2022-07-21 16:54</span> <span style="display: inline-block;">广东</span>
</p>

<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=f6c5110f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F8SDYbMEObOJYcJHRde10AW9L28dRrOibCNAkLjQj3LxicuOIhRAnd8LTvp7aAlvlpum6UciaRFOMoZkTJQ8nF4R7w%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px;color: black;padding: 0px 10px;line-height: 1.6;word-spacing: 0px;letter-spacing: 0px;word-break: break-word;overflow-wrap: break-word;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;margin-bottom: 0px;"><h2 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 22px;text-align: left;margin: 20px 10px 0px 0px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;font-size: 22px;color: #0e88eb;font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid #0e88eb;">0x00 Xcheck 能力再受认可</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">近日，由中国信息通信研究院主办的 2022 首届软件供应链安全论坛在北京召开，会上正式发布：腾讯代码安全检查工具 Xcheck 通过了《静态应用程序安全测试工具能力要求》评估。</p><img class="rich_pages wxw-img" data-ratio="1.3423799582463465" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;width: 70%;" data-type="png" data-w="958" src="https://wechat2rss.xlab.app/img-proxy/?k=d9849ed9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIu8jIoIFzJTA657vlcjJg1E2qicfesCyJy10wjWjWvNv9S85GgpZgMmcJgTVCWxsjyr3ewGbZ60tQ%2F640%3Fwx_fmt%3Dpng"/><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">为了从软件生命周期的源头保障软件供应链安全，自 2019 年以来，中国信通院联合腾讯在内的众多国内知名企业，共同编制了《软件供应链安全保障基本要求》、《可信研发运营安全能力成熟度》、《静态应用程序安全测试工具能力要求》、《交互式应用程序安全测试工具能力要求》等软件供应链安全相关标准。基于以上系列标准，中国信通院对国内多个企业开展了严格的测试与评估。凭借优异的性能和在代码安全实践中的表现，Xcheck 通过了此次静态应用程序安全测试工具的能力评估。</p><h2 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 22px;text-align: left;margin: 20px 10px 0px 0px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;font-size: 22px;color: #0e88eb;font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid #0e88eb;">0x01 关于 Xcheck</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck 是腾讯自研的新一代静态应用安全测试（SAST）工具，采用创新的技术路线，基于成熟的污点分析技术与对抽象语法树的精准剖解，实现了快速精准的识别代码风险。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">作为新一代的 SAST 工具，Xcheck 解决了传统白盒扫描速度慢、误报高的通病，非常适合集成到 DevOps 的流水线当中使用。当前腾讯内部已全面使用 Xcheck 作为 DevOps 开发环节中的必备检测工具。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">针对 Golang、Java、Nodejs、PHP、Python 等常用语言，Xcheck 引擎算法具有非常明显优势，能够实现每秒万行的扫描，速度是同类工具的几十倍。同时，Xcheck 产品经过每年数百万个真实项目统计，工具自身误报率可控制在 10%以下，远低于同类工具。</p><h2 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 22px;text-align: left;margin: 20px 10px 0px 0px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;font-size: 22px;color: #0e88eb;font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid #0e88eb;">0x02 新控制台抢先看</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck 一直在持续迭代，在不断提升核心引擎扫描分析能力的同时，控制台也经历了多次重构优化，针对灵活性、扩展性、兼容性、安全性、用户体验等方面进行充分的思考和设计，以满足用户在不同场景下的使用需求。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;font-size: 18px;color: #0e88eb;"><span style="display: none;"></span><span style="font-size: 18px;color: #0e88eb;">整体架构</span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">如下图所示，Xcheck 整体采用客户端-服务端的架构，服务端的各个组件均支持水平伸缩，使得 Xcheck 可以支撑海量的分析任务。</p><img class="rich_pages wxw-img" data-ratio="0.5934579439252337" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;width: 100%;" data-type="png" data-w="2140" src="https://wechat2rss.xlab.app/img-proxy/?k=251ec4a6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIu8jIoIFzJTA657vlcjJg1S9o8p7oLah4oaGFFRZ3naXY76Cte6icmjqMxZ7J0CEX9U8KrUGdHDTw%2F640%3Fwx_fmt%3Dpng"/><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;font-size: 18px;color: #0e88eb;"><span style="display: none;"></span><span style="font-size: 18px;color: #0e88eb;">使用场景</span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck 支持多种使用场景，可以帮助用户在研发的各个阶段发现代码中的安全风险</p><h5 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 16px;"><span style="display: none;"></span>Web 图形页面<span style="display: none;"></span></h5><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">用户可以通过 Web 页面来使用 Xcheck</p><img class="rich_pages wxw-img" data-ratio="0.4474647151071615" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;width: 100%;" data-type="png" data-w="3826" src="https://wechat2rss.xlab.app/img-proxy/?k=63aa5cd5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIu8jIoIFzJTA657vlcjJg1yOR9icvfQj9tTVPgvFXNYxbk1a3yyHiabDv0OPibFCWCYkjjY8jcDV3OQ%2F640%3Fwx_fmt%3Dpng"/><h5 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 16px;"><span style="display: none;"></span>API 接口调用<span style="display: none;"></span></h5><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck 提供丰富的 API 接口，供用户进行调用，用户可以基于 API 开发自己的插件</p><img class="rich_pages wxw-img" data-ratio="0.37927531324077207" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;width: 100%;" data-type="png" data-w="2953" src="https://wechat2rss.xlab.app/img-proxy/?k=6a3be5b8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIu8jIoIFzJTA657vlcjJg1SLwu1Imy8DibhuNcrxiaNazhp8psNFh0SibVpib4aIs6qC3FgZyZDAIhmA%2F640%3Fwx_fmt%3Dpng"/><h5 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 16px;"><span style="display: none;"></span>命令行调用<span style="display: none;"></span></h5><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck 也提供命令行工具：xcheck-cli，只需要简单的命令就能对本地代码进行安全分析</p><img class="rich_pages wxw-img" data-ratio="0.4578884934756821" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;width: 100%;" data-type="png" data-w="3372" src="https://wechat2rss.xlab.app/img-proxy/?k=02dd922a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIu8jIoIFzJTA657vlcjJg1AF7qhXjXtR8V5GzysamGnK6ReuP1mMqcsQibAEdLHjMaaqxYom4fLdw%2F640%3Fwx_fmt%3Dpng"/><h5 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 16px;"><span style="display: none;"></span>CI/CD 插件<span style="display: none;"></span></h5><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck 提供常见 CI/CD 平台的流水线插件，如腾讯 Coding、蓝鲸、Jenkins 等，凭借优异的分析速度，能够在制品构建环节发现安全风险，避免漏洞发布到生产环境</p><img class="rich_pages wxw-img" data-ratio="0.6309077269317329" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;width: 100%;" data-type="png" data-w="2666" src="https://wechat2rss.xlab.app/img-proxy/?k=80e13538&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIu8jIoIFzJTA657vlcjJg1dbKuYAjWnicdLtKbULbLNkibJDQDsMUcdYCfNtB8tHRxF2eTJ1JSc56g%2F640%3Fwx_fmt%3Dpng"/><h5 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 16px;"><span style="display: none;"></span>本地 IDE 插件<span style="display: none;"></span></h5><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck 提供常见 IDE 的插件，让用户在开发阶段可以快速发现并修复安全风险</p><img class="rich_pages wxw-img" data-ratio="0.5401785714285714" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;width: 100%;" data-type="png" data-w="2240" src="https://wechat2rss.xlab.app/img-proxy/?k=79d84bec&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIu8jIoIFzJTA657vlcjJg1qY4XEWia6iaL2MZNHqHzcpzfQRIYJOHovzIxb34HeHHUVGNIAICYWdPA%2F640%3Fwx_fmt%3Dpng"/><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;font-size: 18px;color: #0e88eb;"><span style="display: none;"></span><span style="font-size: 18px;color: #0e88eb;">分析模式</span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck 支持多种分析模式，包括：</p><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;" class="list-paddingleft-1"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;">全量分析/增量分析</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;">并发分析/定时分析</section></li></ul><img class="rich_pages wxw-img" data-ratio="0.4304" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;width: 100%;" data-type="png" data-w="1250" src="https://wechat2rss.xlab.app/img-proxy/?k=4e89483e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIu8jIoIFzJTA657vlcjJg1P3lQ8aaxgg7RSp2GADicNGShy6ZcoS1yAJicedu9NnJqJds31VFhdeTA%2F640%3Fwx_fmt%3Dpng"/><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;font-size: 18px;color: #0e88eb;"><span style="display: none;"></span><span style="font-size: 18px;color: #0e88eb;">告警形式</span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck 支持多种告警通知形式，包括：邮件、短信、企业微信</p><img class="rich_pages wxw-img" data-ratio="0.6785109983079526" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;width: 100%;" data-type="png" data-w="1182" src="https://wechat2rss.xlab.app/img-proxy/?k=8b0107f8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIu8jIoIFzJTA657vlcjJg1v8BolQ9Th11ibfGostpG3MAfB7tk2UnCS6APfAoTGicibZGYsiaMETzSkw%2F640%3Fwx_fmt%3Dpng"/><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;font-size: 18px;color: #0e88eb;"><span style="display: none;"></span><span style="font-size: 18px;color: #0e88eb;">报告格式</span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck 支持导出多种格式的报告，也可以自定义报告内容</p><img class="rich_pages wxw-img" data-ratio="0.9836244541484717" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;width: 100%;" data-type="png" data-w="916" src="https://wechat2rss.xlab.app/img-proxy/?k=f6d1154d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIu8jIoIFzJTA657vlcjJg170Rl2J2tjRjJDjZiaYMTz2Lz8vwrxRYQt0WLHtZBYILytJyrQQo9TGA%2F640%3Fwx_fmt%3Dpng"/><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;font-size: 18px;color: #0e88eb;"><span style="display: none;"></span><span style="font-size: 18px;color: #0e88eb;">辅助功能</span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck 希望用户在分析代码、定位缺陷、修复缺陷等操作中，能够获得良好的用户体验，为此，我们提供这些辅助能力</p><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;" class="list-paddingleft-1"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;">实时查看分析进度</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;">手动启停分析任务</section></li></ul><img class="rich_pages wxw-img" data-ratio="0.1836734693877551" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;width: 100%;" data-type="png" data-w="3332" src="https://wechat2rss.xlab.app/img-proxy/?k=62435ee9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIu8jIoIFzJTA657vlcjJg1a5ibicCze4B79p9QY9rVREArDniavQ16fT785Jac0Vs6JSSD4BIibAfosA%2F640%3Fwx_fmt%3Dpng"/><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;" class="list-paddingleft-1"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;">缺陷定位、溯源</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;">缺陷介绍与修复指引</section></li></ul><img class="rich_pages wxw-img" data-ratio="0.547301218804411" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;width: 100%;" data-type="png" data-w="3446" src="https://wechat2rss.xlab.app/img-proxy/?k=791f06a0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIu8jIoIFzJTA657vlcjJg1gXtYicYo2icrzR1p8OxtjXksIITwZrXhItDphCIo8GDERUMBrA2872yw%2F640%3Fwx_fmt%3Dpng"/><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;" class="list-paddingleft-1"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;">集中管理任务/项目</section></li></ul><img class="rich_pages wxw-img" data-ratio="0.2920448478376935" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;width: 100%;" data-type="png" data-w="3746" src="https://wechat2rss.xlab.app/img-proxy/?k=3e9ab591&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIu8jIoIFzJTA657vlcjJg1THPt3141ls7H9nhWziajjnTMekh7eicjzr1ziaypqaILSaxGxMwEyxfmA%2F640%3Fwx_fmt%3Dpng"/><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;" class="list-paddingleft-1"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;font-size: 15px;">多维度数据统计与展示</section></li></ul><img class="rich_pages wxw-img" data-ratio="0.3842931937172775" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;width: 100%;" data-type="png" data-w="3820" src="https://wechat2rss.xlab.app/img-proxy/?k=14f6aec1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIu8jIoIFzJTA657vlcjJg1j20gYDMc05H6UJ8qZU9zJQL3XHlOUQRnUiaJA6fammz7IicoweHcPIHg%2F640%3Fwx_fmt%3Dpng"/><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;font-size: 18px;color: #0e88eb;"><span style="display: none;"></span><span style="font-size: 18px;color: #0e88eb;">集成扩展</span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">扩展性是一款成熟商业产品的必备能力，Xcheck 支持集成其他工具或作为第三方工具被集成</p><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 18px;"><span style="display: none;"></span>集成其他工具<span style="display: none;"></span></h4><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck 提供导入结果功能，可以导入其他工具的扫描结果，作为一次分析记录在 Xcheck 中展示</p><img class="rich_pages wxw-img" data-ratio="0.1528735632183908" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;width: 100%;" data-type="png" data-w="3480" src="https://wechat2rss.xlab.app/img-proxy/?k=37b3f793&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIu8jIoIFzJTA657vlcjJg1FxsYXFCKibC9Shic7GO6tWcSCRs6maCjkOdrPsbUicPwxg26UNk3uk5pg%2F640%3Fwx_fmt%3Dpng"/><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">同时，Xcheck 底层也支持多引擎分析能力，只要实现相关接口，就能在分析时调用其他引擎来进行分析，结果会一并展示在页面中</p><img class="rich_pages wxw-img" data-ratio="0.4964871194379391" style="max-width: 100%;border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;height: 100%;object-fit: contain;box-shadow: #84A1A8 0px 10px 15px;width: 100%;" data-type="png" data-w="3416" src="https://wechat2rss.xlab.app/img-proxy/?k=722c82b1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIu8jIoIFzJTA657vlcjJg1iauYfOr9IPqyumLfjN68NSFicmncR52zWQIxClgmiciaOiaq1Ev58Gxjibiag%2F640%3Fwx_fmt%3Dpng"/><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 18px;"><span style="display: none;"></span>被集成<span style="display: none;"></span></h4><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck 提供了丰富的 API 接口，可以通过 API 来调用 Xcheck 来分析代码并获取结果，只要将结果转换为对应平台支持的结果格式并导入，即可在其他工具平台展示</p><h2 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 22px;text-align: left;margin: 20px 10px 0px 0px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;font-size: 22px;color: #0e88eb;font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid #0e88eb;">0x03 体验环境正式开放!</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">即日起，Xcheck 在线体验环境正式开放，</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">访问体验地址或点击阅读原文即可体验！</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><a href="https://xcheck.tencent.com/" target="_blank">https://xcheck.tencent.com/</a></p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">每个用户默认可以创建 20 个分析任务，可分析代码行数 20w 行</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">欢迎反馈漏报/误报或提出产品使用上的建议。</p></section><p style="margin-bottom: 0px;"><br/></p>



<p><a href="https://xcheck.tencent.com/">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=405188c7&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzg2ODQ3ODE1NA%3D%3D%26mid%3D2247486380%26idx%3D1%26sn%3Dd2ab503ab41e6d3434b1140a142d3357%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 21 Jul 2022 16:54:00 +0800</pubDate>
    </item>
    <item>
      <title>Xcheck 对 Java 工具类代码的分析尝试</title>
      <link>https://mp.weixin.qq.com/s?__biz=Mzg2ODQ3ODE1NA==&amp;mid=2247486008&amp;idx=1&amp;sn=f90b681a5cce77d88f53fe6403fc4683</link>
      <description>Xcheck能发现log4j2 shell和 spring cloud function RCE这样的漏洞吗？</description>
      <content:encoded><![CDATA[<p>
原创 <span>xcheck团队</span> <span>2022-05-09 16:43</span> <span style="display: inline-block;">广东</span>
</p>

<p>Xcheck能发现log4j2 shell和 spring cloud function RCE这样的漏洞吗？</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=75b6027a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F8SDYbMEObOKwjibibVWia7D5U68gmXKibNyPzDmZmPM01gibqqCJs4mX6icGicicrV10OiaIkG4VUofTicQcJ0clPs9pHfDw%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px;color: black;padding-right: 10px;padding-left: 10px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;overflow-wrap: break-word;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;"><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img class="rich_pages wxw-img" data-ratio="0.5638888888888889" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=de80d1ab&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOKgZibyVIZNFXSzykricod8vRvXVIvOMcJ0CdprIz5hiaBKzricjPzXlicjtDh3ybCDxFzvouaULtPMlGA%2F640%3Fwx_fmt%3Dpng"/></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x00 背景</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">log4j2 和 spring cloud function 爆出严重的安全漏洞，作为静态代码扫描工具，Xcheck 经常会被问到——是否能够发现此类漏洞。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">从设计初衷出发，Xcheck 不会对框架代码和工具类代码（第三方 Jar 包）进行有效扫描。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">主要有以下原因：</p><ol data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-1"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">此类代码与上层应用代码相比，通常来说漏洞相对少，且使用到的 Java 语言特性比较复杂，Xcheck 使用的污点传播模型来进行分析，既不够高效，效果也不够理想</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">工具类代码的入口缺乏统一的特征，如果要通过自定义规则来逐一标注，不利于实现自动化批量分析</section></li></ol><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">尝试自己使用CodeQL，以及参考网上的文章，在<strong style="font-weight: border;color: #0e88eb;">不添加专用规则的前提下</strong>并没有实现<strong style="font-weight: border;color: #0e88eb;">精准</strong>的分析出 log4j2 的漏洞。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">那么换一个思路，如果只需要得出近似的结果，Xcheck 是否可以做？</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">近期，基于 Java 引擎进行扩展，实现了对框架代码和工具类代码的分析，能够得出一些近似结果，可以辅助做安全研究的同学用于分析。</p><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x01 log4j2</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">分析后，根据lookup函数得出可能的入口函数有 426 个，其中虽然包含了所需要的函数，但是也存在不少干扰数据：</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBQqjtPaBnmGfLfoZye48Rzs1xuljghdqYxjD0a4Ontv9Rqho6aGyQD8YGbrIcBUQYUgX399lhTYSSvN0jJFMRXm/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">AbstractLogger.debug(Marker, String, Object, Object, Object, Object, Object, )<br/>AbstractLogger.debug(Marker, String, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.debug(Marker, String, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.debug(Marker, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.debug(Marker, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.debug(String, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.debug(String, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.debug(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.debug(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.enter(String, MessageSupplier, )<br/>AbstractLogger.error(Marker, String, Object, Object, Object, Object, )<br/>AbstractLogger.error(Marker, String, Object, Object, Object, Object, Object, )<br/>AbstractLogger.error(Marker, String, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.error(Marker, String, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.error(Marker, String, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.error(Marker, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.error(Marker, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.error(String, Object, Object, Object, Object, Object, )<br/>AbstractLogger.error(String, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.error(String, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.error(String, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.error(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.error(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.fatal(Marker, String, Object, Object, Object, )<br/>AbstractLogger.fatal(Marker, String, Object, Object, Object, Object, )<br/>AbstractLogger.fatal(Marker, String, Object, Object, Object, Object, Object, )<br/>AbstractLogger.fatal(Marker, String, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.fatal(Marker, String, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.fatal(Marker, String, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.fatal(Marker, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.fatal(Marker, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.fatal(String, Object, Object, Object, Object, )<br/>AbstractLogger.fatal(String, Object, Object, Object, Object, Object, )<br/>AbstractLogger.fatal(String, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.fatal(String, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.fatal(String, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.fatal(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.fatal(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.log(Level, Marker, String, Object, Object, Object, )<br/>AbstractLogger.log(Level, Marker, String, Object, Object, Object, Object, )<br/>AbstractLogger.log(Level, Marker, String, Object, Object, Object, Object, Object, )<br/>AbstractLogger.log(Level, Marker, String, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.log(Level, Marker, String, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.log(Level, Marker, String, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.log(Level, Marker, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.log(Level, Marker, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.log(Level, String, Object, Object, Object, Object, )<br/>AbstractLogger.log(Level, String, Object, Object, Object, Object, Object, )<br/>AbstractLogger.log(Level, String, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.log(Level, String, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.log(Level, String, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.log(Level, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.log(Level, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.log(Message, )<br/>AbstractLogger.readObject(ObjectInputStream, )<br/>AbstractLogger.throwing(Level, T, )<br/>AbstractLogger.trace(Marker, String, Object, Object, Object, Object, Object, )<br/>AbstractLogger.trace(Marker, String, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.trace(Marker, String, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.trace(Marker, String, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.trace(Marker, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.trace(Marker, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.trace(String, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.trace(String, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.trace(String, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.trace(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.trace(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.warn(Marker, String, Object, Object, Object, Object, Object, )<br/>AbstractLogger.warn(Marker, String, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.warn(Marker, String, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.warn(Marker, String, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.warn(Marker, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.warn(Marker, String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.warn(String, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.warn(String, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.warn(String, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.warn(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>AbstractLogger.warn(String, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, )<br/>...<br/>...<br/></code></pre><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck 能够找到从风险函数到入口函数的调用链路，但是，在不做专用规则的前提下，无法生成与真实路径一致的结果。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">在此类较为复杂的场景下，Xckeck可以做的是，根据Debug过程中的实际数据，实时生成可能的调用链路，从而辅助漏洞挖掘：</p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.5653419262441819" data-s="300,640" style="" data-type="gif" data-w="2793" src="https://wechat2rss.xlab.app/img-proxy/?k=aeb62db5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_gif%2F8SDYbMEObOKgZibyVIZNFXSzykricod8vRujJX9NAfpBZ4kzia4IWFIK6JwOzVeXA6G9lYB8TjHZJCMuxgzB5hxTQ%2F640%3Fwx_fmt%3Dgif"/></p><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x02 Spring Cloud Function</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">分析后，根据parseExpression函数得出可能的入口函数有 4 个：</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBQqjtPaBnmGfLfoZye48Rzs1xuljghdqYxjD0a4Ontv9Rqho6aGyQD8YGbrIcBUQYUgX399lhTYSSvN0jJFMRXm/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">FunctionDeployerConfiguration.functionArchiveUnDeployer(FunctionDeployerProperties, FunctionRegistry, ApplicationArguments, MavenProperties, ApplicationContext, )<br/>HeaderEnricher.apply(Object, )<br/>RoutingFunction.apply(Object, )<br/>SimpleFunctionRegistry.FunctionInvocationWrapper.accept(Object, )<br/></code></pre><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">其中调试确认 RoutingFunction.apply(Object)是真实触发路径上的函数：<img class="rich_pages wxw-img" data-ratio="0.23973880597014927" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1072" src="https://wechat2rss.xlab.app/img-proxy/?k=5a3fedfc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOKgZibyVIZNFXSzykricod8vRXZZQ5Osxn4siaM4EbcOakcS67FpuBo24eG0VibwGgJh9SPcVKX5dEEmQ%2F640%3Fwx_fmt%3Dpng"/></p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck 分析出的调用路径与实际结果吻合：</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBQqjtPaBnmGfLfoZye48Rzs1xuljghdqYxjD0a4Ontv9Rqho6aGyQD8YGbrIcBUQYUgX399lhTYSSvN0jJFMRXm/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">RoutingFunction.apply(Object)<br/>RoutingFunction.route(Object, String)<br/>RoutingFunction.functionFromExpression(String, Object, String)<br/>org.springframework.expression.spel.standard.SpelExpressionParser.parseExpression()<br/></code></pre><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><em style="color: rgb(14, 136, 235);letter-spacing: 0.3em;">还缺少 doApply 到 post 的调用链条，是由于工具在处理上存在一点小的瑕疵，后续会补齐。</em></p><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x03 其它</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">尝试分析常见的 Java 框架和工具类代码，发现很多之前没有关注到的有意思代码，以下是一些归纳总结。</p><ol data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-1"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">很多软件都会对配置文件中的内容调用表达式语言进行解析，例如：</p><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;"><em style="color: rgb(14, 136, 235);letter-spacing: 0.3em;">Mybatis3 在处理某些标签时，会调用 OGNL 对标签属性进行解析</em></p><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;"><em style="color: rgb(14, 136, 235);letter-spacing: 0.3em;">spring-cloud-stream-binder-rabbit 的部分 bindings 配置信息会被 SPEL 解析</em></p><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;"><em style="color: rgb(14, 136, 235);letter-spacing: 0.3em;">如果你发现有写配置文件或者XML文件的漏洞，可以考虑上述特性的利用</em></p></section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">反序列化还是广泛存在于各种软件中，如果有新的反序列化链条被发现，会有很大影响，例如：</p><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;"><em style="color: rgb(14, 136, 235);letter-spacing: 0.3em;">spring-cloud-integration的session数据的持久化逻辑中</em></p></section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">代码中的各种注解，很多都用到表达式语言模块进行解析，例如：</p><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;"><em style="color: rgb(14, 136, 235);letter-spacing: 0.3em;">jeecg-boot、resilience4j、spring-batch</em></p></section></li></ol><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x04 总结</span></h2><ol data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-1"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">目前主流 SAST 工具对于框架类代码和工具类代码，在不做专用规则的前提下，只能输出近似调用链条的结果</p></section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">对于调用关系复杂场景（如 log4j2），输出的调用链条更多的意义在于辅助安全研究人员进行调试分析</p></section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">对于调用关系简单的场景（如 spring cloud function），输出的调用链条比较接近于准确结果</p></section></li></ol></section><p><br/></p>



<p><a href="2247486008">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=966b9ef5&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzg2ODQ3ODE1NA%3D%3D%26mid%3D2247486008%26idx%3D1%26sn%3Df90b681a5cce77d88f53fe6403fc4683%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Mon, 09 May 2022 16:43:00 +0800</pubDate>
    </item>
    <item>
      <title>Xcheck检查器扩展规则</title>
      <link>https://mp.weixin.qq.com/s?__biz=Mzg2ODQ3ODE1NA==&amp;mid=2247485942&amp;idx=1&amp;sn=752cf113801a9d2334f8507da9859b58</link>
      <description>Xcheck的扩展规则介绍</description>
      <content:encoded><![CDATA[<p>
原创 <span>xcheck团队</span> <span>2022-03-04 14:59</span> <span style="display: inline-block;"></span>
</p>

<p>Xcheck的扩展规则介绍</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=e956b08d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F8SDYbMEObOJQeyje2NneBibppLa95LMmrYCeXh6zaRyuJLXYdNY4TVZ4cWX0xbicicnoRlbzsQEicm0FyGftc9uUJA%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<p><br/></p><section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px;padding-right: 10px;padding-left: 10px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;overflow-wrap: break-word;text-align: left;font-family: PingFangSC-Light;"><figure data-tool="mdnice编辑器" style="color: black;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img class="rich_pages wxw-img" data-fileid="100002198" data-ratio="0.5638888888888889" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=bb72d18e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOL8mOWJ5xYicK2UMySNJbyAtvKialnoeabcSU9er3JvdZDqTRFGZt87NfOwTWj1QccxKwC4rx85ODSg%2F640%3Fwx_fmt%3Dpng"/></figure><h2 data-tool="mdnice编辑器" style="color: black;font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x00 扩展规则</span></h2><p data-tool="mdnice编辑器" style="color: black;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;text-indent: 30px;word-spacing: 1.5px;"><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;text-indent: 30px;word-spacing: 1.5px;">扩展规则是用来帮助<a target="_blank" href="http://mp.weixin.qq.com/s?__biz=Mzg2ODQ3ODE1NA==&amp;mid=2247483698&amp;idx=1&amp;sn=827baf0317a3a1e06cc8732f3d3b365b&amp;chksm=ceaafc97f9dd7581c58db57c63ea48d33a06d721c2c8951bd9e84b889028342bdceb9ba48490&amp;scene=21#wechat_redirect" textvalue="Xcheck检查器" linktype="text" imgurl="" imgdata="null" data-itemshowtype="0" tab="innerlink" data-linktype="2">Xcheck检查器</a>去</span></span><strong style="font-weight: border;color: #0e88eb;">适配各种项目框架</strong><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;text-indent: 30px;word-spacing: 1.5px;"><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;text-indent: 30px;word-spacing: 1.5px;">的一个解决方案。</span><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;text-indent: 30px;word-spacing: 1.5px;">通过扩展规则模版，</span><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;text-indent: 30px;word-spacing: 1.5px;">简单</span><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;text-indent: 30px;word-spacing: 1.5px;">的填写项目框架中的一些必要信息（如类名，函数名等），即可让Xcheck检查器在扫描该</span><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;text-indent: 30px;word-spacing: 1.5px;">项目的过程</span><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;text-indent: 30px;word-spacing: 1.5px;">中，</span></span><strong style="font-weight: border;color: #0e88eb;">“认识”</strong><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;text-indent: 30px;word-spacing: 1.5px;"><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;text-indent: 30px;word-spacing: 1.5px;">私有框架（或忽略某些片段），帮助用户<span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;word-spacing: 1.5px;background-color: rgb(255, 255, 255);">挖掘代码中隐藏的安全风险</span>。</span></span></p><p data-tool="mdnice编辑器" style="color: black;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;text-indent: 30px;word-spacing: 1.5px;"><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;text-indent: 30px;word-spacing: 1.5px;"><br/></span></span></p><h2 data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);margin-top: 20px;margin-right: 10px;font-weight: bold;font-size: 22px;font-family: PingFangSC-Light;text-align: left;white-space: normal;"><span style="padding-left: 10px;font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;border-left: 5px solid rgb(14, 136, 235);">0x01 安装 &amp; 配置</span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);margin: 10px;padding-top: 8px;padding-bottom: 8px;font-family: PingFangSC-Light;text-align: left;white-space: normal;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><span style="text-indent: 30px;"><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;word-spacing: 1.5px;text-indent: 30px;">首先，需要私有化部署Xcheck，并在部署的Xcheck网页上申请</span></span><strong style="font-weight: border;color: #0e88eb;">Token</strong><span style="text-indent: 30px;"><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;word-spacing: 1.5px;text-indent: 30px;">:</span><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;word-spacing: 1.5px;text-indent: 30px;"></span></span></p><p style="color: black;text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.7068366164542295" data-s="300,640" style="" data-type="png" data-w="1726" src="https://wechat2rss.xlab.app/img-proxy/?k=a47f5ebc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJQeyje2NneBibppLa95LMmrgdC33MmGOmm63pY2oRn7JeibjrH1ya1o8Jf8qcAMEkxQ4v3U6Gfibeqg%2F640%3Fwx_fmt%3Dpng"/></p><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);margin: 10px;padding-top: 8px;padding-bottom: 8px;font-family: PingFangSC-Light;text-align: left;white-space: normal;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">申请完成后，记录</p><ul class="list-paddingleft-2" style="color: black;list-style-type: square;"><li><p data-tool="mdnice编辑器" style="margin: 10px;padding-top: 8px;padding-bottom: 8px;color: rgb(0, 0, 0);font-family: PingFangSC-Light;text-align: left;white-space: normal;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><strong style="font-weight: border;color: #0e88eb;">后台地址URL</strong></p></li><li><p data-tool="mdnice编辑器" style="margin: 10px;padding-top: 8px;padding-bottom: 8px;color: rgb(0, 0, 0);font-family: PingFangSC-Light;text-align: left;white-space: normal;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><strong style="font-weight: border;color: #0e88eb;">Token</strong></p></li></ul><p data-tool="mdnice编辑器" style="margin: 10px;padding-top: 8px;padding-bottom: 8px;font-family: PingFangSC-Light;text-align: left;white-space: normal;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><span style="color:#000000;">完成上述步骤后，安装私有化交付配套的</span><strong style="font-weight: border;color: #0e88eb;">Xcheck扩展规则客户</strong><strong style="font-weight: border;color: #0e88eb;">端</strong><span style="color:#000000;">（win/mac）并打开：</span><span style="color: rgb(0, 0, 0);letter-spacing: 0.2em;word-spacing: 0.1em;"></span></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.7559912854030502" data-s="300,640" style="" data-type="png" data-w="918" src="https://wechat2rss.xlab.app/img-proxy/?k=c12225fe&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJQeyje2NneBibppLa95LMmrzZuysUdNZFoBE325lNuiadDRZVqxkj8T76iaW7ueaib2tZBC7h7s0nobg%2F640%3Fwx_fmt%3Dpng"/></p><p data-tool="mdnice编辑器" style="margin: 10px;padding-top: 8px;padding-bottom: 8px;font-family: PingFangSC-Light;text-align: left;white-space: normal;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><strong style="color: rgb(14, 136, 235);letter-spacing: 0.2em;word-spacing: 0.1em;"></strong>软件打开后界面如图，共两个Tab：<strong style="font-weight: border;color: #0e88eb;">扩展规则</strong>/<strong style="font-weight: border;color: #0e88eb;">设置</strong><span style="text-align: center;font-size: 16px;letter-spacing: 0px;"></span></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.7513812154696132" data-s="300,640" style="" data-type="png" data-w="1448" src="https://wechat2rss.xlab.app/img-proxy/?k=9b2de407&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJQeyje2NneBibppLa95LMmrD3paicQibnwuUdTKdKZa3Gu23FaC6PvX6gCt7mmomd10KEAbibguVzIag%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="text-align: center;"><br/></p><p style="text-align: left;"><span style="letter-spacing: 0px;">首</span>次打开Xchec<span style="letter-spacing: 0px;">k扩展规则</span><span style="letter-spacing: 0px;">客户端</span><span style="letter-spacing: 0px;">，需要完成以下几个步骤：</span><br/></p><p style="text-align: left;"><span style="letter-spacing: 0px;"><br/></span></p><ul class="list-paddingleft-2" style="list-style-type: square;"><li><p style="text-align: left;"><span style="letter-spacing: 0px;color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;text-indent: -20px;">在本地磁盘</span><strong style="font-weight: border;color: #0e88eb;">新建一个目录</strong><span style="letter-spacing: 0px;"><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;text-indent: -20px;">例如C:/rule/rule，并在扩展规则客户端</span></span><strong style="font-weight: border;color: #0e88eb;">设置</strong><span style="letter-spacing: 0px;"><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;text-indent: -20px;">中填写。</span><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;text-indent: -20px;">注：</span><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;text-indent: -20px;">需要用户提前创建目录，并且</span></span><strong style="font-weight: border;color: #0e88eb;">至</strong><strong style="font-weight: border;color: #0e88eb;">少为盘符下两级</strong><span style="letter-spacing: 0px;"><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;text-indent: -20px;">（包含两级），如不可为C:/rule，否则可能会有文件读写权限问题</span></span></p></li><li><p style="text-align: left;"><span style="letter-spacing: 0px;"><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;text-indent: -20px;"><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;text-indent: -20px;">在</span></span></span><strong style="font-weight: border;color: #0e88eb;">设置</strong><span style="letter-spacing: 0px;"><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;text-indent: -20px;"><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;text-indent: -20px;">中填写规则测试服务器，如<a href="http://xcheck.com" target="_blank">http://xcheck.com</a></span></span></span></p></li><li><p style="text-align: left;"><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-indent: -20px;letter-spacing: 0px;">在左侧</span><strong style="font-weight: border;color: #0e88eb;">设置</strong><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-indent: -20px;letter-spacing: 0px;">中填写插件鉴权Token（在Xcheck后台页面创建）</span></p></li></ul><p style="text-align: left;"><br/></p><p style="text-align: left;"><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-indent: -20px;letter-spacing: 0px;">完成以上三个步骤即为初始化完成，接下来就可以使用扩展规则客户端的核心功能：<br/></span></p><p style="text-align: left;"><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-indent: -20px;letter-spacing: 0px;"><br/></span></p><ul class="list-paddingleft-2" style="list-style-type: square;"><li><p style="text-align: left;"><strong style="font-weight: border;color: #0e88eb;">添加规则</strong><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-indent: -20px;letter-spacing: 0px;">并</span><strong style="font-weight: border;color: #0e88eb;">测试</strong><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-indent: -20px;letter-spacing: 0px;">，若生效即可</span><strong style="font-weight: border;color: #0e88eb;">导出</strong><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-indent: -20px;letter-spacing: 0px;">规则zip包，通过拖拽等方式</span><strong style="font-weight: border;color: #0e88eb;">上传</strong><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-indent: -20px;letter-spacing: 0px;">至Xcheck网页</span></p></li></ul><p style="text-align: left;"><span style="letter-spacing: 0px;"><br/></span></p><p style="text-align: left;"><span style="letter-spacing: 0px;">接下来重点介绍一下核心功能的使用方法。<br/></span></p><p style="text-align: left;"><span style="letter-spacing: 0px;"><br/></span></p><h2 data-tool="mdnice编辑器" style="margin-top: 20px;margin-right: 10px;font-weight: bold;font-size: 22px;font-family: PingFangSC-Light;text-align: left;white-space: normal;color: black;"><span style="padding-left: 10px;font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;border-left: 5px solid rgb(14, 136, 235);">0x02 添加规则</span></h2><p data-tool="mdnice编辑器" style="margin: 10px;padding-top: 8px;padding-bottom: 8px;font-family: PingFangSC-Light;text-align: left;white-space: normal;color: black;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><br/></p><p data-tool="mdnice编辑器" style="margin: 10px;padding-top: 8px;padding-bottom: 8px;font-family: PingFangSC-Light;text-align: left;white-space: normal;color: black;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">以一个Java私有项目为例，介绍如何添加规则，帮助检查器识别框架。</p><p data-tool="mdnice编辑器" style="margin: 10px;padding-top: 8px;padding-bottom: 8px;font-family: PingFangSC-Light;text-align: left;white-space: normal;color: black;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">注：一些关键信息在代码注释中</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;font-size: 16px;text-align: left;color: black;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="margin-bottom: -7px;display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBT8R59GckZknwxPx5KLWmiaVf2eb0V9MwpRrzytiavy7WkVvPWJ7ibfKYeI596iaxDrYSYE1NI6W0jW54CxDp5SKvCv/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 558px;border-radius: 5px;"></span><code style="padding: 15px 16px 16px;overflow-x: auto;color: rgb(171, 178, 191);display: -webkit-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;"></span><span style="white-space:pre-wrap;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;box-sizing: border-box;color: rgb(198, 120, 221);line-height: 26px;">package</span><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);"> file_testcase;</span><br style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;box-sizing: border-box;"/><span style="white-space:pre-wrap;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;box-sizing: border-box;color: rgb(198, 120, 221);line-height: 26px;"></span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;box-sizing: border-box;color: rgb(198, 120, 221);line-height: 26px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;">import</span><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);"> com.lib.FileUtils; </span><span style="white-space:pre-wrap;box-sizing: border-box;color: rgb(92, 99, 112);font-style: italic;line-height: 26px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;">// 需要适配的包名类名</span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;box-sizing: border-box;color: rgb(198, 120, 221);line-height: 26px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;">import</span><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);"> java.io.File;</span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;box-sizing: border-box;color: rgb(198, 120, 221);line-height: 26px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;">public</span><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);"> </span><span style="white-space:pre-wrap;box-sizing: border-box;line-height: 26px;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"><span style="box-sizing: border-box;color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="box-sizing: border-box;color: rgb(230, 192, 123);line-height: 26px;">FileTest</span> </span><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">{</span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">    </span><span style="white-space:pre-wrap;box-sizing: border-box;color: rgb(97, 174, 238);line-height: 26px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;">@RequestMapping</span><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">(</span><span style="white-space:pre-wrap;box-sizing: border-box;color: rgb(152, 195, 121);line-height: 26px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;">&#34;test0&#34;</span><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">)</span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">    </span><span style="white-space:pre-wrap;box-sizing: border-box;line-height: 26px;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"><span style="box-sizing: border-box;color: rgb(198, 120, 221);line-height: 26px;">public</span> String <span style="box-sizing: border-box;color: rgb(97, 174, 238);line-height: 26px;">test0</span><span style="box-sizing: border-box;line-height: 26px;">(String name0)</span> </span><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">{</span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">        File f = FileUtils.createFile(name0);</span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">        </span><span style="white-space:pre-wrap;box-sizing: border-box;color: rgb(92, 99, 112);font-style: italic;line-height: 26px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;">// createFile是污点传播场景的方法名称</span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">        </span><span style="white-space:pre-wrap;box-sizing: border-box;color: rgb(92, 99, 112);font-style: italic;line-height: 26px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;">// name0是污点，且下标是0（第一个参数）</span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">        </span><span style="white-space:pre-wrap;box-sizing: border-box;color: rgb(92, 99, 112);font-style: italic;line-height: 26px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;">// 返回类型是java.io.File</span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">        f.delete();</span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">    }</span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">    </span><span style="white-space:pre-wrap;box-sizing: border-box;color: rgb(97, 174, 238);line-height: 26px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;">@RequestMapping</span><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">(</span><span style="white-space:pre-wrap;box-sizing: border-box;color: rgb(152, 195, 121);line-height: 26px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;">&#34;test1&#34;</span><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">)</span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">    </span><span style="white-space:pre-wrap;box-sizing: border-box;line-height: 26px;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"><span style="box-sizing: border-box;color: rgb(198, 120, 221);line-height: 26px;">public</span> String <span style="box-sizing: border-box;color: rgb(97, 174, 238);line-height: 26px;">test1</span><span style="box-sizing: border-box;line-height: 26px;">(String name1)</span> </span><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">{</span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">        FileUtils.deleteFile(name1);</span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">        </span><span style="white-space:pre-wrap;box-sizing: border-box;color: rgb(92, 99, 112);font-style: italic;line-height: 26px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;">// deleteFile是危险函数场景的方法名称</span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">        </span><span style="white-space:pre-wrap;box-sizing: border-box;color: rgb(92, 99, 112);font-style: italic;line-height: 26px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;">// name1是污点，且下标是0（第一个参数）</span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">        </span><span style="white-space:pre-wrap;box-sizing: border-box;color: rgb(92, 99, 112);font-style: italic;line-height: 26px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;">// 此处存在任意文件删除漏洞</span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">    }</span><br style="white-space:pre-wrap;box-sizing: border-box;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;"/><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);">}</span><span style="white-space:pre-wrap;color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;text-align: left;background-color: rgb(40, 44, 52);"></span></code></pre><p data-tool="mdnice编辑器" style="margin: 10px;padding: 8px 10px;font-family: PingFangSC-Light;text-align: left;white-space: normal;color: black;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;word-break: break-word;overflow-wrap: break-word;">首先切换到“扩展规则”Tab：</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.7513812154696132" data-s="300,640" style="" data-type="png" data-w="1448" src="https://wechat2rss.xlab.app/img-proxy/?k=cb2c1a6b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJQeyje2NneBibppLa95LMmr4FrDOiaeBfoc0uicrm3cmniaENicfTqqVTGM1Qe1CFw0VMy82uvjzRVcRg%2F640%3Fwx_fmt%3Dpng"/></p><p data-tool="mdnice编辑器" style="margin: 10px;padding-top: 8px;padding-bottom: 8px;font-family: PingFangSC-Light;text-align: left;white-space: normal;color: black;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;">点击上方标题右侧</span><strong style="font-weight: border;color: #0e88eb;">添加规则</strong><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;">按钮，然后分为4步：</span></p><h3 style="margin: 40px 10px 20px;font-weight: bold;font-size: 19.2px;white-space: normal;box-sizing: border-box;text-align: left;color: rgb(63, 63, 63);line-height: 1.5;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;">Step1: 选择Java通用规则模版</h3><p style="white-space: normal;text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.3950892857142857" data-s="300,640" data-w="1792" data-type="png" src="https://wechat2rss.xlab.app/img-proxy/?k=19ed03bf&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOLjHw24UyUG8LRrib7OHtPZVEhhTibLO2rFTq6p6V0xtJzTltnqkJBad0gYibiatZJic2tWqiazA6DUUUxQ%2F640%3Fwx_fmt%3Dpng"/></p><h3 style="margin: 40px 10px 20px;font-weight: bold;font-size: 19.2px;white-space: normal;box-sizing: border-box;text-align: left;color: rgb(63, 63, 63);line-height: 1.5;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;">Step2: 填写规则名称/规则描述/场景类型<br/></h3><p style="margin: 10px;white-space: normal;box-sizing: border-box;font-size: 16px;text-align: left;color: rgb(63, 63, 63);line-height: 1.6;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;">此处为<strong style="font-weight: border;color: #0e88eb;">污点传播</strong>场景的扩展规则，因此场景类型选择污点传播 </p><p style="white-space: normal;text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.4841628959276018" data-s="300,640" data-w="1768" data-type="png" src="https://wechat2rss.xlab.app/img-proxy/?k=43385d4f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOLjHw24UyUG8LRrib7OHtPZVgqOjibLhjZslNGrUS9hto3QgeKHzeCDsEoK6nF0WwyNqHDRFYa1QX5A%2F640%3Fwx_fmt%3Dpng"/></p><h3 style="margin: 40px 10px 20px;font-weight: bold;font-size: 19.2px;white-space: normal;box-sizing: border-box;text-align: left;color: rgb(63, 63, 63);line-height: 1.5;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;">Step3: （关键信息见上述黑框内的代码注释）<br/></h3><p style="margin-top: 20px;margin-right: 10px;margin-bottom: 20px;padding-left: 20px;white-space: normal;box-sizing: border-box;font-size: 16px;text-align: left;line-height: 1.5;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;list-style: circle;"><span style="color: rgb(63, 63, 63);margin: 10px;box-sizing: border-box;line-height: 1.5;text-indent: -20px;display: block;"><span style="margin-right: 10px;box-sizing: border-box;">•</span>需要适配的包名类名：<strong style="font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;text-indent: -20px;white-space: normal;color: rgb(14, 136, 235);">com.lib.FileUtils</strong></span><span style="color: rgb(63, 63, 63);margin: 10px;box-sizing: border-box;line-height: 1.5;text-indent: -20px;display: block;"><span style="margin-right: 10px;box-sizing: border-box;">•</span>方法名字：<strong style="font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;text-indent: -20px;white-space: normal;color: rgb(14, 136, 235);">createFile</strong></span><span style="color: rgb(63, 63, 63);margin: 10px;box-sizing: border-box;line-height: 1.5;text-indent: -20px;display: block;"><span style="margin-right: 10px;box-sizing: border-box;">•</span>污点参数：<strong style="font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;text-indent: -20px;white-space: normal;color: rgb(14, 136, 235);">0</strong>，因为污点<strong style="font-weight: border;color: #0e88eb;">name0</strong>是<strong style="font-weight: border;color: #0e88eb;">createFile</strong>的第一个参数</span><span style="margin: 10px;box-sizing: border-box;line-height: 1.5;text-indent: -20px;display: block;"><span style="color: rgb(63, 63, 63);margin-right: 10px;box-sizing: border-box;">•</span>返回类型：<strong style="color: rgb(14, 136, 235);">java.io.File</strong><span style="color:#3f3f3f;">，因为FileUtils.createFile返回的类型是File</span></span></p><p style="white-space: normal;text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.5512249443207127" data-s="300,640" data-w="1796" data-type="png" src="https://wechat2rss.xlab.app/img-proxy/?k=25f2999c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOLjHw24UyUG8LRrib7OHtPZVzficXQDhv044Z43sdPZhO2T7ia7yuTWRqsML94ABYCFQ5MsicFTlnib0pA%2F640%3Fwx_fmt%3Dpng"/></p><h3 style="margin: 40px 10px 20px;font-weight: bold;font-size: 19.2px;white-space: normal;box-sizing: border-box;text-align: left;color: rgb(63, 63, 63);line-height: 1.5;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;">Step4:<br/></h3><p style="margin: 10px;white-space: normal;box-sizing: border-box;font-size: 16px;text-align: left;color: rgb(63, 63, 63);line-height: 1.6;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;">确认无误后点击<strong style="font-weight: border;color: #0e88eb;">确定</strong>按钮，提交即可 </p><p style="white-space: normal;text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.6662420382165605" data-s="300,640" data-w="1570" data-type="png" src="https://wechat2rss.xlab.app/img-proxy/?k=3fd3a4a1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOLjHw24UyUG8LRrib7OHtPZVbzq9ic0unB508v8Kgibat2n9XQ9Ckf9ONhexqC7jOyiahZOU4P3gcv9AQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: left;"><br/></p><h2 data-tool="mdnice编辑器" style="margin-top: 20px;margin-right: 10px;font-weight: bold;font-size: 22px;font-family: PingFangSC-Light;text-align: left;white-space: normal;color: black;"><span style="padding-left: 10px;font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;border-left: 5px solid rgb(14, 136, 235);">0x03 测试规则</span></h2><p data-tool="mdnice编辑器" style="margin: 10px;white-space: normal;box-sizing: border-box;font-size: 16px;text-align: left;color: rgb(63, 63, 63);line-height: 1.6;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;padding-right: 10px;padding-left: 10px;letter-spacing: 0px;word-break: break-word;overflow-wrap: break-word;"><span style="letter-spacing: 0px;"></span></p><p style="margin: 10px;white-space: normal;box-sizing: border-box;font-size: 16px;text-align: left;color: rgb(63, 63, 63);line-height: 1.6;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;"><span style="color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;">编写好规则之后，扩展规则客户端提供了低成本的规则测试方法：</span></p><p style="margin: 10px;white-space: normal;box-sizing: border-box;font-size: 16px;text-align: left;color: rgb(63, 63, 63);line-height: 1.6;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;">找到刚才添加的扩展规则那一行，点击右侧<strong style="font-weight: border;color: #0e88eb;">测试</strong>按钮，自行选择测试样本根文件夹，等待测试结果。前后两次结果不同，表示扩展规则生效。 </p><p style="white-space: normal;text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.3796498905908096" data-s="300,640" data-w="1828" data-type="png" src="https://wechat2rss.xlab.app/img-proxy/?k=29d0dd9b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOLjHw24UyUG8LRrib7OHtPZV1ickEce4xyHDwMgHFpIDmibQP8slBFdobVcOtVRwKMmUXrVDy9j5rjVQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="white-space: normal;text-align: center;"><br/></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.3333333333333333" data-s="300,640" style="" data-type="png" data-w="1812" src="https://wechat2rss.xlab.app/img-proxy/?k=94e5a6f6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJQeyje2NneBibppLa95LMmrL2I8bgR1GVhQiburjP3Jmh24k4kzRnNia2icj36W5tiaNOQicWZ6oVY99XQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><br/></p><p style="white-space: normal;text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.33061699650756693" data-s="300,640" data-w="1718" data-type="png" src="https://wechat2rss.xlab.app/img-proxy/?k=995bdc83&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOLjHw24UyUG8LRrib7OHtPZVDl3Ol7pDT4Bj74P2v87y51JhCU3KZYrKvY0SI0BPnAkicwsmXYOV0qw%2F640%3Fwx_fmt%3Dpng"/></p><p data-tool="mdnice编辑器" style="margin: 10px;padding-top: 8px;padding-bottom: 8px;font-family: PingFangSC-Light;text-align: left;white-space: normal;color: black;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><br/></p><h2 data-tool="mdnice编辑器" style="color: black;font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x04 名词解释</span><br/></h2><ul class="list-paddingleft-2" style="color: rgb(0, 0, 0);width: 557.438px;font-family: PingFangSC-Light;font-size: 16px;text-align: left;white-space: normal;"><li><p data-tool="mdnice编辑器" style="margin: 10px;padding-top: 8px;padding-bottom: 8px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><strong style="font-weight: border;color: #0e88eb;">污点</strong><span style="text-indent: 30px;"><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;text-indent: 30px;word-spacing: 1.5px;">：</span><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;text-indent: 30px;word-spacing: 1.5px;">英文名source，指系统中会使用到的用户可控/不受信任的数据</span></span></p></li><li><p data-tool="mdnice编辑器" style="margin: 10px;padding-top: 8px;padding-bottom: 8px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><strong style="font-weight: border;color: #0e88eb;">风险（危险）函数</strong><span style="text-indent: 30px;"><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;text-indent: 30px;word-spacing: 1.5px;">：</span><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;text-indent: 30px;word-spacing: 1.5px;">英文名sink，指可能触发危险行为如文件操作、命令执行、数据库操作等行为的函数</span></span></p></li></ul><p data-tool="mdnice编辑器" style="color: black;margin: 10px;padding-top: 8px;padding-bottom: 8px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><span style="text-indent: 30px;"><span style="color: rgb(0, 0, 0);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 3px;text-align: left;text-indent: 30px;word-spacing: 1.5px;"></span></span><span style="background-color: rgb(40, 44, 52);color: rgb(171, 178, 191);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;letter-spacing: 0px;"></span></p><h2 data-tool="mdnice编辑器" style="color: black;font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x05 常见问题</span></h2><p data-tool="mdnice编辑器" style="color: black;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><span style="margin: 10px;color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;box-sizing: border-box;line-height: 1.5;text-indent: -20px;display: block;"><span style="margin-right: 10px;box-sizing: border-box;">•</span>Q: 点击测试之后，按钮一直转圈？</span><span style="margin: 10px;color: rgb(63, 63, 63);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;box-sizing: border-box;line-height: 1.5;text-indent: -20px;display: block;"><span style="margin-right: 10px;box-sizing: border-box;">•</span>A: 可能扫描项目过大，请替换成较小项目，并重新打开客户端重试</span></p><h2 data-tool="mdnice编辑器" style="color: black;font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x06 总结</span></h2><p data-tool="mdnice编辑器" style="color: black;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck的扩展规则还在持续迭代中，后续会逐步优化从而提高易用性，减轻用户的使用成本，敬请期待。</p></section><p><br/></p>



<p><a href="2247485942">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=35a2bbe6&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzg2ODQ3ODE1NA%3D%3D%26mid%3D2247485942%26idx%3D1%26sn%3D752cf113801a9d2334f8507da9859b58%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Fri, 04 Mar 2022 14:59:00 +0800</pubDate>
    </item>
    <item>
      <title>Xcheck之C/C++安全检查引擎</title>
      <link>https://mp.weixin.qq.com/s?__biz=Mzg2ODQ3ODE1NA==&amp;mid=2247485861&amp;idx=1&amp;sn=66de2ef0b3a0b7ab3f88a9db4425fb03</link>
      <description>Xcheck的C/C++检查引擎介绍与实际漏洞检测案例。</description>
      <content:encoded><![CDATA[<p>
原创 <span>xcheck团队</span> <span>2021-10-22 15:54</span> <span style="display: inline-block;"></span>
</p>

<p>Xcheck的C/C++检查引擎介绍与实际漏洞检测案例。</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=f1a80ad6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F8SDYbMEObOL8mOWJ5xYicK2UMySNJbyAtWR58E6VTS2YwFcEn22Q3KPNmkSSQl6wPibQl0icicG5ib4WaTJ3LEMUj8g%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px;color: black;padding-right: 10px;padding-left: 10px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;overflow-wrap: break-word;text-align: left;font-family: PingFangSC-Light;"><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-fileid="100002198" data-ratio="0.5638888888888889" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=bb72d18e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOL8mOWJ5xYicK2UMySNJbyAtvKialnoeabcSU9er3JvdZDqTRFGZt87NfOwTWj1QccxKwC4rx85ODSg%2F640%3Fwx_fmt%3Dpng"/></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x00 C/C++安全检查引擎</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck的 C/C++ 安全检查引擎，能够在不编译源码的情况下对 C 和 C++ 源代码进行安全检查，检测SQL注入、命令注入、SSRF、路径穿越、缓冲区溢出、格式化字符串漏洞等漏洞。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">作为最古老的“现代”编程语言，C/C++ 的框架和库极为丰富，当前 Xcheck 优先支持了业界和公司内部的主流开发框架，如 <strong style="font-weight: border;color: #0e88eb;">gRPC-C++ 、tRPC-C++、SPP、Svrkit、TARS</strong> 等，同时，用户也可以编写自定义规则，快速适配自己的框架。</p><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x01 不编译代码进行安全检查</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">随着多年的社区发展，C 和 C++ 的<strong style="font-weight: border;color: #0e88eb;">版本多、语法杂</strong>，各项目使用的编译器、编译参数、编译环境配置等均不统一，导致大部分 C/C++ 源代码不能拿到就直接编译。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-fileid="100002196" data-ratio="0.44652908067542213" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1066" src="https://wechat2rss.xlab.app/img-proxy/?k=8859140f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOL8mOWJ5xYicK2UMySNJbyAtmwqW9ibMfIwicO9ELSibicWDH3UynHZuibGUibAu5QVu7bH4lhhm1iawromjA%2F640%3Fwx_fmt%3Dpng"/></figure><center data-tool="mdnice编辑器">C/C++ 的各个版本</center><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">传统 SAST 工具针对 C/C++ 代码的安全检查，强依赖于编译的中间产物进行扫描，编译失败就无法正常执行，用户在使用时，需要配置 SAST 工具可用的编译脚本，或者将源代码改造为 SAST 工具可以直接编译的代码，增加了使用成本。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck 的 C/C++ 安全检查引擎，采用了自研的 <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">Xparser</code> 语法解析器，可以在 <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">不编译代码</code> 的情况下模糊解析出代码的语法信息，再结合 Xcheck 的语义分析算法和污点传播算法，高效快速地发现代码中的安全风险。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><strong style="font-weight: border;color: #0e88eb;">Xparser 支持在各类无法编译的场景模糊解析语法，最大程度保留语法信息，如：缺少相关头文件/库、编译时替换字符、特殊编译器语法等。</strong></p><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);"><span style="display: none;"></span>场景1：缺少相关头文件/库<span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">include 的库不在代码中，会导致代码中存在未知的宏定义</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBT8R59GckZknwxPx5KLWmiaVf2eb0V9MwpRrzytiavy7WkVvPWJ7ibfKYeI596iaxDrYSYE1NI6W0jW54CxDp5SKvCv/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">TEST(xxx, xxx){}     <span style="color: #5c6370;font-style: italic;line-height: 26px;">// 单测代码，像 function 声明</span><br/>for_each(a, b, c){}  <span style="color: #5c6370;font-style: italic;line-height: 26px;">// 封装了一层的 for 循环</span><br/>__END_DECLS          <span style="color: #5c6370;font-style: italic;line-height: 26px;">// 未知语句块</span><br/></code></pre><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">也可能存在未知的类型</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBT8R59GckZknwxPx5KLWmiaVf2eb0V9MwpRrzytiavy7WkVvPWJ7ibfKYeI596iaxDrYSYE1NI6W0jW54CxDp5SKvCv/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">XXClass * a          <span style="color: #5c6370;font-style: italic;line-height: 26px;">// 未知类型，造成歧义，声明或者相乘</span><br/></code></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);"><span style="display: none;"></span>场景2：编译时替换字符<span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">某些项目的代码会在编译时，编译脚本替换源代码中的关键字</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBT8R59GckZknwxPx5KLWmiaVf2eb0V9MwpRrzytiavy7WkVvPWJ7ibfKYeI596iaxDrYSYE1NI6W0jW54CxDp5SKvCv/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">namespace</span> ${APP} {   <span style="color: #5c6370;font-style: italic;line-height: 26px;">// 编译时替换 ${APP} -&gt; xxx_project</span><br/>...<br/>} <br/></code></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);"><span style="display: none;"></span>场景3：特殊编译器语法<span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">一些编译器会有特殊的语法</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBT8R59GckZknwxPx5KLWmiaVf2eb0V9MwpRrzytiavy7WkVvPWJ7ibfKYeI596iaxDrYSYE1NI6W0jW54CxDp5SKvCv/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">int</span> $a = <span style="color: #d19a66;line-height: 26px;">1</span>;         <span style="color: #5c6370;font-style: italic;line-height: 26px;">// GNU C 支持标识符中包含 $</span><br/></code></pre><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x02 精准解析语法特性</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">和 Xcheck 的其他引擎一样，为了能够精准的发现安全漏洞，Xcheck 对 C/C++ 的各类语法特性都做了支持，包括：Template、流式操作、命名空间、指针等。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);"><span style="display: none;"></span>Template语法<span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Template（模板）是 C++ 中比较有代表性的语法之一，主要特点如下：</p><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">语法复杂：包括函数模板的声明和调用、类模板的声明和调用，类外声明模板函数、模板类外定义模板函数，模板特化等</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">编译器特殊处理：编译器在编译时，会根据传入参数的具体类型去实例化对应的函数/类</section></li></ul><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;"><span style="display: none;"></span>函数模板声明：<span style="display: none;"></span></h4><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">声明一个名为 Foo 的函数模板，函数中的 T 在这个时候是未知的</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBT8R59GckZknwxPx5KLWmiaVf2eb0V9MwpRrzytiavy7WkVvPWJ7ibfKYeI596iaxDrYSYE1NI6W0jW54CxDp5SKvCv/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">template</span> &lt;<span style="color: #c678dd;line-height: 26px;">typename</span> T&gt;<br/><span style="line-height: 26px;">T <span style="color: #61aeee;line-height: 26px;">foo</span><span style="line-height: 26px;">(T b)</span></span>{<br/> T a = b;<br/> <span style="color: #c678dd;line-height: 26px;">return</span> a;<br/>}<br/></code></pre><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;"><span style="display: none;"></span>函数模板调用：<span style="display: none;"></span></h4><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">调用 Foo，这里因为 Foo 是函数模板，会先用 a 的类型  int，去实例化一个真实的函数，然后调用</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBT8R59GckZknwxPx5KLWmiaVf2eb0V9MwpRrzytiavy7WkVvPWJ7ibfKYeI596iaxDrYSYE1NI6W0jW54CxDp5SKvCv/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">int</span> a = <span style="color: #d19a66;line-height: 26px;">1</span>;<br/>Foo(a);         <span style="color: #5c6370;font-style: italic;line-height: 26px;">// 实例化出 int Foo(int a){}</span><br/></code></pre><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBT8R59GckZknwxPx5KLWmiaVf2eb0V9MwpRrzytiavy7WkVvPWJ7ibfKYeI596iaxDrYSYE1NI6W0jW54CxDp5SKvCv/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">double</span> b = <span style="color: #d19a66;line-height: 26px;">1.1</span>;<br/>Foo(b);         <span style="color: #5c6370;font-style: italic;line-height: 26px;">// 实例化出 double Foo(double a){}</span><br/></code></pre><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBT8R59GckZknwxPx5KLWmiaVf2eb0V9MwpRrzytiavy7WkVvPWJ7ibfKYeI596iaxDrYSYE1NI6W0jW54CxDp5SKvCv/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #e6c07b;line-height: 26px;">string</span> c = “test”;<br/>Foo(b);         <span style="color: #5c6370;font-style: italic;line-height: 26px;">// 实例化出 string Foo(string a){}</span><br/></code></pre><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;"><span style="display: none;"></span>类模板声明：<span style="display: none;"></span></h4><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">声明一个名为 Pair 的类模板，类中的 T 同样是未知的，类中有一个 value 属性和构造函数</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBT8R59GckZknwxPx5KLWmiaVf2eb0V9MwpRrzytiavy7WkVvPWJ7ibfKYeI596iaxDrYSYE1NI6W0jW54CxDp5SKvCv/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">template</span> &lt;<span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">class</span> <span style="color: #e6c07b;line-height: 26px;">T</span>&gt;<br/><span style="color: #e6c07b;line-height: 26px;">class</span> <span style="color: #e6c07b;line-height: 26px;">Pair</span> {</span><br/> <span style="color: #c678dd;line-height: 26px;">public</span>:<br/> T value;<br/> Pair(T v): value(v) {<br/> }<br/>}<br/></code></pre><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;"><span style="display: none;"></span>类模板调用：<span style="display: none;"></span></h4><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">显示传入模板中需要的类型，这里传入了一个 int 类型，这时候会实例出一个真实的类，类中的 value 是 int 类型的，接着用这个类实例化一个对象，执行 Pair 的构造函数</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBT8R59GckZknwxPx5KLWmiaVf2eb0V9MwpRrzytiavy7WkVvPWJ7ibfKYeI596iaxDrYSYE1NI6W0jW54CxDp5SKvCv/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="line-height: 26px;">Pair&lt;<span style="color: #c678dd;line-height: 26px;">int</span>&gt; <span style="color: #61aeee;line-height: 26px;">a</span> <span style="line-height: 26px;">(<span style="color: #d19a66;line-height: 26px;">1</span>)</span></span>;<br/></code></pre><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x03 漏洞案例</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">以真实业务代码为例（已脱敏）</p><ol data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">这是 SPP 框架的一个入口函数，其中 <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">req</code> 参数为外部传入的污点，经过参数提取和字符串拼接后，污点传递给 <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">select_sql</code>，然后作为参数传给 <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">LogServicesInstance.exec_query</code></section></li></ol><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBT8R59GckZknwxPx5KLWmiaVf2eb0V9MwpRrzytiavy7WkVvPWJ7ibfKYeI596iaxDrYSYE1NI6W0jW54CxDp5SKvCv/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">int</span> <span style="color: #61aeee;line-height: 26px;">GetXXMsg::execute</span><span style="line-height: 26px;">(<span style="color: #c678dd;line-height: 26px;">const</span> DbProxy::CommonReq &amp;req, DbProxy::CommonRsp &amp;rsp)</span><br/></span>{<br/>    <span style="color: #c678dd;line-height: 26px;">const</span> DbProxy::GetXXReq &amp;real_req = req.getservicelogtopic();<br/>    <span style="color: #e6c07b;line-height: 26px;">std</span>::<span style="color: #e6c07b;line-height: 26px;">string</span> select_sql = <span style="color: #98c379;line-height: 26px;">&#34;SELECT xx FROM xxxxx &#34;</span><br/>                             <span style="color: #98c379;line-height: 26px;">&#34;WHERE uin=&#34;</span> + Util::toString((<span style="color: #c678dd;line-height: 26px;">unsigned</span> <span style="color: #c678dd;line-height: 26px;">long</span>)real_req.uin()) +<br/>                             <span style="color: #98c379;line-height: 26px;">&#34; AND name= &#39;&#34;</span> + real_req.name() + <span style="color: #98c379;line-height: 26px;">&#34;&#39;&#34;</span> +<br/>                             <span style="color: #98c379;line-height: 26px;">&#34; AND tag = &#39;&#34;</span> + SERVICE_LOG_TAG + <span style="color: #98c379;line-height: 26px;">&#34;&#39;&#34;</span>;<br/>    <span style="color: #e6c07b;line-height: 26px;">std</span>::<span style="color: #e6c07b;line-height: 26px;">vector</span>&lt;struct XXX&gt; topic_rows;<br/>    <span style="color: #c678dd;line-height: 26px;">int</span> ret = LogServicesInstance.exec_query(select_sql, topic_rows,...);<br/></code></pre><ol start="2" data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">LogServicesInstance</code> 实际上是一个宏</section></li></ol><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBT8R59GckZknwxPx5KLWmiaVf2eb0V9MwpRrzytiavy7WkVvPWJ7ibfKYeI596iaxDrYSYE1NI6W0jW54CxDp5SKvCv/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">class</span> <span style="color: #e6c07b;line-height: 26px;">LogServicesDb</span> :</span> <span style="color: #c678dd;line-height: 26px;">public</span> MysqlClient<br/>{};<br/><span style="color: #61aeee;line-height: 26px;">#<span style="line-height: 26px;">define</span> LogServicesInstance   (CSingleton<span style="color: #98c379;line-height: 26px;">&lt;LogServicesDb&gt;::instance())</span></span><br/></code></pre><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xparser 在解析 C/C++ 源代码时会调用自研的预处理模块，将该代码宏展开为：</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBT8R59GckZknwxPx5KLWmiaVf2eb0V9MwpRrzytiavy7WkVvPWJ7ibfKYeI596iaxDrYSYE1NI6W0jW54CxDp5SKvCv/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">int</span> ret = (CSingleton&lt;LogServicesDb&gt;::instance()).exec_query(select_sql, topic_rows,...)<br/></code></pre><ol start="3" data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">CSingleton</code> 是一个单例模式的模板类，传入 <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">LogServicesDb</code>，再调用 <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">instance</code> 方法，就会返回 <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">LogServicesDb</code> 的一个实例</section></li></ol><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBT8R59GckZknwxPx5KLWmiaVf2eb0V9MwpRrzytiavy7WkVvPWJ7ibfKYeI596iaxDrYSYE1NI6W0jW54CxDp5SKvCv/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">template</span>&lt;<span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">class</span> <span style="color: #e6c07b;line-height: 26px;">T</span>&gt;<br/><span style="color: #e6c07b;line-height: 26px;">class</span> <span style="color: #e6c07b;line-height: 26px;">CSingleton</span> {</span><br/>   <span style="color: #c678dd;line-height: 26px;">public</span>:<br/>      <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">static</span> T&amp; <span style="color: #61aeee;line-height: 26px;">instance</span><span style="line-height: 26px;">()</span></span>;<br/>};<br/><span style="color: #c678dd;line-height: 26px;">template</span>&lt;<span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">class</span> <span style="color: #e6c07b;line-height: 26px;">T</span>&gt;<br/><span style="color: #e6c07b;line-height: 26px;">T</span>&amp; <span style="color: #e6c07b;line-height: 26px;">CSingleton</span>&lt;T&gt;:</span>:instance(){<br/>   <span style="color: #c678dd;line-height: 26px;">static</span> T _instance;<br/>   <span style="color: #c678dd;line-height: 26px;">return</span> _instance;  <br/>}<br/></code></pre><ol start="4" data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">在 2 中可以知道 <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">LogServicesDb</code> 实际上继承了 <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">MysqlClient</code></section></li></ol><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBT8R59GckZknwxPx5KLWmiaVf2eb0V9MwpRrzytiavy7WkVvPWJ7ibfKYeI596iaxDrYSYE1NI6W0jW54CxDp5SKvCv/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">class</span> <span style="color: #e6c07b;line-height: 26px;">MysqlClient</span><br/>{</span><br/>    <span style="color: #c678dd;line-height: 26px;">public</span>:<br/>        ...<br/>        <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">int</span> <span style="color: #61aeee;line-height: 26px;">exec_query</span><span style="line-height: 26px;">(<span style="color: #e6c07b;line-height: 26px;">std</span>::<span style="color: #e6c07b;line-height: 26px;">string</span>&amp; sql, ...)</span></span>;<br/>    <span style="color: #c678dd;line-height: 26px;">private</span>:<br/>        ...<br/>        xxxxx::MySQLPool _pool;<br/>}<br/></code></pre><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">具体的方法实现是在类外定义的</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/iahdQicCC5VBT8R59GckZknwxPx5KLWmiaVf2eb0V9MwpRrzytiavy7WkVvPWJ7ibfKYeI596iaxDrYSYE1NI6W0jW54CxDp5SKvCv/640?wx_fmt=svg&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">int</span> <span style="color: #61aeee;line-height: 26px;">MysqlClient::exec_query</span><span style="line-height: 26px;">(<span style="color: #e6c07b;line-height: 26px;">std</span>::<span style="color: #e6c07b;line-height: 26px;">string</span>&amp; sql, ...)</span><br/></span>{<br/>    <span style="color: #c678dd;line-height: 26px;">if</span> (interface &lt;= <span style="color: #d19a66;line-height: 26px;">0</span>)<br/>        <span style="color: #c678dd;line-height: 26px;">return</span> _pool.exec_query(sql, row_vec);<br/>    <span style="color: #c678dd;line-height: 26px;">else</span><br/>    {<br/>        ...<br/>    }<br/>}<br/></code></pre><ol start="5" data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">经过精准的语义分析和污点传播，Xcheck 检查到污点传入了 <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">_pool.exec_query(sql, xx)</code>，而 <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">_pool</code> 是 <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">xxxxx::CSyncMySQLPool</code> 的实例， Xcheck 已将该类的 <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">exec_query</code> 方法标记为漏洞函数，故此处触发 SQL 注入漏洞。</section></li></ol><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">涉及到的语义：</p><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">类声明/继承/实例化</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">类模板声明/实例化</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">函数调用</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">赋值语句</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">字符串拼接</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">...</section></li></ul><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x04 测试数据</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck 在 8 月内部灰度上线了 C/C++ 检查引擎，同时也和多个安全团队联合进行了测试，相关数据如下：</p><section data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;"><th style="border-top-width: 1px;border-color: rgb(204, 204, 204);text-align: left;background-color: rgb(240, 240, 240);font-size: 15px;min-width: 85px;"><br/></th><th style="border-top-width: 1px;border-color: rgb(204, 204, 204);text-align: left;background-color: rgb(240, 240, 240);font-size: 15px;min-width: 85px;">灰度数据</th></tr></thead><tbody style="border-width: 0px;border-style: initial;border-color: initial;"><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;"><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">项目数</td><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">34177</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);"><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">风险项目数</td><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">246</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;"><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">问题总数</td><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">2573</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);"><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">误报率</td><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">10%（抽检）</td></tr></tbody></table></section><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-fileid="100002197" data-ratio="0.48549323017408125" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1034" src="https://wechat2rss.xlab.app/img-proxy/?k=c9bd2d2a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOL8mOWJ5xYicK2UMySNJbyAtuyr6EegfGOiaaNiaNXYewibo1jtGWVKaiaH1tcGNiaNeYPUEr7u2OlzqUVA%2F640%3Fwx_fmt%3Dpng"/></figure><center data-tool="mdnice编辑器">内部灰度测试漏洞类型分布</center><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x05 总结</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck 的 C/C++ 引擎还在持续迭代中，后续会逐步支持更多主流框架和漏洞，同时也会尝试对开源项目进行静态代码分析，敬请期待。</p></section><p><br/></p>



<p><a href="2247485861">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=939a0044&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzg2ODQ3ODE1NA%3D%3D%26mid%3D2247485861%26idx%3D1%26sn%3D66de2ef0b3a0b7ab3f88a9db4425fb03%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Fri, 22 Oct 2021 15:54:00 +0800</pubDate>
    </item>
    <item>
      <title>Xcheck Java引擎漏洞挖掘&amp;防护识别</title>
      <link>https://mp.weixin.qq.com/s?__biz=Mzg2ODQ3ODE1NA==&amp;mid=2247485770&amp;idx=1&amp;sn=f5043cbd6236b88f339170092e2c1713</link>
      <description>0x00 漏洞挖掘新增两个CNVD近期，使用了Xcheck Java引擎对一些开源网站系统进行检查，最终发现</description>
      <content:encoded><![CDATA[<p>
原创 <span>xcheck团队</span> <span>2021-07-01 16:54</span> <span style="display: inline-block;"></span>
</p>

<p>0x00 漏洞挖掘新增两个CNVD近期，使用了Xcheck Java引擎对一些开源网站系统进行检查，最终发现</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=b4b0ccb8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F8SDYbMEObOIAb0Wpibau9k0MFiaiccuicoR1OqiaK1aIN3vtQCYKemw8kibIER1ycUAZj3icoNcvjvU6YwjUrJ6sp6dwQ%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<p><br/></p><section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px;color: black;padding-right: 10px;padding-left: 10px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;overflow-wrap: break-word;text-align: left;font-family: PingFangSC-Light;"><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.5638888888888889" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=428c05ea&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIAb0Wpibau9k0MFiaiccuicoR19icOH0hc0dGvrKgcicgibQ2z7vjf3o9LnMHCyh8Ez6mjvF9jUgnGyicuTw%2F640%3Fwx_fmt%3Dpng"/></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x00 漏洞挖掘</span></h2><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);"><span style="display: none;"></span>新增两个CNVD<span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">近期，使用了Xcheck Java引擎对一些开源网站系统进行检查，最终发现了若依管理系统和<strong style="font-weight: border;color: #0e88eb;">MCMS</strong>系统两个安全漏洞。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.6245487364620939" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=2f383937&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIAb0Wpibau9k0MFiaiccuicoR1iaOfMgIC6XRr0t7NkGw6dA3sTx8QdL3vkbfvibKCCSlQgtlVJBhAa1gA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">若依管理系统（<a href="https://gitee.com/y_project/RuoYi）" target="_blank">https://gitee.com/y_project/RuoYi）</a></figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.4855595667870036" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=a4b652f7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIAb0Wpibau9k0MFiaiccuicoR1vLx1OCzmwJHVlQ1D6Z42ppQYnLycNHj4Erfj9G2wqFC30lXiabbU5qw%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">MCMS（<a href="https://gitee.com/mingSoft/MCMS）" target="_blank">https://gitee.com/mingSoft/MCMS）</a></figcaption></figure><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);"><span style="display: none;"></span>漏洞挖掘过程<span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><strong style="font-weight: border;color: #0e88eb;">Xcheck检查</strong><br/>使用Xcheck挖掘漏洞十分简单，下载项目源码之后，上传至Xcheck进行检查，喝口水的功夫，就出结果了。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.22494432071269488" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="898" src="https://wechat2rss.xlab.app/img-proxy/?k=2f3709d5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIAb0Wpibau9k0MFiaiccuicoR177nzMN5ibBbqn3scSJDCZCYIpf2LHPULMGOqOzicqibibr6REeEtC0awsw%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">xcheck检查结果</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><strong style="font-weight: border;color: #0e88eb;">结果分析</strong><br/>这里对若依管理系统发现的漏洞进行简单分析：从检查结果总览可以看出发现了两个高风险的SQL注入漏洞，其中一个漏洞污染链如下（没展示报告中代码细节），最终在<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">mybatis SQL</code>文件中触发SQL注入漏洞</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="1.1387900355871887" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="562" src="https://wechat2rss.xlab.app/img-proxy/?k=459e3545&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIAb0Wpibau9k0MFiaiccuicoR1mmc128FPq0qNvJibOZhWZ3LM0JOEuszV1PzqkUhTBIjVN5DWia7qLHIg%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">xcheck检查结果总览</figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.6119133574007221" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=2441c0ab&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIAb0Wpibau9k0MFiaiccuicoR1M2zAZXOQNwzvwSvx4ia1jia1gjapS4MQ2ERrtoiahuvNmWjY59snqHgicQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">SQL注入漏洞污染链</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><strong style="font-weight: border;color: #0e88eb;">漏洞验证</strong><br/>本地搭建测试环境，验证结果如下：</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.4963898916967509" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=2ce3b90a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIAb0Wpibau9k0MFiaiccuicoR1giblCJEfde1REarrDx5LpgficNPesOia7UmpKwcWgGBybeYLib8zRJ5seg%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">通过报错注入获取数据库版本信息</figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.41335740072202165" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=6450016f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIAb0Wpibau9k0MFiaiccuicoR1uJmjnMlEYAfs4ooE7lNTWHVPLowQuXDkwzdyexeGxXrt2gVzAkiaibCg%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">成功获取数据库版本号</figcaption></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x01防护识别</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">防护识别是指Xcheck能够识别出用户自定义的安全防护代码，检查时不会将做过防护的漏洞上报为风险。<br/>如下图，在若依管理系统的检查结果中，发现了三个做了安全防护的漏洞<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">（confidence为0）</code>。防护信息中显示在<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">CommonController.java</code>中46行做了安全防护。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.46586646661665415" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1333" src="https://wechat2rss.xlab.app/img-proxy/?k=61da5c02&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIAb0Wpibau9k0MFiaiccuicoR18F3xBbe1Bd0R7EW5U1d6XKXTtoJ56DA4AcUNsfNyYl4KYvlw2UQKJg%2F640%3Fwx_fmt%3Dpng"/></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">来验证下检查器识别到的防护是否正确,可以看到在<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">CommonController.java</code>46行出对文件名做了合法性判断。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.47833935018050544" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=d8a83e41&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIAb0Wpibau9k0MFiaiccuicoR1DuP6n3owF0D56AXHexYnoDdqxKnMqbloA0omQrCR1rZqVjdZrXZ3Gw%2F640%3Fwx_fmt%3Dpng"/></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">通过判断文件名中是否包含<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">..</code></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.6787003610108303" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=c040a837&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIAb0Wpibau9k0MFiaiccuicoR1mKeHl9oUTn3lJtOd7fbFK5LElyJ55fLqcv9U7OalaS2pay0AOufrhA%2F640%3Fwx_fmt%3Dpng"/></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">工具类StringUtils继承自apache库的StringUtils类</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.24729241877256317" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=91087caa&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIAb0Wpibau9k0MFiaiccuicoR1nib5I6MFicnRL52RkKsQXWialSaLDg4nsImRAGPOSGLP19R3HUE5ia9dicw%2F640%3Fwx_fmt%3Dpng"/></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">所以，检查器识别出的安全防护是准确的。<br/>可以看出，<strong style="font-weight: border;color: #0e88eb;">Xcheck能够在没有提前适配的情况下，主动去识别用户的安全自定义防护逻辑，从而降低误报！</strong></p><center data-tool="mdnice编辑器">想了解Xcheck更多信息或者代码安全审计相关技术欢迎关注xcheck公众号~</center><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.4255555555555556" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="900" src="https://wechat2rss.xlab.app/img-proxy/?k=edfbbff5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIAb0Wpibau9k0MFiaiccuicoR1FGmKg5Oiau5lAmLVcQZJViaaxPiagytTKAte2EXYGK3NNC85eQmPv3DkQ%2F640%3Fwx_fmt%3Dpng"/></figure></section>



<p><a href="2247485770">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=e124fab1&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzg2ODQ3ODE1NA%3D%3D%26mid%3D2247485770%26idx%3D1%26sn%3Df5043cbd6236b88f339170092e2c1713%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 01 Jul 2021 16:54:00 +0800</pubDate>
    </item>
    <item>
      <title>SAST大规模应用实践</title>
      <link>https://mp.weixin.qq.com/s?__biz=Mzg2ODQ3ODE1NA==&amp;mid=2247485552&amp;idx=1&amp;sn=9cddc041f8324c1344a316a47ae5fd44</link>
      <description>介绍Xcheck团队如何在企业内部落地SAST应用，以及取得的效果</description>
      <content:encoded><![CDATA[<p>
原创 <span>xcheck团队</span> <span>2021-04-28 18:57</span> <span style="display: inline-block;"></span>
</p>

<p>介绍Xcheck团队如何在企业内部落地SAST应用，以及取得的效果</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=0e4f9d17&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F8SDYbMEObOJ1UibZaLPk0GibicTiagfiaPUSYRGcjCwgubaBPbT9rkrvVk0kJykKiawduopk2xmmHYWNEpY9Xr3dq5OQ%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="text-align: center;"><p style="text-align: center;"><img class="rich_pages" data-galleryid="" data-ratio="0.42578125" data-s="300,640" style="" data-type="jpeg" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=2a9c9b42&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F8SDYbMEObOKqedkkwXGLk4Qyh1AaZl2n8C0KdZicQQiaEqUghAFPcuTiby8ZQPJoN3qS92chbcfNhsPUecymiayIHQ%2F640%3Fwx_fmt%3Djpeg"/></p><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;text-align: left;"><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">SAST 简介</span></h2><section style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;text-align: left;">SAST（静态应用安全测试）是指不运行被测程序本身，仅通过分析或者检查源程序的语法、结构、过程、接口等来检查程序是否存在安全漏洞。在腾讯，Xcheck 就是我们自研的一个 SAST 工具。</section><span style="color: rgb(178, 178, 178);font-size: 15px;"></span></section><section data-tool="mdnice编辑器" data-website="https://www.mdnice.com"><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">SAST 工具的优势</span></h2><section style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;">相比于动态分析或运行时测试方案，SAST 工具能在开发阶段，而不是开发完成之后，探测出源码中的安全漏洞，从而大大降低修复安全问题的成本。因为是基于源码进行扫描，它们还能找到许多动态分析工具通常无法找到的漏洞。而且，部分 SAST 工具是不依赖于编译（或者能够自动化完成编译环境的构建），使得自动化执行海量的扫描任务变得可行。</section><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">SAST 大规模应用的障碍</span></h2><section style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;">既然 SAST 工具具有那么大的优点，为什么在实际工作之中并没有得到广泛的应用呢，原因有很多，但是主要有以下两个原因：</section><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);">误报多</h3><section style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;">常见的 SAST 工具的扫描结果中往往包含着大量的误报，分析这些误报需要耗费工程师大量宝贵的时间，同时，也增加了工程师对这个工具质疑与不满。</section></section><section data-tool="mdnice编辑器" data-website="https://www.mdnice.com"><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);">速度慢</h3><section style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;">常见的 SAST 工具扫描的效率不是很高，扫描一个中型项目耗费几个小时很常见。现在的开发节奏很快，这样的速度使得 SAST 工具无法融入 DevSecOps 流程，也无法得到大规模的使用，任务队列随时都是排队状态。</section><br/></section><section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="text-align: center;"><span style="color: rgb(178, 178, 178);font-size: 15px;"></span></section><section data-tool="mdnice编辑器" data-website="https://www.mdnice.com"><span style="color: rgb(14, 136, 235);font-size: 18px;font-weight: bold;">误报多的原因</span><section style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;">在对源码分析的过程中，扫描工具并未对源代码进行足够深入的理解，导致了很多关键信息丢失，为了防止漏报，本着“宁可错杀，不可错放”的原则，只能尽可能多的上报告警，最终导致了海量的误报。</section></section><section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="text-align: center;"><span style="color: rgb(178, 178, 178);font-size: 15px;"></span></section><section data-tool="mdnice编辑器" data-website="https://www.mdnice.com"><section style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;">每个语言或多或少都有自己的一些特性，如果不支持，会直接导致在污点传播分析时无法确认标识符指向的对象（比如：JavaScript的变量声明提升）。这样的语言特性不胜枚举，每个语言又都不一样，而且不幸的是，大多数厂商在这方面并没有给予足够好的支持。</section><section style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;">还有一个主要原因，部分检查器为了降低复杂度，只使用了过程内分析，失了上下文信息，从而无法准确定位到某些标识符正确指向的对象，最终导致误报或漏报。</section><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);">速度慢的原因</h3><section style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;">简单来说，这个问题本来复杂度就高，要想解决好必然耗时。</section><section style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;"><span style="letter-spacing: 0.2em;text-indent: 2em;word-spacing: 0.1em;">众所周知，主流的 SAST 工具都是基于污点传播模型实现。</span><span style="letter-spacing: 0.2em;text-indent: 2em;word-spacing: 0.1em;">这也导致了在代码分支多，调用层级很深的情况下，污点传播信息网络比较庞大（特别是考虑了调用顺序和全局变量的情况下）。</span><span style="letter-spacing: 0.2em;text-indent: 2em;word-spacing: 0.1em;">基于这样一个庞大的数据集进行污点传播分析，必然是一个耗时的事情。</span><span style="letter-spacing: 0.2em;text-indent: 2em;word-spacing: 0.1em;">调研中发现，有的产品需要多次对这个庞大的数据集逐个运行匹配规则，结果耗时成倍增长。</span></section></section><section data-tool="mdnice编辑器" data-website="https://www.mdnice.com"><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">Xcheck 的解决方案</span></h2><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);">降低误报</h3><section style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;">Xcheck 在设计之初就意识到精确理解语言特性的重要性，并针对所支持语言尽可能的实现了对代码的精准理解。从而，基本解决了因为错误理解代码造成的误报，或者因传播链断裂造成的漏报问题。</section></section><section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="text-align: center;"><span style="font-size: 15px;color: rgb(178, 178, 178);"></span></section><p style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;">此外，针对用户自定义的转义和过滤逻辑，Xcheck也在尽力识别，从而进一步降低误报。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);">提升速度</h3><section style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;">SAST 扫描过程中怎样才能既快又准，这个问题目前业界并没有完美的解决方案。所以，我们换了一个思路，把问题转化为：怎样的效率与精度的取舍策略，更符合 SAST 扫描的绝大多数场景。</section><p style="text-align: center;"><span style="font-size: 15px;color: rgb(178, 178, 178);"></span></p><section style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;"><span style="font-size: 15px;">针对复杂度高的问题，Xcheck在算法上采用了精简方案，把最耗时的分支处理问题进行了简化，使复杂度从指数级降为线性。根据实测可知，这样的策略并未显著提升误报或漏报。另外，基于对代码的正确理解，Xcheck减少了对污点传递无关代码的分析，进一步提升了扫描速度。</span></section><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">运营策略</span></h2><section style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;"><span style="font-size: 15px;">首先需要明确一个概念，Xcheck 不是跑起来就一劳永逸的，是需要持续运营优化的。</span></section><p><img data-ratio="0.8822768434670116" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="773" src="https://wechat2rss.xlab.app/img-proxy/?k=090b4325&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJ1UibZaLPk0GibicTiagfiaPUSYFsRELOCTyI8sXLWq5yKEqvRiauFcXMwAXIc6OJFmiawgPDRtzCn4bIHg%2F640%3Fwx_fmt%3Dpng"/></p><blockquote class="js_blockquote_wrap" data-type="2" data-url="" data-author-name="" data-content-utf8-length="182" data-source-title=""><section class="js_blockquote_digest"><p style="text-indent: 2em;">对于一些极端的情况，不进行任何适配，Xcheck 仅使用默认的规则来扫描，甚至连一个漏洞都无法发现。但是，这样并不能说明这款工具不好。因为，在一些实际项目中存在私有化框架，和私有封装的风险函数，识别这些信息的规则是缺失的，所以无法发现漏洞。而判定一款 SAST 工具是否优秀的标准主要是：1. 对语言的语义是否能精准全面的理解；2. 污点传递模型实现方式是否足够的精确高效。</p></section></blockquote><p style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;"><span style="font-size: 15px;">“主动出击”，主动发现并修复 Xcheck 的规则缺失或存在的 Bug：</span></p><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li style="font-size: 15px;"><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;"><span style="font-size: 15px;">运维人员不定期对扫描结果进行人工审计，主要关注误报</span></p></section></li><li style="font-size: 15px;"><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;"><span style="font-size: 15px;">搭建框架信息搜集系统，定期发起对目标语言设计框架的流行情况统计，以便制定后续新框架规则开发计划</span></p></section></li><li style="font-size: 15px;"><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;"><span style="font-size: 15px;">通过爬虫主动搜集已知组件信息，从而添加对应的扫描规则</span></p></section></li><li style="font-size: 15px;"><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;"><span style="font-size: 15px;">开放自定义规则开发接口，在各个研发圈子，安全圈子发文推广，打造 Xcheck 扫描生态，群策群力打磨工具</span></p></section></li></ul><section style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;"><span style="font-size: 15px;">“被动响应”，根据用户反馈完善规则或修改 Xcheck 的 Bug：</span></section><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li style="font-size: 15px;"><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;"><span style="font-size: 15px;">建立客服账号解答用户遇到的各种问题</span></p></section></li><li style="font-size: 15px;"><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;"><span style="font-size: 15px;">将 SAST 工具接入 CI 平台并搜集用户反馈，Xcheck 目前已经接入公司内所有主流 CI 平台</span></p></section></li></ul><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">Xcheck 的实施效果</span></h2><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);">服务器配置</h3><section style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;"><span style="font-size: 15px;">这里简单介绍一下 Xcheck 在公司内运行的一些情况，首先看一下服务器的配置：</span></section><table data-tool="mdnice编辑器"><tbody style="border-width: 0px;border-style: initial;border-color: initial;"><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;height: 27px;"><td style="font-size: 15px;min-width: 85px;background: rgb(233, 233, 233);border-color: rgb(153, 153, 153);padding: 4px 4px 3px;word-break: break-all;" width="301" colspan="1" rowspan="1" align="" valign=""><p style="padding-top: 8px;padding-bottom: 8px;margin: 4px 10px;letter-spacing: 0.2em;word-spacing: 0.1em;text-align: center;line-height: 130%;"><span style="font-family: -apple-system, &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-weight: 700;color: rgb(51, 51, 51);background: transparent;letter-spacing: 0pt;vertical-align: baseline;font-size: 15px;">CPU</span></p></td><td style="font-size: 15px;min-width: 85px;background: rgb(233, 233, 233);border-color: rgb(153, 153, 153);padding: 4px 4px 3px;word-break: break-all;" width="301" colspan="1" rowspan="1" align="" valign=""><p style="padding-top: 8px;padding-bottom: 8px;margin: 4px 10px;letter-spacing: 0.2em;word-spacing: 0.1em;text-align: center;line-height: 130%;"><span style="font-family: -apple-system, &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-weight: 700;color: rgb(51, 51, 51);background: transparent;letter-spacing: 0pt;vertical-align: baseline;font-size: 15px;">内存</span></p></td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);height: 27px;"><td style="font-size: 15px;min-width: 85px;background: transparent;border-color: rgb(153, 153, 153);padding: 4px 4px 3px;word-break: break-all;" width="301" colspan="1" rowspan="1" align="" valign=""><p style="padding-top: 8px;padding-bottom: 8px;margin: 4px 10px;letter-spacing: 0.2em;word-spacing: 0.1em;text-align: center;line-height: 130%;"><span style="font-family: -apple-system, &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;color: rgb(51, 51, 51);background: transparent;letter-spacing: 0pt;vertical-align: baseline;font-size: 15px;">64核</span></p></td><td style="font-size: 15px;min-width: 85px;background: transparent;border-color: rgb(153, 153, 153);padding: 4px 4px 3px;word-break: break-all;" width="301" colspan="1" rowspan="1" align="" valign=""><p style="padding-top: 8px;padding-bottom: 8px;margin: 4px 10px;letter-spacing: 0.2em;word-spacing: 0.1em;text-align: center;line-height: 130%;"><span style="font-family: -apple-system, &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;color: rgb(51, 51, 51);background: transparent;letter-spacing: 0pt;vertical-align: baseline;font-size: 15px;">192GB</span></p></td></tr></tbody></table><section style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;"><span style="font-size: 15px;">目前总共使用了 4 台上述配置的服务器。</span></section><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);">运营数据</h3><table><tbody><tr><td width="268" valign="top" style="word-break: break-all;"><span style="font-family: -apple-system, &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;font-weight: 700;text-align: center;word-spacing: 1.5px;background-color: rgb(255, 255, 255);">并</span><span style="font-family: -apple-system, &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;font-weight: 700;text-align: center;word-spacing: 1.5px;background-color: rgb(255, 255, 255);">发</span></td><td width="268" valign="top" style="word-break: break-all;"><span style="font-size: 15px;font-family: -apple-system, &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;text-align: center;word-spacing: 1.5px;background-color: rgb(255, 255, 255);">150</span></td></tr><tr><td width="268" valign="top" style="word-break: break-all;"><span style="font-family: -apple-system, &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;font-weight: 700;text-align: center;word-spacing: 1.5px;background-color: rgb(248, 248, 248);">最大单日任务数</span></td><td width="268" valign="top" style="word-break: break-all;"><span style="font-family: -apple-system, &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;text-align: center;word-spacing: 1.5px;background-color: rgb(248, 248, 248);">50737（远未跑满</span><span style="font-family: -apple-system, &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;text-align: center;word-spacing: 1.5px;background-color: rgb(248, 248, 248);">负载）</span></td></tr><tr><td width="268" valign="top" style="word-break: break-all;"><span style="font-family: -apple-system, &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-weight: 700;text-align: center;word-spacing: 1.5px;background-color: rgb(255, 255, 255);font-size: 15px;">总任务数</span></td><td width="268" valign="top" style="word-break: break-all;"><span style="font-family: -apple-system, &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;text-align: center;word-spacing: 1.5px;background-color: rgb(255, 255, 255);font-size: 15px;">3277287</span></td></tr><tr><td width="268" valign="top" style="word-break: break-all;"><span style="font-family: -apple-system, &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-weight: 700;text-align: center;word-spacing: 1.5px;background-color: rgb(248, 248, 248);font-size: 15px;">5分钟内扫描完成率</span></td><td width="268" valign="top" style="word-break: break-all;"><span style="font-family: -apple-system, &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;text-align: center;word-spacing: 1.5px;background-color: rgb(248, 248, 248);font-size: 15px;">98.36%</span></td></tr><tr><td width="268" valign="top" style="word-break: break-all;"><span style="font-family: -apple-system, &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-weight: 700;text-align: center;word-spacing: 1.5px;background-color: rgb(255, 255, 255);font-size: 15px;">误报率</span></td><td width="268" valign="top" style="word-break: break-all;"><span style="font-family: -apple-system, &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;text-align: center;text-indent: 30px;word-spacing: 1.5px;background-color: rgb(255, 255, 255);font-size: 15px;">6.57%</span></td></tr></tbody></table><section style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;">需要重点说明的是大部分项目都是在 30 秒内完成的：</section><p><img data-ratio="0.85" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="600" src="https://wechat2rss.xlab.app/img-proxy/?k=1f7b3cb5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJ1UibZaLPk0GibicTiagfiaPUSYPEU0vtdO01v4naian7AAfyjq7mbYz9swZ0joO4yQVLp2HSCo9YLuJuQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;">目前统计到的漏洞类型分布情况如下图所示：</p><p><img data-cropselx1="0" data-cropselx2="492" data-cropsely1="0" data-cropsely2="418" data-ratio="0.85" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 492px;height: 418px;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="600" src="https://wechat2rss.xlab.app/img-proxy/?k=128ba795&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOKic4K6w4X4yiaK4zAFSQDibtjVmuk2ljibkxcKic0xVLicxP2I453aKdLnvv3RzSBtdomhglwUg9H1nZ8w%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><br/></p><hr style="border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);"/><p><br/></p><p style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;text-indent: 2em;">想了解Xcheck更多信息或者代码安全审计相关技术欢迎关注xcheck公众号~</p><p style="text-align: center;"><img class="rich_pages" data-galleryid="" data-ratio="0.4255555555555556" data-s="300,640" style="" data-type="jpeg" data-w="900" src="https://wechat2rss.xlab.app/img-proxy/?k=0636d0f4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F8SDYbMEObOKqedkkwXGLk4Qyh1AaZl2nyvxIHfdh1eWpgUropCsYaqHukHbjAWWlIlnlD0Dvbs4atBQADlYd2A%2F640%3Fwx_fmt%3Djpeg"/></p><p><br/></p>



<p><a href="2247485552">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=fe284e23&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzg2ODQ3ODE1NA%3D%3D%26mid%3D2247485552%26idx%3D1%26sn%3D9cddc041f8324c1344a316a47ae5fd44%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Wed, 28 Apr 2021 18:57:00 +0800</pubDate>
    </item>
    <item>
      <title>JumpServer日志读取漏洞自动化审计分析</title>
      <link>https://mp.weixin.qq.com/s?__biz=Mzg2ODQ3ODE1NA==&amp;mid=2247484414&amp;idx=1&amp;sn=38caed66e7fc555e64edf7318c214305</link>
      <description>JumpServer在上周被披露出一个远程命令执行漏洞，这个远程命令执行主要由一个log日志跨目录读取引发。</description>
      <content:encoded><![CDATA[<p>
原创 <span>xcheck团队</span> <span>2021-01-20 17:14</span> <span style="display: inline-block;"></span>
</p>

<p>JumpServer在上周被披露出一个远程命令执行漏洞，这个远程命令执行主要由一个log日志跨目录读取引发。</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=ce56196b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F8SDYbMEObOJEcZKgHVCTcEKWTPEahibRoyp4sc3MUqHcBX57oLYPx3hAHibib4hvgP4mG6LuoATQvCrQrEUGU6yGQ%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px;color: black;padding-right: 10px;padding-left: 10px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;text-align: left;font-family: PingFangSC-Light;" data-mpa-powered-by="yiban.io"><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.5638888888888889" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=95242e58&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJEcZKgHVCTcEKWTPEahibRoszBu0pxRAViapEibpMZughh6RE5U2pHeZLQOo9m2PXAZ7de3PA8TyzHw%2F640%3Fwx_fmt%3Dpng"/></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x00 JumpServer与漏洞介绍</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">JumpServer是一个开源的堡垒机，server端使用python编写开发，开源地址在<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;"><a href="https://github.com/jumpserver/jumpserver" target="_blank">https://github.com/jumpserver/jumpserver</a></code>。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">在上周五被爆出一个<strong style="font-weight: border;color: #0e88eb;">远程命令执行漏洞</strong>，这个远程命令执行主要由一个log日志跨目录读取引发。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">漏洞影响版本：</p><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">&lt; v2.6.2</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">&lt; v2.5.4</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">&lt; v2.4.5</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">= v1.5.9</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">&gt;= v.15.3</section></li></ul><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.8127128263337117" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="881" src="https://wechat2rss.xlab.app/img-proxy/?k=2b2d5040&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJEcZKgHVCTcEKWTPEahibRoTqCgtnMUpZTkNmYj8bVMHBFPHvHN8y4qUkClNu9ibYIDEr7etZr8hBQ%2F640%3Fwx_fmt%3Dpng"/></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x01 漏洞详情</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">漏洞主要由两部分组成：</p><ol data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><strong style="font-weight: border;color: #0e88eb;">跨目录读取log日志来获取token</strong></section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">利用获取的token构造ws通信payload，在jumpserver所管理的服务器进行命令执行。</section></li></ol><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">本文主要对1部分进行分析，也是漏洞利用的前提关键条件。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">log日志读取漏洞触发主要在<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">apps/ops/ws.py</code> 文件，关键代码为<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">task_log_f = open(log_path, &#39;rb&#39;)</code> ，位于wait_util_log_path_exist函数。</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_png/8SDYbMEObOJEcZKgHVCTcEKWTPEahibRo1KficVdd8v30fWxvH7H2ZUJBlnsZqQ8GgHZcFSH7sFGHbV9H9Kd24vg/640?wx_fmt=png&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">  def wait_util_log_path_exist(self, task_id):<br/>      log_path = get_celery_task_log_path(task_id)<br/>      <span style="color: #c678dd;line-height: 26px;">while</span> not self.disconnected:<br/>          <span style="color: #c678dd;line-height: 26px;">if</span> not os.path.exists(log_path):<br/>              self.send_json({<span style="color: #98c379;line-height: 26px;">&#39;message&#39;</span>: <span style="color: #98c379;line-height: 26px;">&#39;.&#39;</span>, <span style="color: #98c379;line-height: 26px;">&#39;task&#39;</span>: task_id})<br/>              time.sleep(0.5)<br/>              <span style="color: #e6c07b;line-height: 26px;">continue</span><br/>          self.send_json({<span style="color: #98c379;line-height: 26px;">&#39;message&#39;</span>: <span style="color: #98c379;line-height: 26px;">&#39;\r\n&#39;</span>})<br/>          try:<br/>              logger.debug(<span style="color: #98c379;line-height: 26px;">&#39;Task log path: {}&#39;</span>.format(log_path))<br/>              task_log_f = open(log_path, <span style="color: #98c379;line-height: 26px;">&#39;rb&#39;</span>)<br/>              <span style="color: #e6c07b;line-height: 26px;">return</span> task_log_f<br/>          except OSError:<br/>              <span style="color: #e6c07b;line-height: 26px;">return</span> None<br/></code></pre><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x02 日志读取漏洞调用链分析</span></h2><ol data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">apps/ops/ws.py</code>的receive函数引入污点</section></li></ol><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">污点由websocket通信进来。查阅相关文档，函数receive中的text_data为用户可控的参数。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.5953360768175583" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="729" src="https://wechat2rss.xlab.app/img-proxy/?k=1b0c2265&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJEcZKgHVCTcEKWTPEahibRofxq5d0PlqcBKTEc0RsG7towQVLBV6FHCWb3pckOjx1lF51AGvvdTZA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">JsonWebsocketConsumer</figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.46701570680628274" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="955" src="https://wechat2rss.xlab.app/img-proxy/?k=ec20208b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJEcZKgHVCTcEKWTPEahibRo5r5QAE86oZaybH0agIg7j26icXMbQA3SCQ8hc4AVV1ED7fiazhpPiaUiaw%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">污点引入</figcaption></figure><ol start="2" data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">污点传递到handle_task, 又将污点传递给read_log_file</section></li></ol><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.16651418115279049" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1093" src="https://wechat2rss.xlab.app/img-proxy/?k=47f243b9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJEcZKgHVCTcEKWTPEahibRoGTaGNm8uozbcNVQy9nrgIzh1SDMVm48ek1gdgh6qzeLic7CQ0aq8QGA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">handle_task</figcaption></figure><ol start="3" data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">read_log_file函数再传递到上文提及的wait_util_log_path_exist函数</section></li></ol><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.6790980052038161" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1153" src="https://wechat2rss.xlab.app/img-proxy/?k=62f29b80&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJEcZKgHVCTcEKWTPEahibRoTicBKXoEntne9naZl4icqQ2ve4JWLOOZ3T2wuv6Zre3XiaZMDsKjdcPEQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">read_log_file</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">日志读取返回也是在此处，循环读取4096btypes，然后<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">sleep(0.2)</code>。</p><ol start="4" data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">wait_util_log_path_exist 中通过get_celery_task_log_path获取路径，get_celery_task_log_path方法直接将污点拼接到所要读取的日志路径当中，造成一个跨目录的问题</section></li></ol><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.2020997375328084" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1143" src="https://wechat2rss.xlab.app/img-proxy/?k=1b201ec1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJEcZKgHVCTcEKWTPEahibRoZkZqibA5bRChJibR8PqicBcHSC57bT95D1gPRwZncV9W6pAKickREHmcrA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">get_celery_task_log_path</figcaption></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x03 Xcheck自动化审计</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">xcheck检查结果如下，<strong style="font-weight: border;color: #0e88eb;">仅耗时2s</strong>:</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.09833187006145742" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1139" src="https://wechat2rss.xlab.app/img-proxy/?k=36ab6f22&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJEcZKgHVCTcEKWTPEahibRoyZgMoH7pZmqviaC0IAAO79drXBPf6fCTAzEiaVTXytjxRYeibqjKaN1MA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">xcheck检查结果</figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.6500566251415628" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="883" src="https://wechat2rss.xlab.app/img-proxy/?k=e3e64b3f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJEcZKgHVCTcEKWTPEahibRoYEwpsSJF6vGibK4QxdMpdTq73noYiccndcDEJMBDsvg19oicGpeaEWuXQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">结果详情</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">这是我们适配<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">channels.generic.websocket</code> 之后的检查结果，<strong style="font-weight: border;color: #0e88eb;">这个适配添加过程仅仅是将<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">receive</code> 方法的参数设置成污点，剩下的这长长的调用链都可由xcheck自动化完成</strong>。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.624405705229794" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="631" src="https://wechat2rss.xlab.app/img-proxy/?k=c9955bf4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJEcZKgHVCTcEKWTPEahibRomFQTYiaWlSLLm013f8ovmfWSMr1Z0PNXaKVtN8unfDCtFwYhR2zX0Cw%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">传递链</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">漏洞复现：</p><ol data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">本地搭建成功</section></li></ol><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.43103448275862066" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1276" src="https://wechat2rss.xlab.app/img-proxy/?k=773befdf&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJEcZKgHVCTcEKWTPEahibRoNOoRfiaD1qhyptjHw2Aj0uSOdvGyAtUusIsOhUfJGaibUGbOK4vhPtHw%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">搭建成功</figcaption></figure><ol start="2" data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">漏洞验证</section></li></ol><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.5336374002280502" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="877" src="https://wechat2rss.xlab.app/img-proxy/?k=16364aef&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJEcZKgHVCTcEKWTPEahibRoknFEQv1G7xOVGK1ia17JPdqy9Me6su3ic4cqZGHPb8C1viaZNTetaX3jw%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">读取/tmp下log文件验证</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">实际利用可读取默认log目录<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">/opt/jumpserver/core/logs</code>下的日志文件获取token等敏感信息。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">漏洞利用进行命令执行的部分本文不进行赘述，可参考《Jumpserver 任意命令执行漏洞分析报告》这篇文章。</p><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x04 参考</span></h2><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><strong style="font-weight: border;color: #0e88eb;">修复建议：《JumpServer 远程命令执行漏洞风险通告，腾讯安全全面检测》</strong> <a href="https://mp.weixin.qq.com/s/yB7pSlG2ZFz65JDf5A-1Mg" target="_blank">https://mp.weixin.qq.com/s/yB7pSlG2ZFz65JDf5A-1Mg</a></section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">《Jumpserver 任意命令执行漏洞分析报告》<a href="https://mp.weixin.qq.com/s/mJ7nY1r2QWeNzaRK6aZViA" target="_blank">https://mp.weixin.qq.com/s/mJ7nY1r2QWeNzaRK6aZViA</a></section></li></ul><hr data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;height: 1px;border-width: initial;border-style: none;border-color: initial;text-align: center;background-image: linear-gradient(to right, rgba(248, 57, 41, 0), rgb(14, 136, 235), rgba(248, 57, 41, 0));"/><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">想了解Xcheck更多信息或者代码安全审计相关技术欢迎关注xcheck公众号~<img data-ratio="0.4255555555555556" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="900" src="https://wechat2rss.xlab.app/img-proxy/?k=c0a7f9e2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJEcZKgHVCTcEKWTPEahibRoMYxCm8eoOjTltQhZsL56ticSiaqzR9EuN1J5SOch9iaicgibkUgvLOKBg0w%2F640%3Fwx_fmt%3Dpng"/></p></section>



<p><a href="2247484414">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=65c51d48&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzg2ODQ3ODE1NA%3D%3D%26mid%3D2247484414%26idx%3D1%26sn%3D38caed66e7fc555e64edf7318c214305%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Wed, 20 Jan 2021 17:14:00 +0800</pubDate>
    </item>
    <item>
      <title>禅道开源版自动化安全审计</title>
      <link>https://mp.weixin.qq.com/s?__biz=Mzg2ODQ3ODE1NA==&amp;mid=2247484357&amp;idx=1&amp;sn=5f4a693969a04d9d171582462e325231</link>
      <description>禅道自动化代码安全审计，任意文件下载漏洞与xcheck适配禅道框架思路。</description>
      <content:encoded><![CDATA[<p>
原创 <span>xcheck团队</span> <span>2021-01-18 12:12</span> <span style="display: inline-block;"></span>
</p>

<p>禅道自动化代码安全审计，任意文件下载漏洞与xcheck适配禅道框架思路。</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=5fda56f8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkfj3okQMKvgMu4IF9TeTYASZMO52nHKgdHv6DaFkRmArL2fb9qR5EGCA%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="padding-right: 10px;padding-left: 10px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;text-align: left;font-family: PingFangSC-Light;" data-mpa-powered-by="yiban.io"><figure data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.5638888888888889" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=37de75a5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkf4ia92NAEwtIeBwuvlVA6WicMTc8aVDkeEzjFH0XfdoW4tDz1b3gHGokQ%2F640%3Fwx_fmt%3Dpng"/></figure><h2 data-tool="mdnice编辑器" style="color: black;font-size: 22px;font-weight: bold;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x00 禅道简介</span></h2><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">ZenTaoPMS（ZenTao Project Management System），中文名为禅道项目管理软件。</p><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">禅道项目管理软件基于自主研发的PHP开发框架——禅道PHP框架开发而成。</p><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">禅道有四个版本，分别是开源版，专业版，企业版和集团版。</p><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">本文审计对象为禅道开源版，版本为v12.4.3。</p><figure data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.5315315315315315" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="555" src="https://wechat2rss.xlab.app/img-proxy/?k=303035d4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkfNJwh4xOanZMVibSzjXh3rKJ4ZuuqhPqd1poCmV7IsMSk6ThW8hLkibLg%2F640%3Fwx_fmt%3Dpng"/></figure><h2 data-tool="mdnice编辑器" style="color: black;font-size: 22px;font-weight: bold;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x01 禅道目录结构与路由</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;text-align: center;"><span style="color:#000000;"><span style="font-size: 15px;">项目根目录如下图：</span></span><span style="color:#000000;"><span style="font-size: 15px;margin-right: auto;margin-left: auto;width: 85%;height: 100%;box-shadow: rgb(132, 161, 168) 0px 10px 15px;"><img data-ratio="0.8768115942028986" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="276" src="https://wechat2rss.xlab.app/img-proxy/?k=6d0f8aaf&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkfSuhZb1O1zecsSIf6fXX7gFusKTRGzoRRh4hcoibiaTLvRXLSzJiaKMelQ%2F640%3Fwx_fmt%3Dpng"/></span></span><span style="color:#888888;"><span style="font-size: 12px;letter-spacing: 0.5px;">项目根目录</span></span></p><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">其中framework目录包括具体路由分发的实现，这里细节不再展开，可参考《禅道pms-路由及漏洞分析》这篇，链接在文后。</p><figure data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="1.104602510460251" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="239" src="https://wechat2rss.xlab.app/img-proxy/?k=987d523e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkfOGicicYSp1ZL5QbjHgpibZPRKOmQoBBM7mbff7yqJTGaPhhzmwOVU8dvA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">framework目录</figcaption></figure><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">至于module目录，则是禅道应用程序具体功能的实现，包含60多个模块。</p><figure data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.7854406130268199" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="261" src="https://wechat2rss.xlab.app/img-proxy/?k=80c251b8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkfK82Hn0Ojj3mVxyibDLQFoPrA9cibD832gSZ7xJJzCh42JaHkUmWTBV6A%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">module目录</figcaption></figure><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">以其中一个模块为例，主要看control.php，model.php这两个文件。</p><figure data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="1.2216494845360826" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="194" src="https://wechat2rss.xlab.app/img-proxy/?k=a5302f75&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkfQ64TYPz1Jhgq7E9HaGyQeal1U1oWKaIbsUDK0JNNG7piaomqVRjkPKw%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">模块示例</figcaption></figure><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">control.php中的函数可被用户请求直接访问到，下图为admin/control.php中的register函数，则访问请求为<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">index.php?m=admin&amp;f=register&amp;from=1</code>，请求中的from的值赋值给<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$from</code>。</p><figure data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.6752988047808764" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="502" src="https://wechat2rss.xlab.app/img-proxy/?k=12656ac2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkfksp5Jt5vdPU4qPZdBpibsAY6AvibH3yG6OP3iaIcibJkBXt4nNWYiaONSCw%2F640%3Fwx_fmt%3Dpng"/></figure><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">即m为对应module，f为对应方法，方法的参数也与请求中的参数一一对应。</p><figure data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.2753846153846154" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="650" src="https://wechat2rss.xlab.app/img-proxy/?k=b931a9e1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkfqHfgnn0XIbjQzicXpVHu8nrgg7iawiaNsVMAIJbeNk9kHzxiceglZE2LGA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">框架路由相关设置</figcaption></figure><h2 data-tool="mdnice编辑器" style="color: black;font-size: 22px;font-weight: bold;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x02 CNVD-2020-65242 后台任意文件下载</span></h2><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">漏洞入口位于file模块control.php中的sendDownHeader函数，</p><pre data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_png/8SDYbMEObOIeAedfU9peYRmibRZEcNmkfsHMxrKGfDHUTy1CgEfITtR1cdt0vlyQqAibhMwrojibYibEiaPVdtTFscQ/640?wx_fmt=png&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">public <span style="color: #c678dd;line-height: 26px;">function</span> sendDownHeader(<span style="color: #d19a66;line-height: 26px;">$fileName</span>, <span style="color: #d19a66;line-height: 26px;">$fileType</span>, <span style="color: #d19a66;line-height: 26px;">$content</span>, <span style="color: #d19a66;line-height: 26px;">$type</span> = <span style="color: #98c379;line-height: 26px;">&#39;content&#39;</span>)<br/>  {<br/>    <span style="color: #d19a66;line-height: 26px;">$this</span>-&gt;file-&gt;sendDownHeader(<span style="color: #d19a66;line-height: 26px;">$fileName</span>, <span style="color: #d19a66;line-height: 26px;">$fileType</span>, <span style="color: #d19a66;line-height: 26px;">$content</span>, <span style="color: #d19a66;line-height: 26px;">$type</span>);<br/>  }<br/></code></pre><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">其中，<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;file</code>即当前模块目录中model.php中类对象的实例，这里为fileModel。</p><figure data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.5656167979002624" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="762" src="https://wechat2rss.xlab.app/img-proxy/?k=0b02a7e4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkfXBH30p0cVJIaeoqvAGBBn5eTDXeGRIScssEhacwsuOdptxTP0Rvq0A%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">fileModel的sendDownHeader函数</figcaption></figure><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">漏洞代码位于922行，文件读取<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$content</code>并输出，进入这个逻辑需要<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$file</code>变量为字符串值file.</p><figure data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.9211165048543689" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="824" src="https://wechat2rss.xlab.app/img-proxy/?k=77119a3d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkfT1I7vTjERibWlic9HCyw4r5t4nxGus0cCZGN0iazJT5b6XVITNCwibbbaA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">漏洞代码</figcaption></figure><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">所以漏洞触发为<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">index.php?m=file&amp;f=sendDownHeader&amp;fileName=2&amp;fileType=1&amp;content=/etc/passwd&amp;type=file</code></p><figure data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.47692307692307695" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1625" src="https://wechat2rss.xlab.app/img-proxy/?k=b47afa07&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkfZdos54YLibeHjuwiax1NmL3gAqLXQBRbYgZefjGERJjjP6t4JYcHBu7Q%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">读取/etc/passwd</figcaption></figure><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">若存在open_basedir限制，可读取数据库配置文件：<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">index.php?m=file&amp;f=sendDownHeader&amp;fileName=2&amp;fileType=1&amp;content=./../../config/my.php&amp;type=file</code>。</p><figure data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.4609297725024728" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1011" src="https://wechat2rss.xlab.app/img-proxy/?k=e3a84a40&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkfdbTZIVfCy3tcqTQ7Iqu36uyuYDRRs1frdJM2TyeVXPz0IBLib4UR8FA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">读取配置文件</figcaption></figure><h2 data-tool="mdnice编辑器" style="color: black;font-size: 22px;font-weight: bold;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x03 后台im模块downloadXxdPackage函数任意文件下载</span></h2><figure data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.40463917525773196" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="776" src="https://wechat2rss.xlab.app/img-proxy/?k=ac95af45&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkf7eKqLicY6HDEuO3LQkAGj2pyW3XkibcROxQkWIfMprUml0FtVNuJH0Ng%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">漏洞代码</figcaption></figure><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">触发链接：<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">index.php?m=im&amp;f=downloadXxdPackage&amp;xxdFileName=../../../../../../../../../etc/passwd</code></p><figure data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.4758454106280193" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1656" src="https://wechat2rss.xlab.app/img-proxy/?k=e3719781&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkfWxCbzLKv3IDe8kPdFNfycDY5ZiaJuyy9rgbQDgruicuO82u0TdUIGZbQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">读取/etc/passwd</figcaption></figure><h2 data-tool="mdnice编辑器" style="color: black;font-size: 22px;font-weight: bold;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x04 Xcheck适配与分析检查</span></h2><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">禅道使用的框架是自研的一套禅道PHP框架，具有一定的复杂性，不在xcheck默认支持框架范围内。</p><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">对于框架的适配，xcheck这边均采用<strong style="font-weight: border;color: #0e88eb;">人工经验赋能检查器</strong>的思路进行相关规则的添加。从人工审计出发，将污点分析理论的关键点传递给检查器，使检查器能够理解新框架中的代码。</p><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">以本文的禅道为例，经过前面对路由请求的分析，可得以下人工审计经验：</p><ol data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">module目录下子模块中control.php函数可被用户直接访问，函数参数为用户请求参数，即污点</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">file模块中<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;file</code>即同模块当中的model.php中的fileModel对象，client模块中<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;client</code>为同模块中model.php 中的clientModel对象，其他模块也类似</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">模块control.php中继承的父类control存在loadModel方法，loadModel方法为动态调用对象，如 <code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;loadModel(&#34;file&#34;)</code> 则调用的为file模块中model.php的fileModel对象</section></li></ol><figure data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.45901639344262296" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="671" src="https://wechat2rss.xlab.app/img-proxy/?k=1b1bc0fc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkfFwgN7KCpWAwg7GJEShmHkicXO4mpIlL5ylS6Lms1jFUamWXWCZysSKQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">loadModel函数</figcaption></figure><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">通过将以上经验赋能给检查器，做一个禅道框架的简单适配，就可轻松检查发现项目中的安全漏洞。若由人工审计来做，对60多个子模块逐个审计，工作量可想而知。</p><figure data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.9634002361275088" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="847" src="https://wechat2rss.xlab.app/img-proxy/?k=e507bf53&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkf1ia5I2ZGmyhcRLcosjSAHdfxrdeicSp2kuUejWw7fTd8y0hsiczBtkU5g%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">downloadXxdPackage 任意文件下载</figcaption></figure><figure data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="1.3409915356711004" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="827" src="https://wechat2rss.xlab.app/img-proxy/?k=5f96c10a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkflFy8tZ4nRTEH5hCABo8A8AricCng0YJB2w28XiaFQEtrNia4iaKeGpMW1g%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">CNVD-2020-65242 后台任意文件下载</figcaption></figure><h2 data-tool="mdnice编辑器" style="color: black;font-size: 22px;font-weight: bold;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x05 最后</span></h2><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">对禅道的代码检查发现问题数较多，对于其中部分与业务密切相关导致利用失败的或者存在一定利用条件的，本文不再赘述。</p><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">由于是简单适配，相关分析和提及安全问题仅供参考，有兴趣的小伙伴可发送消息后台一起讨论交流。</p><h2 data-tool="mdnice编辑器" style="color: black;font-size: 22px;font-weight: bold;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x06 参考</span></h2><ul data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">《禅道pms-路由及漏洞分析》<a href="https://www.anquanke.com/post/id/160473" target="_blank">https://www.anquanke.com/post/id/160473</a></p></section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><p style="padding-top: 8px;padding-bottom: 8px;color: black;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">《【组件攻击链】禅道项目管理系统(ZenTaoPMS)高危漏洞分析与利用》<a href="https://mp.weixin.qq.com/s/LIugWEiETPwYmmLwZLe7Ag" target="_blank">https://mp.weixin.qq.com/s/LIugWEiETPwYmmLwZLe7Ag</a></p></section></li></ul><hr data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;height: 1px;border-width: initial;border-style: none;border-color: initial;text-align: center;background-image: linear-gradient(to right, rgba(248, 57, 41, 0), rgb(14, 136, 235), rgba(248, 57, 41, 0));"/><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;">想了解Xcheck更多信息或者代码安全审计相关技术欢迎关注xcheck公众号~</p><p data-tool="mdnice编辑器" style="color: black;font-size: 15px;padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;word-spacing: 0.1em;"><img data-ratio="0.4255555555555556" data-w="900" data-type="png" src="https://wechat2rss.xlab.app/img-proxy/?k=28ec27b2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOIeAedfU9peYRmibRZEcNmkfLtTibaBhcZDEf7CwE6eI50Od5N4rjRkmTGtdtOiaEKQuicUicBbQ9guCog%2F640%3Fwx_fmt%3Dpng"/></p><figure data-tool="mdnice编辑器" style="color: black;font-size: 16px;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><br/></figure></section><p><br/></p>



<p><a href="2247484357">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=09be30f4&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzg2ODQ3ODE1NA%3D%3D%26mid%3D2247484357%26idx%3D1%26sn%3D5f4a693969a04d9d171582462e325231%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Mon, 18 Jan 2021 12:12:00 +0800</pubDate>
    </item>
    <item>
      <title>OpenRASP SQL注入绕过</title>
      <link>https://mp.weixin.qq.com/s?__biz=Mzg2ODQ3ODE1NA==&amp;mid=2247484213&amp;idx=1&amp;sn=94d3a79bb392568c73c6de50d1379fc4</link>
      <description>OpenRASP介绍OpenRASP即应用运行时自我保护，绕过OpenRASP进行SQL注入。</description>
      <content:encoded><![CDATA[<p>
原创 <span>xcheck团队</span> <span>2020-11-27 19:03</span> <span style="display: inline-block;"></span>
</p>

<p>OpenRASP介绍OpenRASP即应用运行时自我保护，绕过OpenRASP进行SQL注入。</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=c4d31161&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F8SDYbMEObOI1aQib9GNM1aNTL1dwULtm7WlElK2icYx3gALzC0Mic6AVBNz9libD6HEuPQ1xPqU9AAib9EJeOiaaqAgQ%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px;color: black;padding-right: 10px;padding-left: 10px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;text-align: left;font-family: PingFangSC-Light;" data-mpa-powered-by="yiban.io"><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.5638888888888889" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=f0b5985d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOI1aQib9GNM1aNTL1dwULtm7zybG2w68CmDhV4y90352riahUqZP9CGC2e5icDNKseG0Nn19kGaOCWUg%2F640%3Fwx_fmt%3Dpng"/></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">OpenRASP介绍</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">OpenRASP即应用运行时自我保护，“可直接注入到被保护应用的服务中提供函数级别的实时防护，可以在不更新策略以及不升级被保护应用代码的情况下检测/防护未知漏洞”——<em style="color: rgb(14, 136, 235);letter-spacing: 0.3em;"><a href="https://rasp.baidu.com/" target="_blank">https://rasp.baidu.com/</a></em>  <em style="color: rgb(14, 136, 235);letter-spacing: 0.3em;">《OpenRASP 官方文档》</em></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.277" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="2000" src="https://wechat2rss.xlab.app/img-proxy/?k=ea437155&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOI1aQib9GNM1aNTL1dwULtm7FdoYW6shtiaUotmtx5ibRKCPySG9PYiaN1v7nAe9kXSdE3MnTPQljiauBA%2F640%3Fwx_fmt%3Dpng"/></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">OpenRASP防护效果</span></h2><ol data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">环境搭建<br/>本文以Tomcat服务器为例，参考官网 快速接入——Tomcat服务器文档（<em style="color: rgb(14, 136, 235);letter-spacing: 0.3em;"><a href="https://rasp.baidu.com/doc/install/manual/tomcat.html" target="_blank">https://rasp.baidu.com/doc/install/manual/tomcat.html</a></em>）</section></li></ol><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.4244514106583072" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1595" src="https://wechat2rss.xlab.app/img-proxy/?k=c1f23701&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOI1aQib9GNM1aNTL1dwULtm7VOf17akfg1f2dzrU915cGiaYsrYp76sVhrJ2NzUllf9MFz1qHFFd68g%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">官方搭建指引文档</figcaption></figure><ol start="2" data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">防护示例<br/>对靶场项目进行SQL注入攻击，根据burp返回报文，显示已经被OpenRASP拦截。</section></li></ol><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.24746906636670415" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="889" src="https://wechat2rss.xlab.app/img-proxy/?k=dbe03561&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOI1aQib9GNM1aNTL1dwULtm7sYAYT8Q3tpWBQH5RAeiaAOlnjd9TXKSzLz1Ih8V8Dvsm11jPjRlbFOA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">burp返回报文</figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.6278713629402757" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1306" src="https://wechat2rss.xlab.app/img-proxy/?k=99d146e6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOI1aQib9GNM1aNTL1dwULtm7gkMlouBjYLWpcO18UjBPQuFQDjZN8RGtxic1LT0ZwJBnPrI4wBCcdMQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">OpenRASP拦截图</figcaption></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">绕过OpenRASP进行SQL注入</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">操作：<strong style="font-weight: border;color: #0e88eb;">新增一个参数（参数名为一个无意义的参数名即可），注意该参数需要在被注入参数的前面，以保证rasp先检测该参数</strong>。被注入参数中添加一段注释如下，新增参数值为注释的一部分（长度大于等于8即可）。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">如下图，盲注成功：</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.3708609271523179" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1057" src="https://wechat2rss.xlab.app/img-proxy/?k=0dfaae24&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOI1aQib9GNM1aNTL1dwULtm7WFoQ8n7IMKiakp1FXO7ibhCmOhicYnc8nbYGnmZC3S482xQcuNbuTNAHg%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">盲注成功</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">对于请求content-type为multipart的，也是同理，新增额外参数来绕过。但是对于json格式的请求报文，除了上述的请求参数污染外，还可以通过添加或者修改header（User-Agent/X-Forwarded-For/Referer）内容，从而绕过open rasp检测。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.38086642599277976" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=1ba408ec&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOI1aQib9GNM1aNTL1dwULtm72Z070rKmMuHXFL0p7SEJslhO4lAXg83geiaYAVmCRAZgvnt1AoJNEvQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">修改User-Agent绕过</figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.38267148014440433" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=c1fb6442&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOI1aQib9GNM1aNTL1dwULtm7ckibp8Lg35onEibEOAPzZI8yKFu9autr8pfUbJFJUWhicuP2lVAOEbG5w%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">修改X-Forwarded-For绕过</figcaption></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">绕过分析</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">调试分析源码plugins/official/plugin.js文件。在_run方法中，使用RASP.sql_tokenize方法会将执行的SQL语句解析成一个个token，解析的结果中不会包含注释部分。</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_png/8SDYbMEObOI1aQib9GNM1aNTL1dwULtm7PSWWNhicMqe6ic6n0SkXFrFo1iabficBjRxhE9SGLAFdQwh8wGO6MMYgGw/640?wx_fmt=png&#34;) 10px 10px / 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">  <span style="color: #c678dd;line-height: 26px;">if</span> (algorithmConfig.sql_userinput.pre_enable &amp;&amp; ! sqliPrefilter1.test(value)) {<br/>       <span style="color: #e6c07b;line-height: 26px;">return</span> <span style="color: #56b6c2;line-height: 26px;">false</span><br/>  }<br/>  // 懒加载，需要的时候初始化 token<br/>  <span style="color: #c678dd;line-height: 26px;">if</span> (raw_tokens.length == 0) {<br/>      raw_tokens = RASP.sql_tokenize(params.query, params.server)<br/>  }<br/>  <span style="color: #c678dd;line-height: 26px;">if</span> (is_token_changed(raw_tokens, userinput_idx, value.length)) {<br/>      reason = _(<span style="color: #98c379;line-height: 26px;">&#34;SQLi - SQL query structure altered by user input, request parameter name: %1%&#34;</span>, [name])<br/>      <span style="color: #e6c07b;line-height: 26px;">return</span> <span style="color: #56b6c2;line-height: 26px;">true</span><br/>  }<br/></code></pre><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">如下图，调试可观察到程序将SQL语句解析为12个token，语句中注释的部分被忽略。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.5840867992766727" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=2c5281ef&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOI1aQib9GNM1aNTL1dwULtm7nq1q57XzUg5Hyet3ibr2PkyDl0bjAaAQJxv9xN7LdiarKgjQf1SU5oLA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">SQL语句 token</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">然后进入is_token_changed方法中。该方法作用主要是：<strong style="font-weight: border;color: #0e88eb;">找到用户输入参数值在要被执行的SQL语句（已经解析成token，里面不包含注释内容）的位置，所以只要该参数属于SQL语句注释的内容，这里的start值就不会被后续赋值，始终为-1。在后面会产生数组越界，从而程序异常终止。从而绕过open rasp检测。</strong></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.6329113924050633" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=82e8be16&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOI1aQib9GNM1aNTL1dwULtm7lxBHLKutlb5icm1IaicStDhBzKYG8PvcavmMGYtiaXZFkOmHLYCPLU4ug%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">is_token_changed方法</figcaption></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">最后</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">使用OpenRASP并不能保证应用程序绝对的安全，代码安全才是治本之道。本文仅对绕过OpenRASP进行SQL注入进行研究，但是从绕过原理上看，其他漏洞防护也可用相似的方法绕过，暂未验证。抛砖引玉，有兴趣的小伙伴欢迎发送消息后台交流~</p><hr data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;height: 1px;border-width: initial;border-style: none;border-color: initial;text-align: center;background-image: linear-gradient(to right, rgba(248, 57, 41, 0), rgb(14, 136, 235), rgba(248, 57, 41, 0));"/><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">想了解Xcheck更多信息或者代码安全审计相关技术欢迎关注xcheck公众号~</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="1" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="258" src="https://wechat2rss.xlab.app/img-proxy/?k=083682fd&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOI1aQib9GNM1aNTL1dwULtm7yzJkycS0quazX2W29bdIkPNJZIdkbqflOO35CzEiaFZk6NtttalseeQ%2F640%3Fwx_fmt%3Dpng"/></figure></section><p><br/></p>



<p><a href="2247484213">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=9a804f74&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzg2ODQ3ODE1NA%3D%3D%26mid%3D2247484213%26idx%3D1%26sn%3D94d3a79bb392568c73c6de50d1379fc4%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Fri, 27 Nov 2020 19:03:00 +0800</pubDate>
    </item>
    <item>
      <title>ECShop最新4.1.0前台免登录SQL注入0day漏洞披露与分析</title>
      <link>https://mp.weixin.qq.com/s?__biz=Mzg2ODQ3ODE1NA==&amp;mid=2247484172&amp;idx=1&amp;sn=5c790c662639f74b6a0f1be1c27c128c</link>
      <description>ECShop最新4.1.0前台免登录SQL注入0day漏洞披露与分析</description>
      <content:encoded><![CDATA[<p>
原创 <span>xcheck团队</span> <span>2020-11-09 12:11</span> <span style="display: inline-block;"></span>
</p>

<p>ECShop最新4.1.0前台免登录SQL注入0day漏洞披露与分析</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=86f53165&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F8SDYbMEObOIknsrEhUceNlwA3KmItco7AjibicedwcGuJEn3m7oPjYJQeBpyDMr8mqZlYZkRRoicibFqxkCiahKjljA%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px;color: black;padding-right: 10px;padding-left: 10px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;overflow-wrap: break-word;text-align: left;font-family: PingFangSC-Light;" data-mpa-powered-by="yiban.io"><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.5638888888888889" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=580000c8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJ3ZbrhI1RQxLlPwnAZDvaY309YvH3tkaEUfiaYEmW9nFF35Yzume9XX1TW6hJ2LM646u2sVa8QX7Q%2F640%3Fwx_fmt%3Dpng"/></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x00 漏洞概述</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">影响版本：<strong style="font-weight: border;color: #0e88eb;">ecshop4.1.0及以下</strong><br/>是否需要身份认证：<strong style="font-weight: border;color: #0e88eb;">否，前台漏洞</strong><br/>漏洞类型：<strong style="font-weight: border;color: #0e88eb;">SQL注入</strong><br/>CNVD编号：<strong style="font-weight: border;color: #0e88eb;">CNVD-2020-58823，</strong><em><a href="https://www.cnvd.org.cn/flaw/show/2454613" target="_blank">https://www.cnvd.org.cn/flaw/show/2454613</a></em><br/>漏洞来源：<strong style="font-weight: border;color: #0e88eb;">xcheck代码安全检查</strong><br/>源码获取：<em style="color: rgb(14, 136, 235);letter-spacing: 0.3em;"><a href="https://www.ecshop.com/" target="_blank">https://www.ecshop.com/</a></em>，登录注册下载，最新版本为4.1.1(<strong style="font-weight: border;color: #0e88eb;">已修复</strong>)。</p><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x01 漏洞详情</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;"><strong style="font-weight: border;color: #0e88eb;">漏洞代码</strong>：/source/ecshop/delete_cart_goods.php,16行</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.8815958815958816" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="777" src="https://wechat2rss.xlab.app/img-proxy/?k=7bd0c4bc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJ3ZbrhI1RQxLlPwnAZDvaYEtcxVR0erQTXLibyRBKcECYq2eAOe1WZq88ZBMmhKIiaMsPeO9w0O73w%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">漏洞代码</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">$_POST变量直接传入sql语句进行拼接，再进入数据库查询，触发漏洞。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">如果有对ecshop进行过代码审计的话，应该会知道在includes/safety.php存在个waf，<strong style="font-weight: border;color: #0e88eb;">但是在这个版本并没有生效，这里漏洞触发可以不进入这里的过滤防护逻辑</strong>。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.3403141361256545" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="764" src="https://wechat2rss.xlab.app/img-proxy/?k=0927513a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJ3ZbrhI1RQxLlPwnAZDvaYuoGJBibUWpffjqcibocUjaB4Vn5BQoeKXbor3qVRrHURdl7mibhiah9G6A%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">includes/safety.php</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">本地搭建验证如下，配置默认是开了报错，线上的测试环境也是，不存在报错的话可以通过盲注验证。报错注入的截图证明如下。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.3401639344262295" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1220" src="https://wechat2rss.xlab.app/img-proxy/?k=9f013534&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJ3ZbrhI1RQxLlPwnAZDvaYALOTfzVwMjtiawuVK4OUicm9DEfAjVazLHia6Mg6TpIgT7LeLyOPjVnlg%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">本地漏洞验证</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">漏洞修复：对请求参数进行过滤。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.13983050847457626" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1180" src="https://wechat2rss.xlab.app/img-proxy/?k=c330398e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJ3ZbrhI1RQxLlPwnAZDvaYmp28CIVWXf9cITefmO6Pucx3s3yy0iajh30yQJXqajV9Qoe7XzIJTicg%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">漏洞修复</figcaption></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x02 注入漏洞利用分析</span></h2><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);"><span style="display: none;"></span>思路一：获取注入获取管理员密码md5<span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">ecshop默认密码不加盐，所以可以直接注入找到ecs_admin_user表获取管理员密码的md5.</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);"><span style="display: none;"></span>思路二：获取管理员session<span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">如果管理员使用了较为复杂的密码，md5解不出来时，可以考虑获取session。即cookie中ECSCP_ID的值。<br/>登录用户的session存在ecs_sessions表，但是只有sesskey。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.3611650485436893" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1030" src="https://wechat2rss.xlab.app/img-proxy/?k=507c98ef&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJ3ZbrhI1RQxLlPwnAZDvaYkESyOKib7ib7VsibqXH52FwTd9oBMbBwwicyHUZmia1GjJdgKVkHzfkoiaRA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">ecs_sessions表</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">代码中登录成功后cookie设置：<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">setcookie($this-&gt;session_name, $this-&gt;session_id . $this-&gt;gen_session_key($this-&gt;session_id), 0, $this-&gt;session_cookie_path, $this-&gt;session_cookie_domain, $this-&gt;session_cookie_secure, TRUE);</code>.</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">其中<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;session_name</code> 就是ECSCP_ID， <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;session_id . $this-&gt;gen_session_key($this→session_id)</code>就是最终cookie的值，数据库中sesskey对应的是<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;session_id</code>，至于后半部分是通过gen_session_key这个函数生成。</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_png/8SDYbMEObOJ3ZbrhI1RQxLlPwnAZDvaYgXqrVuCzVRs2fMfVmUfiaHh3QgZ4op3tMfha4U3JdLymxbqJSvWrhjg/640?wx_fmt=png&#34;) 10px 10px / 40px no-repeat rgb(250, 250, 250);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #383a42;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #fafafa;border-radius: 5px;"><span style="color: #a626a4;line-height: 26px;">function</span> gen_session_key(<span style="color: #986801;line-height: 26px;">$session_id</span>)<br/>    {<br/>        static <span style="color: #986801;line-height: 26px;">$ip</span> = <span style="color: #50a14f;line-height: 26px;">&#39;&#39;</span>;<br/>        <span style="color: #a626a4;line-height: 26px;">if</span> (<span style="color: #986801;line-height: 26px;">$ip</span> == <span style="color: #50a14f;line-height: 26px;">&#39;&#39;</span>)<br/>        {<br/>            <span style="color: #986801;line-height: 26px;">$ip</span> = substr(<span style="color: #986801;line-height: 26px;">$this</span>-&gt;_ip, 0, strrpos(<span style="color: #986801;line-height: 26px;">$this</span>-&gt;_ip, <span style="color: #50a14f;line-height: 26px;">&#39;.&#39;</span>));<br/>        } <br/>        <span style="color: #c18401;line-height: 26px;">return</span> sprintf(<span style="color: #50a14f;line-height: 26px;">&#39;%08x&#39;</span>, crc32(ROOT_PATH . <span style="color: #986801;line-height: 26px;">$ip</span> . <span style="color: #986801;line-height: 26px;">$session_id</span>));<br/>    }<br/></code></pre><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">后半部分gen_session_key通过ip和ROOT_PATH来确认，ip也在session表中可以找到，至于ROOT_PATH，可以通过猜测或者部分路径的报错拿到。最后拼凑到的，就是最终的cookie。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);"><span style="display: none;"></span>思路三: ecshop/api/client/includes/lib_api.php 写入shell<span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">api/client 的访问需要登录，位于ecshop/api/client/includes/lib_api.php的API_UserLogin接口。这里登录是直接校验密码md5，也就是说当思路一解不出来时，这里也能用上密码的md5。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.7397408207343412" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="926" src="https://wechat2rss.xlab.app/img-proxy/?k=7dd7c1eb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJ3ZbrhI1RQxLlPwnAZDvaYibchFgJkfQ0aYxsLO4HmmHqQnbPIvUqBLWmY24EYJ8MiaZHOAeP9KneA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">api登录</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">登录成功后访问api接口，可以利用一个任意写入漏洞。触发点为upload_image函数，在API_AddBrand函数中被调用。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.5933734939759037" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="664" src="https://wechat2rss.xlab.app/img-proxy/?k=5c959f70&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJ3ZbrhI1RQxLlPwnAZDvaYJicKWAJ4B7TnbWhaap6c18PAJHQRd3It1c5lvFndAW3fkd2I1UNOARQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">upload_image函数</figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.8143899895724713" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="959" src="https://wechat2rss.xlab.app/img-proxy/?k=4961edd0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJ3ZbrhI1RQxLlPwnAZDvaYhd1wXsl9CevJEezkP18clmpN5coGgCibq96LTLlpCic6XXveqicgibqmLA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">调用upload_image函数</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">最后登录成功后写入文件的payload为：</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block;background: url(&#34;https://mmbiz.qpic.cn/mmbiz_png/8SDYbMEObOJ3ZbrhI1RQxLlPwnAZDvaYgXqrVuCzVRs2fMfVmUfiaHh3QgZ4op3tMfha4U3JdLymxbqJSvWrhjg/640?wx_fmt=png&#34;) 10px 10px / 40px no-repeat rgb(250, 250, 250);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;"></span><code style="overflow-x: auto;padding: 16px;color: #383a42;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #fafafa;border-radius: 5px;">URL: <a href="http://localhost/ecshop/api/client/api.php" target="_blank">http://localhost/ecshop/api/client/api.php</a><br/>POST: Json= {<span style="color: #50a14f;line-height: 26px;">&#34;Action&#34;</span>:<span style="color: #50a14f;line-height: 26px;">&#34;AddBrand&#34;</span>,<span style="color: #50a14f;line-height: 26px;">&#34;brand_name&#34;</span>:<span style="color: #50a14f;line-height: 26px;">&#34;test&#34;</span>,<span style="color: #50a14f;line-height: 26px;">&#34;brand_logo&#34;</span>:{<span style="color: #50a14f;line-height: 26px;">&#34;Data&#34;</span>:<span style="color: #50a14f;line-height: 26px;">&#34;xx</span>,<span style="color: #50a14f;line-height: 26px;">&#34;Type&#34;</span>:<span style="color: #50a14f;line-height: 26px;">&#34;xx&#34;</span>}}<br/></code></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);"><span style="display: none;"></span>最后getshell<span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">ecshop后台能读写文件的地方，大多做了限制。现在找到能shell的地方，就是在利用smarty模板渲染来执行代码，可参考ecshop原来爆过的一个任意代码执行漏洞，这里简要概述下。</p><ol data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">首先插入代码，在模板管理里找到邮件模板，修改为<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">{str:{\$asd&#39;];assert(base64_decode(&#39;ZmlsZV9wdXRfY29udGVudHMoJ3hjaGVjay5waHAnLCc8P3BocCBwaHBpbmZvKCk7Jyk7IA==&#39;));//}x</code></section></li></ol><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.3423529411764706" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="850" src="https://wechat2rss.xlab.app/img-proxy/?k=514666ef&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJ3ZbrhI1RQxLlPwnAZDvaYBOFvYPxxZgQ1gOX6hmSULwGZtNbjMK9oGibbPjH45elWbXxv0bmep5g%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">payload</figcaption></figure><ol start="2" data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">再回到管理密码找回页面，点击确定，即可触发。</section></li></ol><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.3089133089133089" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="819" src="https://wechat2rss.xlab.app/img-proxy/?k=4c87a344&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJ3ZbrhI1RQxLlPwnAZDvaYJ3A9MBJuWJu8knuzTo3J8Q57rktKKzWKmVCDrx2icrFtkqBuUj94fcQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">触发页面</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">分析如下：<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$template[&#39;template_content&#39;]</code>为我们插入的数据。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.29931972789115646" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1176" src="https://wechat2rss.xlab.app/img-proxy/?k=1c9df542&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJ3ZbrhI1RQxLlPwnAZDvaYjppepKx2mXbD8b7Gjvb3eKY1HAX36Oj2nSuPVVFQOTRbtcBfuVFwGQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">触发入口</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">跟进fetch函数，进入eval函数前还有个fetch_str函数，会对payload进行一些过滤，这里不展开细节。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.4360086767895879" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="922" src="https://wechat2rss.xlab.app/img-proxy/?k=14cf4ec5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJ3ZbrhI1RQxLlPwnAZDvaYIOhL0gcyJL4TxPubaJkLs6NY6ghVftdAn8SsKX4doxscBHj808obiaA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">fetch函数</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;"><code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">_eval</code>函数将过滤后的字符串拿过来进行执行。由于是无回显，所以payload采用的是写文件的方式。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.610655737704918" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="488" src="https://wechat2rss.xlab.app/img-proxy/?k=f9cc68a9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJ3ZbrhI1RQxLlPwnAZDvaYWqAmx8HkAEY6Rmvibv5JYbrVMxCQG27Q7J5uNGZ2PR42hSAGHLsiaia2A%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">eval执行</figcaption></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x03 结束语</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">这个前台SQL注入较为简单，但是危害较高，只通过一些简单字符匹配规则去找类似这种漏洞的话，整个项目大概有三百多个，其中前台的风险大多被单双引号包裹且开了GPC防护，对xcheck来说仅需要加一点字符串比对处理即可筛选找出。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">这个漏洞由<strong style="font-weight: border;color: #0e88eb;">xcheck</strong>检出，已第一时间上报CNVD，现在官网版本已经修复。<strong><strong style="color: rgb(14, 136, 235);font-family: PingFangSC-Light;font-size: 15px;letter-spacing: 1.95px;text-align: left;white-space: normal;word-spacing: 1.5px;background-color: rgb(255, 255, 255);">本文仅限技术研究与讨论，严禁用于非法用途。</strong></strong></p><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">0x04 参考</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;"><em style="color: rgb(14, 136, 235);letter-spacing: 0.3em;">Ecshop 2.x/3.x SQL注入/任意代码执行漏洞分析：<a href="https://www.secrss.com/articles/4965" target="_blank">https://www.secrss.com/articles/4965</a></em></p><hr data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;height: 1px;border-width: initial;border-style: none;border-color: initial;text-align: center;background-image: linear-gradient(to right, rgba(248, 57, 41, 0), rgb(14, 136, 235), rgba(248, 57, 41, 0));"/><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">想了解Xcheck更多信息或者代码安全审计相关技术欢迎关注xcheck公众号~</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="1" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="258" src="https://wechat2rss.xlab.app/img-proxy/?k=4aa57d7e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJ3ZbrhI1RQxLlPwnAZDvaYrb6EM2Xu1eIXXKlbyibL9W3tFUoAWvq2b7eIHSQmUDFUYciaHfhYRK7Q%2F640%3Fwx_fmt%3Dpng"/></figure></section><p><br/></p>



<p><a href="2247484172">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=489340ce&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzg2ODQ3ODE1NA%3D%3D%26mid%3D2247484172%26idx%3D1%26sn%3D5c790c662639f74b6a0f1be1c27c128c%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Mon, 09 Nov 2020 12:11:00 +0800</pubDate>
    </item>
    <item>
      <title>Xcheck之Java安全检查引擎</title>
      <link>https://mp.weixin.qq.com/s?__biz=Mzg2ODQ3ODE1NA==&amp;mid=2247484036&amp;idx=1&amp;sn=af79ed3ac8b28c621703eaf23d5fef8d</link>
      <description>Xcheck java安全检查引擎介绍与CVE-2014-3582 检测。</description>
      <content:encoded><![CDATA[<p>
原创 <span>xcheck团队</span> <span>2020-10-30 19:31</span> <span style="display: inline-block;"></span>
</p>

<p>Xcheck java安全检查引擎介绍与CVE-2014-3582 检测。</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=3a4f8c17&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F8SDYbMEObOKqYuXRRiaPcdZibCWpibVvyjlYCFFVEcWuzE6jPRZyoGIiclsickMic3CI8V6rG9tExq9lchic2cIGhDpng%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px;color: black;padding-right: 10px;padding-left: 10px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;text-align: left;font-family: PingFangSC-Light;" data-mpa-powered-by="yiban.io"><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.5638888888888889" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=57141827&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOKqYuXRRiaPcdZibCWpibVvyjlwdAOicVwqEVA6w4wnE6hUuzMibAaRxP1eY7aQpl5UVrvbUky1yKib8icpQ%2F640%3Fwx_fmt%3Dpng"/></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">Java安全检查引擎</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">Xcheck的java安全检查引擎支持<strong style="font-weight: border;color: #0e88eb;">Spring RequestMapping</strong>、<strong style="font-weight: border;color: #0e88eb;">JAX-RS</strong>、<strong style="font-weight: border;color: #0e88eb;">WebService</strong>和<strong style="font-weight: border;color: #0e88eb;">Java Servlet</strong>几种常用web接口的代码安全检查，目前内部误报率数据统计低于10%，扫描速度1w+行每秒。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">覆盖漏洞类别包括但不限于以下：</p><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">系统命令注入</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">模板注入</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">反序列化</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">路径穿越漏洞</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">SQL注入</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">XML实体注入</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">XPATH注入</section></li></ul><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.6375" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="400" src="https://wechat2rss.xlab.app/img-proxy/?k=12635916&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOKqYuXRRiaPcdZibCWpibVvyjl71wD6RYGh6BiaUNNRBeqX5iaxsIY6Sn5fjsPibl4trKS2Z5ekvutuwEiaQ%2F640%3Fwx_fmt%3Dpng"/></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">OWASP Benchemark评测结果</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">OWASP benchmark是OWASP组织下的一个开源项目，又叫作OWASP基准测试项目，它是免费且开放的测试套件。可用来评估那些自动化安全扫描工具的<strong style="font-weight: border;color: #0e88eb;">速度、覆盖范围和准确性</strong>。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.7129963898916968" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=f9d32b9c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOKqYuXRRiaPcdZibCWpibVvyjlZVribVrFsMnWsQiaQ5Ayx0qVZ19ct6gFKLUyY1AhsibgRPW3mnTuGPiaTQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">xcheck-java benchmark评测结果</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">从上图结果可以看出，对注入类漏洞（LDAPI、PATH Traversal、SQLI、XPATHI、CMDI）<strong style="font-weight: border;color: #0e88eb;">Xcheck的召回率均达到了100%</strong>。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.6922162804515746" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1683" src="https://wechat2rss.xlab.app/img-proxy/?k=86b796cb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOKqYuXRRiaPcdZibCWpibVvyjlhjP9zUqowUUp1oJKrFxia8GG1sttoKoyq9QaecorXiaibvEDzVhdQNHmA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">某商业化产品benchmark评测结果</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">从上图可以看出，对于基于benchmark评测，Xcheck的测试结果是与现有的某些商业化的代码检查工具的测试结果是不相上下的。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.7857142857142857" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="266" src="https://wechat2rss.xlab.app/img-proxy/?k=3082203e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOKqYuXRRiaPcdZibCWpibVvyjlgwiakebGIPrXC2gR4MNxt31RnAic9Lz16icrujibVkj0mUvbvq2YcXQDog%2F640%3Fwx_fmt%3Dpng"/></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">Apache Ambari任意代码执行漏洞：CVE-2014-3582 检测</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">在对内部项目的代码检查中，发现一个项目存在命令注入漏洞，经过查找，确认是已经披露出来的Apache Ambari任意代码执行漏洞——CVE-2014-3582。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.10009442870632672" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1059" src="https://wechat2rss.xlab.app/img-proxy/?k=c1d326c8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOKqYuXRRiaPcdZibCWpibVvyjlxkVNXOFibuTG0ST2JPhj1SO7ibs2TLVyUKgYuibczszulJzZzOswnSYYw%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">发现漏洞</figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.48736462093862815" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=91b4bd7a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOKqYuXRRiaPcdZibCWpibVvyjl3Hbe9gONRM2N5SsFaBic9pWa4ibmq8UksibcMk4m2J94LIE7sNIxCOP1w%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">CVE-2014-3582</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">漏洞分析如下：</p><ol data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">污点引入，<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">java/org/apache/ambari/server/security/unsecured/rest/CertificateSign.java</code>，63行</section></li></ol><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.3606889564336373" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="987" src="https://wechat2rss.xlab.app/img-proxy/?k=26606ae1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOKqYuXRRiaPcdZibCWpibVvyjlv6M3qIhNCtvFWz6IUv9k8uzyxkKv4oaUbgm9sMI9hmal8PKpvCqhibg%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">污点引入</figcaption></figure><ol start="2" data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">跟进signAgentCrt函数，<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">java/org/apache/ambari/server/security/CertificateManager.java</code>，187行。在192行将污点传递给<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">agentHostname</code>，在239行<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">agentHostname</code>传递给<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">agentCrtName</code>，然后又到<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">scriptArgs</code>当中。</section></li></ol><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.2363356428021555" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1299" src="https://wechat2rss.xlab.app/img-proxy/?k=11f3ceea&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOKqYuXRRiaPcdZibCWpibVvyjlybErAxCzcntvhHOlkV3ByTykfdictfrzxP2tBm8yIM2XV8vBwZEDfgw%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">signAgentCrt函数</figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.35906040268456374" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="894" src="https://wechat2rss.xlab.app/img-proxy/?k=d01bfe28&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOKqYuXRRiaPcdZibCWpibVvyjlFV8eBlwpyhNNaXPyu6ib39baP0Fu9GMwdGgXNILAyPeT0t53sqBtnsw%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">污点传递</figcaption></figure><ol start="3" data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;"><code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">java/org/apache/ambari/server/security/CertificateManager.java</code>，271行。调用<code style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">runCommand</code>函数，然后触发漏洞。</section></li></ol><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.260129659643436" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1234" src="https://wechat2rss.xlab.app/img-proxy/?k=08acff75&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOKqYuXRRiaPcdZibCWpibVvyjlktFqwfR9UcoA1HkxuPz24wuxUFRtxDtNzzZQLbicFM4QdktVPS7TXlA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">调用runCommand函数</figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.3336980306345733" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="914" src="https://wechat2rss.xlab.app/img-proxy/?k=9339f949&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOKqYuXRRiaPcdZibCWpibVvyjltpBR1YtBfkMicCGpiaIenNkvlfvoPkQxsEu9oj15vP9Vm2TQGbS3TGhQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">runCommand执行命令触发漏洞</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">整理数据流分析图如下：</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.5798245614035088" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1140" src="https://wechat2rss.xlab.app/img-proxy/?k=960a82fb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOKqYuXRRiaPcdZibCWpibVvyjlQD7u1fCoOfyPvKVcuK9uQzvdxb8fibyYL5iaibvwPVz0EVVEmNKBfUzRg%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">数据流分析</figcaption></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">最后</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">Xcheck的Java引擎还在不断优化提升过程中，期间也发现不少开源项目的0day漏洞，待修复之后会分享出来，敬请期待。</p><hr data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;height: 1px;border-width: initial;border-style: none;border-color: initial;text-align: center;background-image: linear-gradient(to right, rgba(248, 57, 41, 0), rgb(14, 136, 235), rgba(248, 57, 41, 0));"/><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">想了解Xcheck更多信息或者代码安全审计相关技术欢迎关注xcheck公众号~<img data-ratio="1" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="258" src="https://wechat2rss.xlab.app/img-proxy/?k=f72ca057&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOKqYuXRRiaPcdZibCWpibVvyjlb30Z2UdotJSCbQgP92pfCHM1VAic2aJBacpSunEcKjEycrY42uxAvcw%2F640%3Fwx_fmt%3Dpng"/></p></section><p><br/></p>



<p><a href="2247484036">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=2eaf4721&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzg2ODQ3ODE1NA%3D%3D%26mid%3D2247484036%26idx%3D1%26sn%3Daf79ed3ac8b28c621703eaf23d5fef8d%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Fri, 30 Oct 2020 19:31:00 +0800</pubDate>
    </item>
    <item>
      <title>Xcheck之Golang安全检查引擎</title>
      <link>https://mp.weixin.qq.com/s?__biz=Mzg2ODQ3ODE1NA==&amp;mid=2247483838&amp;idx=1&amp;sn=aeaa216d2fcd81a1c7c9a6b63f097281</link>
      <description>Golang安全检查引擎Go语言近几年开始越来越流行，凭借其强大的性能和跨平台的优势，对web和后台开发都是</description>
      <content:encoded><![CDATA[<p>
原创 <span>xcheck团队</span> <span>2020-10-16 17:30</span> <span style="display: inline-block;"></span>
</p>

<p>Golang安全检查引擎Go语言近几年开始越来越流行，凭借其强大的性能和跨平台的优势，对web和后台开发都是</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=9a96c253&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F8SDYbMEObOJv7JI5y1aHJWC5ZNpP5W58zgKlRmMPaicIT3uQ2v1dibNprExAiawnVj3cCO6XDicJMoicDmzKicObTvBg%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px;color: black;padding-right: 10px;padding-left: 10px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;overflow-wrap: break-word;text-align: left;font-family: PingFangSC-Light;"><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.5638888888888889" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=255ad605&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJv7JI5y1aHJWC5ZNpP5W58Eed2R2iaHO9Oiclr0PnugoIKVKMSicPQ2Gs9P7ibv0OTEibLRzpEwz4yQzA%2F640%3Fwx_fmt%3Dpng"/></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">Golang安全检查引擎</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">Go语言近几年开始越来越流行，凭借其强大的性能和跨平台的优势，对web和后台开发都是一个不错的选择。Xcheck支持Golang的代码安全检查，覆盖常用web框架，包括golang内建的net/http，以及一些流行的第三方web框架：gin，iris，mux，httprouter，fasthttp，fasthttprouter等。自然，也可以通过Xcheck的扩展能力，来适配其他框架。目前覆盖的Web漏洞类型包括但不限于以下：</p><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">命令注入</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">SQL注入</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">URL跳转</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">路径穿越</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">SSRF</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">...</section></li></ul><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">检测数据</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">我们在github上面选取了10000个golang项目进行安全检查，发现其中存在风险的项目182个，风险数317个，误报数19个，整体误报率6%左右。</p><section data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;"><th style="border-top-width: 1px;border-color: rgb(204, 204, 204);text-align: left;background-color: rgb(240, 240, 240);font-size: 15px;min-width: 85px;">项目</th><th style="border-top-width: 1px;border-color: rgb(204, 204, 204);text-align: left;background-color: rgb(240, 240, 240);font-size: 15px;min-width: 85px;">数据</th></tr></thead><tbody style="border-width: 0px;border-style: initial;border-color: initial;"><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;"><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">Github项目数</td><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">10000</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);"><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">存在风险的项目数</td><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">182</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;"><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">问题总数</td><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">317</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);"><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">误报数</td><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">19</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;"><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">误报率</td><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">6%</td></tr></tbody></table></section><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.5983193277310924" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="595" src="https://wechat2rss.xlab.app/img-proxy/?k=a4da134e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJv7JI5y1aHJWC5ZNpP5W58eJIaucLu4nTcshxakpsfwtgNFKmvQYuZicNQ27NWeTEGAaYs6oB3pvQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">漏洞类型分布</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">使用Xcheck扫描内部golang项目19w次任务，其中耗时小于1分钟的项目占18万个，换句话说，90%以上的项目都在1分钟内扫描完毕。</p><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">检测案例</span></h2><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);"><span style="display: none;"></span>SQL注入漏洞<span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;"><img data-ratio="0.4847908745247148" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="526" src="https://wechat2rss.xlab.app/img-proxy/?k=88c28da1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJv7JI5y1aHJWC5ZNpP5W58H7G24AbDluDFwBcXbml720Ge2AGHpSiafOnuBtzXicWBFCwQe2RIicI5w%2F640%3Fwx_fmt%3Dpng"/>这是整理的部分golang进行sql查询时不正确地使用方式会引发风险的函数。</p><section data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;"><th style="border-top-width: 1px;border-color: rgb(204, 204, 204);text-align: left;background-color: rgb(240, 240, 240);font-size: 15px;min-width: 85px;">package</th><th style="border-top-width: 1px;border-color: rgb(204, 204, 204);text-align: left;background-color: rgb(240, 240, 240);font-size: 15px;min-width: 85px;">函数</th></tr></thead><tbody style="border-width: 0px;border-style: initial;border-color: initial;"><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;"><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">database/sql</td><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;"><code>Query,QueryRow,QueryContext,QueryRowContext</code></td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);"><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">gorm</td><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;"><code>Exec,Raw,Select,Where</code></td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;"><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">xorm</td><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;"><code>Query,QueryString,SQL,Where</code></td></tr></tbody></table></section><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">以国外安全团队NemoSecurity在github的一个golang靶场项目GoVWA(<a href="https://github.com/0c34/govwa.git)为例：" target="_blank">https://github.com/0c34/govwa.git)为例：</a></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.4870967741935484" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="930" src="https://wechat2rss.xlab.app/img-proxy/?k=707dce0a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJv7JI5y1aHJWC5ZNpP5W58BnjhsT3NAy5c73WRyntRqFbOxmEPuriaq04k56YQNT2SdoFBD2hRpgw%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">检测结果</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">靶场中共存在两个sql注入漏洞，以其中一个为例，触发漏洞的所用的package为<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">database/sql</code>。数据流分析如下：</p><ol data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">/vulnerability/sqli/sqli.go 72行 引入污点：<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">uid := r.FormValue(&#34;uid&#34;)</code></section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">/vulnerability/sqli/sqli.go 74行 获取一个profile的实例p：<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">p := NewProfile()</code></section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">/vulnerability/sqli/sqli.go 79行 调用p的方法UnsafeQueryGetData: <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">err := p.UnsafeQueryGetData(uid)</code></section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">/vulnerability/sqli/function.go 37行 拼接sql语句</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);font-size: 15px;">/vulnerability/sqli/function.go 41行 将拼接的sql参数进行查询。</section></li></ol><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.4523281596452328" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="902" src="https://wechat2rss.xlab.app/img-proxy/?k=de1dc6c3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJv7JI5y1aHJWC5ZNpP5W584OOkvDMYVicpNicvvEqRG42Jotib6zACIG2yW1d3SAoCiaFiblusE5RS2AA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">vulnerability/sqli/sqli.go 引入污点</figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.6069906223358909" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1173" src="https://wechat2rss.xlab.app/img-proxy/?k=24f5aa44&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJv7JI5y1aHJWC5ZNpP5W58y0OK9oEIy8nsc8ic0QzuqRAQUVSGOdMRJcX6m0RagzRIoJ603tHR43g%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">vulnerability/sqli/function.go 触发漏洞</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">这里我们也使用了github开源高星项目的gosec代码扫描工具进行检测，很遗憾，工具报错了未能得到结果。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);"><span style="display: none;"></span>命令注入<span style="display: none;"></span></h3><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.6210526315789474" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="285" src="https://wechat2rss.xlab.app/img-proxy/?k=7288d20f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJv7JI5y1aHJWC5ZNpP5W58LEasR6GiclMz4FYDOCXLKe3lfEJzDY13T791rOxjT0Oa4a5XiaPDiaAaw%2F640%3Fwx_fmt%3Dpng"/></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">对于命令注入，Golang引擎原生支持识别os/exec相关的函数和结构体，包括exec.Command，exec.CommandContext以及相关实际执行函数CombinedOutput/Output/Run/Start。</p><section data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;"><th style="border-top-width: 1px;border-color: rgb(204, 204, 204);text-align: left;background-color: rgb(240, 240, 240);font-size: 15px;min-width: 85px;">package</th><th style="border-top-width: 1px;border-color: rgb(204, 204, 204);text-align: left;background-color: rgb(240, 240, 240);font-size: 15px;min-width: 85px;">执行函数</th></tr></thead><tbody style="border-width: 0px;border-style: initial;border-color: initial;"><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;"><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">os/exec</td><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;"><code>CombinedOutput,Output,Run,Start</code></td></tr></tbody></table></section><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">举一个实际项目的案例，图中317行是一个污点，318行是一个Cmd的实例，339行才是真实执行。值得注意的是，如果没有执行Start函数（319行），是不会报漏洞的。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.23140495867768596" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="605" src="https://wechat2rss.xlab.app/img-proxy/?k=f3b5d4d4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJv7JI5y1aHJWC5ZNpP5W58TcotJIsuU6kwd06hj5BMGZhOCSSTlNbK5hsNhGZCjhHOZ1Mh9q2HAg%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">命令注入图1</figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.22148760330578512" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="605" src="https://wechat2rss.xlab.app/img-proxy/?k=2ce39b05&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJv7JI5y1aHJWC5ZNpP5W58IrAejejiaNtlx0DPvMnS8ucRia3B7PZTOjMtr47ibr4B4mXbKMfR7Q2vQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">命令注入图2</figcaption></figure><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);"><span style="display: none;"></span>URL跳转和SSRF<span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">对于扫描引擎来说，这两类漏洞的检测除了支持一些相关触发函数的识别外，难点在于对url字符串的精确判断和分析，如果能做到这个效果，就能降低一些误报。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">来看一个SSRF案例，Xcheck识别出这是一个SSRF问题，但是在最后的触发点，“过滤”字段提示这个url的host部分不可控制，其实无法造成危害，对于这种无法被利用的风险，Xcheck给出的漏洞级别是“提示（可忽略）”，这也是Xcheck精准识别的一个体现。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.628099173553719" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="605" src="https://wechat2rss.xlab.app/img-proxy/?k=593c1634&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJv7JI5y1aHJWC5ZNpP5W587Z8gLqDhseYibNeGlcRg2JxSfZrZGgIetERhNfslyybsBswZKUrgxhg%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">SSRF</figcaption></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">结束语</span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">随着golang在web后台开发等领域越来越流行，goalng的安全是个不可忽视的关注点。网上关于golang的代码审计文章也较少，后续xcheck也会持续输出golang代码审计的一些文章，共同学习进步。</p><hr data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;height: 1px;border-width: initial;border-style: none;border-color: initial;text-align: center;background-image: linear-gradient(to right, rgba(248, 57, 41, 0), rgb(14, 136, 235), rgba(248, 57, 41, 0));"/><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.13em;font-size: 15px;word-spacing: 0.1em;">想了解Xcheck更多信息或者代码安全审计相关技术欢迎关注xcheck公众号~</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="1" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="258" src="https://wechat2rss.xlab.app/img-proxy/?k=dd51d2a0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJv7JI5y1aHJWC5ZNpP5W58a0GU2dht6Cu5MsReHERibLZV9jiblbibg1LM8vQpdt3icFdxy9zTaETDEQ%2F640%3Fwx_fmt%3Dpng"/></figure></section><p><br/></p>



<p><a href="2247483838">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=8a60d942&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzg2ODQ3ODE1NA%3D%3D%26mid%3D2247483838%26idx%3D1%26sn%3Daeaa216d2fcd81a1c7c9a6b63f097281%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Fri, 16 Oct 2020 17:30:00 +0800</pubDate>
    </item>
    <item>
      <title>腾讯代码安全检查Xcheck</title>
      <link>https://mp.weixin.qq.com/s?__biz=Mzg2ODQ3ODE1NA==&amp;mid=2247483698&amp;idx=1&amp;sn=827baf0317a3a1e06cc8732f3d3b365b</link>
      <description>Xcheck是一个由腾讯公司CSIG质量部代码安全检查团队自研的静态应用安全测试(SAST，Static application security testing)工具，致力于挖掘代码中隐藏的安全风险，提升代码安全质量。</description>
      <content:encoded><![CDATA[<p>
<span>xcheck团队</span> <span>2020-09-17 15:53</span> <span style="display: inline-block;"></span>
</p>

<p>Xcheck是一个由腾讯公司CSIG质量部代码安全检查团队自研的静态应用安全测试(SAST，Static application security testing)工具，致力于挖掘代码中隐藏的安全风险，提升代码安全质量。</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=b000acdb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F8SDYbMEObOJeyRzH6Kwxktyias2EhwqXpNbW8Ev0bg165MjpuNXicj8kP3u0EeicT4bmj1icbUX0SIA37xOHXueBEg%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px;color: black;padding-right: 10px;padding-left: 10px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;overflow-wrap: break-word;text-align: left;font-family: PingFangSC-Light;"><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.5635300372142478" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1881" src="https://wechat2rss.xlab.app/img-proxy/?k=40a0d51a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJeyRzH6Kwxktyias2EhwqXppQ1CNUwoY94ZQozW82dibgGcdQbwykNDkkjjQ4pN7n8TTQr4rrnDGcw%2F640%3Fwx_fmt%3Dpng"/></figure><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">1 Xcheck介绍</span><span></span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck是一个由腾讯公司CSIG质量部代码安全检查团队自研的静态应用安全测试(SAST，Static application security testing)工具，致力于挖掘代码中隐藏的安全风险，提升代码安全质量。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck现已支持<strong style="font-weight: border;color: #0e88eb;">Golang、Java、Nodejs、PHP、Python</strong> 五种语言的安全检查，其他语言支持还在开发中。覆盖漏洞包括SQL注入、代码注入、命令注入、跨站脚本、反序列化漏洞、路径穿越等多种漏洞。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">在框架支持上，xcheck内置覆盖了常见的web框架，也可根据<strong style="font-weight: border;color: #0e88eb;">易编写易扩展</strong>的自定义规则模块自行编写规则对第三方框架进行覆盖支持。</p><section data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;"><th style="border-top-width: 1px;border-color: rgb(204, 204, 204);text-align: left;background-color: rgb(240, 240, 240);font-size: 15px;min-width: 85px;">语言</th><th style="border-top-width: 1px;border-color: rgb(204, 204, 204);text-align: left;background-color: rgb(240, 240, 240);font-size: 15px;min-width: 85px;">框架</th></tr></thead><tbody style="border-width: 0px;border-style: initial;border-color: initial;"><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;"><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;"><strong style="font-weight: border;color: #0e88eb;">Golang</strong></td><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">Gin,Beego,Iris,net/http,fastrouter,httprouter,go-restful,mux</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);"><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;"><strong style="font-weight: border;color: #0e88eb;">Java</strong></td><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">Spring,HttpServlet,WebService,jax-rs</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;"><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;"><strong style="font-weight: border;color: #0e88eb;">Nodejs</strong></td><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">Koa,Express</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);"><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;"><strong style="font-weight: border;color: #0e88eb;">PHP</strong></td><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;word-break: break-all;">Thinkphp,Laravel,CodeIgniter,Yii,Yaf</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;"><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;"><strong style="font-weight: border;color: #0e88eb;">Python</strong></td><td style="border-color: rgb(204, 204, 204);font-size: 15px;min-width: 85px;">Django,Flask,Tornado,Webpy,Bottle,BaseHTTPServer</td></tr></tbody></table></section><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">2 Xcheck的优势</span><span></span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">Xcheck在基于成熟的污点分析技术与对抽象语法树的精准剖解上，通过巧妙优雅的实现来达到对污点的传递和跟踪的目的，更精准地发现隐藏在代码中的安全风险。同时赋予了Xcheck两大优势：<strong style="font-weight: border;color: #0e88eb;">快！低误报！</strong></p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">在4核16g的linux云主机上，Xcheck对项目的检查速度在 <strong style="font-weight: border;color: #0e88eb;">1w+/s</strong> ，部分项目可以达到 <strong style="font-weight: border;color: #0e88eb;">2w+/s</strong>。以28w行的wordpress项目为例，xcheck检查时间为18s。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">经过团队对xcheck投喂大量的项目进行误报优化，现xcheck各语言的<strong style="font-weight: border;color: #0e88eb;">误报率低于10%</strong>。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">以python为例，xcheck对github部分python开源项目检测结果如下：<img data-ratio="1.1835564053537284" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1046" src="https://wechat2rss.xlab.app/img-proxy/?k=68e6d71f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJeyRzH6Kwxktyias2EhwqXpSMRlFau3tjXeEqRHnVbicibvtJkWl24eibV8Mn8DIy34eGq5bgibN0Stqw%2F640%3Fwx_fmt%3Dpng"/></p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">传统的 SAST 需要比较长的扫描分析时间， <strong style="font-weight: border;color: #0e88eb;">实时性比较差</strong> ，一个稍大的项目扫描好几个小时，在版本迭代快速的web应用开发中<strong style="font-weight: border;color: #0e88eb;">严重拖慢流水线</strong>，同时 <strong style="font-weight: border;color: #0e88eb;">误报率也比较高</strong> ，同一个漏洞报n次的情况更是常有发生， 需要投入大量的安全团队的资源来去除这些误报，因此 <strong style="font-weight: border;color: #0e88eb;">无法敏捷地融入到 DevOps 中</strong> 。但Xcheck基于这两大优势，<strong style="font-weight: border;color: #0e88eb;">可完美融入DevSecOps</strong>，<strong style="font-weight: border;color: #0e88eb;">加速流水线又快又安全地建设</strong>。</p><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;margin-top: 20px;margin-right: 10px;"><span style="display: none;"></span><span style="font-family: STHeitiSC-Light;color: rgb(14, 136, 235);font-weight: bolder;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(14, 136, 235);">3 部分检测案例</span><span></span></h2><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);"><span style="display: none;"></span><span>3.1 Apache Kylin 远程命令执行漏洞（CVE-2020-13925）</span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;"><img data-ratio="0.516245487364621" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=2fbb1767&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJeyRzH6Kwxktyias2EhwqXpRHuts3QOgADE2fgfuS27nUib7icWp3IpxHWn76gHO65kb7j0PzCsIjgw%2F640%3Fwx_fmt%3Dpng"/>2020年7月份，京东安全团队发现了一个Apachec Kylin 远程命令执行漏洞，这里使用Xcheck对Kylin2.6.3的源码进行检查。耗时31s,检测出3个RCE漏洞，2.6.3版本不存在checkParameterWhiteList过滤函数，检测结果如下图。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.1361926260346125" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1329" src="https://wechat2rss.xlab.app/img-proxy/?k=4f948315&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJeyRzH6Kwxktyias2EhwqXpYibFxBz3E4qkzPJrhXoO5BmeAoCXbgw5El847UJQlUAGtOyicwQHCibsA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">检测结果</figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">漏洞触发点：<img data-ratio="0.6323676323676324" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1001" src="https://wechat2rss.xlab.app/img-proxy/?k=e8be420c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJeyRzH6Kwxktyias2EhwqXpl9otFLuZrGRxyArraDkIL1PiaGY6u008f2efb7Zndia79UUVGCiaJOGnw%2F640%3Fwx_fmt%3Dpng"/></p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">其中一条触发路由：</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.3199393479909022" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1319" src="https://wechat2rss.xlab.app/img-proxy/?k=7ce9df1c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJeyRzH6Kwxktyias2EhwqXpfStPADDvyjFChTTTP38SjeVFWFbZcxtA2qrqrzLr79XboicYSWPf0Wg%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">路由</figcaption></figure><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: rgb(14, 136, 235);"><span style="display: none;"></span><span>3.2 ThinkAdmin V4,v5,v6 反序列化漏洞（CNVD-2020-33163）</span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">这是今年6月份Xcheck在对github部分开源项目检测中发现的<strong style="font-weight: border;color: #0e88eb;">0day漏洞</strong>，通过这个反序列化漏洞可实现任意代码执行的效果。漏洞代码位于<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">app/admin/controller/api/Update.php</code>和<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">app/wechat/controller/api/Push.php</code>，<strong style="font-weight: border;color: #0e88eb;">无需登录认证</strong>，此漏洞已第一时间告知开发者并申报CNVD,现已修复。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">从git历史可以看到，程序对用户post进来的数据直接进行反序列化操作。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.43496357960457854" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="961" src="https://wechat2rss.xlab.app/img-proxy/?k=e3006350&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJeyRzH6Kwxktyias2EhwqXp3JBicwYE8Pnoj4lh8n1WiaLPDEkQibqic6N3261ib5JHY0ckp1O8lCugmIQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">漏洞源码</figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.3484978540772532" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="1165" src="https://wechat2rss.xlab.app/img-proxy/?k=d8c2e6d7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJeyRzH6Kwxktyias2EhwqXpXhn94E08gicYI16CsdIcSbKfpHD0ZwlYsiaUpVIFBQqVVhTRhcUQGX6A%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">xcheck部分检测结果</figcaption></figure><hr data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;height: 1px;border-width: initial;border-style: none;border-color: initial;text-align: center;background-image: linear-gradient(to right, rgba(248, 57, 41, 0), rgb(14, 136, 235), rgba(248, 57, 41, 0));"/><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;margin: 10px;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;">想了解Xcheck更多信息或者代码安全审计相关技术欢迎长按关注xcheck公众号~</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="1" style="border-radius: 0px 0px 5px 5px;display: block;margin: 20px auto;width: 85%;height: 100%;object-fit: contain;box-shadow: rgb(132, 161, 168) 0px 10px 15px;" data-type="png" data-w="258" src="https://wechat2rss.xlab.app/img-proxy/?k=678cdf64&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F8SDYbMEObOJeyRzH6Kwxktyias2EhwqXpFeQmibol3UfEObjfLqqSx2dRxGUIUlwm4LoYeyIfkopIH1mHp9p5k9w%2F640%3Fwx_fmt%3Dpng"/></figure></section><p><br/></p>



<p><a href="2247483698">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=c4066dab&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzg2ODQ3ODE1NA%3D%3D%26mid%3D2247483698%26idx%3D1%26sn%3D827baf0317a3a1e06cc8732f3d3b365b%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 17 Sep 2020 15:53:00 +0800</pubDate>
    </item>
  </channel>
</rss>