项目说明
HowPwndAmI 🔒
A defensi tool that assesses your local system for credential exposure , helping you understand what could be compromised in a supply chain attack (like the Shai-hulud ).
⚡ New user? Start with the Quick Start Guide (60 seconds to your first scan!)
What It Does
This tool performs a reconnaissance scan on your local system to identify:
🔑 En : Sensiti, API keys, and secrets loaded in memory📁 Configuration Files: Cloud provider credentials, SSH keys, Docker configs, etc.📜 Shell History: Accidentally exposed credentials in command history💾 Browser Storage: Session tokens in browser local storage📂 Current Directory: Credential files in your working directoryAll sensitive data is redacted in the output to prevent accidental exposure.
Quick Start
See USAGE.md for ad usage, CI/CD integration, and programmatic examples.
Why This Matters
Supply chain attacks can compromise de tools and gain access to:
Your AWS/GCP/Azure credentialsGitHub tokens and SSH keysDatabase connection stringsAPI keys in en Docker registry credentialsKubernetes cluster accessThis tool shows you what's at risk so you can take action.
What It Checks
En
AWS credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)Cloud provider tokens (GCP, Azure)API keys (GitHub, OpenAI, Anthropic, Stripe, etc.)Database URLs and passwordsAny matching patterns like *KEY*, *SECRET*, *TOKEN*Configuration Files
~/.aws/credentials - AWS credentials~/.ssh/id_* - SSH private keys~/.docker/config.json - Docker registry auth~/.kube/config - Kubernetes cluster access~/.netrc - Network authentication~/.npmrc, ~/.pypirc - Package registry credentialsAnd 20+ more common locationsShell History
Scans for commands that may ha credentials:
export SECRET_KEY=...curl -H "Authorization: Bearer ..."Git URLs with embedded passwordsCloud CLI commands with inline credentialsCurrent Directory
Looks for common credential file patterns:
.env and .env.* files*.pem, *.key filessecrets.*, credentials.* filesService account JSON filesUnderstanding the Output
Risk Levels
CRITICAL: Credentials actively loaded in memory (en )HIGH: Credentials in files with broad permissions or command historyMEDIUM: Properly secured credential files (restricti)LOW: Informational findingsINFO: General security obserSample Output
Remediation Strategies
Immediate Actions
1.
Rotate any exposed credentials - Especially those with overly broad permissions
2.
Fix file permissions:
chmod 600 ~/.ssh/id_rsa ~/.aws/credentials3.
Clear shell history:
history -c (or selectively remo)
4.
Remove .en from git: Add to
.gitignoreLong-term Best Practices
1.
Use credential managers - 1Password, LastPass, macOS Keychain
2.
Implement short-li - AWS STS, temporary tokens
3.
Enable MFA - On all critical services
4.
Use secret scanning - GitHub secret scanning, pre-commit hooks
5.
Rotate regularly - Automated credential rotation policies
6.
Principle of least pri - Minimal scoped permissions
Limitations
This tool provides a point-in-time snapshot of your local exposure. It does not:
Monitor network traffic for credential leakageCheck credentials against breach databases if credentials are still activeScan encrypted or secure enclavesReplace comprehensi auditingRequirements
Python 3.7+No external dependencies (uses only stdlib)Works on macOS, Linux, and Windows (with some platform-specific differences)Privacy & Security
Runs entirely locally - No data leaves your machineRedacts sensiti - Only shows first/last 4 charactersRead-only operations - Ne files or enOpen source - Review the code yourselfContributing
Found a common credential location we're missing? Submit a PR!
Common additions:
Cloud provider credential pathsIDE/editor credential storesDatabase client credential filesCI/CD tool configurationsLicense
MIT License - Use freely for personal or commercial defensi purposes.
Disclaimer
This tool is intended for defensi and authorized security testing only. Use it to:
✅ Audit your own systems✅ Security awareness training✅ Compliance assessments✅ De workflowsDo not use for unauthorized access or malicious purposes.
---
Stay safe out there! 🛡️
项目信息
开发语言:Python
Star 数:4
技术要点
该项目属于防护思路方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕A defensive security tool that assesses your local system for credential exposure vulnerabilities, helping you understand what could be compromised in a supply chain attack (like the Shai-hulud vulnerability).展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
使用与学习建议
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
免责声明
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。