22.09.2016 Views

JIT Spraying Never Dies

JIT%20Spraying%20Never%20Dies%20-%20Bypass%20CFG%20By%20Leveraging%20WARP%20Shader%20JIT%20Spraying

JIT%20Spraying%20Never%20Dies%20-%20Bypass%20CFG%20By%20Leveraging%20WARP%20Shader%20JIT%20Spraying

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Known CFG Bypass Methods<br />

• Call VirtualProtect Wrapper to replace ___guard_check_icall_fptr<br />

– The Wrapper itself must be able to pass CFG check.<br />

– The Wrapper is better to take as few arguments as possible to facilitate passing arguments from high<br />

level language.<br />

– Fixed by adding extra logic in wrapper to make sure it can not be used for other purposes.<br />

• Transit via unguarded trampoline (either in executable or in <strong>JIT</strong> code)<br />

– The trampoline itself must be able to pass CFG check.<br />

– The target address of unguarded indirect control transfer instruction must be controllable.<br />

– Fixed by introducing a CFG check before the indirect control transfer instruction.<br />

• Leverage stack desynchronization situation to overwrite function return address<br />

– Requires a function that contains a controllable function callout, which is used to cause stack imbalance.<br />

– A controllable value must be pushed onto the stack, which happens to overwrite the function’s saved<br />

return address.<br />

– Fixed by enforcing stack pointer sanity check.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!