cwfletcher / stt

BSD 3-Clause "New" or "Revised" License
34 stars 11 forks source link

Spectre attack code #3

Open pluviophilee opened 4 years ago

pluviophilee commented 4 years ago

Hi, I have tried spectre code on unsafe mode, but it does not work. Do you have the sample spectre attack code which is used in your experiment?

jiyongyu commented 4 years ago

Can you leave your error message?

pluviophilee commented 4 years ago

I run the spectre attack code in Invisispec https://github.com/mjyan0720/InvisiSpec-1.0/blob/master/attack_code/spectre_full.c with the command line build/X86_MESI_Two_Level/gem5.opt config/example/se.py --num-cpus=1 --mem-size=4GB --caches --l1d_assoc=8 --l2_assoc=16 --l1i_assoc=4 --cpu-type=DerivO3CPU --threat_model=UnsafeBaseline --needsTSO=0 --STT=0 --implicit_channel=0 0c spectre_full. The result shows that the spectre attack is not successful.

image
pluviophilee commented 4 years ago

The successful result should be like this.

image
jiyongyu commented 4 years ago

I didn't try this attack code before. Although I think in the first picture, part of the private text is extracted. To extract all the text, you probably need to tweak the parameters in the code, or change the processor configuration of gem5 to make it more obvious.

pluviophilee commented 4 years ago

Could you please share your attack test code?