onion network architecture

56
Onion network architecture http://www.ataeyan.com By: Mahdi ataeyan

Upload: mahdi-ataeyan

Post on 12-Jul-2015

603 views

Category:

Internet


1 download

TRANSCRIPT

Page 1: Onion network architecture

Onion network architecture

http://www.ataeyan.com

By: Mahdi ataeyan

Page 2: Onion network architecture

Privacy?!

Page 3: Onion network architecture

Symmetric­key algorithm

Page 4: Onion network architecture

Public key crypto

● An unpredictable (typically large and random) number is used to begin generation of an acceptable pair of keys suitable for use by an asymmetric key algorithm.

Alice011010101011011101000011011010

LargeRandomNumber

KeyGenerationProgram

Public Private

Page 5: Onion network architecture

Public key encryption

● In an asymmetric key encryption scheme, anyone can encrypt messages using the public key, but only the holder of the paired private key can decrypt. Security depends on the secrecy of the private key.

Hello Alice!

Alice's private key

Encrypt

6EB69570 08E03CE4

Hello Alice!

Decrypt

Alice's public key

Bob

Alice

Page 6: Onion network architecture

Public key shared secret

● In the Diffie–Hellman key exchange scheme, each party generates a public/private key pair and distributes the public key. After obtaining an authentic copy of each other's public keys, Alice and Bob can compute a shared secret offline. The shared secret can be used, for instance, as the key for a symmetric cipher.

Alice's private key

Combine keys

Bob's public key

751A696C 24D97009

Alice's public key

Bob's private key

Alice

Alice and Bob's shared secret

Bob

Combine keys

751A696C 24D97009

Alice and Bob's shared secret

Page 7: Onion network architecture

what's Onion routing?

● OR is a technique for anonymous communication over a computer network

● peeling an onion.

Page 8: Onion network architecture

Why onion?

Message

Router C Key

Router B Key

Router A Key

Source

Router ARouter B

Router CDestination

Page 9: Onion network architecture

entry node

● First hop into the tor network.

Page 10: Onion network architecture

exit node

● last hop before destination.

Page 11: Onion network architecture

relay node

● Middle node

Page 12: Onion network architecture

bridge node 

● nodes not listed in the tor directory to evade filtering

Page 13: Onion network architecture

Steps

● The originator picks nodes from the directory node and chose some node.

● the chosen nodes are ordered (chain or circuit)

● Originator encript and send data.

Page 14: Onion network architecture

picks nodes from the directory node

Page 15: Onion network architecture

Select node

Page 16: Onion network architecture

After 10 minute...

Page 17: Onion network architecture

Who can see the message?

●     the sender●     the last intermediary (the exit node)●     the recipient

Page 18: Onion network architecture

end­to­end encryption

Page 19: Onion network architecture

Tor off https off

Page 20: Onion network architecture

Tor off https on

Page 21: Onion network architecture

Tor on https off

Page 22: Onion network architecture

Tor on https on

Page 23: Onion network architecture

Weaknesses

● Timing analysis● Intersection attacks● Predecessor attacks● Exit node sniffing● Dos nodes● social engineering attacks

Page 24: Onion network architecture

Who's using tor?

● Diplomatic mission● Militaries● Normal people● Journalists● Activists & Whistleblowers

Page 25: Onion network architecture

Hidden service

● anonymity websites and servers.

● accessed through onion address.

● Abcdefghijklmnop.onion

Page 26: Onion network architecture

rendezvous protocol

● computer network protocol.

● Enables network node to find each other.

● require at least one unblocked and un­NATed servers.

Page 27: Onion network architecture

advertise

● advertise existence● randomly picks some relays● asks them to act as „introduction points“● send public key● introduction points dont know service 

location (ip)

Page 28: Onion network architecture

introduction points

Page 29: Onion network architecture

hidden service descriptor

● the hidden service assembles a hidden service descriptor

●  signs descriptor with private key.● uploads descriptor to a distributed hash 

table.● 16 character name derived from the service's 

public key.onion

Page 30: Onion network architecture

hidden service descriptor

