search 登录 注册
arrow_back返回列表
ID:2829
light_mode
Lv.2 独赏二月雪
edit_note帖子 181
stars积分 41,982
event加入 2010-12-04
电脑网络

MyBB所有版本远程命令执行总结

schedule发表于 2012-10-24 17:46:00 visibility查看 848 chat_bubble回复 2
#1 楼主
源码下载 : http://www.mybb.com/download/latest


文件: /inc/3rdparty/diff/Diff/Engine/shell.php

Bug 部分源码:
$$fp = fopen($$to_file, ‘w‘);
fwrite($$fp, implode(“\n“, $$to_lines));
fclose($$fp);
$$diff = shell_*($$this->_diff* . ‘ ‘ . $$from_file . ‘ ‘ . $$to_file);
unlink($$from_file);
unlink($$to_file);
证明:

$$_GET + shell_*() = * *ution

缺陷描述:

An attacker might *ute arbitrary system *s with this vulnerability. User tainted data is used when creating the * that will be *uted on the underlying operating system. This vulnerability can lead to full server compromise.

缺陷示例代码:
1: *(“./crypto -mode “ . $$_GET[“mode“]);

proof of concept :

/index.php?mode=1;sleep 10;

补丁:

Limit the code to a very strict character subset or build a whitelist of allowed *s. Do not try to filter for evil *s. Try to avoid the usage of system * *uting functions if possible.

1: $$modes = array(“r“, “w“, “a“); if(!in_array($$_GET[“mode“], $$modes)) exit ;
r

D3m0 :

http://www.minuteworkers.com/forum/inc/3rdparty/diff/Diff/Engine/shell.php?Find It In Source=RCE

http://www.artistsuniverse.org/forum/inc/3rdparty/diff/Diff/Engine/shell.php?Find It In Source=RCE
#########################################################
We are : K0242 | Nafsh | Ehram.shahmohamadi

全部回复 (2)

ID:19677
light_modedark_mode
Lv.6 胸怀六国志
2012-10-24 17:51:00 沙发
这帖不错,该顶!
ID:123767
dark_modedark_modedark_modestarstarstar
Lv.1 韶华一笑间
2012-10-24 17:52:00 板凳
看帖回帖是美德!
登录 后才能回复