The following is and Enclave simulator. With this simulator you can see both the process of:
- Remote Attestation
- An attack on an Encalve caused by state malleaubility
- TODO
- Navigate to Enclave.java (located in isv.enclave package)
- Find the empty constructor
protected Enclave()
{
setAuthCount(0);
setGeneralInfo(new HashSet<>());
setCreateInterrupt(false);
};
- Replace
setCreateInterrupt(false)withsetCreateInterrupt(true) - Run Enclave.java, located in the isv.enclave package (run through an editor like Eclipse or through the command line)
- Run ISVClient.java
- the first time an interrupt should occur, which messes with the state of the enclave
- Run ISVClient.java one more time
- the second ecall will successfully initiate the attack