1 % LVA-Feedback: mehr Freitext, weniger REP$x.$y !!! Diese Stuktur ist wirr und z.b. Failed attempts stehen an 3 unterschiedlichen stellen, obwohl sie doch alle irgendwie zusammenhängen -.-
3 \section{Exercise 1 - Task 1}
5 \fbox{\parbox{\textwidth}{
6 What is the IP address of the suspicious notebook?
9 The IP address of the suspicious notebook (our own IP address) is \emph{\textbf{192.168.67.37}}.
13 \fbox{\parbox{\textwidth}{
14 What is the IP address of the machine presumably leaking information?
17 The remote IP address is \emph{\textbf{192.168.67.83}}.
21 \fbox{\parbox{\textwidth}{
22 Give a detailed (but brief) explanation of these steps you carried out to filter irrelevant data (either Wireshark or Rapidminer).\\
23 Do also specify the keywords and operators required.
26 The necessary Wireshark filter expression is \emph{\textbf{ip.addr == 192.168.67.83}}.
30 \fbox{\parbox{\textwidth}{
31 Which features are not viable to mask a covert channel and could be removed from the analysis?\\
32 List the rejected features and provide short but meaningful reasons for rejection.
36 \item \emph{\textbf{No.}} is just the packet number in the pcap file.
37 \item \emph{\textbf{Source IP}} fixed value: \emph{\textbf{192.168.67.83}}
38 \item \emph{\textbf{Destination IP}} fixed value: \emph{\textbf{192.168.67.37}}
39 \item \emph{\textbf{Protocol}} fixed value: \emph{\textbf{UDP}}
40 \item \emph{\textbf{Length}} fixed value: \emph{\textbf{82}}
41 \item \emph{\textbf{TTL}} fixed value: \emph{\textbf{64}}
42 \item \emph{\textbf{Destination port}} fixed value: \emph{\textbf{118}}
43 \item \emph{\textbf{Flags}} fixed value: \emph{\textbf{n/a}}
44 \item \emph{\textbf{Frag offset}} fixed value: \emph{\textbf{0}}
47 Features containing fixed values have been rejected as one obviously cannot hide more than one bit of information in them.
51 \fbox{\parbox{\textwidth}{
52 From the remaining features, which ones are not viable to mask a covert channel and could be removed from the analysis?\\
53 List the newly rejected features and provide short but meaningful reasons for rejection.
56 We see that the source port changes only between transmissions. The transmission contains only one flow.\\
57 Therefore we can assume that the \emph{\textbf{source port}} can be ignored.\\
59 The next step was to apply the following filter in Wireshark: \emph{\textbf{ip.addr == 192.168.67.83 and udp.srcport == 52899}}, export the result to a new pcap file and reload in Wireshark (to reset the packet numbers) and export the pcap to csv.
63 \fbox{\parbox{\textwidth}{
64 Do you think that you have found the covert channel?\\
65 Give a detailed description of where the covert channel is occurring (feature value:covert symbol relationship) and provide a capture of the plot where the abnormal behaviour of the suspicious feature is isolated and clearly visible.
68 At first we wrote a decoder that printed the difference between the current and the last csv line looking at \emph{\textbf{IP.ID}}.\\
69 Combined with the hint 8 bit ASCII we tried to extract full. The results did not made any sense.\\
71 After analysis with Rapidminer we found that the timing differences were obviously not randomly distributed.\\
72 \includegraphics[width=0.8\columnwidth]{content/e11_timing.pdf}
74 So the hacky solution was to multiply the time-difference by 10 and cast the result to int. This resulted in a nice one bit/packet list which we quickly converted to 8 bit ascii.
78 \fbox{\parbox{\textwidth}{
79 Write in the report the formula of the deployed filter and the steps carried out to prepare the required file.
81 \emph{\textbf{udp.dstport == 118}} and later \emph{\textbf{ip.addr == 192.168.67.83 and udp.srcport == 52899}}.
85 \fbox{\parbox{\textwidth}{
86 Write in the report the decoded message. Explain clearly how you carried out the decoding task (step by step in a numbered list).
89 The message was \emph{\textbf{Starting transmission from Ministry of Cyber {\ucr}ffairs. (Agent Scott)Star{\ucr}i{\ucr}}}\\
90 By applying a corrective timing difference of 0.05 we can fully decode the message: \emph{\textbf{Starting transmission from Ministry of Cyber affairs. (Agent Scott)Startin}}\\
93 \begin{redframe}\begin{scriptsize}\begin{verbatim}
99 def somedecode(filename):
100 with open(filename, 'rb') as csvfile:
101 spamreader = csv.reader(csvfile, delimiter=',', quotechar='"')
106 for row in spamreader:
114 va = str(int((float(row[1])-float(last[1])-0.05)*10))
115 if va not in ["0","1"]:
121 print binascii.unhexlify('%x' % int(v, 2)),
126 if __name__ == "__main__":
127 somedecode("filtered.dehexed.csv")
128 \end{verbatim}\end{scriptsize}\end{redframe}
132 \fbox{\parbox{\textwidth}{
133 Report briefly any additional comment or observation related to the exercise solving to be considered during the review of your exercise.
136 We had our Wireshark misconfigured and were looking into the DSCP field for quite some time, before realising that it was actually IP.ID.
139 \section{Exercise 1 - Task 2}
141 \fbox{\parbox{\textwidth}{
142 Give a detailed (but brief) explanation of the steps you carried out to filter irrelevant data (either Wireshark or Rapidminer). Do also specify the keywords and operators required.
145 We captured 10 minutes of traffic. Our IP was \emph{\textbf{192.168.67.26}}.\\
146 We exported the packets matching our Wireshark filter rules to csv and looked at them in Rapidminer, adapted our Wireshark filter rules, exported ...
149 \item At first we looked at all packets. This was a mess as we use sshfs snd ssh-reverse-shells.
150 \item We selected only packets within our local network. \emph{\textbf{ip.src == 192.168.67.0/24 and ip.dst == 192.168.67.0/24}}.
151 \item Then removed packets from our gateway \emph{\textbf{ip.src != 192.168.67.1}}
152 \item And later we removed packets sent from us, as we are not going to send a covert message. \emph{\textbf{ip.src != 192.168.67.1}}
155 The full ruleset was: \emph{\textbf{ip.src == 192.168.67.0/24 and ip.dst == 192.168.67.0/24 and ip.src != 192.168.67.1 and ip.src != 192.168.67.26}}
157 \includegraphics[width=0.8\columnwidth,keepaspectratio]{content/e12_local.png}\\
158 \includegraphics[width=0.8\columnwidth,keepaspectratio]{content/e12_dst_ports.png}
160 We saw repeatedly traffic from .83 to 80/udp, then .82 to 443/udp, then .81 to 465/tcp, then .84 to 464/udp. We assumed that one complete transmission consists of those 4 flows.\\
162 We select a complete transmission (not the first and not the last one):
163 \emph{\textbf{udp.port == 58493 or udp.port == 45875 or tcp.port == 40875 or udp.port == 36842}}
167 \fbox{\parbox{\textwidth}{
168 Which features are not viable to mask a covert channel and could be removed from the analysis? List the
169 rejected features and provide short but meaningful reasons for rejection.
173 \item \emph{\textbf{No.}} is just the packet number in the pcap file.
174 \item \emph{\textbf{Time}} packets arrived with almost equal delays.
175 \item \emph{\textbf{Destination IP}} fixed value: \emph{\textbf{192.168.67.26}}
176 \item \emph{\textbf{Source IP}} fixed values: \emph{\textbf{192.168.67.83, .82, .81, .84}}
177 \item \emph{\textbf{Protocol}} fixed values: \emph{\textbf{TCP}} or \emph{\textbf{UDP}}
178 \item \emph{\textbf{TTL}} fixed value: \emph{\textbf{64}}
179 \item \emph{\textbf{Destination port}} fixed values: \emph{\textbf{80, 443, 465, 464}}
180 \item \emph{\textbf{Frag offset}} fixed value: \emph{\textbf{0}}
185 \fbox{\parbox{\textwidth}{
186 From the remaining features, which ones are not viable to mask a covert channel and could be removed
187 from the analysis? List the newly rejected features and provide short but meaningful reasons for rejection.
190 We could also ignore \emph{\textbf{IP.Flags}} as they meet our expected distribution:
192 \item 0x0002: SYN (1x)
193 \item 0x0012: SYN,ACK (1x)
194 \item 0x0010: ACK (602x)
195 \item 0x0018: ACK,PSH (600x)
196 \item 0x0011: ACK,FIN (2x)
199 Length also does not vary very much:
201 \item Length 60 for Source Port 56040/udp
202 \item Length 60 for Source Port 52093/udp
203 \item Length 60 for Source Port 36842/udp
204 \item Length 70 for ACK,PSH (600x), 74 for SYN (1x), 66 for ACK (1x) and 66 for FIN (1x) for Source Port 56533/tcp
205 \item Length 66 for ACK, 74 for SYN,ACK for Source Port 465/tcp
210 \fbox{\parbox{\textwidth}{
211 What is the IP address of the machine presumably leaking information?
214 In the second run it turned out to be \emph{\textbf{192.168.67.81}}.
218 \fbox{\parbox{\textwidth}{
219 Do you think that you have found the covert channel?\\
220 Give a detailed description of where the covert channel is occurring (feature value:covert symbol relationship) and provide a capture of the plot where the abnormal behaviour of the suspicious feature is isolated and clearly visible.
223 It appears that the DSCP field varies a lot when it should stay constant for the duration of one connection.\\
224 How to decode the information took pretty long to figure out.
226 It turned out that DSCP field (6 bits) needed to be converted to bits from the separate packets and appended to a large bit string and then converted back to 8bit-ascii.
230 \fbox{\parbox{\textwidth}{
231 Write in the report the decoded message. Explain clearly how you carried out the decoding task (step by step in a numbered list).
234 \emph{\textbf{Agent South already successfully infiltrated The minister's office. In the next step, we try to acquire data from the Ministry of Cyber Affair's office network. Stay tuned, I will keep you updated on the progress. (This message was sent by agent Scott)Agent South already successfully infiltrated The minister's office. In the next step, we try to acquire data from the Ministry of Cyber Affair's office network. Stay tuned, I will keep you updated on t}}\\
237 \begin{redframe}\begin{scriptsize}\begin{verbatim}
238 #!/usr/bin/env python
243 def somedecode(filename):
244 with open(filename, 'rb') as csvfile:
245 spamreader = csv.reader(csvfile, delimiter=',', quotechar='"')
249 for row in spamreader:
254 if row[2] == '192.168.67.81':
255 bits += "{0:06b}".format(int(row[7]))
257 print binascii.unhexlify('%x' % int(bits, 2))
259 if __name__ == "__main__":
260 somedecode("transmission.csv")
261 \end{verbatim}\end{scriptsize}\end{redframe}
265 \fbox{\parbox{\textwidth}{
266 Report briefly any additional comment or observation related to the exercise solving to be considered during the review of your exercise.
269 Actually we described our second run, as our first didn't seem to contain any covert channels. By gossip we learned that there are four flows in the transmission. We somehow managed to capture only three at first and our hidden message was hidden in the fourth.