Leverage Leaked Credentials for Pwnageb
| 2024-6-26
字数 285阅读时长 1 分钟
In the ever-shifting world of logistics, Huge Logistics has emerged as an undisputed global leader. Yet, every Goliath has its vulnerabilities. Whispered rumors in cybersecurity circles suggest that amidst the vast digital sprawl of Huge Logistics, there might lie unnoticed weaknesses. As a seasoned security consultant, your mission is set: Navigate the labyrinth of Huge Logistics' GitHub repositories, looking for the smallest chink in their armor. Dive deep, analyze thoroughly, and leave no stone unturned. Can you spot what others have missed?
 
访问在 .env 中发现 AK 和数据库的账号密码
notion image
 
自己创个 IAM 用户,绑定上 sts:GetAccessKeyInfo 权限即可找到该 ak 对应的 account id
 
尝试用该 Account ID 以及 DB 的账号密码登录 IAM 用户
notion image
 
可以登录进去!最近访问一个个进去看看
notion image
 
先看 Secrets Manager,employee-database 可以查看,employee-database-admin 访问提示权限不足
notion image
 
查看 secret
notion image
 
连上后在 flag 表拿到 flag
notion image
 
防御
 
此外,其实也可以加个 .gitignore 不要把 .env 推到代码仓库
 
 
进一步阅读表明,这些案例挺多的
  1. https://rudrasarkar.medium.com/how-i-takeover-a-company-whole-database-after-got-laravel-env-file-and-protect-to-breach-data-e999148ed4d4
  1. https://www.trendmicro.com/en_ie/research/22/h/analyzing-hidden-danger-of-environment-variables-for-keeping-secrets.html
  1. https://johnjhacking.com/blog/indian-government-breach-disclosure/
  1. https://cybernews.com/security/bmw-exposes-italy-clients/
Loading...
目录