天天看點

Windows linux 敏感目錄 路徑彙總0x01、 基本資訊0x02、配置檔案0x03、敏感檔案0x04、常見 CMS

0x01、 基本資訊

遇到檔案包含、任意檔案下載下傳等漏洞的時候,可以結合這篇文章,進行下一步攻擊。

0x02、配置檔案

查找檔案

如果能夠指令執行,直接使用查找指令吧。。。

Linux 相關:

# 查找檔案
find / -name filename.ext

# 全盤查找含有 flag 的檔案
grep flag -r /
           

Windows 相關:

# 全盤查找檔案,一定要加一個星号!
for /r c:\ %i in (password.txt*) do @echo %i
for /r c:\ %i in (*.ini) do @echo %i

# 查找 C 盤中包含 password 字樣的檔案,一定要雙引号!
findstr /s /n "password" c:\*

# 查找 pwd.txt 中是否包含 password 字樣,一定要雙引号!
find /N /I "password" pwd.txt
           

常見的配置檔案名

# apache
httpd.conf

# MySQL
my.ini

# 虛拟主機配置
httpd-vhosts.conf

# IIS
metabase.xml
applicationHost.config

# ssh
/etc/ssh/sshd_config

# nginx
/etc/nginx/nginx.conf
/etc/nginx/sites-enabled/default

# PHP
php.ini
# weblogic 讀密碼
./security/SerializedSystemIni.dat
./config/config.xml
           

Apache

# 配置檔案路徑
/etc/httpd/conf/httpd.conf

# 預設站點路徑
/var/www/html/

# ubuntu 下配置檔案
/etc/apache2/apache2.conf

# 通路日志和錯誤日志
/private/var/log/apache2/error_log
/private/var/log/apache2/access_log
           

IIS

# 配置檔案
web.config
           

MySQL

# 配置檔案
/etc/my.cnf
/etc/mysql/my.cnf 
           

phpMyAdmin

# 配置檔案
config.inc.php

# 預設路徑
/var/www/phpmyadmin/config.inc.php
           

XAMPP 建站

相關路徑

# 網站預設路徑
xampp\htdocs

# Apache 基本配置
xampp\apache\conf\httpd.conf

# Apache SSL
xampp\apache\conf\ssl.conf

# Apache Perl(僅限插件)
xampp\apache\conf\perl.conf

# Apache Tomcat(僅限插件)
xampp\apache\conf\java.conf

# Apache Python(僅限插件)
xampp\apache\conf\python.conf

# 虛拟主機
xampp/apache/conf/extra/httpd-vhosts.conf

# PHP
xampp\php\php.ini

# 資料庫預設路徑
xampp\mysql\data

# MySQL
xampp\mysql\bin\my.ini 

# phpMyAdmin
xampp\phpMyAdmin\config.inc.php

# FileZilla FTP 伺服器
xampp\FileZilla

# FTP\FileZilla 
Server.xml Mercury 

# 郵件伺服器基本配置
xampp\MercuryMail\MERCURY.INI 

# Sendmail
xampp\sendmail\sendmail.ini 
           

預設密碼

# MySQL
User: root   Password:(空)

# FileZilla FTP
User: newuser   Password: wampp
User: anonymous   Password: [email protected]

# Mercury
Postmaster: postmaster ([email protected]) 
Administrator: Admin ([email protected]) 
TestUser: newuser   Password: wampp 

# WEBDAV
User: wampp   Password: xampp
           

phpStudy 建站

還記得幾年前用 phpStudy 建站,賊費勁,可能是當時技術太差了,端口占用、資料庫管理啥的都很亂,今天(2019年08月02日)在 Windows 上又搭了一次,發現啥問題也沒遇到,技術、産品的更新換代真的太快了。

現在還出了個 pro 版本,是以路徑也相對的有了變化,本文以 Pro 版為例,如果是普通版,去掉 Pro 即可。

相關路徑

# 根目錄
phpstudy\WWW
phpstudy_pro\WWW

# phpMyAdmin
phpstudy_pro\WWW\phpMyAdmin4.8.5

# php:Pro 版本,以擴充的方式來顯示插件。
phpstudy_pro\Extensions\php\php7.3.4nts\php.ini
           

0x03、敏感檔案

探針等資訊

在使用 XAMPP/LAMPP/phpStudy/PHPnow 建站時,可能留下來一些探針頁面,可以找到一些可用的資訊,比如 Document_Root 代表網站根目錄,session.save_path 存放 Session 資訊。

1.php
l.php
p.php
u.ph
tz.php
test.php
info.php
ceshi.php
tanzhen.php
phpinfo.php
           

Windows

# 檢視系統版本
c:\boot.ini

# IIS配置檔案
c:\windows\system32\inetsrv\MetaBase.xml 

# 存儲Windows系統初次安裝的密碼
c:\windows\repair\sam 

# MySQL配置
c:\ProgramFiles\mysql\my.ini 

# MySQL root密碼
c:\ProgramFiles\mysql\data\mysql\user.MYD 

# php 配置資訊
c:\windows\php.ini 
           

linux

Basic Linux Privilege Escalation

# 賬戶資訊
/etc/passwd

# 賬戶密碼檔案
/etc/shadow

# Apache2預設配置檔案
/usr/local/app/apache2/conf/httpd.conf

# 虛拟網站配置
/usr/local/app/apache2/conf/extra/httpd-vhost.conf

# PHP 配置檔案
/usr/local/app/php5/lib/php.ini

# Apache 配置檔案
/etc/httpd/conf/httpd.conf

# MySQL 配置檔案
/etc/my.conf       
           

0x04、常見 CMS

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
/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

/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

/lib/mods/celive/menu_top.php
/lib/default/ballot_act.php
/lib/default/special_act.php
           

繼續閱讀