Typo3 v4.5-4.7 Remote Code Execution (RFI/LFI) and repair

Source: Internet
Author: User
Tags typo3

Title: Typo3 v4.5-4.7-Remote Code Execution (RFI/LFI)
Author: MaXe
: Https://typo3.org/download/
Affected Versions: 4.5.0 up to 4.5.8, 4.6.0 and 4.6.1 (+ development releases
4.7 branch)
 
Introduction:
TYPO3 is a small to midsize enterprise-class Content Management Framework
Offering
The best of both worlds: out-of-the-box operation with a complete set
Standard
Modules and a clean and sturdy high-performance architecture accomodating
Virtually
Every kind of custom solution or extension.
 
External Links:
Http://typo3.org/
 
 
 
-: The Advisory ::-
Requirements for any RCE:
-Register_globals in the php. ini MUST be enabled (if the exploit fails
Against a supposed to be vulnerable version, this is why. This setting is
Often disabled by default .)
 
Requirements for RFI:
-Allow_url_include has to be enabled (It's often "off" by default .)
 
 
Proof of Concept:
By browsing to a script/page, that uses the following file:
Typo3/sysext/workspaces/Classes/Controller/AbstractController. php (direct
Access may not be allowed)
It is possible to include PHP code to be executed via the "BACK_PATH"
Global variable. This can be accessed in ways like:
AbstractController. php? BACK_PATH = LFI/RFI % 00 www.2cto.com
 
The vulnerable piece of code: require_once ($ GLOBALS ['back _ path'].
'Template. php ');
Demonstrates, that it is necessary to append a null-byte (% 00) after
Maliciously crafted input/URL. (Unless your remote file if applicable, is
Named something. template. php)
 
 
-: Solution ::-
* Upgrade to the latest version or change the vulnerable piece
Code to: require_once (PATH_site. TYPO3_mainDir. 'template. php ');
 
 
 
References:
Http://typo3.org/fileadmin/security-team/bug32571/32571.diff
-
Https://typo3.org/teams/security/security-bulletins/typo3-core/typo3-core-sa-2011-004/
-
Http://news.typo3.org/news/article/important-security-bulletin-pre-announcement-2/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.