secure communications with jabber

270
Jabber security

Upload: stpeter

Post on 05-Dec-2014

7.505 views

Category:

Technology


1 download

DESCRIPTION

An overview of secure communications with Jabber/XMPP IM technologies

TRANSCRIPT

Page 1: Secure Communications with Jabber

Jabber security

Page 2: Secure Communications with Jabber

Peter Saint-Andre

Page 4: Secure Communications with Jabber
Page 5: Secure Communications with Jabber

https://stpeter.im/

Page 6: Secure Communications with Jabber

secure communication

Page 7: Secure Communications with Jabber

with Jabber

Page 8: Secure Communications with Jabber

what is Jabber?

Page 9: Secure Communications with Jabber

open XML technologies

Page 10: Secure Communications with Jabber

real-time messaging

Page 11: Secure Communications with Jabber

presence

Page 12: Secure Communications with Jabber

multimedia negotiation

Page 13: Secure Communications with Jabber

collaboration

Page 14: Secure Communications with Jabber

and more

Page 15: Secure Communications with Jabber

invented by Jeremie Miller in 1998

Page 16: Secure Communications with Jabber

in essence...

Page 17: Secure Communications with Jabber

streaming XML

Page 18: Secure Communications with Jabber

over long-lived TCP connection

Page 19: Secure Communications with Jabber

client-server architecture

Page 20: Secure Communications with Jabber

decentralized network

Page 21: Secure Communications with Jabber

inter-domain messaging

Page 22: Secure Communications with Jabber

like email

Page 23: Secure Communications with Jabber

but really fast

Page 24: Secure Communications with Jabber

with built-in presence

Page 25: Secure Communications with Jabber

not just one open-source project

Page 26: Secure Communications with Jabber

multiple codebases

Page 27: Secure Communications with Jabber

open-source and commercial

Page 28: Secure Communications with Jabber

interoperability via XML wire protocol

Page 29: Secure Communications with Jabber

core protocol standardized @ IETF

Page 30: Secure Communications with Jabber

Extensible

Page 31: Secure Communications with Jabber

Messaging

Page 32: Secure Communications with Jabber

and

Page 33: Secure Communications with Jabber

Presence

Page 34: Secure Communications with Jabber

Protocol

Page 35: Secure Communications with Jabber

(XMPP)

Page 36: Secure Communications with Jabber

RFCs 3920 + 3921

Page 37: Secure Communications with Jabber

multiple implementations

Page 38: Secure Communications with Jabber

serious deployment

Page 39: Secure Communications with Jabber

how many users?

Page 40: Secure Communications with Jabber

we don’t know

Page 41: Secure Communications with Jabber

decentralized architecture

Page 42: Secure Communications with Jabber

100k+ servers

Page 43: Secure Communications with Jabber

50+ million IM users

Page 44: Secure Communications with Jabber

not just IM

Page 45: Secure Communications with Jabber

generic XML routing

Page 46: Secure Communications with Jabber

lots of applications beyond IM

Page 47: Secure Communications with Jabber

continually defining XMPP extensions

Page 48: Secure Communications with Jabber

XMPP Standards Foundation (XSF)

Page 49: Secure Communications with Jabber

developer-driven standards group

Page 50: Secure Communications with Jabber

that’s great, but...

Page 51: Secure Communications with Jabber

how secure is it?

Page 52: Secure Communications with Jabber

what is security?

Page 53: Secure Communications with Jabber

secure conversationin real life...

Page 54: Secure Communications with Jabber

a good friend visits your home

Page 55: Secure Communications with Jabber

you know and trust each other

Page 56: Secure Communications with Jabber

only the two of you

Page 57: Secure Communications with Jabber

strangers can’t enter your home

Page 58: Secure Communications with Jabber

your home is not bugged

Page 59: Secure Communications with Jabber

conversation is not recorded

Page 60: Secure Communications with Jabber

what you say is private and confidential

Page 61: Secure Communications with Jabber

contrast that with the Internet...

Page 62: Secure Communications with Jabber

lots of potential attacks

Page 63: Secure Communications with Jabber

man-in-the-middle

Page 64: Secure Communications with Jabber

eavesdropping

Page 65: Secure Communications with Jabber

unauthenticated users

Page 66: Secure Communications with Jabber

address spoofing

Page 67: Secure Communications with Jabber

weak identity

Page 68: Secure Communications with Jabber

rogue servers

Page 69: Secure Communications with Jabber

denial of service

Page 70: Secure Communications with Jabber

directory harvesting

Page 71: Secure Communications with Jabber

buffer overflows

Page 72: Secure Communications with Jabber

