|
1 | | -=== Find the Slack API Token |
| 1 | +=== Find the Slack Webhook URL |
2 | 2 |
|
3 | | -Welcome to this challenge that demonstrates the vulnerability of hardcoded Slack API tokens in environment variables! |
| 3 | +Welcome to this challenge that demonstrates the vulnerability of hardcoded Slack webhook URLs in environment variables! |
4 | 4 |
|
5 | 5 | This challenge simulates a real-world scenario where: |
6 | 6 |
|
7 | | -1. **Slack API tokens are stored as environment variables** for application integration |
8 | | -2. **The tokens are obfuscated** to avoid detection by secret scanning tools |
9 | | -3. **Employee turnover risk**: When an employee leaves, the token may not be rotated, allowing continued access |
| 7 | +1. **Slack webhook URLs are stored as environment variables** for application notifications |
| 8 | +2. **The URLs are obfuscated** to avoid detection by secret scanning tools |
| 9 | +3. **Employee turnover risk**: When an employee leaves, the webhook may not be rotated, allowing continued access |
10 | 10 |
|
11 | 11 | ==== Your Mission |
12 | 12 |
|
13 | | -In this scenario, a developer has stored a Slack API token as an environment variable `CHALLENGE59_SLACK_TOKEN`. The token has been obfuscated using double base64 encoding to bypass Slack's secret scanning detection. |
| 13 | +In this scenario, a developer has stored a Slack webhook URL as an environment variable `CHALLENGE59_SLACK_WEBHOOK_URL`. The URL has been obfuscated using double base64 encoding to bypass Slack's secret scanning detection. |
14 | 14 |
|
15 | 15 | Your task is to: |
16 | 16 |
|
17 | | -1. Find the obfuscated Slack API token in the environment variable |
18 | | -2. Deobfuscate it to reveal the original token |
19 | | -3. Submit the deobfuscated token as your answer |
| 17 | +1. Find the obfuscated Slack webhook URL in the environment variable |
| 18 | +2. Deobfuscate it to reveal the original URL |
| 19 | +3. Submit the deobfuscated webhook URL as your answer |
20 | 20 |
|
21 | 21 | ==== Real-World Impact |
22 | 22 |
|
23 | | -This vulnerability demonstrates why: |
| 23 | +This vulnerability demonstrates the specific risks of exposed Slack webhook URLs: |
24 | 24 |
|
25 | | -- Hardcoded secrets in environment variables are risky |
26 | | -- Obfuscation is not a security measure |
27 | | -- API tokens should be rotated when employees leave |
28 | | -- Proper secrets management solutions should be used |
| 25 | +- **Unauthorized message posting**: Attackers can send malicious messages to your Slack channels |
| 26 | +- **Social engineering attacks**: Fake announcements or phishing attempts via trusted channels |
| 27 | +- **Information disclosure**: Sensitive channel names and workspace information revealed |
| 28 | +- **Reputation damage**: Spam or inappropriate content posted under your organization's name |
| 29 | +- **Obfuscation is not security**: Base64 encoding provides no real protection |
| 30 | +- **Webhook persistence**: Unlike tokens, webhooks may remain active for extended periods |
29 | 31 |
|
30 | 32 | ==== Educational Note |
31 | 33 |
|
32 | 34 | In production environments: |
33 | 35 | - Use proper secrets management (AWS Secrets Manager, Azure Key Vault, HashiCorp Vault) |
34 | | -- Implement token rotation policies |
35 | | -- Monitor API token usage |
36 | | -- Revoke access immediately when employees leave |
| 36 | +- Implement webhook rotation policies when employees leave |
| 37 | +- Monitor webhook usage and establish alerts for unusual activity |
| 38 | +- Revoke and regenerate webhooks immediately when employees leave |
37 | 39 | - Never obfuscate secrets as a security measure |
| 40 | +- Consider using webhook signing secrets for additional validation |
0 commit comments