0x01、配置文件
查找文件
如果能够命令执行,直接使用查找命令吧。。。
Linux 相关:
| 12
 3
 4
 5
 
 | find / -name filename.ext
 
 
 grep flag -r /
 
 | 
Windows 相关:
| 12
 3
 4
 5
 6
 7
 8
 9
 
 | for /r c:\ %i in (password.txt*) do @echo %i
 for /r c:\ %i in (*.ini) do @echo %i
 
 
 findstr /s /n "password" c:\*
 
 
 find /N /I "password" pwd.txt
 
 | 
常见的配置文件名
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 
 | httpd.conf
 
 
 my.ini
 
 
 httpd-vhosts.conf
 
 
 metabase.xml
 applicationHost.config
 
 
 /etc/ssh/sshd_config
 
 
 /etc/nginx/nginx.conf
 /etc/nginx/sites-enabled/default
 
 
 php.ini
 
 ./security/SerializedSystemIni.dat
 ./config/config.xml
 
 | 
Apache
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 
 | /etc/httpd/conf/httpd.conf
 
 
 /var/www/html/
 
 
 /etc/apache2/apache2.conf
 
 
 /private/var/log/apache2/error_log
 /private/var/log/apache2/access_log
 
 | 
IIS
MySQL
| 12
 3
 
 | /etc/my.cnf
 /etc/mysql/my.cnf
 
 | 
phpMyAdmin
| 12
 3
 4
 5
 
 | config.inc.php
 
 
 /var/www/phpmyadmin/config.inc.php
 
 | 
XAMPP 建站
相关路径
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 
 | xampp\htdocs
 
 
 xampp\apache\conf\httpd.conf
 
 
 xampp\apache\conf\ssl.conf
 
 
 xampp\apache\conf\perl.conf
 
 
 xampp\apache\conf\java.conf
 
 
 xampp\apache\conf\python.conf
 
 
 xampp/apache/conf/extra/httpd-vhosts.conf
 
 
 xampp\php\php.ini
 
 
 xampp\mysql\data
 
 
 xampp\mysql\bin\my.ini
 
 
 xampp\phpMyAdmin\config.inc.php
 
 
 xampp\FileZilla
 
 
 Server.xml Mercury
 
 
 xampp\MercuryMail\MERCURY.INI
 
 
 xampp\sendmail\sendmail.ini
 
 | 
默认密码
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 
 | User: root   Password:(空)
 
 
 User: newuser   Password: wampp
 User: anonymous   Password: some@mail.net
 
 
 Postmaster: postmaster (postmaster@localhost)
 Administrator: Admin (admin@localhost)
 TestUser: newuser   Password: wampp
 
 
 User: wampp   Password: xampp
 
 | 
phpStudy 建站
还记得几年前用 phpStudy 建站,贼费劲,可能是当时技术太差了,端口占用、数据库管理啥的都很乱,今天(2019年08月02日)在 Windows 上又搭了一次,发现啥问题也没遇到,技术、产品的更新换代真的太快了。
现在还出了个 pro 版本,所以路径也相对的有了变化,本文以 Pro 版为例,如果是普通版,去掉 Pro 即可。
相关路径
| 12
 3
 4
 5
 6
 7
 8
 9
 
 | phpstudy\WWW
 phpstudy_pro\WWW
 
 
 phpstudy_pro\WWW\phpMyAdmin4.8.5
 
 
 phpstudy_pro\Extensions\php\php7.3.4nts\php.ini
 
 | 
Nginx
| 1
 | 配置文件存放目录:/etc/nginx 主配置文件:/etc/nginx/conf/nginx.conf 管理脚本:/usr/lib64/systemd/system/nginx.service 模块:/usr/lisb64/nginx/modules 应用程序:/usr/sbin/nginx 程序默认存放位置:/usr/share/nginx/html 日志默认存放位置:/var/log/nginx 配置文件目录为:/usr/local/nginx/conf/nginx.conf 
 | 
0x03、敏感文件
探针等信息
在使用 XAMPP/LAMPP/phpStudy/PHPnow 建站时,可能留下来一些探针页面,可以找到一些可用的信息,比如 Document_Root 代表网站根目录,session.save_path 存放 Session 信息。
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 
 | 1.phpl.php
 p.php
 u.ph
 tz.php
 test.php
 info.php
 ceshi.php
 tanzhen.php
 phpinfo.php
 
 | 
Windows
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 
 | c:\boot.ini
 
 
 c:\windows\system32\inetsrv\MetaBase.xml
 
 
 c:\windows\repair\sam
 
 
 c:\ProgramFiles\mysql\my.ini
 
 
 c:\ProgramFiles\mysql\data\mysql\user.MYD
 
 
 c:\windows\php.ini
 
 | 
linux
Basic Linux Privilege Escalation
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 
 | /etc/passwd
 
 
 /etc/shadow
 
 
 /usr/local/app/apache2/conf/httpd.conf
 
 
 /usr/local/app/apache2/conf/extra/httpd-vhost.conf
 
 
 /usr/local/app/php5/lib/php.ini
 
 
 /etc/httpd/conf/httpd.conf
 
 
 /etc/my.conf
 
 | 
0x04、常见 CMS
DeDeCms
| 12
 3
 4
 5
 6
 7
 
 | /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
| 12
 
 | /wp-admin/includes/file.php/wp-content/themes/baiaogu-seo/footer.php
 
 | 
Ecshop
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 
 | /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
 /temp/compiled/goods_related.lbi.php
 /temp/compiled/page_header.lbi.php
 /temp/compiled/goods_script.html.php
 /temp/compiled/index.dwt.php
 /temp/compiled/goods_fittings.lbi.php
 /temp/compiled/myship.dwt.php
 /temp/compiled/brands.lbi.php
 /temp/compiled/help.lbi.php
 /temp/compiled/goods_gallery.lbi.php
 /temp/compiled/comments.lbi.php
 /temp/compiled/myship.lbi.php
 /includes/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php
 /includes/modules/cron/auto_manage.php
 /includes/modules/cron/ipdel.php
 
 | 
PHP168
| 12
 3
 4
 5
 
 | /admin/inc/hack/count.php?job=list/admin/inc/hack/search.php?job=getcode
 /admin/inc/ajax/bencandy.php?job=do
 /cache/MysqlTime.txt
 /PHPcms2008-sp4
 
 | 
CMSeasy
| 12
 3
 
 | /lib/mods/celive/menu_top.php/lib/default/ballot_act.php
 /lib/default/special_act.php
 
 | 
参考:https://my.oschina.net/u/4324366/blog/3442695