Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getshell in bigtreecms 4.2.18 #291

Closed
xfkxfk opened this issue Jun 5, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@xfkxfk
Copy link

commented Jun 5, 2017

Multiple Security Issue of php code execution exists in BigTree CMS Less than 4.2.18

FILE:
\BigTree-CMS-4.2.18\core\admin\modules\developer\extensions\install\unpack.php

        $file = $_FILES["file"]["tmp_name"];
	
	// Clean up existing area
	$cache_root = SERVER_ROOT."cache/package/";

	// Unzip the extension
	include BigTree::path("inc/lib/pclzip.php");
	$zip = new PclZip($file);

	// See if this was downloaded off GitHub (will have a single root folder)
	$zip_root = BigTreeUpdater::zipRoot($zip);
	if ($zip_root) {
		$files = $zip->extract(PCLZIP_OPT_PATH,$cache_root,PCLZIP_OPT_REMOVE_PATH,$zip_root);
	} else {
		$files = $zip->extract(PCLZIP_OPT_PATH,$cache_root);
	}

we can upload a zip file which containing the PHP code, then Unpacked to SERVER_ROOT/cache/package/xxx/yyy.php

POC:
1、build extension
2、Add modules, templates, callouts, field types, feeds, and settings to your extension.
3、Add additional files to your extension.
4、create extension
5、download extension(a zip file)
6、modify webshell content to php file in extension(a zip file)
7、install extension(Only upload can, do not install,to prevent being deleted)
8、the shell in SERVER_ROOT/cache/package/xxx/yyy.php
getshell

The same vulnerability exists in the file \BigTree-CMS-4.2.18\core\admin\modules\developer\packages\install\unpack.php

thank you~
email : xfkxfk@secbook.net

@timbuckingham

This comment has been minimized.

Copy link
Collaborator

commented Jun 10, 2017

Uploading third party code to your site is always a risk. Without code-signing extensions/packages there's no way around this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.