# Binance: Binance: a fake job interview swapped a pyenv shim and led to a $6.3B wallet heist

> **Safety notice:** Read-only local developer Mac audit; changes no system binaries.

- **Incident date:** Oct 29, 2026
- **Disclosed:** Nov 3, 2026
- **Source disclosure:** https://www.binance.com/en/blog/community/3229153443759566763

## Reproduction lab
Verifies whether your macOS EndpointSecurity / EDR pipeline logs file renames inside /opt/homebrew/Cellar and flags container deploy tokens stored on developer disks.

```bash
# check local macOS developer environments for long-lived container or registry deploy tokens
find "$HOME" -maxdepth 3 \( -name "*kubeconfig*" -o -name "config.json" -o -name "*.token" \) 2>/dev/null
```

## Policies and detection rules

### `detect-homebrew-shim-swap.sql`
macOS osquery / EndpointSecurity hunt checking for tampered Homebrew shims or non-brew file replacements under /opt/homebrew/Cellar and /opt/homebrew/bin.

```sh
# Hunt for recently modified Homebrew shims or unexpected symlinks on macOS developer laptops
find /opt/homebrew/Cellar /opt/homebrew/bin -maxdepth 4 -type f -mtime -30 \
  -exec shasum -a 256 {} + | head -n 50

# Verify Homebrew package integrity against upstream bottle checksums
brew doctor
brew list --versions | awk '{print $1}' | xargs -n 1 brew reinstall --dry-run 2>&1 | grep -i "mismatch" || echo "No obvious mismatch"
```

### `macos-pyenv-shim-tamper.yaml`
Detection rule flagging non-Homebrew processes replacing files inside /opt/homebrew/Cellar or spawning interactive zsh directly from a language version-manager shim.

```yaml
title: Suspicious Homebrew Shim Replacement or Shell Spawn (macOS)
status: production
logsource:
  product: macos
  category: process_creation
detection:
  shim_zsh:
    ParentImage|contains:
      - '/opt/homebrew/Cellar/pyenv/'
      - '/opt/homebrew/bin/pyenv'
    Image|endswith: '/zsh'
  non_brew_write:
    TargetFilename|startswith: '/opt/homebrew/Cellar/'
    Image|does_not_contain: '/Homebrew/'
  condition: shim_zsh or non_brew_write
level: critical
```

## Indicators of compromise
- **log:** `/opt/homebrew/Cellar/pyenv/2.8.0/libexec/pyenv (3,344B replaced by 3,414B pyenv_)` (Exact file-replacement trace published in Binance’s Nov 3 findings (with /opt/homebrew/bin/pyenv symlink re-creation and zsh spawn).)
- **log:** `Container deployment initiated Oct 29 (17:15–19:56 UTC) using another engineer’s token` (Cross-host token replay from Engineer C’s workstation using Engineer A’s container deployment permission token.)
