天天看點

通過phpMyadmin背景擷取shell(getshell)通過phpMyadmin背景擷取shell

通過phpMyadmin背景擷取shell

前提:

1.要知道靶機的mysql使用者名和密碼

2.能成功登入到靶機phpmyadmin中

先登入對方phpmyadmin

然後找到執行sql語句的架構

1.開啟日志

通過phpMyadmin背景擷取shell(getshell)通過phpMyadmin背景擷取shell

2.指定日志寫入的檔案,就是一句話木馬寫入的路徑

注意:一定注意路徑的斜杠一定是/不是複制的路徑

通過phpMyadmin背景擷取shell(getshell)通過phpMyadmin背景擷取shell

檢視靶機根目錄,發現建立成功

通過phpMyadmin背景擷取shell(getshell)通過phpMyadmin背景擷取shell

3.寫入一句話木馬

通過phpMyadmin背景擷取shell(getshell)通過phpMyadmin背景擷取shell

通路一下

通過phpMyadmin背景擷取shell(getshell)通過phpMyadmin背景擷取shell

然後擷取shell

通過phpMyadmin背景擷取shell(getshell)通過phpMyadmin背景擷取shell

4.模糊查詢嗅探

通過phpMyadmin背景擷取shell(getshell)通過phpMyadmin背景擷取shell

5.這是檢視寫入權限的值

通過phpMyadmin背景擷取shell(getshell)通過phpMyadmin背景擷取shell

要是value為NULL 則代表無法導出

要是value為空值 則代表導出和導入沒有限制

要是value為/www 則代表導出和導入隻能到www目錄中

6.修改secure_file_priv的方式

首先再mysql指令檢視

通過phpMyadmin背景擷取shell(getshell)通過phpMyadmin背景擷取shell

在my.ini下裡的[mysqld] 加入 secure_file_priv =

檔案位置

通過phpMyadmin背景擷取shell(getshell)通過phpMyadmin背景擷取shell

添加

通過phpMyadmin背景擷取shell(getshell)通過phpMyadmin背景擷取shell

重新開機phpstudy

然後開啟

通過dumpfile導出 也可以 使用outfile寫入

寫入一句話

然後可以上傳此目錄