路径与敏感信息发现

路径与敏感信息发现概述一般网站主站信息都比较少,我们需要在渗透测试过程的信息搜集阶段,我们可能会自动化工具获得来网站其他路径如:后台、其他未授权访问路径,扫描得到敏感文件的路径,从而找到敏感数据。
根据路径爆破工具进行使用与测评分析工具的特点,批量访问发现的路径查找敏感路径。工具爬虫扫描得到敏感文件的路径,找到敏感数据。
使用爆破工具进行破解参考工具:
dirsearch:https://github.com/maurosoria/dirsearch
OneForAll:https://github.com/shmilylty/OneForAll.git
virustotal:https://www.virustotal.com
子域名自动化搜索:https://d.chinacycc.com
dnsdumpster:https://dnsdumpster.com
FeeiCN :[url=]https://github.com/FeeiCN/esd[/url]
御剑
DirBuster
intellitamper
dirmap
工具介绍Dirsearch:一种高级的命令行工具,旨在对web服务器中的目录和文件进行暴力破解。
(一)下载dirsearch步骤
1. git clone https://github.com/maurosoria/dirsearch.git//kali上输入指令下载源码安装包
2. cd dirsearch   //切换路径
3. python3 dirsearch.py -u <URL> -e <EXTENSION>     //-u(url地址)-e (EXTENSION指网站语言,如php、asp)
(二)附上dirsearch使用手册:
https://blog.csdn.net/yigaoyu/article/details/108473952
在kali上的dirsearch目录下的README.md文件也有使用方法


(三)模拟暴力破解敏感路径(靶机的目标ip/510cms)
Dirsearch/db目录下存放暴力破解所需的字典,可以从中增添字段,充实加强字典库。

(四)接下来在kali中输入./dirsearch.py -u http://10.10.10.1/510cms -e php --plain-text-report=/su.txt
进行路径的暴力破解
回显的信息有访问网页html的状态码status,回复包的长度length,以及网站的路径


(五)--plain-text-report=/su.txt这条命令为将输出报告放到kali指定的路径下面

(六)默认输出报告位置如下:/dirsearch/reports

OneForAll:一款功能强大的子域收集工具
子域名自动化搜索:扩大渗透测试范围,找到目标站点突破口,业务边界安全
(一)安装过程:
1. 下载更新:git clone https://github.com/shmilylty/OneForAll.git
2. 安装依赖包:
3. cd /OneForALL
4. pip install -r requirements.txt
5. OneForALL源码链接:https://github.com/shmilylty/OneForAll
6. 执行操作指令./oneforall.py --target http://xxx.com run


(二)扫描输出的文件存放在/OneForALL/results 目录下
会生成一个表格数据文件(.csv),方便用户查看

(三)可以将csv文件复制到windows系统中,查看xxx.com.csv文件(csv文件信息有:域名,url,ip,回复包状态码,title,banner,isp等)

对路径进行批量访问查找敏感路径敏感路径:后台路径与返回含有重要的敏感信息的文件的路径,比如数据库文件、代码的备份文件或svn、git版本控制文件等
首先了解敏感的信息文件的后缀,如.mdb  .zip   .rar  .txt  .git  .svn等
然后构造url+后缀名的访问请求,即可查找和验证敏感文件是否存在
(一)简易枚举敏感路径脚本,通过url+后缀名来访问网站,从得到的状态码判断路径是否存在。
注:该网站为本机的测试网站
# -*- coding:utf-8 -*-
from typing import TextIO
import requests
url = 'http://www.xxx.com/'
with open("web.txt","r") as web:
webs=web.readlines()
for web in webs:
web=web.strip()
u = url+web
r = requests.get(u)
# print("url为:"+u)
print("url为:"+u+' '+"状态为:%d"%r.status_code)
w=open('write.txt','w+')
for web in webs:
web = web.strip()
u = url + web
r = requests.get(u)
w.write("url为:"+u+' '+"状态为:%d"%r.status_code+"\n")
运行结果图如下

(二)御剑后台扫描器,同理可得通过写入的域名+路径配置文件,最后判断状态码是否为200,是则回显,否则不回显。
注:该网站为本机的测试网站

(三)intellitamper软件路径枚举
注:该网站为本机的测试网站

(四)获取敏感文件
注:该网站为本机的测试网站
网站源码备份文件存放在根目录下,以至于用户可以访问并且下载网站源码备份文件

源码备份存在着敏感数据库备份文件(.sql)以及敏感路径和配置文件信息等敏感文件
攻击者可以通过代码审计等方法对网站进一步的渗透

config.php为网站的配置文件,里面存放连接数据库的主机的ip、user、password、数据库名等敏感信息

510cms.sql文件就是一个备份的数据库文件,其中可能存放网站的敏感信息(网站后台的账号密码等)

通常数据库的密码为md5加密,我们可以放在网上的在线md5解密网站进行解密

