moonD4rk/HackBrowserData · error

abe: %w

Error message

abe: %w

What it means

ABERetriever.RetrieveKey wraps a payload.Get("amd64") failure with "abe: %w". Before injecting the ABE payload into the browser process to unwrap Chrome's app-bound encrypted key, the tool must load the compiled amd64 payload. If the embedded payload is missing, corrupt, or the build linked the stub (default builds without -tags abe_embed), retrieval of the v20 Chrome master key fails.

Source

Thrown at masterkey/abe_windows.go:46

func (r *ABERetriever) RetrieveKey(hints Hints) ([]byte, error) {
	// Non-ABE forks (Opera/Vivaldi/Yandex) supply no WindowsABEKey — treat as "not applicable".
	// (Pre-v20 Chrome takes the errNoABEKey path below.)
	browserKey := strings.TrimSpace(hints.WindowsABEKey)
	if browserKey == "" {
		return nil, nil
	}

	encKey, err := loadEncryptedKey(hints.LocalStatePath)
	if errors.Is(err, errNoABEKey) {
		return nil, nil
	}
	if err != nil {
		return nil, err
	}

	pl, err := payload.Get("amd64")
	if err != nil {
		return nil, fmt.Errorf("abe: %w", err)
	}

	exePath, err := winutil.ExecutablePath(browserKey)
	if err != nil {
		return nil, fmt.Errorf("abe: %w", err)
	}

	env := map[string]string{
		envEncKeyB64: base64.StdEncoding.EncodeToString(encKey),
	}

	inj := &injector.Reflective{}
	key, err := inj.Inject(exePath, pl, env)
	if err != nil {
		return nil, fmt.Errorf("abe: inject into %s: %w", exePath, err)
	}
	if len(key) != 32 {
		return nil, fmt.Errorf("abe: unexpected key length %d (want 32)", len(key))

View on GitHub (pinned to 0503d04d7a)

Solutions

  1. Rebuild with the payload embedded: `make build-windows` (or `go build -tags abe_embed`) — the default build links a stub that cannot perform ABE.
  2. Ensure the payload DLL was built first with `make payload` (requires zig) so crypto/*.bin exists before embedding.
  3. If layout constants changed, run `make gen-layout` and rebuild both payload and binary together.
  4. For non-ABE browsers (Opera/Vivaldi/Yandex) or pre-v20 Chrome, confirm WindowsABEKey is empty so RetrieveKey short-circuits instead of needing the payload.

Example fix

// before
go build ./cmd/hack-browser-data/ // links ABE stub, payload.Get fails at runtime
// after
make payload && make build-windows // builds DLL + binary with -tags abe_embed
Defensive patterns

Strategy: validation

Validate before calling

// ensure an ABE-capable build before extraction on Windows
// (default builds link an ABE stub that fails at runtime)
// build with: go build -tags abe_embed ./cmd/hack-browser-data/
// runtime probe:
if runtime.GOOS == "windows" && !abeBuildEmbedded {
    log.Warn("binary lacks embedded ABE payload; Chrome v20 keys cannot be retrieved")
}

Try / catch

// Go
key, err := retriever.RetrieveKey(hints)
if err != nil {
    if strings.HasPrefix(err.Error(), "abe:") {
        log.Warnf("ABE retrieval unavailable (stub build?): %v", err)
        return nil, nil // degrade to non-ABE key sources
    }
    return nil, err
}

Prevention

When it happens

Trigger: Windows-only. RetrieveKey with a non-empty hints.WindowsABEKey (Chrome 127+ / v20 app-bound key present in Local State) and a successfully loaded encrypted key, but payload.Get("amd64") returns an error — the abe_embed build tag was not used so the stub payload is linked, or the embedded payload blob failed validation/decompression.

Common situations: Building with plain `go build` instead of `make build-windows` / `-tags abe_embed` (the default stub errors at runtime); cross-compiling without zig-built payload artifacts (crypto/*.bin missing); payload version mismatch after regenerating layout constants.

Understand the failure class

Background: "X is not installed. Please install it with pip install Y": missing optional dependency errors — ImportError/ValueError raised when a library's optional extra was never installed — this error's family across 22 libraries.

Related errors


AI-assisted analysis of moonD4rk/HackBrowserData@0503d04d7a (2026-09-06). Data as JSON: /api/errors/85473c53627b84e7. Report an issue: GitHub.