Page 31: Onion network architecture

Client rendezvous point

● client needs to know onion address.● download the descriptor from the 

distributed hash table.● the client knows the introduction points and 

the right public key.● Client select and connect to rendezvous 

point and telling it a one­time secret.

Page 32: Onion network architecture

Client rendezvous point

Page 33: Onion network architecture

client introduce message

● the client assembles an „introduce message“ (encrypted to the hidden service's public key) + address of the rendezvous point and the one­time secret.

● The client sends „introduce message“ to one of the introduction points.

● introduction points delivered to the hidden service.● the client and service remains anonymous. 

Page 34: Onion network architecture

client introduce message

Page 35: Onion network architecture

Hidden Service rendezvous point● The hidden service decrypts the client's 

introduce message and finds the address of the rendezvous point and the one­time secret in it.

● The service creates a circuit to the rendezvous point and sends the one­time secret to it in a „rendezvous message“. 

Page 36: Onion network architecture

Hidden Service rendezvous point

Page 37: Onion network architecture

the last step

● the rendezvous point notifies the client about successful connection establishment.

● connection between client and hidden service consists of 6 relay.

Page 38: Onion network architecture

the last step

Page 39: Onion network architecture

Hidden service protocol

Page 40: Onion network architecture

Xyz.onion

● SHA1 hash of the public key● the first half of the hash is encoded to 

Base32● the suffix „.onion“ is added.● .onion names can only contain the digits 2­7 

and the letters a­z and are exactly 16 characters long. 

Page 41: Onion network architecture

Why automatically­generated service name?

Page 42: Onion network architecture

facebookcorewwwi.onion

Page 43: Onion network architecture

Birthday attack

● cryptographic attack● abuse 

communication between two or more parties

00.10.20.30.40.50.60.70.80.9

1

0 10 20 30 40 50 60 70 80 90 100P

rob

ab

ility o

f a

pa

ir

Number of people

23

Page 44: Onion network architecture

Get specific .onion address

● Shallot ● Scallion (GPU hashing)● Eschalot (wordlist search)

Page 45: Onion network architecture

test!

Page 46: Onion network architecture

shallot

● https://codeload.github.com/katmagic/Shallot/zip/master

● ./configure && make● ./shallot● ./shallot ^onion● Found matching domain after 22204717 

tries: onion6r33t2v3sq7.onion

Page 47: Onion network architecture

Shallot 1.5 GHZ

● Characters● 1● 3● 5● 7● 9● 11● 14

● Time to generate● Less than 1 sec● Less than 1 sec● 1 min● 7 day● 2,5 years● 640 years● 2.6 milion years

Page 48: Onion network architecture

Hidden services

Page 49: Onion network architecture

Who's using hidden service

● Hitman network● drugs● Child pornography● Hacking● Political 

(anarchism, ...)● Warez

Page 50: Onion network architecture

Tor network hacked by FBI?

Page 51: Onion network architecture

Plausible deniability

Page 52: Onion network architecture

List of most popular onion websites● DuckDuckGo● The Pirate Bay● Facebook● Blockchain.info● Wikileaks● SecureDrop

Page 53: Onion network architecture

Graph Relays and bridges

Page 54: Onion network architecture

● http://en.wikipedia.org/wiki/Onion_routing● http://en.wikipedia.org/wiki/Tor_%28anony

mity_network%29● http://www.fbi.gov/news/pressrel/press­rele

ases/more­than­400­.onion­addresses­including­dozens­of­dark­market­sites­targeted­as­part­of­global­enforcement­action­on­tor­network

● https://www.torproject.org/docs/hidden­services.html.en

Page 55: Onion network architecture

● https://www.eff.org/pages/tor­and­https● https://metrics.torproject.org/● http://en.wikipedia.org/wiki/Plausible_deniab

ility● http://www.theguardian.com/technology/2014

/oct/31/facebook­anonymous­tor­users­onion●

Page 56: Onion network architecture

This work is licensed under a Creative Commons Attribution­ShareAlike 3.0 Unported License.

It makes use of the works of Kelly Loves Whales and Nick Merritt