This paper presents new methods and results for recognising black-box program functions using hardware performance counters (HPC), where an investigator can invoke and measure function calls. Important use cases include analysing compiled libraries, e.g. static and dynamic link libraries, and trusted execution environment (TEE) applications. We develop a generic approach to classify a comprehensive set of hardware events, e.g. branch mis-predictions and instruction retirements, to recognise standard benchmarking and cryptographic library functions. This includes various signing, verification and hash functions, and ciphers in numerous modes of operation. Three architectures are evaluated using off-the-shelf Intel/X86-64, ARM, and RISC-V CPUs. Next, we show that several known CVE-numbered OpenSSL vulnerabilities can be detected using HPC differences between patched and unpatched library versions. Further, we demonstrate that standardised cryptographic functions within ARM TrustZone TEE applications can be recognised using non-secure world HPC measurements, applying to platforms that insecurely perturb the performance monitoring unit (PMU) during TEE execution. High accuracy was achieved in all cases (86.22-99.83%) depending on the application, architectural, and compilation assumptions. Lastly, we discuss mitigations, outstanding challenges, and directions for future research.
翻译:本文介绍了使用硬件性能计(HPC)确认黑盒程序功能的新方法和结果,调查人员可以在此使用硬件性能计(HPC)来援引和测量功能调用。重要的使用案例包括分析汇编的图书馆,例如静态和动态链接图书馆,以及可信赖的执行环境(TEE)应用程序。我们开发了一种通用的方法,对一整套硬件事件进行分类,例如分支错误预测和指令退休,以识别标准基准和密码图书馆功能。这包括各种签名、核查和散列功能,以及多种业务模式的密码。三种结构是使用现成的英特尔/X86-64、ARM和RISC-V CPUs来评估的。接下来,我们展示了几个已知的OpenSSL(OpenSSL)脆弱性可以使用HPC版本之间的差异来检测。此外,我们还展示了亚美尼亚信托公司TEE应用中标准化的加密功能可以通过不安全的世界HPC测量方法得到承认。适用于在TEE执行过程中不稳妥地影响业绩监测单位(PMU)的平台,以及RISC-V-VCalimational laimations asubild ex deal deal decild devidustrations insubild ex insubilstationaltitududududududustrations.