1 / 23

MSCHAP

MSCHAP. CHAP. È un protocollo di tipo challange-response Esistono due version sviluppate dalla Microsoft: MS-CHAP v1 MS-CHAP v2 È un protocollo a tre vie La versione 2 consente la mutua autenticazione. Come funziona la v1. The client requests a login challenge from the Server.

derica
Download Presentation

MSCHAP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MSCHAP

  2. CHAP • È un protocollo di tipo challange-response • Esistono due version sviluppate dalla Microsoft: • MS-CHAP v1 • MS-CHAP v2 • È un protocollo a tre vie • La versione 2 consente la mutua autenticazione

  3. Come funziona la v1 • The client requests a login challenge from the Server. • The Server sends back an 8-byte random challenge. • The Client uses the LAN Manager hash of its password to derive three DES keys. • Each of these keys is used to encrypt the challenge. • All three encrypted blocks are concatenated into a 24-byte reply. • The Client creates a second 24-byte reply using the Windows NT hash and the same procedure. • The server uses the hashes of the Client's password, stored in a database, to decrypt the replies.

  4. I problemi • Vengono inviati due pacchetti • Uno per domini NT • Un altro per domini non NT • Ho due informazioni ed uno dei due messaggi è molto più attaccabile dell’altro • L0phtcrack è in grado di attaccare efficientemente il pacchetto più debole

  5. Protocollo v.2 • Client requests a login challenge from the Server. 2. The Server sends back a 16-byte random challenge. 3a. The Client generates a random 16-byte number, called the “Peer Authenticator Challenge.“ 3b. The Client generates an 8-byte challenge by hashing the 16-byte challenge received in step (2), the 16-byte Peer Authenticator Challenge generated in step (3a), and the Client's username. 3c. The Client creates a 24-byte reply, using the Windows NT hash function and the 8-byte challenge generated in step (3b). This process is identical to MS-CHAPv1. 3d. The Client sends the Server the results of steps (3a) and (3c).

  6. Protocolo v2 4a. The Server uses the hashes of the Client's password, stored in a database, to decrypt the replies. If the decrypted blocks match the challenge, the Client is authenticated. 4b. The Server uses the 16-byte Peer Authenticator Challenge from the client, as well as the Client's hashed password, to create a 20-byte “Authenticator Response.“ 5 The Client also computes the Authenticator Response. If the computed response matches the received response, the Server is authenticated.

  7. Forze e debolezze • This protocol works, and eliminates the most serious weaknesses that plagued MS-CHAPv1. In MS-CHAPv1, two parallel hash values were sent from the Client to the Server: the LAN Manager hash and the Windows NT hash. • Still, the security of this protocol is based on the password used, and L0phtcrack can still break weak passwords using a dictionary attack

  8. Derivare l’eight byte • The Client creates a 16-byte random number, called the Peer Authenticator Challenge. • The Client concatenates the Peer Authenticator Challenge with the 16-byte challenge received from the server and the Client's username. • The client hashes the result with SHA-1 • The first eight bytes of the hash become the 8-byte challenge.

  9. Creazione Response Both MS-CHAPv1 and MS-CHAPv2 use the same procedure to derive a 24-byte response from the 8-byte challenge and the 16-byte NT password hash: • The 16-byte NT hash is padded to 21 bytes by appending ve zero bytes. • Let X; Y;Z be the three consecutive 7-byte blocks of this 21-byte value, and let C be the 8-byte challenge. The 24-byte response R is calculatedas R = hDESX(C);DESY (C); DESZ(C)i.

  10. Debolezze !! • It is unclear to us why this protocol is so complicated. At first glance, it seems reasonable that the Client not use the challenge from the Server directly, since it is known to an eavesdropper. • Instead of deriving a new challenge from some secret information (the password hash, for example) the Client uses a unique random number that is sent to the Server later in the protocol. • There is no reason why the Client cannot use the Server's challenge directly and not use the Peer Authenticator Challenge at all.

  11. Problema principale!!! • This complicated procedure creates a serious weakness in the MS-CHAP protocols: it allows the attacker to speed up dictionary keysearch by a factor of 216, which is a pretty devastating given the relatively low entropy of most user passwords. • Problema particolarmente grave per v2 poichè è quello principale

  12. È possibile attuare un attacco plain-text perché si conosce C e DESz(C). • Z assume solo 216 possibili valori !!! • Inoltre effettuando off-line l’hash di tutte le possibili password di un dizionario si possono selezionare solo quelle che hanno gli ultimi due bytes corretti. • A questo punto si riduce il numero di password da provare di 216. • R = SHA-1(NT hash;C) risolverebbe il problema

  13. Creazione • The Server (or the Client) hashes the 16-byte NT password hash to get password-hash-hash. (The Server stores the clients password hashed with MD4; this is the NT password hash value.) • The Server then concatenates the password-hash-hash, the 24-byte NT response, and the literal string “Magic server to client constant", and then hashes the result with SHA. • The Server concatenates the 20-byte SHA output from step (2), the initial 8-byte generated challenge and the literal string “Pad to make it do more than one iteration", and then hashes the result with SHA.

  14. Differenze * MS-CHAP-V2 is enabled by negotiating CHAP Algorithm 0x81 in LCP option 3, Authentication Protocol. * MS-CHAP-V2 provides mutual authentication between peers by piggybacking a peer challenge on the Response packet and an authenticator reponse on the Success packet. * The calculation of the "Windows NT compatible challenge response" sub-field in the Response packet has been changed to include the peer challenge and the user name. * In MS-CHAP-V1, the "LAN Manager compatible challenge response“ sub-field was always sent in the Response packet. This field has been replaced in MS-CHAP-V2 by the Peer-Challenge field. * The format of the Message field in the Failure packet has been changed. * The Change Password (version 1) and Change Password (version 2) packets are no longer supported. They have been replaced with a single Change-Password packet.

  15. S/KEY

  16. Autenticazione S/Key • Il sistema S/KEY provvede all'autenticazione, usando password one-time, su reti soggette all'attacco di risposta. • La password segreta dell'utente non attraversa mai la rete durante il login, o quando sono eseguiti altri programmi che richiedono l'autenticazione dell'utente. • Per installare il sistema S/KEY è necessario avere il software S/KEY. Esistono diverse versioni di questo software a seconda dei sistemi su cui lo si vuole installare: Dos, Windows, Mac ed Unix.

  17. Caratteristiche di S/Key Alcune delle proprietà del sistema S/KEY sono: • Protezione contro gli attacchi di tipo replay. • E’ concettualmente facile e semplice da usare. • E’ basato su password segrete memorizzate in database. • Non richiede speciali dispositivi, né algoritmi segreti.

  18. Meccanismi Ci sono due modi di operare: quello dell'utente e quello del sistema: • dal lato dell’utente, la password one-time deve essere generata • dal lato del sistema, la password one-time deve essere verificata. Queste password one-time sono generate e verificate usando funzioni one-way basate sull'MD4 La funzione one-way prende in input otto byte e restituisce in output otto byte, dopo che è stato eseguito l'MD4

  19. Protocollo lato Server • Client e server devono condividere un segreto • Il client genera la one-time password all’istante i nel seguente modo: • PN=f(S) • Pi=fN-i(S) • P0=fN(S) Dove s è il segreto ed f la funzione di Hash

  20. Protocollo lato server • Il server calcola la password e conserva ili risultato del penultimo calcolo • Confronta le versioni e dà la risposta • Il penultimo risultato può servire ad anticipare il calcolo della sequenza

  21. Utilizzo • L’utente chiede l’autenticazione • Il server risponde con un seed e un numero • Il seed serve ad identificare il segreto e può essere usato per l’accesso a diverse macchine • Il numero serve a capire quante volte la funzione di hash deve essere calcolata • Da quel momento le ulteriori password userranno N-i per l’iesima autenticazione • Serve una reinizializzazione

More Related