Sample+Midterm+ 2+answers
Sample+Midterm+ 2+answers
1a. [3 pts] Whats the cheapest attack (name and amount) thats Possible? Install
Trojan onto Host Computer, $200K
1b. [4 pts] Whats the cheapest and most expensive methods (name and amount)
that's Possible to Infect Target with Trojan? Cheapest: Malicious Website,
$100K; Most Expensive: Get Target to Click on Email Link, $120K
1c. [3 pts] Suppose its Possible to Obtain BIOS Password, and the Cost of Attack
for it is $50K. Now, what is the cheapest attack (name and amount) thats
Possible now? Obtain Physical Access to Host, $150K
Standard DNS
Request
Brute-force
Forward DNS
DNS Zone
Mitigations
Transfer
Split DNS
3a. [3 pts] Identify the step number(s) in the diagram in which the attacker
can insert traffic to poison the DNS cache. Explain your answer.
Steps 3, 5, 7, and 8. The attacker can potentially insert or modify
any response to a DNS request.
3b. [6 pts] What are three issues that the attacker needs to overcome in
order to successfully poison the DNS cache?
1. Timing: the DNS response must be before the actual server
responds.
2. Transaction ID (sequence number): the DNS transaction ID must
match with the one in the request
3. Spoof IP Address of Server: the source IP address must be from
the DNS server
3c. [3 pts] Explain the main difficulty with using ingress filtering to prevent
IP spoofing. Ingress filtering is only allowing subnets at the router that are
supposed to be connected to the router.
The difficulty is that ingress filtering must be implemented at all
levels of the network as IP spoofing can always occur at a subnetwork.
4. [6 pts] Using the standard nmap TCP SYN scan, how does nmap
decide if a port is open, closed, or filtered?
TCP SYN Scan
nmap
target
SYN (port
X)
CK
: SYN/A
n
e
p
o
K
If
RST/AC
:
d
e
s
>
If clo
othing
n
<
:
d
e
If filter
The nmap TCP SYN Scan is the default scan type if nmap as root/admin
rights. nmap will send a TCP packet to the target with the SYN flag set,
with the destination port set to X. nmap will repeat this for each port.
Open: If the port is open, the target will respond with a SYN/ACK,
meaning that host is trying to establish a connection
Closed: If the port is closed, the target will respond with a RST/ACK
Filtered: If the port is filtered, then the target will respond with nothing
5. [10 pts] This diagram represents the covert_tcp (TCP ACK Method)
of transferring data from one host to another.
5a. [4 pts] Details of communications
for label A.
The Sender sends a packet with the IP
source spoofed as the Receiver, and
Destination to be the Bounce Server.
The TCP SYN flag is set, with a ISN set
to (ASCII# - 1).
7. Vignere
7a. [4] Using the standard Vignere (Vigenere) (Poly-alphabetic Encryption) table, decrypt
the message HEFF using the key CAB.
The table was not given, but its trivial to recreate the table yourself.
Decrypt H: Lookup Row C / Cell H => Column F
Decrypt E: Lookup Row A / Cell E => Column E
Decrypt F: Lookup Row B / Cell F => Column E
Decrypt F: Lookup Row C / Cell F => Column D
Answer: FEED
7b. [2] Does the table in Vignere need to be kept secret for this cryptographic scheme to
work? Two possible answers, depending on explanation: Either the key (CAB) or
the table must be kept secret. Typically, its the key (CAB) that is kept
secret.
No. The table in this case is the encryption engine. As long as the key CAB is kept secret,
then the table does not need to be kept secret.
- or Yes. The table is the key used to decrypt the message. If the table is kept secret, then
the encryption engine CAB does not need to be secret.
6 mod 33 = 6
Modular Math
Work
6 mod 33
2
2 mod 11 = 2
22 mod 11
=((2 mod 11)(2 mod 11)) mod
11
=((2)(2)) mod 11 = 4 mod 11 =
4
24 mod 11
=((22 mod 11)(22 mod 11)) mod
11
=((4)(4)) mod 11 = 16 mod 11
=5
28 mod 11
=((24 mod 11)(24 mod 11)) mod
11
=((5)(5)) mod 11 = 25 mod 11
=3
8. Perform RSA key generation with p=3 and q=11. Note: you must show
work for any modular mathematics.
8a. [2 pts] Compute n and
n = pq = 3 * 11 = 33
= (p-1)(q-1) = (3-1)(11-1) = (2)(10) = 20
8b. [2 pts] Choose the smallest possible public (encryption) exponent
e
Find e such that:
1 < e < n;
GCD(e, )=1
Not possible e: 2, 4, 5, 6, 8, 10, 12, 14, 15, 16, 18
Possible e: 3, 7, 9, 11, 13, 17, 19
Choose e=3
10. Block
Input
0000
0001
0010
0011
0100
0101
0110
0111
Cipher Mode of
OutputInput
0111 1000
0110 1001
0101 1010
0100 1011
0011 1100
0010 1101
0001 1110
0000 1111
Operations
Output
1111
1110
1101
1100
1011
1010
1001
1000
1011
0011
0100
1100
1101
0100
1010
1010
1110
0001
1010
1110
Based on following the diagram, we can figure out the formulas for
decryption:
PT 1 = dec(CT 1) IV = dec(0011) 1010 = 0100 1010 = 1110
PT 2 = dec(CT 2) CT 1 PT 1 = dec(1011) 0011 1110 = 1100 0011
1110 = 0001
PT 3 = dec(CT 3) CT 2 PT 2 = dec(0011) 1011 0001 = 0100 1011
0001 = 1110