Comments (3)
Hi kmarzouq,
Nice to see you're interested and got the code working!
It's been a while I looked at this code, but to answer your questions:
, I commented out unmap_alias from the program and found it didn't really change much.
for unmap_alias: you definitely need a faulting non-present page to trigger Foreshadow. The reason it still works I think is because of this call further to unmap_alias:
sgx-step/app/foreshadow/main.c
Line 186 in 4c59c80
, I commented out sim_reload from the program and found it didn't really change much.
This will not do anything if SIM_ENCLAVE is not set. This is only added to demonstrate the effect on patched CPUs or CPUs without SGX support. It "simulates" the enclave in a different C file without any hardware protection, just demonstrating you can leak from the L1D cache transiently (see #34)
Hope it helps! Closing this for now (feel free to re-open if needed)
from sgx-step.
for unmap_alias: you definitely need a faulting non-present page to trigger Foreshadow. The reason it still works I think is because of this call further to unmap_alias:
I commented that one too and it "worked"
This will not do anything if SIM_ENCLAVE is not set. This is only added to demonstrate the effect on patched CPUs or CPUs without SGX support. It "simulates" the enclave in a different C file without any hardware protection, just demonstrating you can leak from the L1D cache transiently (see #34)
I had to set SIM_ENCLAVE to 1 for Foreshadow to work. When I set it to 0, it isn't able to extract any data, even when I uncomment unmap_alias and sim_reload. Also what is to purpose of var rv in the sim_destroy_secret?
Also, I can't re-open the issue. I am not a collaborator.
from sgx-step.
I commented that one too and it "worked"
Then you're not doing a transient-execution attack, but simply an architectural access and encoding it in a cache side channel. This will of course also work, but is not showing the Foreshadow effect..
I had to set SIM_ENCLAVE to 1 for Foreshadow to work. When I set it to 0, it isn't able to extract any data, even when I uncomment unmap_alias and sim_reload.
That likely means your CPU is not vulnerable to Foreshadow: either it's too recent, or you have the ucode update that flushes L1D after SGX exit.
Also what is to purpose of var rv in the sim_destroy_secret?
No purpose, it seems this is leftover code from an older version or so. The whole "sim-enclave" mode was hacked in rather quickly just as a PoC so not necessarily high-quality code :)
Also, I can't re-open the issue. I am not a collaborator.
Ok, I'll leave it closed for now as I don't see an "issue" that needs fixing in the code. You can always reply here if needed.
from sgx-step.
Related Issues (20)
- How to execute it HOT 1
- Hyperlink of the approach to bypass devmem_is_allowed checks is unavailable HOT 3
- ./app: undefined symbol: sgx_get_aep HOT 8
- undefined symbol : sgx_get_aep HOT 10
- kernel panics when single-stepping [SOLVED: KPTI #PF for kernel IRQ] HOT 12
- error when running bench: [file.c] assertion '(f = fopen(path, "w"))' failed: No such file or directory HOT 6
- Work-in-progress Gramine port HOT 17
- Could add some explanation for each test application under app/ to README? HOT 1
- /dev/sgx-step would be uninstalled after os reboot HOT 2
- foreshadow/lvi building error , memcmp running error HOT 2
- os would always hang after running cpl/idt/memcmp HOT 8
- Refactor: page-fault abstraction in libsgxstep HOT 2
- Could sgx-step support SGX in-kernel/dcap driver? HOT 2
- victim.base && "no enclave found in /proc/self/maps HOT 4
- Support multithreaded enclaves
- ./install_SGX_SDK.sh can't find python2 HOT 3
- Trying to run app/memcmp but gives assertion error HOT 5
- Questions regarding fs_reload_threshold in foreshadow HOT 1
- Refactor build system
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sgx-step.