Skip to content
Pwnversity
AUD-SLACKintermediate · 14 min · upd. 2026-11

Auditing Slack

SlackSaaStokens

Everything a company does not write down anywhere else ends up in Slack: decisions, internal links, screenshots, code snippets and, far too often, passwords and API keys pasted “just for a second”. It is also the channel where employees trust whoever is writing to them. An attacker who gets into Slack has a historical archive to read and a place to ask for things as if they were a colleague. The audit reviews who can get in and how long their session lasts, which apps read the messages and what leaves the organization.

Slack runs the platform. The customer decides:

  • how people sign in and for how long;
  • who can invite, and with which account type;
  • which channels are shared with other organizations;
  • which apps are installed and with which permissions;
  • what can be exported or published;
  • whether anyone reads the logs.
flowchart LR
    U["Employees"] -->|"SSO or 2FA,<br/>session duration"| S(("Slack<br/>workspace or org"))
    G["Guests"] -->|"specific<br/>channels"| S
    X["Other organizations"] <-->|"Slack Connect"| S
    A["Apps and bots<br/>xoxb- / xoxp- tokens"] -->|"OAuth scopes"| S
    W["Incoming webhooks<br/>hooks.slack.com/services/…"] -->|"post to<br/>a channel"| S
    S --> E["Exports and<br/>public file links"]
    S --> L["Audit logs and<br/>anomaly events"]
    S --> AI["Slack AI<br/>searches what the user can see"]

Many controls depend on the plan. The first step is to note which one the customer has, because it changes which recommendations are possible:

Control Available on
Mandatory 2FA for everyone Turned on by Workspace Owners and Admins
Session duration Pro, Business+ and Enterprise
SAML SSO Business+ and Enterprise (on Free and Pro only with a connected Salesforce org)
SCIM provisioning Business+ and Enterprise
Audit logs, Audit Logs API and anomaly events Enterprise
  • Mandatory SSO. It can be required for everyone, for everyone except guests, or optional. If it is optional, the Slack password still works and bypasses the IdP’s policies (see Okta).
  • Mandatory 2FA when there is no SSO.
  • Session duration. Check that it is set. While the session is open, a browser’s Slack cookie is enough to get in without authenticating again. A short session limits the value of a cookie stolen by an infostealer.
  • Offboarding. An account still active after the employee has left is a finding. With SCIM, deactivation in the IdP reaches Slack.

Who is inside: invitations, guests and Slack Connect

Section titled “Who is inside: invitations, guests and Slack Connect”
  • Invitations. By default, owners, admins and members can send invitations. Admin approval can be required for all of them.
  • Approved domains. Anyone with an email address on an approved domain joins on their own. Check that those domains belong to the company and still do; a domain that expired and was bought by someone else can open the door (see the abandoned domains case in Google Workspace).
  • Guests. For contractors and clients, guest accounts limited to the channels they need and with an expiry date.
  • Slack Connect. Every channel shared with another organization is a boundary:
    • review the list of connected organizations;
    • review who can approve new channels;
    • apply your own retention and DLP policies in those channels.

By default, any member can install apps without an owner’s approval. With Require approved apps:

  • members can only install pre-approved apps;
  • the rest are requested and reviewed by an owner or an app manager;
  • restricting an app that is already installed does not uninstall it: it has to be removed separately.
Credential Prefix What to know
Bot token xoxb- Acts as the app; survives the deactivation of the user who installed it
User token xoxp- Acts as the person, with everything they can see
App-level token xapp- For Socket Mode and app features
Workflow token xwfp- Expires and cannot be refreshed
Rotated token xoxe.xoxb-, xoxe.xoxp- Expires after 12 hours; rotation cannot be turned off once on
Incoming webhook https://hooks.slack.com/services/T…/B…/… The URL is the secret: whoever has it can post to the channel

Without rotation, the access token never expires. An xoxp- pasted into a repository stays valid until someone revokes it. Slack searches for and revokes webhook secrets leaked to public repositories, but that does not replace your own scanner (see secrets management).

To find out whether a token found during an audit is still alive, use auth.test. Only do it with the customer’s own tokens and with their authorization. The response for an invalid token is the one shown here, real:

Ventana de terminal
$ curl -s -H 'Authorization: Bearer xoxb-0000-fake' https://slack.com/api/auth.test
{"ok":false,"error":"invalid_auth"}

A valid token returns "ok":true with the team and the user. Report it to the customer and revoke it with auth.revoke or from the app’s management page.

The app review looks at:

  • which apps exist and who installed them;
  • their scopes (channels:history, files:read, users:read.email are among the ones that read a lot);
  • whether they use user or bot tokens;
  • whether any has gone unused for months.
  • Public file links. A public link makes a file reachable outside Slack. They can be turned off for the whole workspace.
  • Exports. An export takes the message history out in one go. On plans that allow corporate exports, which must be enabled and approved, it also includes private channels and direct messages. Review:
    • who can start them;
    • that each export generates a log event.
  • Retention and DLP. Review retention periods per conversation type and the native DLP rules on the plans that have them.
  • Secrets in messages. An authorized, scoped search for xoxb-, AKIA, ghp_ or BEGIN PRIVATE KEY in Slack itself finds secrets pasted into messages. Each one is rotated, not just deleted.