spam

Page 73: Secure Communications with Jabber

spim

Page 74: Secure Communications with Jabber

spit

Page 75: Secure Communications with Jabber

splogs

Page 76: Secure Communications with Jabber

viruses

Page 77: Secure Communications with Jabber

worms

Page 78: Secure Communications with Jabber

trojan horses

Page 79: Secure Communications with Jabber

malware

Page 80: Secure Communications with Jabber

phishing

Page 81: Secure Communications with Jabber

pharming

Page 82: Secure Communications with Jabber

information leaks

Page 83: Secure Communications with Jabber

inappropriate logging and archiving

Page 84: Secure Communications with Jabber

you get the picture

Page 85: Secure Communications with Jabber

the Internet is a dangerous place

Page 86: Secure Communications with Jabber

how do we fight these threats?

Page 87: Secure Communications with Jabber

sorry, but...

Page 88: Secure Communications with Jabber

Jabber is not a perfect technology

Page 89: Secure Communications with Jabber

not originally builtfor high security

Page 90: Secure Communications with Jabber

don’t require PGP keys or X.509 certs

Page 91: Secure Communications with Jabber

don’t require ubiquitous encryption

Page 92: Secure Communications with Jabber

tradeoffs between security and usability

Page 93: Secure Communications with Jabber

maybe that’s why we have 50+ million users...

Page 94: Secure Communications with Jabber

but privacy and security are important

Page 95: Secure Communications with Jabber

so what have we done to help?

Page 96: Secure Communications with Jabber

Jabber architecture...

Page 97: Secure Communications with Jabber
Page 98: Secure Communications with Jabber

similar to email

Page 99: Secure Communications with Jabber

client connects to server (TCP 5222)

Page 100: Secure Communications with Jabber

(or connect via HTTP binding over SSL)

Page 101: Secure Communications with Jabber

client MUST authenticate

Page 102: Secure Communications with Jabber

originally: plaintext (!) or hashed password

Page 103: Secure Communications with Jabber

Simple Authentication & Security Layer (SASL)

Page 104: Secure Communications with Jabber

RFC 4422

Page 105: Secure Communications with Jabber

many SASL mechanisms

Page 106: Secure Communications with Jabber

PLAIN (OK over encrypted connection)

Page 107: Secure Communications with Jabber

DIGEST-MD5

Page 108: Secure Communications with Jabber

EXTERNAL (with X.509 certs)

Page 109: Secure Communications with Jabber

GSSAPI (a.k.a. Kerberos)

Page 110: Secure Communications with Jabber

ANONYMOUS

Page 111: Secure Communications with Jabber

etc.

Page 112: Secure Communications with Jabber

all users are authenticated

Page 113: Secure Communications with Jabber

sender addresses not merely asserted

Page 114: Secure Communications with Jabber

server stamps user ‘from’ address

Page 115: Secure Communications with Jabber

Jabber IDs are logical addresses

Page 116: Secure Communications with Jabber

IP addressesnot exposed

Page 117: Secure Communications with Jabber

Jabber ID looks like an email address

Page 120: Secure Communications with Jabber

not limited to US-ASCII characters

Page 121: Secure Communications with Jabber

jiři@čechy.cz

Page 122: Secure Communications with Jabber

πλατω@ἑλλας.gr

Page 123: Secure Communications with Jabber

มฌำปจ@jabber.th

Page 124: Secure Communications with Jabber

ぷぉぞ@jabber.jp

Page 125: Secure Communications with Jabber

∞@math.it

Page 126: Secure Communications with Jabber

full Unicode opens phishing attacks

Page 127: Secure Communications with Jabber

[email protected]ᏚᎢᎵᎬᎢᎬᏒ@jabber.org

Page 128: Secure Communications with Jabber

clients should use “petnames”

Page 129: Secure Communications with Jabber

store in buddy list [tm] (a.k.a. “roster”)

Page 130: Secure Communications with Jabber

server stores your roster

Page 131: Secure Communications with Jabber

server broadcastsyour presence

Page 132: Secure Communications with Jabber

but only to subscribers you have authorized

Page 133: Secure Communications with Jabber

most traffic goes through server

Page 134: Secure Communications with Jabber

traffic is pure XML

Page 135: Secure Communications with Jabber

servers reject malformed XML

Page 136: Secure Communications with Jabber

servers may validate traffic against schemas

Page 137: Secure Communications with Jabber

difficult to inject binary objects

Page 138: Secure Communications with Jabber

difficult to propagate malware

Page 139: Secure Communications with Jabber

break alliance between viruses and spam

