1 % tunet und eduroam down...
3 % 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 -.-
5 \section{Exercise 1 - Task 1}
7 \fbox{\parbox{\textwidth}{
8 What is the IP address of the suspicious notebook?
11 The IP address of the suspicious notebook (our own IP address) is \emph{\textbf{192.168.67.37}}.
15 \fbox{\parbox{\textwidth}{
16 What is the IP address of the machine presumably leaking information?
19 The remote IP address is \emph{\textbf{192.168.67.83}}.
23 \fbox{\parbox{\textwidth}{
24 Give a detailed (but brief) explanation of these steps you carried out to filter irrelevant data (either Wireshark or Rapidminer).\\
25 Do also specify the keyworks and operators required.
28 The necessary wireshark filter expression is \emph{\textbf{ip.addr == 192.168.67.83}}.
32 \fbox{\parbox{\textwidth}{
33 Which features are not viable to mask a covert channel and could be removed from the analysis?\\
34 List the rejected features and provide short but meaningful reasons for rejection.
38 \item \emph{\textbf{No.}} (it is generated while monitoring and is strictly monotonically increasing by 1 with each packet)
39 \item \emph{\textbf{Source IP}} (fixed value: \emph{\textbf{192.168.67.83}})
40 \item \emph{\textbf{Destination IP}} (fixed value: \emph{\textbf{192.168.67.37}})
41 \item \emph{\textbf{Protocol}} (fixed value: \emph{\textbf{UDP}})
42 \item \emph{\textbf{Length}} (fixed value: \emph{\textbf{82}})
43 \item \emph{\textbf{TTL}} (fixed value: \emph{\textbf{64}})
44 \item \emph{\textbf{Dest port}} (fixed value: \emph{\textbf{118}})
45 \item \emph{\textbf{Flags}} (none set)
46 \item \emph{\textbf{Frag offset}} (fixed value: \emph{\textbf{0}})
49 Fixed values have been rejected as it is not possible to hide information within.
53 \fbox{\parbox{\textwidth}{
54 From the remaining features, which ones are not viable to mask a covert channel and could be removed from the analysis?\\
55 List the newly rejected features and provide short but meaningful reasons for rejection.
58 We can determine that the source port changes only between transmissions. The transmissions seem to be identical.\\
60 Therefore we can assume that the \emph{\textbf{source port}} can be ignored in further analysis.
62 We filter the transmission by applying the following filter in wireshark: \emph{\textbf{ip.addr == 192.168.67.83 and udp.srcport == 52899}} export the selection to a new pcap file and reload in wireshark to reset the packet numbers and export the pcap to csv.
68 \fbox{\parbox{\textwidth}{
69 Do you think that you have found the covert channel?\\
70 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.
73 At first we wrote a decoder that made a diff between the current and the last csv line looking at DSCP.\\
74 Combined with the hint 8 bit ASCII we tried to extract full or partial bytes. The results did not made any sense.\\
76 Later we tried to look at the timing diffs and realised that most packets had a delay of either 0.04-0.06 or 0.14-0.16 ms.\\
77 So we tried to multiply the time-diff 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.
81 \fbox{\parbox{\textwidth}{
82 Write in the report the formula of the deployed filter and the steps carried out to prepare the required file.
85 \emph{\textbf{Dest port == 118}}
89 \fbox{\parbox{\textwidth}{
90 Write in the report the decoded message. Explain clearly how you carried out the decoding task (step by step in a numbered list).
93 The message is \emph{\textbf{Starting transmission from Ministry of Cyber {\ucr}ffairs. (Agent Scott)Star{\ucr}i{\ucr}}}\\
106 def somedecode(filename):
107 with open(filename, 'rb') as csvfile:
108 spamreader = csv.reader(csvfile, delimiter=',', quotechar='"')
114 for row in spamreader:
122 va = str(int((float(row[1])-float(last[1]))*10))
123 if va not in ["0","1"]:
131 print " "+binascii.unhexlify('%x' % n),
136 if __name__ == "__main__":
137 def signal_handler(signal, frame):
138 print('SIG received. exitting!')
140 signal.signal(signal.SIGINT, signal_handler)
142 somedecode("dump_selected_udp_single_src_port_dehexed.csv")
148 \fbox{\parbox{\textwidth}{
149 Report briefly any additional comment or observation related to the exercise solving to be considered during the review of your exercise.
152 Some characters are broken, as the some packets seem to have expirienced unexpected delays and therefore were wrongly classified. All in all the Message is still understandable.
155 \section{Exercise 1 - Task 2}
157 \fbox{\parbox{\textwidth}{
158 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.
161 Captured. Our new IP is \emph{\textbf{192.168.67.26}}.\\
163 Selected local network packets: \emph{\textbf{ip.src == 192.168.67.0/24 and ip.dst == 192.168.67.0/24}} and saved as separate pcap file and also exported the packets to csv.\\
165 In Rapidminer we analyzed the csv and removed our gateway (.1) and self (.26) as sources.\\
167 % TODO image:stream\_localnet.pdf
169 We get 4 network flows: The first from .83 to 80/udp, then from .82 to 443/udp, then .81 to 465/tcp, then .84 to 464/udp.\\
171 % TODO image:stream\_localnet\_ports.pdf
173 Filters for one complete transmission:
174 \emph{\textbf{udp.port == 58493 or udp.port == 45875 or tcp.port == 40875 or udp.port == 36842}}
176 % TODO: failed attempt
178 %%%%%%%%%%%%%%%%%%%%%
179 % WTF ?! % WTF ?! % WTF ?! % WTF ?! % WTF ?!
180 % WTF ?! % WTF ?! % WTF ?! % WTF ?! % WTF ?!
181 % WTF ?! % WTF ?! % WTF ?! % WTF ?! % WTF ?!
182 % WTF ?! % WTF ?! % WTF ?! % WTF ?! % WTF ?!
183 % WTF ?! % WTF ?! % WTF ?! % WTF ?! % WTF ?!
184 %%%%%%%%%%%%%%%%%%%%%
186 %filtered away nfs and ssh
187 %!(tcp.port == 666 || tcp.port == 2049)
190 %look at it via rapidminer
193 %((ip.addr eq 192.168.67.81 or ip.addr eq 192.168.67.82 or ip.addr eq 192.168.67.83) and ip.addr eq 192.168.67.37)
196 %look at it again via rapidminer
197 %image:stream\_better.pdf
199 %dest ports are always first 80/udp, then 443/udp, then 465/tcp
201 %filtered for one complete transaction
202 %tcp.port == 56533 or udp.port == 50293 or udp.port == 56040
205 %look at it again via rapidminer
206 %image:stream\_cool.pdf
208 %%%%%%%%%%%%%%%%%%%%%%%
212 \fbox{\parbox{\textwidth}{
213 Which features are not viable to mask a covert channel and could be removed from the analysis? List the
214 rejected features and provide short but meaningful reasons for rejection.
218 \item \emph{\textbf{No.}} (it is generated while monitoring and is strictly monotonically increasing by 1 with each packet)
219 \item \emph{\textbf{Time}} (packets arrive with almost equal delays)
220 \item \emph{\textbf{TTL}} (fixed value: \emph{\textbf{64}})
221 \item \emph{\textbf{Frag offset}} (fixed value: \emph{\textbf{0}})
224 We can also ignore \emph{\textbf{IP.Flags}} as they meet our expected distribution:
226 \item 0x0002: SYN (1x)
227 \item 0x0012: SYN,ACK (1x)
228 \item 0x0010: ACK (602x)
229 \item 0x0018: ACK,PSH (600x)
230 \item 0x0011: ACK,FIN (2x)
235 \fbox{\parbox{\textwidth}{
236 From the remaining features, which ones are not viable to mask a covert channel and could be removed
237 from the analysis? List the newly rejected features and provide short but meaningful reasons for rejection.
241 % TODO continue writing here.
243 not a high variance detected:
245 \item UDP Stream from 192.168.67.83:56040 to 192.168.67.37:80 %TODO fix
246 \item UDP Stream from 192.168.67.82:50293 to 192.168.67.37:443 %TODO fix
247 \item TCP Traffic between 192.168.67.81:56533 to 192.168.67.37:465 %TODO fix
248 \item UDP Stream from 192.168.67.84:36842 to 192.168.67.26:464
251 Length also does not vary very much:
253 \item Length 60 for Source Port 56040/udp
254 \item Length 60 for Source Port 52093/udp
255 \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
256 \item Length 66 for ACK, 74 for SYN,ACK for Source Port 465/tcp
257 \item %TODO fix for sport 464
260 % TODO: failed attempt
261 %-> map in rapidminer ipid vs dscp
262 %-> every dscp has two ipid's? (ipid1 xor ipid2) or (ipid1 - ipid2) -> char
266 \fbox{\parbox{\textwidth}{
267 What is the IP address of the machine presumably leaking information?
270 Unknown, because we do have two shorter transmissions before a longer transmission from different source ips
272 % TODO: failed attempt 1 - nicht alles
273 Later the IP address turned out to be 192.168.67.84.
277 \fbox{\parbox{\textwidth}{
278 Do you think that you have found the covert channel?\\
279 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.
282 Not yet. We do not know if the three transmissions are connected to each other.
284 % TODO: failed attempt 2 - dumm rum gesucht
285 Most likely it is in the DSCP field of the third transmission. (This also has responses from the local system)
287 Turned out that the 6 bits from the DSCP field in the 4. transmission just needed to be concatenated and then split into 8 bit chunks again.
291 \fbox{\parbox{\textwidth}{
292 Write in the report the decoded message. Explain clearly how you carried out the decoding task (step by step in a numbered list).
295 \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}}\\
301 from pprint import pprint
305 with open('stream_data.txt', 'r') as infile:
309 bin = "{0:06b}".format(i)
312 bytelist = [ fullstr[i:i+8] for i in range(0, len(fullstr), 8) ]
316 for bchar in bytelist:
317 solution += chr(int(bchar, 2))
319 print ("%s" % solution)
320 print ("len: %d" % len(solution))
325 \fbox{\parbox{\textwidth}{
326 Report briefly any additional comment or observation related to the exercise solving to be considered during the review of your exercise.
330 % TODO: failed attempt 3 - config fail
331 We did have a wireshark configuration issue as we had mistakenly configured it to show the IPID as the DSCP field and did miss the (correct) DSCP field completely.