Slack AI summarizes conversations and answers questions by searching what the user can see. In August 2024, PromptArmor demonstrated an indirect prompt injection (see prompt injection):

  1. An attacker with no access to a private channel posted instructions in a public channel.
  2. The victim asked Slack AI for a piece of data from that private channel, such as an API key.
  3. The answer mixed the data into an attacker’s link that exfiltrated it when clicked.

Slack fixed it. The lesson for the audit still stands: AI features and MCP servers connected to Slack inherit the permissions of whoever uses them and read content written by others. The log action catalog already includes events for MCP Slack search tools.

Lab: validating rules before they reach the SIEM

Section titled “Lab: validating rules before they reach the SIEM”

The Audit Logs API (Enterprise only) is queried with a token that has the auditlogs:read scope. Its action catalog, however, is public and needs no token. It is useful to check that SIEM rules watch actions that exist: a misspelled name is a rule that never fires.

import json, urllib.request
cat = json.load(urllib.request.urlopen("https://api.slack.com/audit/v1/actions", timeout=20))["actions"]
every = {a for group in cat.values() for a in group}
print(f"{len(cat)} categories, {len(every)} actions")
WATCH = [
"anomaly", "user_login", "user_session_invalidated", "user_logout_compromised",
"pref.sso_setting_changed", "pref.two_factor_auth_changed", "pref.session_duration_changed",
"team_ip_allowlist_disabled", "role_assigned", "owner_transferred",
"app_installed", "app_scopes_expanded", "app_approved", "bot_token_upgraded",
"file_public_link_created", "manual_export_started", "corporate_exports_enabled",
"external_shared_channel_connected", "guest_created",
# names written "from memory" that are worth checking
"pref_sso_setting_changed", "app_install_approval_changed", "file_downloaded_blocked",
]
for a in WATCH:
print(("OK " if a in every else "MISSING "), a)

Real output from November 21, 2026 (trimmed):

$ python3 slack_actions.py
29 categories, 896 actions
OK anomaly
OK user_login
OK pref.sso_setting_changed
OK pref.session_duration_changed
OK app_scopes_expanded
OK file_public_link_created
OK manual_export_started
OK external_shared_channel_connected
...
MISSING pref_sso_setting_changed
MISSING app_install_approval_changed
MISSING file_downloaded_blocked

The last three are plausible names that do not exist. Preference changes are logged with the pref. prefix and a dot, not an underscore.

Common queries with the audit token:

Ventana de terminal
A=https://api.slack.com/audit/v1/logs
curl -s -H "Authorization: Bearer $T" "$A?action=anomaly&limit=100" | jq -r '.entries[] | .date_create, .actor.user.email, .details.reason'
curl -s -H "Authorization: Bearer $T" "$A?action=app_installed,app_scopes_expanded&oldest=1762000000"

The details.reason field of an anomaly event says why it was flagged, for example:

  • tor: access from Tor;
  • unexpected_scraping: a scraping tool;
  • excessive_downloads: excessive downloads;
  • spoofed_user_agent: spoofed user agent;
  • ip_address: IP address change.

On Enterprise, some of them can be set to end the user’s sessions automatically.

  • Disney (2024). An employee installed on their personal computer a program posing as an AI art tool published on GitHub. The malware gave the attacker access to the credentials the employee stored, including their Disney Slack account. In May 2024 he downloaded about 1.1 TB from thousands of non-public channels. The perpetrator pleaded guilty in 2025. For the audit: access from unmanaged devices and no alerts on mass downloads.
  • Electronic Arts (2021). According to the attackers’ account to Motherboard, they bought a stolen cookie for 10 dollars and got into EA’s Slack. From there they messaged IT support saying they had lost their phone and obtained an MFA token for the corporate network. They stole about 780 GB, including source code. Slack was both the door and the social engineering tool.
  • Slack AI (August 2024). The indirect prompt injection described above, published by PromptArmor and fixed by Slack.

The audit covers the customer’s workspace or organization with their authorization, with an admin or read-only audit role, and without reading conversations outside the agreed scope. Flaws in the Slack platform are reported through its bug bounty program.

  • Plan noted and available controls identified
  • SSO required (at least for employees) or 2FA required; session duration limited
  • Offboarding automated with SCIM; no active accounts for people who have left
  • Invitations with admin approval; approved domains verified
  • Guests limited to specific channels and with an expiry date; Slack Connect reviewed
  • Require approved apps on; apps reviewed by scopes, token type and usage; restricted ones uninstalled
  • Bot tokens rather than user tokens; token rotation in in-house apps; webhooks treated as secrets
  • Public file links turned off; exports controlled and logged
  • Retention and DLP configured; authorized search for secrets pasted in messages
  • Audit logs and anomaly events in the SIEM, with rules validated against the action catalog
  • Slack AI and MCP connectors reviewed: what they can read and who uses them