
























Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Prepara i tuoi esami
Studia grazie alle numerose risorse presenti su Docsity
Prepara i tuoi esami con i documenti condivisi da studenti come te su Docsity
Trova i documenti specifici per gli esami della tua università
Preparati con lezioni e prove svolte basate sui programmi universitari!
Rispondi a reali domande d’esame e scopri la tua preparazione
Riassumi i tuoi documenti, fagli domande, convertili in quiz e mappe concettuali
Studia con prove svolte, tesine e consigli utili
Togliti ogni dubbio leggendo le risposte alle domande fatte da altri studenti come te
Esplora i documenti più scaricati per gli argomenti di studio più popolari
Ottieni i punti per scaricare
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Soluzioni diversi esami di control network security
Tipologia: Prove d'esame
1 / 32
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!

























1. Firme digitali e hashing Una firma digitale è solitamente realizzata calcolando uno hashing di un messaggio e cifrando il risultato dello hashing attraverso la chiave private di colui che firma. a. Cosa potrebbe accadere se si verificasse una collisione nella funzione di hashing usata per la firma? Due messaggi hanno lo stesso hash implica che i due messaggi hanno la stessa firma. b. Quale potrebbe essere il possibile impatto di una tale collisione sulla sicurezza del meccanismo di firma digitale? Posso trovare un messaggio m2 con lo stesso hash del messaggio m1. L’utente firma l’hash di m1. L’avversario può dire che m2 è stato firmato dall’utente perché m1 e m2 hanno la stessa firma. c. Quali fattori condizioneranno l’impatto e quali azioni potrebbero essere intraprese per mitigare l’effetto di tali collisioni (si considerino, ad esempio, le soluzioni implementate in standard come PKCS e DSS)? PKCS: 0|1o2|8≠bytes|0 end of nonzero|message 0 per assicurare signature h(m), 1 else 2 for encoding only message PKCS: Invece di firmare l’hash del messaggio, firmo l’hash del messaggio concatenato a byte casuali. DSS: Uso SHA come hash e DSA come algoritmo: Prima di firmare sommo all’ hash del messaggio una certa quantità che dipende sia da numeri primi contenuti in chiave pubblica (che servono per la verification) che da numeri segreti casuali che variano di volta in volta. In questo modo è difficile che due messaggi abbiano la stessa firma anche se hanno stesso hash. (i byte casuali dovrebbero coincidere). In dss you need per message
secret number In DSA p and q high prime number are chosen before continuing, private and public key are chosen according to these numbers
2. RSA a. Si assuma un sistema di cifratura RSA con p=23 e q= 29. L’esponente di cifratura è scelto pari a e=3. Determinare l’esponente di decifratura d. N = pq = 667 Z = (p-1)(q-1) = 616 scelgo e tale che (de-1) mod z = 0 3d mod 616 = 1 Provo 616 +1 è divisibile per 3? no Provo 6162 +1 è divisibile per 3? si d = 411 b. Mostrare che RSA è insicuro rispetto un attacco “chosen cyphertext”, in cui un attaccante che osserva c = me^ mod n può determinare m richiedendo la decifratura di c’ ≠ c. Suggerimento: sfruttare la proprietà omomorfica di RSA, secondo la quale (m1 m2)e^ mod n = (m1e^ mod n)(m2e^ mod n) mod n. cc’’ = (me^ mod n)(m’’e^ mod n) cc’’ mod n = (me^ mod n)(m’’e^ mod n) mod n cc’’ mod n = (m m’’)e^ mod n c’ = cc’’ richiedo la decifratura di c’. mi risponde con m * m’’. m’’ lo conosco, calcolo m = (mm’’)/m’’ 3. Autenticazione a. Descrivere dettagliatamente cosa è il Lamport’s Hash e come lavora. In quali casi risulta particolarmente utile? invece di fare H(password) faccio Hn(password) e conservo sul server sia Hn(password) e n. ogni volta che uso la password sul server sostituisco Hn(password) e n con Hn-1(password) e n-1. Quando n è vicina a 0 la password scade.
Consente al client e al server di autenticarsi. Si comunicano i propri cifrari disponibili in modo da scegliere il migliore comune. Il server invia il certificato e inizia lo scambio della chiave (opzionalmente richiede l’auth del client). (Il cliente opzionalmente si autentica) 2 random number and pre master key exchanged to generate session keys, If some steps fail, ssl fails. From random number exchanged both generate k material for encrypt decrypt. Connection establish untile the closure :P AUTH with mac Hash(MAC_secret_key || pad2 || hash(MAC_secret_key || pad1 || seqNum || SSLcompressed.type || SSLcompressed.length || SSLcompressed.fragment))
handshake!
Both of them are security layer in the protocol stack. The main difference is that SSL work between TCP and application while IPSec work on top of IP so can encrypt TPC segment. The first advantage of IPSec is that we can avoid IPspoofing but this cost in term of complexity of the architecture: each intermediate network node have to support IPSec and share private keys with other nodes moreover there is a problem of decrypting and encryption at each node. This also comport problem in the existent NAT system and required a new standard: NAT-T. All this problems are avoid with SSL that simply encrypt the payload of the TCP segments so we have a more practical protocol easy to use especially in application. b. Spiegare le ragioni per cui SSL permette a un intruso di ottenere più informazioni per l’analisi del traffico rispetto a IPSec. (Transport Layer Security (TLS) and its predecessor, Secure Sockets Layer (SSL)) SSL è tra livello applicativo e livello di trasporto. IPSEC è tra livello TCP e IP. Quindi con SSL sono in chiaro tutte le informazioni dell’header tcp, con IPSEC no.
L’amministratore di rete ha assegnato al gruppo i seguenti diritti di accesso ai file di una cartella usata dai membri del gruppo. La cartella contiene sia dati che applicazioni. Permessi del gruppo: esecuzione, visione del contenuto di cartelle, creazione file, creazione cartelle, cancellazione, lettura, presa possesso (proprietà). Quale modalità di controllo accessi è stata usata nell’assegnare i diritti di accesso? b1. Mandatory Access Control b2. Role-Based Access Control b3. Discretionary Access Control b4. Un controllo similare a quello del sistema operativo UNIX b3-b c. Spiegare la risposta alla domanda 5b Lo UNIX access control permette di creare un gruppo che contiene i quattro membri e dare a loro la proprietà del file e il permesso di lettura, scrittura, esecuzione e creazioni di cartelle e file. UNIX access control è un tipo di DAC che associa ad ogni oggetto un proprietario.
Short questions (no more than 5 lines per question)
Un firewall blocca determinati pacchetti o permette solo alcuni pacchetti TCP e IP. Un IDS invece lavora a livello applicativo ed inoltre rileva un intrusione o un tentativo di intrusione.
a. Dicuss the robustness of the protocol with respect to possible misbehaviour of Bob Bob ha due funzione di encoding. RB e RB’. Lui si trova un b pari e una b’ dispari tale che RB(b) = RB’(b’) b. Improve the protocol in order to make it fair (i.e. there is no possibility for Alice and Bob to cheat) Invece di usare una funzione di encoding uso una funzione di hash crittografica. Invece di comunicare solo la funzione, si scambiano sia l’hash function che il numero scelto. Così facendo l’altro può ricalcolarsi hash(valore) e confrontarlo con quello che gli aveva inviato l’altra persona.
trasport e tunnel: autentico tutto tranne campi mutabili
2013 2 6
1. RSA a. Show how to use RSA in order to send long messages confidentially to Bob knowing his public key; your proposal should computationally efficient. E’ computazionalmente inefficiente criptare un messaggio lungo con RSA. Invio a bob una chiave di sessione simmetrica criptata con RSA e utilizzo questa per criptare il messaggio lungo. b. Show a possible attack to the simple RSA digital signature scheme that is based on chosen ciphertext and possible countermeasures. Vedere sopra. Per la countermeasure basta usare un pattern nel plaintext. scelgo un m’ -> c’ c=Cdascoprirec’ Cdascoprire’=mdascoprire modp c= c=Cdascoprirec’=mdascoprire modpm’modp Cdascoprirec’ modp= mdascoprire modpm’modp modp=mdascoprire m C=cdasoprc’ ottengo decifratura, quindi m mdascoprirem’=m -> mdascoprire=m/m’ dove m’ noto c. Describe the standard PKCS1; while presenting the different fields of the record discuss how they allow to eliminate possible weaknesses of the so called text book implementation of RSA. PKCS vedere prima (prima lo usavamo per evitare collision, ora per evitare l’attacco chosen ciphertext, in pratica mette un pattern al messaggio). 0|1o2|8B ≠0|0|h(mess) 0 per assicurare lunghezza non minore di n 1 per signature -> usiamo h(m) 2 per encoding .> usiamo m 8 non ero bytes to avoid collsion last 0 to show the end of the previous nonn zero bytes 2. Authentication We know that authentication of users can be based either on what you know , or on what you have , or on (who you are , or where you are. Present one authentication scheme for each of the above four different apporaches discussing briefly security requirements of each. what you know: password. Qualcuno usa un attacco dizionario o bruteforce o ti ruba la pwd in qualche altro modo. what you have: smart card. Se ti viene rubata la smart card ti viene rubato l’accesso. who you are: biometric tools. Dead people. Not stable over time
5. Short Questions (10 lines per question) a. Traffic analysis of a host consists in analysing the existing connections (IP, port, TCP etc.) of the host. Compare the robustness of SSL and IPSec with respect to a passive adversary able to perform traffic analysis. Vedere sopra b. Present an example of a “replay” attack and discuss how to cope with it. Suppose Alice wants to prove her identity to Bob. Bob requests her password as proof of identity, which Alice dutifully provides (possibly after some transformation like a hash function); meanwhile, Mallory is eavesdropping on the conversation and keeps the password (or the hash). After the interchange is over, Mallory (posing as Alice) connects to Bob; when asked for a proof of identity, Mallory sends Alice's password (or hash) read from the last session, which Bob accepts. 2013 9 16 1 Digital signatures and hash A digital signature is usually implemented by taking a hash of a message and encrypting the hash value with the private key of the signer. a) What could happen if a collision were found in the hash function used for the signature? b) What might be the possible impact of such a collision on the security of the digital signature mechanisms? c) What factors will affect the impact, and what things might be done to mitigate the effect of such collisions (refer, for example, to solutions implemented in standard like PKCS or DSS). Guarda sopra 2 Short questions a) Precomputations (computations performed before a message or a ciphertext becomes available) can be used to speed up the following cryptographic transformations. If the
answer is positive add one line of motivation. (Please note that multiple answers could be correct) A. AES decryption in the OFB mode B. AES encryption in the counter mode C. AES encryption in ECB D. AES decryption in the CBC mode E. RC4 encryption A. posso precomputare tutti gli Ek(seed), Ek(Ek(seed)). B. mi precomputo tutto gli Ek(seed), Ek(seed+1) etc. C. non c’è precomputation D. CBC non è parallelizzabile, per criptare m2 ho bisogno di C1 -> non c’è precomputation E. Mi precomputo lo stream. b) Show that RSA is not secure against a chosen ciphertext attack. In fact, if an attacker observes c = m e mod n , show how he can find m by requesting a decryption of c’, c’ different from c. Hint: use the homomorphic property of RSA stating that (m1 m2) e mod n = (m e mod n)(m e mod n) mod n. Guarda sopra c) The major weaknesses of the CBC mode of AES are ( add one line of motivation for each weakness and note that multiple answers may be correct): A. IV cannot be repeated for the same key B. IV must be kept secret C. encryption is more time consuming than decryption D. decryption cannot be parallelized E. the same plaintext block is always encrypted to the same ciphertext block F. exhaustive key search is easy to mount H. analysis of the ciphertext may reveal patterns (e.g., repeating blocks) in the plaintext A. WEAKNESS, Se Alice invia a Pippo e Pluto lo stesso msg con lo stesso IV. allora il ciphertext è uguale. B. FALSE, viaggia in chiaro. C. FALSE, sono gli stessi passi rovesciati. D. WEAKNESS. computazionalmente difficile. E. FALSE F. FALSE, perché non è facile trovare la chiave
The network administrator assigned the group the following access rights on all the files of a folder the group members will need in doing the job. The folders include data and programs. Allow: Execute Files , List Folders , Create Files , Create SubFolders , Delete , Read Permissions , Take Ownership. What access control strategy was used in assigning the access rights?
. a) Mandatory Access Control . b) Role-Based Access Control . c) Discretionary Access Control . d) A control similar to UNIX operating system c). Explain your answer to Question 5 b). LINUX, that is a DAC 2012 7 9
Descrivere firma e verifica di Elgamal ( denotare con k il valore casuale generato da ogni firma). Due messaggi possono avere stesso hash ma firma diversa, perché l’algoritmo si basa sulla storia dei numeri primi.