Skip to content

Commit 1d4ed0a

Browse files
Copilotcommjoen
andcommitted
Update Challenge 59 documentation to use webhook URLs instead of tokens and clarify webhook-specific risks
Co-authored-by: commjoen <[email protected]>
1 parent e35f2fb commit 1d4ed0a

File tree

2 files changed

+34
-29
lines changed

2 files changed

+34
-29
lines changed
Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,40 @@
1-
=== Find the Slack API Token
1+
=== Find the Slack Webhook URL
22

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!
44

55
This challenge simulates a real-world scenario where:
66

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
1010
1111
==== Your Mission
1212

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.
1414

1515
Your task is to:
1616

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
2020

2121
==== Real-World Impact
2222

23-
This vulnerability demonstrates why:
23+
This vulnerability demonstrates the specific risks of exposed Slack webhook URLs:
2424

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
2931

3032
==== Educational Note
3133

3234
In production environments:
3335
- 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
3739
- Never obfuscate secrets as a security measure
40+
- Consider using webhook signing secrets for additional validation
Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
=== Hint for Challenge 59
22

3-
Looking for the Slack API token? Here are some hints to get you started:
3+
Looking for the Slack webhook URL? Here are some hints to get you started:
44

55
==== Where to Look
66

7-
1. **Environment Variables**: The token is stored in an environment variable called `CHALLENGE59_SLACK_TOKEN`
7+
1. **Environment Variables**: The webhook URL is stored in an environment variable called `CHALLENGE59_SLACK_WEBHOOK_URL`
88
2. **Check the Application**: You can inspect environment variables through the application or container
99

1010
==== Deobfuscation Process
1111

12-
The token has been obfuscated using a common technique:
12+
The webhook URL has been obfuscated using a common technique:
1313

14-
1. **Double Base64 Encoding**: The original token has been base64 encoded twice
14+
1. **Double Base64 Encoding**: The original URL has been base64 encoded twice
1515
2. **Process**: Original → Base64 → Base64 again
1616
3. **To decode**: Reverse the process (decode base64 twice)
1717

1818
==== What You're Looking For
1919

20-
- Slack API tokens typically start with `xoxb-` for bot tokens
21-
- They follow the pattern: `xoxb-numbers-numbers-letters`
22-
- Example format: `xoxb-1234567890-1234567890-abcdefghijklmnopqrstuvwx`
20+
- Slack webhook URLs follow the pattern: `https://hooks.slack.com/services/...`
21+
- They contain three path segments after `/services/`
22+
- Example format: `https://hooks.slack.com/services/T123456789/B123456789/abcdefghijklmnopqrstuvwx`
23+
- The URL segments represent: Team ID / Channel ID / Secret Token
2324

2425
==== Tools You Can Use
2526

@@ -29,8 +30,9 @@ The token has been obfuscated using a common technique:
2930

3031
==== Security Learning
3132

32-
This challenge teaches you:
33-
- How attackers find obfuscated secrets
34-
- Why obfuscation is not encryption
35-
- The importance of proper secrets management
36-
- Risk of hardcoded tokens in environment variables
33+
This challenge teaches you about webhook-specific risks:
34+
- How attackers can find obfuscated webhook URLs
35+
- Why webhook URLs are sensitive credentials that need protection
36+
- The potential for unauthorized message posting and social engineering
37+
- Risk of hardcoded webhook URLs in environment variables
38+
- How exposed webhooks can lead to reputation damage and information disclosure

0 commit comments

Comments
 (0)