Coder Social home page Coder Social logo

eyedeekay / orjail Goto Github PK

View Code? Open in Web Editor NEW

This project forked from orjail/orjail

0.0 2.0 0.0 107 KB

a more secure way to force programs to exclusively use tor network

Home Page: https://orjail.github.io

License: Do What The F*ck You Want To Public License

Makefile 4.34% Shell 95.66%

orjail's Introduction

Build Status

⚠️ WARNING

orjail is under development, use at your own risk.
if you find a bug, please create an issue.

why?

we've tried to deanonimize a program executed in torsocks environment and that was not so difficult as torsocks use LD_PRELOAD, so you only need to statically compile your stuff. as Whonix is sometimes too much, the idea is to experiment with linux namespaces and learn by doing something useful (at least for us).

requirements

  1. a linux kernel supporting namespaces (you have it since 2008)
  2. Tor installed
  3. firejail (optional)

how it works

it creates a separated network namespace (using ip netns) with its own network interface and a link to the host interface with some iptables rules (on host) that force traffic generated from inside orjail to only exit via Tor (including DNS).
inside orjail you'll be in another pid namespace (this way you cannot switch namespace), and another mount namespace (we use this to show a different /etc/resolv.conf).

if you find a way to deanonimize a program running inside orjail (also a shell with root privileges) would be nice to share it with us

additional info

  1. orjail needs root permission to run
  2. orjail runs your program as your user
  3. orjail will launch a Tor instance bound to orjail interface

usage examples:

an example to see what are we talking about (try yourself with ps aux, ls)

$ sudo orjail ifconfig
out-orjail: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.200.1.2  netmask 255.255.255.0  broadcast 0.0.0.0
        inet6 fe80::6439:afff:febc:c9b5  prefixlen 64  scopeid 0x20<link>
        ether 66:39:af:bc:c9:b5  txqueuelen 1000  (Ethernet)
        RX packets 6847  bytes 7488116 (7.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6809  bytes 915088 (893.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

run an hidden service inside orjail (you'll find your address inside examples/hostname)

sudo orjail -v -H 8080 -d examples "python -m SimpleHTTPServer 8080"

getting an homepage content with curl via Tor

sudo orjail curl autistici.org > autistici.org

same as before with another user

sudo orjail -u another_user curl autistici.org

"resolve" a onion address (not so usefull, just to show that .onion resolving works)

sudo orjail dig wi7qkxyrdpu5cmvr.onion

get an onion webserver content via Tor:

sudo orjail curl wi7qkxyrdpu5cmvr.onion

open a firefox that could reach internet via Tor only:

sudo orjail firefox -P /tmp/tmpprofile

⚠️

firefox has a flag that blocks .onion resolution by default, change it in about:config/network.dns.blockDotOnion.

running a browser inside orjail is not safe, please use Tor Browser instead

get an anonymous shell

sudo orjail -s

run pidgin in verbose mode

sudo orjail -v pidgin

keep the namespace after exit so we can start another program in same ns

sudo orjail -k ls

Use firejail as a security sandbox to join orjail network namespace

sudo orjail -f thunderbird

Made with ❤️ by _TO*hacklab

orjail's People

Contributors

lesion avatar step- avatar harlyh avatar gibix avatar

Watchers

James Cloos avatar idk 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.