Slide 1

Slide 1 text

How to run your code on the dark web (and why you should)

Slide 2

Slide 2 text

Me. I’m Luke. I’m a web dev. I work on Privacy & Security. I click thru slides really fast. Twitter: @groovecoder speakerdeck.com/groovecoder 2

Slide 3

Slide 3 text

How to run your code on the dark web (and why you should)

Slide 4

Slide 4 text

How to run your code on the dark web (in 15 minutes)

Slide 5

Slide 5 text

How to run your code on the dark web and why you should

Slide 6

Slide 6 text

How to write your code for the dark web and why you should

Slide 7

Slide 7 text

How to write your code for and why you should

Slide 8

Slide 8 text

is a browser

Slide 9

Slide 9 text

is a browser mostly

Slide 10

Slide 10 text

is a browser patched

Slide 11

Slide 11 text

is a browser patched with The Onion Router

Slide 12

Slide 12 text

patched with The Onion Router Why is ?

Slide 13

Slide 13 text

https://www.eff.org/pages/tor-and-https

Slide 14

Slide 14 text

IP, DNS, & HTTP threats • Hackers-in-the-middle • ISPs snooping on customers’ online activity • Governments censoring sites • Corporations scanning web logs for their competitors’ IP addresses • Criminal sites scanning web logs for law enforcement IP address

Slide 15

Slide 15 text

https://www.eff.org/pages/tor-and-https Location = IP Address

Slide 16

Slide 16 text

protects the user/pw & data from the intermediaries

Slide 17

Slide 17 text

https://www.eff.org/pages/tor-and-https

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

IP, DNS, & HTTP threats • Hackers-in-the-middle • ISPs snooping on customers’ online activity • Governments censoring sites • Corporations scanning web logs for their competitors’ IP addresses • Criminal sites scanning web logs for law enforcement IP address

Slide 24

Slide 24 text

How do we protect
 location + destination from intermediaries?

Slide 25

Slide 25 text

is a browser patched with The Onion Router

Slide 26

Slide 26 text

The Onion Router?

Slide 27

Slide 27 text

https://www.torproject.org/about/overview.html.en

Slide 28

Slide 28 text

https://www.torproject.org/about/overview.html.en

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

Tor protection from DNS + HTTP internet threats • Hackers-in-the-middle • ISPs snooping on customers’ online activity • Governments censoring sites • Corporations scanning web logs for their competitors’ IP addresses • Criminal sites scanning web logs for law enforcement IP address

Slide 35

Slide 35 text

How to write your code for

Slide 36

Slide 36 text

Since Tor routes thru 3 networks …

Slide 37

Slide 37 text

Optimize for latency (You should do this anyway)

Slide 38

Slide 38 text

Minimize number of requests (You should do this anyway)

Slide 39

Slide 39 text

Help the browser with Resource hints (You should do this anyway) https://w3c.github.io/resource-hints

Slide 40

Slide 40 text

Good caching

Slide 41

Slide 41 text

Make CDN work with exit nodes

Slide 42

Slide 42 text

Come to to learn more!

Slide 43

Slide 43 text

Yay! Your site is faster for users

Slide 44

Slide 44 text

Oh noes! All your users are hacked!

Slide 45

Slide 45 text

Remember these?

Slide 46

Slide 46 text

https://www.torproject.org/about/overview.html.en

Slide 47

Slide 47 text

Tor Encryption https://jordan-wright.com/blog/2015/02/28/how-tor-works-part-one/

Slide 48

Slide 48 text

Tor Encryption https://jordan-wright.com/blog/2015/02/28/how-tor-works-part-one/ Note: exit nodes can see the Original Data

Slide 49

Slide 49 text

hacked

Slide 50

Slide 50 text

hacked hacked hacked hacked

Slide 51

Slide 51 text

exit node threats = Man-in-the-Middle threats • exit node snooping on unencrypted data:
 user/password, PII, etc. • Hook browsers with BeEF • Backdoor binaries

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

protects the location, destination, user/pw, & data from the intermediaries

Slide 54

Slide 54 text

Use HTTPS (OMG you should do this anyway!)

Slide 55

Slide 55 text

https://speakerdeck.com/groovecoder/top-5-security-errors-we-see-from-firefox-and-how-to-fix-them

Slide 56

Slide 56 text

+

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

Yay! Your code is faster and more secure for users

Slide 60

Slide 60 text

Oh noes! Your code is broken in

Slide 61

Slide 61 text

is a browser patched

Slide 62

Slide 62 text

is a browser patched ESR

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

Firefox ESR

Slide 65

Slide 65 text

Make your code work in Firefox ESR (You should do this anyway)

Slide 66

Slide 66 text

Make your code work in all browsers! (You should do this anyway)

Slide 67

Slide 67 text

Download ESR

Slide 68

Slide 68 text

Firefox Dev Tools!

Slide 69

Slide 69 text

Come to to learn more!

Slide 70

Slide 70 text

Oh noes! Some of your code is still broken in

Slide 71

Slide 71 text

Why is patched ESR

Slide 72

Slide 72 text

Adversary Model guides Implementations

Slide 73

Slide 73 text

Fingerprint

Slide 74

Slide 74 text

Tor Implementation: Cross-Origin Fingerprinting Unlinkability

Slide 75

Slide 75 text

