1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
Core Security Technologies - CoreLabs Advisory http://corelabs.coresecurity.com/ Multiple vulnerabilities in BugTracker.Net 1. *Advisory Information* Title: Multiple vulnerabilities in BugTracker.Net Advisory Id: CORE-2010-1109 Advisory URL: [http://www.coresecurity.com/content/multiple-vulnerabilities-in-bugtracker] Date published: 2010-11-30 Date of last update: 2010-11-30 Vendors contacted: BugTracker.NET team Release mode: Coordinated release 2. *Vulnerability Information* Class: Cross site scripting [CWE-79], SQL injection [CWE-89] Impact: Code execution Remotely Exploitable: Yes Locally Exploitable: No CVE Name: CVE-2010-3266, CVE-2010-3267 Bugtraq ID: N/A 3. *Vulnerability Description* BugTracker.NET [1][2] is an open-source web-based bug tracker written using ASP.NET, C#, and Microsoft SQL Server. Several cross-site scripting and SQL-injection vulnerabilities were found in the following files of the BugTracker.NET: . *bugs.aspx*. SQL injection in line 141. . *delete_query.aspx*. No sanitization for 'row_id.Value' in line 30. . *edit_bug.aspx*. Variables without sanitization in lines 1846 and 1857. . *edit_bug.aspx*. No sanitization for variable 'new_project', line 2214. . *edit_bug.aspx*. XSS in line 2918. . *edit_comment.aspx*. XSS in line 233. . *edit_customfield.aspx*. Lines 165 and 172, no sanitization. . *edit_user_permissions2.aspx*. XSS in line 40. . *massedit.aspx*. SQL Injection in line 162. 4. *Vulnerable packages* . BugTracker.NET v3.4.4. . Older versions are probably affected too, but they were not checked. 5. *Non-vulnerable packages* . BugTracker.NET v3.4.5. 6. *Credits* This vulnerability was discovered and researched by Damián Saura [http://corelabs.coresecurity.com/index.php?module=Wiki&action=view&type=researcher&name=Damian_Saura] and Alejandro Frydman from Core Security Technologies. 7. *Technical Description / Proof of Concept Code* 7.1. *XSS Vulnerabilities* [CVE-2010-3266 | N/A]. All XSS vulnerabilities can be exploited in similar ways. The following proof of concept shows how to exploit the XSS founded in 'edit_comment.aspx': /----- ... 230 <div class=align> 231 <table border=0><tr><td> 232 233 <a href=edit_bug.aspx?id=<% Response.Write(Request["bug_id"]);%>>back to <% Response.Write(btnet.Util.get_setting("SingularBugLabel","bug")); %></a> 234 <form class=frm runat="server"> 235 236<table border=0> ... -----/ First, login to BugTracker and create a comment in a previously created bug. Then, edit it using this URL: /----- http://localhost:4535/edit_comment.aspx?id=48&bug_id=3%3E%3Cscript%3Ealert%28%27%27%29;%3C/script%3E -----/ As a result, the JavaScript code injected into the parameter 'bug_id' will be rendered without sanitization in the line 233, and executed in the context of the client's web browser. 7.2. *SQL Injection Vulnerabilities* [CVE-2010-3267 | N/A]. All SQL injection vulnerabilities can also be exploited in similar ways. Consider, for example, the code located in 'delete_query.aspx': /----- ... 26 if (IsPostBack) 27 { 28 // do delete here 29 sql = @"delete queries where qu_id = $1"; 30 sql = sql.Replace("$1", row_id.Value); 31 btnet.DbUtil.execute_nonquery(sql); 32 Server.Transfer ("queries.aspx"); 33 } ... -----/ In line 30, the value of 'row_id' is injected without sanitization into the SQL query. This value arrives to the server in a hidden field of a client request. As a result, a malicious user can manipulate this value in order to execute code in the database layer of the application. 8. *Report Timeline* . 2010-11-29: Core Security Technologies notifies the BugTracker team of the vulnerability, setting the estimated publication date of the advisory to December 20th 2010. . 2010-11-29: The BugTracker team asks Core for a technical description of the vulnerability. . 2010-11-29: Technical details sent to BugTracker team. . 2010-11-29: The BugTracker team acknowledges the report and notifies they will fix all issues in 1 or 2 working days. . 2010-11-30: The BugTracker team notifies that a patched version is publicly available at Sourceforge and Codeplex. . 2010-11-30: The advisory CORE-2010-1109 is published. 9. *References* [1] BugTracker.NET official website: [http://ifdefined.com/bugtrackernet.html]. [2] BugTracker.NET Source Forge project: [http://sourceforge.net/projects/btnet/]. 10. *About CoreLabs* CoreLabs, the research center of Core Security Technologies, is charged with anticipating the future needs and requirements for information security technologies. We conduct our research in several important areas of computer security including system vulnerabilities, cyber attack planning and simulation, source code auditing, and cryptography. Our results include problem formalization, identification of vulnerabilities, novel solutions and prototypes for new technologies. CoreLabs regularly publishes security advisories, technical papers, project information and shared software tools for public use at: [http://corelabs.coresecurity.com]. 11. *About Core Security Technologies* Core Security Technologies develops strategic solutions that help security-conscious organizations worldwide develop and maintain a proactive process for securing their networks. The company's flagship product, CORE IMPACT, is the most comprehensive product for performing enterprise security assurance testing. CORE IMPACT evaluates network, endpoint and end-user vulnerabilities and identifies what resources are exposed. It enables organizations to determine if current security investments are detecting and preventing attacks. Core Security Technologies augments its leading technology solution with world-class security consulting services, including penetration testing and software security auditing. Based in Boston, MA and Buenos Aires, Argentina, Core Security Technologies can be reached at 617-399-6980 or on the Web at [http://www.coresecurity.com]. 12. *Disclaimer* The contents of this advisory are copyright (c) 2010 Core Security Technologies and (c) 2010 CoreLabs, and are licensed under a Creative Commons Attribution Non-Commercial Share-Alike 3.0 (United States) License: [http://creativecommons.org/licenses/by-nc-sa/3.0/us/] 13. *PGP/GPG Keys* This advisory has been signed with the GPG key of Core Security Technologies advisories team, which is available for download at [http://www.coresecurity.com/files/attachments/core_security_advisories.asc]. |