dedecms/include/helpers/archive.helper.php SQL Injection Vul

Source: Internet
Author: User

Catalog

1 . Vulnerability Description 2 . Vulnerability trigger Condition 3 . Vulnerability Impact Range 4 . Vulnerability Code Analysis 5 . Defense Methods 6. Defensive thinking

1. Vulnerability description

DEDECMS Member Center Injection vulnerability

Relevant Link:

http://www.wooyun.org/bugs/wooyun-2010-048892


2. Vulnerability Trigger Condition

1. Open http://127.0.0.1/dedecms5.7/member/soft_add.php2. Add Software3. Open the Burp grab bag1) Change the picnum to Typeid22) and then the parameter write 5', 1,1,1,@ ''`),('-1','7', User (),'3','1389688643','1389688643','8'),(1,2,'


3. Vulnerability Impact Range
4. Vulnerability Code Analysis

/include/helpers/archive.helper.php

if(! function_exists ('Getindexkey') {function Getindexkey ($arcrank, $typeid, $sortrank=0, $channelid =1, $senddate =0, $mid =1)     {         //$typeid 2 from outside, combined with Dede local variable overwrite vulnerability can modify this variable value        Global$dsql, $senddate, $typeid 2; if(Empty ($typeid 2)) $typeid 2 =0; if(Empty ($senddate)) $senddate =Time (); if(Empty ($sortrank)) $sortrank =$senddate; //$typeid 2, $senddate have not been effectively filtered to bring into SQL query$iquery ="INSERT into ' #@__arctiny ' (' Arcrank ', ' typeid ', ' Typeid2 ', ' channel ', ' senddate ', ' Sortrank ', ' mid ') VALUE S ('$arcrank','$typeid','$typeid 2','$channelid','$senddate','$sortrank','$mid')";Echo $iquery; $dsql-executenonequery ($iquery); $aid= $dsqlGetlastid (); return$aid; } }

/archive.helper.php is an auxiliary function library, which is the source of the vulnerability, and the real vulnerability vector is triggered by the Getindexkey function calling this file.
/member/soft_add.php

 else  if  ($dopost == '  

Relevant Link:

http://www.wooyun.org/bugs/wooyun-2010-048892


5. Defense Methods

/include/helpers/archive.helper.php

if(! function_exists ('Getindexkey') {function Getindexkey ($arcrank, $typeid, $sortrank=0, $channelid =1, $senddate =0, $mid =1)    {        //$typeid 2 from outside, combined with Dede local variable overwrite vulnerability can modify this variable value        Global$dsql, $senddate, $typeid 2; if(Empty ($typeid 2)) $typeid 2 =0; if(Empty ($senddate)) $senddate =Time (); if(Empty ($sortrank)) $sortrank =$senddate; /*Filter*/$typeid 2=intval ($typeid 2); $senddate=intval ($senddate); /* */$iquery="INSERT into ' #@__arctiny ' (' Arcrank ', ' typeid ', ' Typeid2 ', ' channel ', ' senddate ', ' Sortrank ', ' mid ') V Alues ('$arcrank','$typeid','$typeid 2','$channelid','$senddate','$sortrank','$mid')";$dsqlexecutenonequery ($iquery); $aid= $dsqlGetlastid (); return$aid; }}


6. Defensive Thinking

Copyright (c) Littlehann All rights reserved

dedecms/include/helpers/archive.helper.php SQL Injection Vul

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.