Page 140: Secure Communications with Jabber

spam virtually unknown on Jabber network

Page 141: Secure Communications with Jabber

why?

Page 142: Secure Communications with Jabber

hard to spoof addresses

Page 143: Secure Communications with Jabber

hard to send inline binary

Page 144: Secure Communications with Jabber

XHTML subset (no scripts etc.)

Page 145: Secure Communications with Jabber

user approval required for file transfer

Page 146: Secure Communications with Jabber

privacy lists to block unwanted users

Page 147: Secure Communications with Jabber

XMPP not immune to spam

Page 148: Secure Communications with Jabber

have spam-fighting tools ready when it appears

Page 149: Secure Communications with Jabber

challenge-response to register an account

Page 150: Secure Communications with Jabber

challenge-response to communicate

Page 151: Secure Communications with Jabber

spam reporting

Page 152: Secure Communications with Jabber

working on more anti-spam tools

Page 153: Secure Communications with Jabber

server reputation system?

Page 154: Secure Communications with Jabber

anonymized IP address? (groupchat spam)

Page 155: Secure Communications with Jabber

spammers need to overcome...

Page 156: Secure Communications with Jabber

bandwidth limits

Page 157: Secure Communications with Jabber

connection limits

Page 158: Secure Communications with Jabber

other denial-of-service prevention measures

Page 159: Secure Communications with Jabber

distributed attack or run a rogue server

Page 160: Secure Communications with Jabber

not impossible

Page 161: Secure Communications with Jabber

just harder than other networks (got email?)

Page 162: Secure Communications with Jabber

no rogue servers (yet)

Page 163: Secure Communications with Jabber

optional to federate with other servers

Page 164: Secure Communications with Jabber

many private XMPP servers

Page 165: Secure Communications with Jabber

public servers federate as needed (TCP 5269)

Page 166: Secure Communications with Jabber

DNS lookup to get server IP address

Page 167: Secure Communications with Jabber

only one hopbetween servers

Page 168: Secure Communications with Jabber

server identitiesare validated

Page 169: Secure Communications with Jabber

server dialback (identity verification)

Page 170: Secure Communications with Jabber

effectively prevents server spoofing

Page 171: Secure Communications with Jabber

receiving server checks sending domain

Page 172: Secure Communications with Jabber

no messages from “[email protected]

Page 173: Secure Communications with Jabber

DNS poisoning can invalidate

Page 174: Secure Communications with Jabber

need something stronger?

Page 175: Secure Communications with Jabber

Transport Layer Security (TLS)

Page 176: Secure Communications with Jabber

RFC 4346

Page 177: Secure Communications with Jabber

IETF “upgrade” to SSL

Page 178: Secure Communications with Jabber

TLS + SASL EXTERNAL with X.509 certs

Page 179: Secure Communications with Jabber

strong authentication of other servers

Page 180: Secure Communications with Jabber

but only if certs arenot self-signed

Page 181: Secure Communications with Jabber

$$$

Page 182: Secure Communications with Jabber

real X.509 certs are expensive

Page 183: Secure Communications with Jabber

VeriSign, Thawte, etc.

Page 184: Secure Communications with Jabber

a better way...

Page 185: Secure Communications with Jabber

xmpp.net

Page 186: Secure Communications with Jabber

intermediate CA for XMPP network

Page 187: Secure Communications with Jabber

free digital certificates for XMPP server admins

Page 188: Secure Communications with Jabber

(need to prove you own the domain)

Page 189: Secure Communications with Jabber

root CA: StartCom

Page 190: Secure Communications with Jabber

ICA: XMPP Standards Foundation

Page 191: Secure Communications with Jabber

hopefully other CAs in future

Page 192: Secure Communications with Jabber

so channel encryption is a no-brainer

Page 193: Secure Communications with Jabber

man-in-the-middleis much harder

Page 194: Secure Communications with Jabber

“Mallory” is foiled

Page 195: Secure Communications with Jabber

but what about “Isaac” and “Justin”?

Page 196: Secure Communications with Jabber
Page 197: Secure Communications with Jabber

we can encrypt the channels

Page 198: Secure Communications with Jabber

but traffic is cleartext within servers!

Page 199: Secure Communications with Jabber

need end-to-end encryption (“e2e”)

Page 200: Secure Communications with Jabber

first try: OpenPGP(XEP-0027)

Page 201: Secure Communications with Jabber

great for geeks

Page 202: Secure Communications with Jabber

but Aunt Tillie doesn’t use PGP

Page 203: Secure Communications with Jabber

second try: S/MIME(RFC 3923)

Page 204: Secure Communications with Jabber

