
Table of Contents
Microarchitectural covert channels are a critical concern in modern computer security. At their heart, these channels exploit subtle hardware behaviors to leak information between isolated security boundaries, bypassing traditional operating system and application-level defenses. With cloud computing and multi-tenant environments becoming the norm, automatic detection and mitigation of such threats has never been more important.
AutoCC is an innovative framework that automates the discovery of these covert timing channels, enabling both offensive and defensive stakeholders to advance their understanding and protections. In this guide, we'll cover the technology and research behind AutoCC, walk through practical detection tips, and explain the importance of microarchitectural covert channels in today's threat landscape.
In computer security, a covert channel is an unintended communication path that can be exploited to transfer information in a way that violates the system's security policies. Unlike side channels (which typically leak data through unintentional radiations or observations), covert channels are used to surreptitiously transmit information between cooperating agents, often circumventing access controls.
Key characteristics:
Microarchitecture refers to the hardware-level implementation details of a CPU designed to seem invisible to software by abstraction.
Microarchitectural covert channels exploit these hardware state transitions, which are:
Quote from research:
Microarchitectural channels exploit hardware states invisible to the instruction set architecture (ISA) to enable unauthorized information flow.
The gap between the hardware features (e.g., caches, buffers, branch predictors) and the abstract view provided by the ISA opens opportunities for covert channels.
Programs sharing the same hardware can influence each other's execution time or behavior, even in the absence of direct communication channels.
Timing channels are the most common microarchitectural covert channels. They operate by:
Typical resources abused:
Channels often arise when two processes compete for a limited hardware resource (e.g., a cache set, memory controller queue).
Microarchitectural covert channels exploit changes in execution timing resulting from competing access to limited hardware resources.
This competition causes measurable timing differences that can encode covert information.
The CPU cache, shared across multiple cores/threads, is a goldmine for covert channel exploitation.
Scenario:
Prime+Probe: Uses timing access to check if the cache line has been replaced.
Flush+Reload: Relies on shared memory, more precise than Prime+Probe.
# Pseudocode: Prime+Probe loop in Python (conceptual)
import time
CACHE_SET = 0xdeadbeef # Simulated address
def access_memory(addr):
# Simulate access to a cache line
pass
def prime():
for i in range(NUM_LINES):
access_memory(CACHE_SET + i * CACHE_LINE_SIZE)
def probe():
start = time.perf_counter_ns()
for i in range(NUM_LINES):
access_memory(CACHE_SET + i * CACHE_LINE_SIZE)
end = time.perf_counter_ns()
return end - start
# Sender primes, waits, then receiver probes and times access
Although not pure covert channels (often classified as side-channel vulnerabilities), these attacks inspired renewed interest in microarchitectural information leaks by showing how speculation and out-of-order execution can break security boundaries and leak secrets through microarchitectural status changes.
Spectre-style attacks: Abuse speculative execution to inject attacker-controlled data into microarchitectural structures, affecting victim's code execution in observable ways.
AutoCC stands for Automatic Discovery of Covert Channels in Time. It's a systematic approach and tool developed to automatically find covert timing channels in CPU microarchitectural resources.
From Marcelo et al., MICRO 2023:
AutoCC:
Key Research Insight:
AutoCC found previously undocumented channels and weaknesses in popular CPUs, indicating the urgent need for automated analysis and defense.
AutoCC uses a mix of techniques:
With AutoCC, both attackers and defenders gain:
Preventing or mitigating covert channels is challenging due to their inception at the hardware level. However, some high-level strategies include:
Operating systems can help by:
rdtsc or similar instructions.Hardware vendors can:
Linux offers performance monitoring counters via the perf tool, which can be used to detect suspicious microarchitectural activity or performance anomalies that might indicate covert channel use.
perf list
# Record cache misses and cycles for process with PID 1234
sudo perf stat -e cache-misses,cycles -p 1234
# Output parsing (example output)
# 1,234,567 cache-misses
# 23,456,789 cycles
Applications using rdtsc or /dev/tsc can be hints of timing-based attack code.
# List processes using /dev/tsc or similar
lsof | grep '/dev/tsc'
# Find binaries that reference rdtsc opcode (0f 31)
grep -rl -E $'\x0f\x31' /usr/bin /usr/local/bin
# Alternative: Use strace to monitor time-related syscalls in a suspect process
strace -e trace=clock_gettime,gettimeofday -p <pid>
import subprocess
def monitor_perf(pid, duration=10):
cmd = [
'perf', 'stat', '-e', 'cache-misses,cycles',
'-p', str(pid), 'sleep', str(duration)
]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = proc.communicate()
return out.decode(), err.decode()
# Example usage
out, err = monitor_perf(1234)
print("Perf Output:", out)
print("Perf Errors:", err)
For deeper automation, you can parse perf output for suspicious changes in cache miss rates, possibly suggesting active cache-based covert channel activity.
import re
def parse_perf_output(perf_err):
cache_misses = re.search(r'([\d,]+)\s+cache-misses', perf_err)
cycles = re.search(r'([\d,]+)\s+cycles', perf_err)
return {
'cache_misses': int(cache_misses.group(1).replace(',', '')) if cache_misses else 0,
'cycles': int(cycles.group(1).replace(',', '')) if cycles else 0,
}
metrics = parse_perf_output(err)
print(f"Cache Misses: {metrics['cache_misses']}, Cycles: {metrics['cycles']}")
Covert channels should be included in threat models for:
Questions to ask:
Red teams can deploy AutoCC-style tools to identify viable exfiltration methods and simulate real-world attacks.
Blue teams and forensic analysts can use performance counters, OS trace logs, and behavioral profiling to hunt for anomalies symptomatic of covert channel activity.
Microarchitectural covert channels represent one of the most insidious threats in hardware security today. Far below the level of classic network or application-layer vulnerabilities, they exploit the very building blocks of modern computing to enable unauthorized information flow between isolated users and processes.
AutoCC and similar research are pushing the field forward, providing the tools and methodologies required to discover and close these channels—before attackers have a chance to use them. As both CPUs and defenders evolve, the only constant is that we must keep searching for (and learning from) every hidden channel that emerges.
By integrating monitoring, analysis, and proactive threat modeling into security processes, organizations can stay ahead of this subtle but powerful threat vector.
AutoCC: Automatic Discovery of Covert Channels in Time
Authors: Marcelo Santos, et al. MICRO 2023
Full paper (PDF)
Prevention of Microarchitectural Covert Channels on an Open-Source 64-bit RISC-V Processor
Authors: Wistoff et al.
arXiv preprint
Full text (PDF)
Linux perf documentation
https://perf.wiki.kernel.org/index.php/Main_Page
Intel® 64 and IA-32 Architectures Optimization Reference Manual
https://software.intel.com/content/www/us/en/develop/articles/intel-sdm.html
Spectre and Meltdown Attacks
https://meltdownattack.com/
Interested in more in-depth guides? Subscribe to our cybersecurity insights newsletter!
If you found this content valuable, imagine what you could achieve with our comprehensive 47-week elite training program. Join 1,200+ students who've transformed their careers with Unit 8200 techniques.