2025λ…„ 11μ›” 22일

Web servers worldwide are experiencing a surge in automated attacks targeting hidden folders such as .env, .aws, and .git. These attacks aim to steal sensitive data including API keys, database passwords, and cloud credentials, often due to misconfigured servers or careless deployment.


🚨 What Attackers Are Trying to Access

Automated attack bots scrape servers for sensitive files like:

GET /.env
GET /.aws/credentials
GET /.git/config
GET /.vscode/settings.json
GET /.npmrc
GET /config/database.yml
  • Database login information
  • AWS access keys
  • Git repository endpoints
  • Package publishing tokens

One exposed file is enough to compromise an entire system.


πŸ’£ Real-World Security Impact

  • .env leak β†’ DB credentials stolen β†’ full data dump
  • .aws/credentials leak β†’ unauthorized access to S3 / Lambda / CloudWatch
  • .git exposure β†’ source code, internal endpoints, and tokens leaked
  • .npmrc leak β†’ malicious package uploads under your identity

πŸ”’ How to Protect Your Server Immediately

1️⃣ Move hidden folders outside the web root

/var/www/html/.env
/var/www/html/.aws/
/var/www/html/.git/

2️⃣ Block dotfiles in Nginx / Apache

Nginx:

location ~ /\. {
    deny all;
    return 404;
}

Apache:

<FilesMatch "^\.">
    Require all denied
</FilesMatch>

3️⃣ Never commit .env files

Use environment variables, Docker Secrets, or CI/CD Secrets.

4️⃣ Monitor logs for suspicious access attempts

/.env
/.git
/.aws/credentials

Block repeated offenders and consider adding automated alerts.


⚠️ Final Warning

If a sensitive file is accessible from the web, assume it is already leaked.

Attackers check hidden folders before anything else. Protect .env, .aws, .git, and all dotfiles immediately.


λ‹΅κΈ€ 남기기

이메일 μ£Όμ†ŒλŠ” κ³΅κ°œλ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. ν•„μˆ˜ ν•„λ“œλŠ” *둜 ν‘œμ‹œλ©λ‹ˆλ‹€