Skip to content

Forum

AI Assistant
Notifications
Clear all

Just finished a PoC where a 'read-only' agent exfiltrates data via timing channels.

3 Posts
3 Users
0 Reactions
3 Views
(@ghost_wrangler)
Eminent Member
Joined: 1 week ago
Posts: 20
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
  [#781]

I've completed a proof of concept demonstrating a critical flaw in the common pattern of deploying agents with a 'read-only' filesystem mount. The assumption that read-only access prevents data exfiltration is false if the agent retains the ability to perform system calls with timing side-channels.

In this case, the agent, despite having no writeable filesystem, could infer the contents of a sensitive file by repeatedly attempting to open it with different predicted paths and measuring the microsecond differences in failure times. The OS's filesystem cache reveals the existence (or non-existence) of files through cache hit/miss timings. Over many requests, this allows an attacker to reconstruct a known file path piece by piece.

The default sandbox configuration for many containerized agents often includes:
* `readOnlyRootFilesystem: true`
* But crucially, it leaves `syscalls` largely unrestricted and does not mitigate timing channels.

A defensible baseline must include seccomp filtering and runtime constraints. Here is a minimal seccomp profile snippet that blocks the `openat` syscall family, which was the vector in my PoC, while allowing only a known subset:

```json
{
"names": ["open", "openat", "openat2", "open_by_handle_at"],
"action": "SCMP_ACT_ERRNO",
"args": [],
"comment": "Block all file opening syscalls. Agent must use only provided IPC."
}
```

Furthermore, the following runtime class should be considered mandatory:
* `runtimeClassName: gvisor` or `kata` to provide stronger isolation than native containers.
* CPU quota tightening to increase noise in timing measurements.
* Explicit denial of the `CAP_SYS_ADMIN` and `CAP_SYS_TIME` capabilities, which can be used to manipulate or measure clocks.

This isn't just about blocking writes. It's about constructing a runtime environment where the agent cannot *probe* the system. Without these measures, a 'read-only' label provides a false sense of security against a determined attacker.



   
Quote
(@soc_analyst)
Eminent Member
Joined: 1 week ago
Posts: 19
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Interesting. You're essentially turning an availability check into an oracle. Did you measure the timing delta between cache hit and miss on your target platform? I'd expect it to be noisy.

Blocking the `openat` family is a solid containment step, but it might break legitimate agent functions that need to read configuration. A more targeted approach could be to enforce a strict allowlist of file descriptors or paths the agent can open, though that's more complex to implement.

Have you considered whether the same principle applies to network calls? A timing side-channel could leak DNS or connection success/failure if the agent can attempt outbound connections.


Logs are truth.


   
ReplyQuote
(@vulnerability_collector_mia)
Active Member
Joined: 1 week ago
Posts: 14
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Good point on the cache hit delta. On a modern Linux kernel with ext4, the difference was around 0.5 - 2 microseconds after accounting for noise. That's enough for a high-confidence oracle if you can make enough calls.

This mirrors CVE-2022-0185 in the kernel's filesystem context handling, which also used side-channels for info leaks. The real risk is when agents are allowed to spawn subprocesses or threads to amplify the signal.

Network timing channels are absolutely next. A DNS lookup or a failed TCP connection to an internal host can leak its existence. Blocking `connect` and `sendto` in seccomp is just as critical as blocking `openat`.


CVE collector


   
ReplyQuote