Digest Access Authentication: Internet Security For Embedded Devices
Digest Access Authentication: Internet Security For Embedded Devices
ABB
ABB Switzerland Ltd, Corporate Research - 2 2002 ABB all rights reserved
ABB
Provides server authentication, confidentiality and integrity Client authentication optional No configuration transparent
Password based, challengeresponse client authentication Optional Integrity protection and server authentication Use light MD5-hash one-way function Standard integrated in web servers and browsers
IPsec:
ABB Switzerland Ltd, Corporate Research - 3 2002 ABB all rights reserved
ABB
Widely used to exchange text data accross different plateforms Used for the WWW on port 80 to exchange HTML files Standarized in the RFCs The current 1.1 version offers two authentication schemes; basic and digest
Protocol://destination-host/ressource
ABB Switzerland Ltd, Corporate Research - 4 2002 ABB all rights reserved
ABB
Webserver
Password encoded in Base64; no encryption Sent in clear for every subsequent requests Sniffing compromises the password
Response 401; unauthorized WWW-authenticate: Basic realm="Basic Test Zone" HTTP GET Request with clear username and password: Authorization: Basic dGVzdDp0ZXN0
Response 200; OK <data>
ABB Switzerland Ltd, Corporate Research - 5 2002 ABB all rights reserved
ABB
Browser
Communication channel
1 2
Response HTTP 401 unauthorized WWW-authenticate: Digest realm="DigestZone", nonce="3gw6ask", algorithm=MD5, domain="/protected/", qop="auth" <data> HTTP GET /protected/test.html Request Authorization: Digest username="Controler", realm="DigestZone", nonce="3gw6ask", uri="/protected/test.html", algorithm=MD5, response="65biad5s70de", qop=auth, nc=0001, cnonce="82c875dc" username, realm
response
MD5-hash
document
5
code 200
MD5-hash
response
response
ABB Switzerland Ltd, Corporate Research - 6 2002 ABB all rights reserved
Show document, update nc by 1 Prompt for username and password again Back to 3
code 401
Authorization: Digest username="Controler", realm="DigestZone", nonce="3gw6ask", uri="/protected/test2.html", algorithm=MD5, response="4c5c93bc8747i", qop=auth, nc=0002, cnonce="72g4dsfs" Response HTTP 200 OK Authentication-Info: rspauth="g45sx4j65s1", cnonce="3gw6ask", nc=0002, qop=auth <data>
Match ?
No
Yes
ABB
Mutual authentication
Browser
Request document
once Challenge: n
Web Server
ABB Switzerland Ltd, Corporate Research - 7 2002 ABB all rights reserved
The server is authenticated Done via an acknowledgement ; the rspauth header-field MD5-digest calculated like the browser response
ABB
Integrity protection
DAA provides a way to protect the transmission integrity Quality Of Protection qop=auth-int (optional) A digest of the entity (payload) is included in the response Protect query sent via POST, queries with GET are already protected
GET /test.html?test&command=1 HTTP/1.1 rspauth = Host: 10.41.74.144 MD5[MD5(username:realm:password):nonce:nc:cnonce:qop:MD5(:URI:MD5{entity-body})] Connection: Keep-Alive Authorization: Digest username="test", realm="digest", qop="auth-int", algorithm="MD5", uri="/test.html?test&command=1", Like mutual authentication, not yet implemented in all the browsers nonce="tC/4qtSqAwA=fbc6ee7ad984a2ccd3f9011c646d1", nc=00004, and web servers cnonce="448e2f9bdd915b6bf", response="d93bf8645d2968867e3a270ff"
ABB
Replay attack
A request from an authenticated user is intercepted and replayed A specific request always includes:
Those fields are protected in the response hash, with the password An attacker must defeat:
the requested uri the nonce from the server A request counter nc
ABB Switzerland Ltd, Corporate Research - 9 2002 ABB all rights reserved
Authorization: Digest username="Controler", realm="DigestZone", nonce="3gw6ask", uri="/protected/test.html", algorithm=MD5, response="65biad5s70de", qop=auth, nc=0001, cnonce="82c875dc" response = MD5[MD5(username:realm:password):nonce:nc:cnonce:qop:MD5(method:URI)]
Implementation dependant A serious implementation reduces the risks of a replay attack to zero
ABB
response = MD5[MD5(test:test:?????):3gw6ask:0001:82c875dc:auth:MD5(GET:/test.htm)]
Authorization: Digest username=test", realm=test", nonce="3gw6ask", uri="/test.htm", algorithm=MD5, response="65biad5s70de", qop=auth, nc=0001, cnonce="82c875dc"
ABB Switzerland Ltd, Corporate Research - 10 2002 ABB all rights reserved
A password in a dictionnary is found within seconds A password with a mix of 8 numbers, upper/lower case characters is cracked in approximatively 702 years Example: My 2 sons Jean and Paul are great! M2sJaPag! With only 5 characters (lower case) 20 minutes Not as safe as SSL / IPsec
ABB
Man-in-the-middle attack
The attacker is between the client and the server The attacker can temper all or part of the communication without the user noticing it
Browser
HTTP GET /p r otecte d/test .html
Web Server
l Req st .htm te d/te c /pr ote uest
Req u est
ABB Switzerland Ltd, Corporate Research - 11 2002 ABB all rights reserved
Resp r ized o nse au tho 01 un ige st WWW HTTP 401 1 4 unau - auth :D HTTP thor iz e ntic o nse uthe nticate ate : B ed Resp -a asi c WW W HTT P GE 2 T Re qu es t, Auth est pa ss clea r use o riza Req u w tion : rnam html Basi o rd e an /test . <...> c dG d te d VzdD r otec : Dige st ..> 3 p0ZX ET /p n e" <. N0 TP G tho rizatio ia d5s70 d HT b Au ="65 ons e resp
GET HTTP
The browser can send basic authentication instead of digest The request can be modified The exchanged data can be modified
4
Username and password
Browsers should accept only digest and use visual clues Not possible with mutual authentication and integrity protection
ABB
Exploit vulnerabilities in the program code Usually done using a bufferoverflow Everything the program has access to is compromised Most of the time, crash the server / client and lead to a DoS Solution includes frequent update and version dissimulation
Denial Of Service attacks the availability of the service Flood the server with requests Physical DoS Network outage
ABB Switzerland Ltd, Corporate Research - 12 2002 ABB all rights reserved
ABB
Apache 2.0.42
Support mutual authentication Nonce check time limited Strong uri check
RomPager 4.05
ABB Switzerland Ltd, Corporate Research - 13 2002 ABB all rights reserved
Opera 6.05
GoAhead 2.1.2
Source available
ABB
Internet explorer 6.0.26 Sends wrong uri Different prompt for Basic/DAA
Apache 2.0.42
Mutual authentication
Digest auth tested Not working for GET + parameters Digest auth tested
Digest auth tested Requires valid domain Digest auth tested Not working for long GET + parameters Not working
RomPager 4.05
Good security, except for GET with parameters
Digest auth tested Not working for long GET + parameters Digest auth tested Not working for GET + parameters
GoAhead 2.1.2
Weak security Parsing errors
ABB Switzerland Ltd, Corporate Research - 14 2002 ABB all rights reserved
ABB
Conclusion
DAA is
ABB Switzerland Ltd, Corporate Research - 15 2002 ABB all rights reserved
Should be used wherever possible, even when used in conjunction with SSL and IPsec Systems using basic should be migrated to DAA
ABB
AB B