0x01 前言
在我们渗透或者漏洞挖掘的过程中,发现越来越多的网站使用webpack技术,开发人员通常会把api路由打包进js文件里。JSFinder这款工具可以帮助我们快速从js文件中提取api和其他敏感信息。

0x02 JSFinder初体验
以https://crossdock.tesla.cn/为例子,
python3 JSFinder.py -u https://crossdock.tesla.cn

如图,我们可以得到以下有意思的api
https://crossdock.tesla.cn/TMS2API/crossdocks/LicensePlateShipments?licensePlate=
https://crossdock.tesla.cn/TMS2API/crossdocks/Mobile/GetShipmentsByOriginAndDate
https://crossdock.tesla.cn/TMS2API/shipment/SCA/AddShipUnitsToShipment
https://crossdock.tesla.cn/internal/armada/shipment_trip_links
https://crossdock.tesla.cn/lambda/morpheus_get_crossdock_locations_by_email/invoke?supplierEmail=
还有一些子域名:
auth.sca.tesla.cn
api-graph.sca.tesla.cn
stg-crossdock.tesla.cn
test-auth.sca.tesla.cn
0x03 提取burpsuite流量里的js文件

链接保存到1.txt里

python3 JSFinder.py -f 1.txt -j

我们可以从中获得特斯拉域名的命名规律和开发写api路由的习惯~
0x04 Chrome插件推荐
https://github.com/ResidualLaugh/FindSomething

0x05 小彩蛋

等特斯拉修完我会申请公开。联合运用信息收集系列的技巧,想必大家也能发现很多有趣的漏洞。希望火线Zone的小伙伴们都能享受渗透和漏洞挖掘带来的快感~

0x06 参考
- https://github.com/Threezh1/JSFinder
- https://github.com/ResidualLaugh/FindSomething