


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



This homework has two parts: one part with a set of theory questions and a programming part. Programming can be done in either C or Java. Submissions should include the annotated source code. Programs that do not compile will get a low grade. Make sure your programs do not crash when given bad input, but rather produce a useful warning or error message and take the appropriate action (recover or quit).
The compressed files (either tar or zip) will be submitted using email to [email protected]. Please make sure that you send me a single compressed file with all the documents and code. The compressed file should not exceed 1MB.
1)[15 points] Firewalls: a) You would like to filter traffic that comes to your Web Server. What type of firewall would you use and why? b) Where would you place a DNS server in an organization assuming that you can use a network firewall and why?
2)[ 4 0points] Assume you are given the following firewall policy: Action Prot. Source Destination Source port Destination port ACCEPT Udp 0.0.0.0/0 129.174.17.180 * 53 ACCEPT Tcp 55.66.77.0/24 129.174.17.180 * 22 REJECT Tcp 55.66.77.12 129.174.17.180 2500 22 ACCEPT Tcp 127.0.0.1 129.174.17.180 * 6000 DENY Tcp 0.0.0.0/0 129.174.17.180 * 6000 REJECT udp 0.0.0.0/0 129.174.17.180 * 32768 REJECT Tcp 0.0.0.0/0 129.174.17.180 * 32769 REJECT Tcp 0.0.0.0/0 129.174.17.180 * 32768 ACCEPT Tcp 0.0.0.0/0 129.174.17.180 * 80 ACCEPT udp 129.174.16.20 0.0.0.0/0 53 1025: ACCEPT udp 129.174.20.100 0.0.0.0/0 53 1025: ACCEPT udp 129.174.18.100 0.0.0.0/0 53 1025: ACCEPT All 0.0.0.0/0 0.0.0.0/0 * * REJECT Tcp 0.0.0.0/0 0.0.0.0/0 * * REJECT udp 0.0.0.0/0 0.0.0.0/0 * * DENY Tcp 0.0.0.0/0 129.57.17.180 * 6000: DENY Tcp 0.0.0.0/0 129. 57 .17.180 * 0: DENY All 0.0.0.0/0 129.174.17.180 * * a) Identify any policy conflicts or redundancies. b) Show what would happen to the following packets under the two rule application strategies: a) first match (or top-down) b) last match (or bottom-up). i) +----+-------------------+-------------------+------+ | TCP | s: 11. 22. 17 .12:4000 | d:129.174.17.180:53 | data… | +----+-------------------+-------------------+------+ ii) +----+-------------------+-------------------+------+ | UDP | s:55.66.77.12:4500 | d:129.174.17.180:22 | data… | +----+-------------------+-------------------+------+ iii) +----+-------------------+-------------------+------+ | UDP | 129.174.16.20:53 |d:129.174.17.180:1026| data… | +----+-------------------+-------------------+------+
java createkey this_is_my_passphrase ls – a (or dir for windows) .myaeskey createkey data.txt filecrypt java createkey this_is_a_new_passphrase ls – a (or dir for windows) .myaeskey .myaeskey.bak createkey data.txt filecrypt java filecrypt - e - mode ECB data.txt ls – a (or dir for windows) .myaeskey createkey data.txt filecrypt data.txt~encrypted java filecrypt - d - mode ECB data.txt~encrypted ls – a (or dir for windows) .myaeskey createkey data.txt filecrypt data.txt~decrypted diff (or comp for windows) data.txt data.txt~decrypted java filecrypt - e mode CBC data.txt ls – a (or dir for windows) .myaeskey createkey filecrypt data.txt data.txt~encrypted data.txt~iv java filecrypt - d mode CBC data.txt ls – a (or dir for windows) .myaeskey createkey filecrypt data.txt data.txt~decrypted diff (or comp for windows) data.txt data.txt~decrypted EXTRA CREDIT [15points] Can you created a multi-threaded version of the previous program that can encrypt and decrypt multiple files at the same time? When can we benefit from using a multi-threaded approach for encryption and decryption? Are we going to have a performance gain for all the modes of AES encryption? Resources for Java : http://java.sun.com/javase/6/docs/api/javax/crypto/package- summary.html http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/Cr yptoSpec.html Look for AES