https://gitweb.torproject.org/tor-browser.git/tree/browser/app/profile/000-tor-browser.js?h=tor-browser-52.2.0esr-7.5-1&id=dda0385cc49240f8bd115476c870d61863741f4c Minimal WebGL No Gamepads Popups open into new tabs UTC timezone No device sensors No WebAudio Windows 7

Slide 76

Slide 76 text

To really debug everything …

Slide 77

Slide 77 text

Download Tor !

Slide 78

Slide 78 text

Tor Dev Tools!

Slide 79

Slide 79 text

Oh noes! Some of your code is STILL broken in

Slide 80

Slide 80 text

Come to to learn more!

Slide 81

Slide 81 text

Summary • Optimize for latency • Make it work in Firefox (ESR) • (Optional) WITHOUT:
 JavaScript, MathML, SVG, Web Fonts

Slide 82

Slide 82 text

Writing code for makes your code better for everyone!

Slide 83

Slide 83 text

Yay! Your code works* fast* and secure* for users * for some definition of “works|fast|secure”

Slide 84

Slide 84 text

Oh noes! YOU are pwned

Slide 85

Slide 85 text

Oh noes! YOU are pwned if YOU were trying to stay anonymous

Slide 86

Slide 86 text

Now we’re (finally) to the dark web

Slide 87

Slide 87 text

https://www.bibliotecapleyades.net/sociopolitica/sociopol_internet214.htm

Slide 88

Slide 88 text

https://www.quora.com/What-is-the-deep-dark-web-and-how-do-you-access-it

Slide 89

Slide 89 text

https://www.eff.org/pages/tor-and-https Location = IP Address

Slide 90

Slide 90 text

https://www.eff.org/pages/tor-and-https Location = IP Address

Slide 91

Slide 91 text

No content

Slide 92

Slide 92 text

How do you set up ? Site.com

Slide 93

Slide 93 text

https://domain.me/how-domain-names-work/

Slide 94

Slide 94 text

https://domain.me/how-domain-names-work/

Slide 95

Slide 95 text

https://whois.icann.org/en/domain-name-registration-process

Slide 96

Slide 96 text

Not Anonymous

Slide 97

Slide 97 text

Not Anonymous

Slide 98

Slide 98 text

How do you set up anonymously? Site.com

Slide 99

Slide 99 text

You set up Site.onion

Slide 100

Slide 100 text

is a Tor Hidden Service Site.onion

Slide 101

Slide 101 text

a Tor Hidden Service uses a “rendezvous protocol” instead of DNS

Slide 102

Slide 102 text

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

Slide 103

Slide 103 text

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

Slide 104

Slide 104 text

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

Slide 105

Slide 105 text

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

Slide 106

Slide 106 text

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

Slide 107

Slide 107 text

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

Slide 108

Slide 108 text

Rendezvous Point

Slide 109

Slide 109 text

But since
 Tor hidden services hop thru 6 nodes …

Slide 110

Slide 110 text

… really, Optimize for latency (You should do this anyway)

Slide 111

Slide 111 text

Optimize for latency • Minimize Requests • Prefer fewer, larger asset bundles • Use CSS Sprites for images • Use Data URIs for small images • Use Icon Fonts • Use Resource Hints • Good caching • Allow CDN access from Tor nodes

Slide 112

Slide 112 text

is easy to set up! Site.onion

Slide 113

Slide 113 text

1. Run a web server 2. Edit your torrc file 3. Run tor Site.onion

Slide 114

Slide 114 text

No content

Slide 115

Slide 115 text

torrc

Slide 116

Slide 116 text

No content

Slide 117

Slide 117 text

No content

Slide 118

Slide 118 text

No content

Slide 119

Slide 119 text

No content

Slide 120

Slide 120 text

Yay! Your .onion is working!

Slide 121

Slide 121 text

Oh noes! You are still hacked identified!

Slide 122

Slide 122 text

Come to to learn more! • OnionScan • Anonymous Email • EXIF data in images • Server fingerprinting • “Rotten Onions” attacks • (maybe: hacking nazis on the dark web?)

Slide 123

Slide 123 text

Why you should write code for the dark web

Slide 124

Slide 124 text

Writing code for the dark web is fun

Slide 125

Slide 125 text

Writing code for the dark web makes your code better

Slide 126

Slide 126 text

Writing code for the dark web makes your code better faster more secure more compatible

Slide 127

Slide 127 text

Writing code for the dark web makes your code better think

Slide 128

Slide 128 text

Writing code for the dark web makes your code better about your privacy think

Slide 129

Slide 129 text

Writing code for the dark web makes your code better about your privacy think others’

Slide 130

Slide 130 text

http://www.slate.com/articles/technology/future_tense/2017/07/women_young_people_experience_the_chilling_effects_of_surveillance_at_higher.html

Slide 131

Slide 131 text

–Trisha Salas @ Thunder Plains 2016 “I want to try Tor … but I heard it puts you on some kind of list … and I plan to travel soon.”

Slide 132

Slide 132 text

–me “I have done many weird things with/on Tor and I’ve had no problems traveling.”

Slide 133

Slide 133 text

Download Tor !

Slide 134

Slide 134 text

Set up a hidden service

Slide 135

Slide 135 text

“Privacy by Design” https://www.smashingmagazine.com/2017/07/privacy-by-design-framework/

Slide 136

Slide 136 text

Privacy Guidelines for Designing Personalization https://www.smashingmagazine.com/2016/03/privacy-for-personalization/

Slide 137

Slide 137 text

Come to to learn more! speakerdeck.com/groovecoder Twitter: @groovecoder