框架debug模式敏感信息泄露汇总
在渗透测试中,经常会遇到某些框架开启debug模式导致账号密码或者key泄露的情况。所以对常见的开发框架debug模式进行汇总。
Laravel
Laravel是一套流行的PHP Web开发框架,国外用得比较多。Laravel默认没有开启Debug,修改.env文件APP_DEBUG=true重启就能开启debug模式。项目上线后开发人员未关闭debug模式,导致敏感信息暴露在公网上。
Shodan 搜索语法
http.title:"Whoops!There was an error"


ThinkPHP
ThinkPHP在开启DEBUG的情况下会在Runtime目录下生成日志。
fofa 搜索语法
product=="ThinkPHP"

TP3:
/Runtime/Logs/ /App/Runtime/Logs/ /Application/Runtime/Logs/Admin/ /Application/Runtime/Logs/Home/ /Application/Runtime/Logs/App/ /Application/Runtime/Logs/Ext/ /Application/Runtime/Logs/Api/ /Application/Runtime/Logs/Test/ /Application/Runtime/Logs/Common/ /Application/Runtime/Logs/Service/ /Application/Runtime/Logs/
TP5:
/runtime/log/
日志格式如下: 时间戳前缀的log。
tp3 19_01_01.log 1550651608-19_02_20.log tp5 /runtime/log/201808/07.log /runtime/log/201808/07_cli.log
这样的话日志很容易被猜解到,而且日志里面有执行SQL语句的记录。

在日志中搜索password关键字,查找日志中的sql语句。

Django
Django的debug模式做了敏感信息处理,所有的密码和密钥均会以星号显示,所以相对安全了很多。
Shodan 搜索语法
http.title:"DisallowedHost at /"



微信赞赏
支付宝赞赏
发表评论