Code Monkey home page Code Monkey logo

gameofthreads_fork's Introduction

Proof of concept APA Attack against SGX

I modified this POC that come from following git repository

Original git repo is here (I modify it for making it work well):

Related Issue:

Related Blog

I realize that notify_attack will catch all page faults and many of these are not relate with this POC (means many page faults are not Image's or Model's Faults), the original POC's driver restore all fault pages' present bit(in Fault-on-Fault, and I'm not mean code in kprobe.post_handler), which will cause new page fault (may be #PF: supervisor read access in kernel mode).

I modified driver to treat fault-on-fault respectively, kindly metigate some new fualt( but still some page fualt thar I have no idea, fualt page is not about Images' or Model's page).

And I think using noticy_attack to catch all page faults is not a good idea to pause threads, and I think register a SIGSEGV handler to handle page faults is a better idea to pause threads.

Discuss: As there are logic about prot_none check in handle_pte_fault, so I think when undo page-flag-modify, we should clear prot_none as well.

Discuss: Because we don't kprobe do_page_fault, __do_page_fault, do_user_addr_fault, so it needn't to remove "NOKPROBE_SYMBOL" label.

Notice: %p parameter in printk will output a "hashed" address, so 0x%lx may helpful.(https://lwn.net/Articles/737451/)

Original README

This directory contains the code to run the proof-of-concept APA attack against real SGX hardware. In particular, we provide two components:

  • nukemod: this repository contains a Linux kernel module which contains the logic of our APA attack, including halting and rescheduling SGX threads.
  • sgx_scheduling: this repository contains our C-based proof-of-concept SGX code which mimics the main operations in the PyTorch code.

gameofthreads_fork's People

Contributors

leonechen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.