feat(windows): Chrome App-Bound Encryption implementation (#573)

* build(abe): add zig-cc payload build system + C reflective loader
* feat(abe): add reflective injector and Go ABE key-retriever primitives
* feat(abe): wire ABERetriever into DefaultRetriever chain + --abe-key CLI
* feat(abe): route Chromium v20 ciphertext through AES-GCM with ABE key
This commit is contained in:
slimwang
2026-04-18 23:25:59 +08:00
committed by GitHub
parent eb58ebbbf4
commit c3d30b9e8a
24 changed files with 1481 additions and 14 deletions
+32
View File
@@ -0,0 +1,32 @@
//go:build windows
package injector
import (
"bytes"
"debug/pe"
"fmt"
)
type Arch string
const (
ArchAMD64 Arch = "amd64"
Arch386 Arch = "386"
ArchUnknown Arch = "unknown"
)
func DetectPEArch(peBytes []byte) (Arch, error) {
f, err := pe.NewFile(bytes.NewReader(peBytes))
if err != nil {
return ArchUnknown, fmt.Errorf("parse PE: %w", err)
}
switch f.Machine {
case pe.IMAGE_FILE_MACHINE_AMD64:
return ArchAMD64, nil
case pe.IMAGE_FILE_MACHINE_I386:
return Arch386, nil
default:
return ArchUnknown, nil
}
}