Coder Social home page Coder Social logo

trailofbits / appjaillauncher-rs Goto Github PK

View Code? Open in Web Editor NEW
105.0 48.0 16.0 360 KB

AppJailLauncher in Rust

Home Page: https://blog.trailofbits.com/2017/08/02/microsoft-didnt-sandbox-windows-defender-so-i-did/

License: MIT License

Rust 98.82% CMake 0.17% C++ 0.90% C 0.10%
sandbox appcontainer rust windows

appjaillauncher-rs's Introduction

AppJailLauncher (Rust)

AppJailLauncher is akin to a simple version of xinetd for Windows but with sandboxing enabled for the spawned child processes. The sandboxing is accomplished via AppContainers. This project is a rewrite of an earlier version in C.

Tested Platforms

  • Windows 10 Professional x64 (build 14393.1198)
  • Windows 10 Professional x64 (build 15063.296)

Supported Platforms

  • Windows 8 and above
  • Windows Server 2012 and above

Creating Challenges

There is an example challenge template in example/ that can be built using CMake.

To build the example challenge:

> cd example
> mkdir build
> cd build
> cmake ..
> cmake --build .

After building the example challenge, you serve the challenge via the following command in the root of the repository:

> .\target\debug\appjaillauncher-rs.exe run --key .\unittest_support\pub\key2.txt .\example\build\Debug\example_challenge.exe

Frequently Asked Questions

In the example challenge, what does InitChallenge do?

The InitChallenge function will create an timer that will terminate the process after a specified amount of milliseconds and set stdout buffering options to work better with network sockets. The first part is essential for countering griefing operations directed at your challenges by malicious actors.

I think I broke something. Is there a way to get more logging?

AppJailLauncher uses env_logger for logging. This means you can get more debug logging by setting the RUST_LOG environment variable to debug. For example, in PowerShell, the following command would be sufficient:

> $env:RUST_LOG="debug"

How do I target x86 Windows from x64 Windows with Rust?

rustup should be part of the default Rust install. First, use rustup to add the new x86 target:

> rustup target add i686-pc-windows-msvc

After installation, add --target=i686-pc-windows-msvc to the cargo build, cargo test commands to build for x86.

I have a complex ACL setup for my key, why won't things work?

Our ACL implementation is simple and should work on most configurations. However, it is entirely possible that for complex ACL setups, this will not work as intended. If you run into any issues, file an issue.

cargo build complains that msvc targets depend on msvc linker but "link.exe" was not found

You need to install the Visual C++ 2015 Build Tools or newer.

Development

Install Rust, then:

Build AppJailLauncher: cargo build

Run the unit tests: cargo test

Authors

appjaillauncher-rs's People

Contributors

dguido avatar masthoon avatar woodruffw avatar yying avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appjaillauncher-rs's Issues

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.