APACHE OFBIZ XMLRPC远程代码执行漏洞详解
| 副标题[/!--empirenews.page--] 漏洞分析 Apache OFBiz使用了一系列开源技术和标准,比如Java、JavaEE、XML和SOAP。 超文本传输协议是一种请求/响应协议,该协议在 RFC 7230-7237中有详细描述。请求由客户端设备发送至服务器,服务器接收并处理请求后,会将响应发送回客户端。一个HTTP请求由请求内容、各种Header、空行和可选消息体组成: Request = Request-Line headers CRLF [message-body] 
 Request-Line = Method SP Request-URI SP HTTP-Version CRLF 
 Headers = *[Header] 
 Header = Field-Name “:” Field-Value CRLF CRLF代表新的行序列回车符(CR),后跟换行符(LF),SP表示空格字符。参数将以键值对的形式通过Request- URI或message-body由客户端传递给服务器,具体将取决于Method和Content-Type头中定义的参数。比如说在下面的HTTP请求样本中,有一个名为“param”的参数,其值为“1”,使用的是POST方法: POST /my_webapp/mypage.htm HTTP/1.1 
 Host: 
 Content-Type: application/x-www-form-urlencoded 
 Content-Length: 7 
 
 
 param=1 Java序列化 Java支持对对象进行序列化操作,使它们额能够被表示为紧凑和可移植的字节流,然后可以通过网络传输这个字节流,并将其反序列化以供接收的servlet或applet使用。下面的示例演示了如何将一个类进行序列化并在随后提取数据: public static void main(String args[]) throws Exception{ 
 //This is the object we're going to serialize. 
 MyObject1 myObj = new MyObject1(); 
 MyObject2 myObj2 = new MyObject2(); 
 myObj2.name = "calc"; 
 myObj.test = myObj2; 
 
 
 //We'll write the serialized data to a file "object.ser" 
 FileOutputStream fos = new FileOutputStream("object.ser"); 
 ObjectOutputStream os = new ObjectOutputStream(fos); 
 os.writeObject(myObj); 
 os.close(); 
 
 
 //Read the serialized data back in from the file "object.ser" 
 FileInputStream fis = new FileInputStream("object.ser"); 
 ObjectInputStream ois = new ObjectInputStream(fis); 
 
 
 //Read the object from the data stream, and convert it back to a String 
 MyObject1 objectFromDisk = (MyObject1)ois.readObject(); 
 ois.close(); 
 } (编辑:锡盟站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! | 