访问后台路径10.10.10.1/510cms/admin,该网页存在敏感路径泄露(目录遍历),用户可以实现路径穿越


总结:在渗透过程中,目录爆破是比较重要的一个环节,获取的子域名和敏感路径越充分,对后续的渗透利用也就越有利。实际上系统的不同以及建站厂商的不同,敏感路径以及一些网站建设上存在着差异,所以还是需要我们去多多了解更多的知识点。

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
IntelliTamper v2.0 Beta 7 (Januray-2001) ========================================= Program by Igor Kouzmine (tamper@engineer.com) Homepage : http://www.multimania.com/intellitamper Copyright (c) 1999-2001 by LaCaveProds Note : The following document hasn't been updated since IntelliTamper v2.0 Beta 4 and is quite old about new features. It will be updated soon. Table of content ---------------- 1.1 Introduction 1.2 Important notice 1.3 Legal distribution 1.4 Known limitations 1.5 Translation of program and documentation 1.6 Version history 1.7 Extras for Beta-Testers 1.8 The little ToDo list 1.1 Introduction ---------------- Tired of closing and jumping between multiple popup windows, thousands of stupid links on a single page, sites without real content and only ads, etc... ? IntelliTamper is a simple and easy-to-use program which will tell you what is really behind a website. Just type in the address, let IntelliTamper works and read the dirty pages for you, and you will be able to access the files and browse the folders like if they were on your own hard-disk ! IntelliTamper is also available to scan a website for unlisted and private files and folders with a dictionnary scan. Results are displayed in real time in the window with various informations about progression. Files and folders found are displayed in a friendly mini Windows-Explorer. If you have any suggestion or bug reports, feel free to send them to me ! 1.2 Important notice -------------------- This program has not been designed to be a web site plague tool, but it should not be used blindly on any web site. In anyway the author can not be liable of any misuse of IntelliTamper, of any data lose or any problem that could result of the use of this program. You must be aware that using this program on a web site can overload the server and slow down its normal use by others users. You must be aware that many web sites servers use heavy logs analyzers to check if nobody is trying to "hack" the site. When you use this program your IP is not masked and trying to discover hidden files or folders could be interpreted as a "hacking method"... 1.3 Legal distribution ---------------------- IntelliTamper is a freeware program, feel free to distribute it all around the world as long as the program and its files remain unmodified, apart catalog and documentation files for a translation purpose. 1.4 Known limitations --------------------- * Links in JavaScript, VisualBasicScript, etc... are not parsed at the moment and will be ignored. * Currently, the program only "reads" links in these most popular tags : - <BODY ... BACKGROUND="link"> - <A HREF="link"> - <FRAME ... SRC="link"> - <IMG SRC="link"> - <LINK ... HREF="link"> - <AREA ... HREF="link"> * When trying to discover hidden files and folders on web sites like www.yahoo.com, they will accept every name you give them, without return a 404 error code if the page doesn't exist. So the program will display all files and all folders tried even if they don't really exist on the web site. 1.5 Translation of text catalog and documentation ------------------------------------------------- IntelliTamper uses the "Catalog Concept" from LaCaveProds to allow a direct and easy translation of texts displayed in the program. I recommend you to use CatalogEditor to edit the catalog file, it's available here : http://www.multimania.com/lacave/prods/ If you have translated the catalog file and the documentation, please send them to me so they can be directly downloadable on the official homepage of IntelliTamper. 1.6 Program history ------------------- v2.0 Beta 4 (December-1999) : - Faster internal code. - Better multitasking by using multiple Threads for downloads. v2.0 Beta 3 (December-1999) : - New way to handle website address, using standard defined in HTTP standard RFC (http://www.anysite.com:1234/address/). - Many bugs killed. v2.0 Beta 2 (November-1999) : - Main window can now be resized to full screen. - Many bugs killed. Where are the next ?... v2.0 Beta 1 (September-1999) : - Full program conversion into C language. - Faster and smaller executable (without boring VB DLLs) - Many many bugs to kill... v1.1 (September-1999) : - Various optimization and better list view of found items. v1.0 (January-1999) : - First version of the program in VisualBasic 6. 1.7 Extras for Beta-Testers --------------------------- Beta-Testers should use a special version of the program which generate a detailed log file of internal activity of IntelliTamper in the C:\TEMP folder. This log file is designed to help the author to find the origins of the problems. Please do not send me too big log files without to zip them with WinZip or so on. If the program failed on a precise URL, email me this URL instead of the log file, so I can try it by myself. Thanks for your support and don't forget to join the forum ! 1.8 The little ToDo list ------------------------ Here are some future options, if you have new ideas... - Discover the real name of the default page. - Add files and folders names found in public scan to dictionnaries. - Save a full given folder to local harddisk. - Multi-selection of files to download in the files list. - Handle access to protected website needing an user name and password. ---

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值