great for geeks (and some employees)

Page 205: Secure Communications with Jabber

but Aunt Tillie doesn’t use X.509

Page 206: Secure Communications with Jabber

XML encryption and digital signatures?

Page 207: Secure Communications with Jabber

seems natural, but not much interest (c14n?)

Page 208: Secure Communications with Jabber

doesn’t provide perfect forward secrecy

Page 209: Secure Communications with Jabber

off-the-record communication (OTR)?

Page 210: Secure Communications with Jabber

great idea

Page 211: Secure Communications with Jabber

opportunistic encryption (à la SSH)

Page 212: Secure Communications with Jabber

perfect forward secrecy

Page 213: Secure Communications with Jabber

but encrypts only the plaintext message body

Page 214: Secure Communications with Jabber

we need to encrypt the entire packet

Page 215: Secure Communications with Jabber

why?

Page 216: Secure Communications with Jabber

because XMPP is more than just IM

Page 217: Secure Communications with Jabber

protect IPs sent in multimedia negotiation

Page 218: Secure Communications with Jabber

protect shared XML editing data

Page 219: Secure Communications with Jabber

etc.

Page 220: Secure Communications with Jabber

solution: encrypted sessions

Page 221: Secure Communications with Jabber

big set of requirements...

Page 222: Secure Communications with Jabber

packets are confidential

Page 223: Secure Communications with Jabber

packet integrity

Page 224: Secure Communications with Jabber

replay protection

Page 225: Secure Communications with Jabber

key compromise does not reveal past comms

Page 226: Secure Communications with Jabber

don’t depend on public key infrastructure

Page 227: Secure Communications with Jabber

entities authenticated to each other

Page 228: Secure Communications with Jabber

3rd parties cannot identify entities

Page 229: Secure Communications with Jabber

robustness against attack (multiple hurdles)

Page 230: Secure Communications with Jabber

upgradeability if bugs are discovered

Page 231: Secure Communications with Jabber

encryption of full XMPP packets

Page 232: Secure Communications with Jabber

implementable by typical developer

Page 233: Secure Communications with Jabber

usable by typical user

Page 234: Secure Communications with Jabber

how to address all requirements?

Page 235: Secure Communications with Jabber

just a dream?

Page 236: Secure Communications with Jabber

bootstrap from cleartext to encryption

Page 237: Secure Communications with Jabber

in-band Diffie-Hellman key exchange

Page 238: Secure Communications with Jabber

translate “SIGMA” approach to XMPP

Page 239: Secure Communications with Jabber

similar to Internet Key Exchange (IKE)

Page 240: Secure Communications with Jabber

details in XSF XEPs 116, 188, 200

Page 241: Secure Communications with Jabber

simplified profile in XEP-0217

Page 242: Secure Communications with Jabber

major priority for2007-2008

Page 243: Secure Communications with Jabber

support from NLnet(thanks!)

Page 244: Secure Communications with Jabber

pursuing full security analysis

Page 245: Secure Communications with Jabber

code bounties

Page 246: Secure Communications with Jabber

GSoC project

Page 247: Secure Communications with Jabber

Jabber security summit

Page 248: Secure Communications with Jabber

more at blog.xmpp.org

Page 249: Secure Communications with Jabber

wide implementation in next ~12 months

Page 250: Secure Communications with Jabber

so how are we doing?

Page 251: Secure Communications with Jabber

spam free

Page 252: Secure Communications with Jabber

hard to spoof addresses

Page 253: Secure Communications with Jabber

pure XML discourages binary malware

Page 254: Secure Communications with Jabber

DoS attacks possible but not easy

Page 255: Secure Communications with Jabber

widespread channel encryption

Page 256: Secure Communications with Jabber

working hard on end-to-end encryption

Page 257: Secure Communications with Jabber

widely deployed in high-security environments

Page 258: Secure Communications with Jabber

Wall Street investment banks

Page 259: Secure Communications with Jabber

U.S. military

Page 260: Secure Communications with Jabber

MIT and other universities

Page 261: Secure Communications with Jabber

many public servers since 1999

Page 262: Secure Communications with Jabber

no major security breaches

Page 263: Secure Communications with Jabber

can’t be complacent

Page 264: Secure Communications with Jabber

always more to do

Page 265: Secure Communications with Jabber

security is a never-ending process

Page 266: Secure Communications with Jabber

analysis and hacking are encouraged

Page 267: Secure Communications with Jabber

if it breaks, we’ll fix it

Page 269: Secure Communications with Jabber

join the conversation

Page 270: Secure Communications with Jabber

let’s build a more secure Internet