@@ -34,11 +34,17 @@ class Conn:
3434 sbytes : int
3535 dbytes : int
3636
37- smac : str
38- dmac : str
39-
4037 state : str
4138 history : str
39+
40+ smac : str = ""
41+ dmac : str = ""
42+
43+ # this is for when you give flows labeled by the netflow labeler
44+ # https://github.com/stratosphereips/netflowlabeler
45+ ground_truth_label : str = ""
46+ detailed_ground_truth_label : str = ""
47+
4248 type_ : str = "conn"
4349 dir_ : str = "->"
4450
@@ -74,6 +80,8 @@ class DNS:
7480
7581 answers : List [str ]
7682 TTLs : str
83+ ground_truth_label : str = ""
84+ detailed_ground_truth_label : str = ""
7785
7886 type_ : str = "dns"
7987
@@ -108,6 +116,9 @@ class HTTP:
108116 resp_mime_types : str
109117 resp_fuids : str
110118
119+ ground_truth_label : str = ""
120+ detailed_ground_truth_label : str = ""
121+
111122 type_ : str = "http"
112123
113124 def __post_init__ (self ) -> None :
@@ -143,6 +154,9 @@ class SSL:
143154 ja3s : str
144155 is_DoH : str
145156
157+ ground_truth_label : str = ""
158+ detailed_ground_truth_label : str = ""
159+
146160 type_ : str = "ssl"
147161
148162
@@ -168,29 +182,35 @@ class SSH:
168182 host_key_alg : str
169183 host_key : str
170184
185+ ground_truth_label : str = ""
186+ detailed_ground_truth_label : str = ""
187+
171188 type_ : str = "ssh"
172189
173190
174191@dataclass
175192class DHCP :
176193 starttime : float
177194 uids : List [str ]
178- saddr : str
179- daddr : str
180-
181195 client_addr : str
182196 server_addr : str
183197 host_name : str
184198
185199 smac : str # this is the client mac
186200 requested_addr : str
187201
202+ ground_truth_label : str = ""
203+ detailed_ground_truth_label : str = ""
204+
188205 type_ : str = "dhcp"
189206
190207 def __post_init__ (self ) -> None :
191208 # Some zeek flow don't have saddr or daddr,
192209 # seen in dhcp.log and notice.log use the mac
193210 # address instead
211+ self .saddr = self .client_addr
212+ self .daddr = self .server_addr
213+ # if the client_addr is empty, use the mac address
194214 if not self .saddr and not self .daddr :
195215 self .saddr = self .smac
196216
@@ -203,6 +223,10 @@ class FTP:
203223 daddr : str
204224
205225 used_port : int
226+
227+ ground_truth_label : str = ""
228+ detailed_ground_truth_label : str = ""
229+
206230 type_ : str = "ftp"
207231
208232
@@ -214,6 +238,10 @@ class SMTP:
214238 daddr : str
215239
216240 last_reply : str
241+
242+ ground_truth_label : str = ""
243+ detailed_ground_truth_label : str = ""
244+
217245 type_ : str = "smtp"
218246
219247
@@ -230,6 +258,9 @@ class Tunnel:
230258 tunnel_type : str
231259 action : str
232260
261+ ground_truth_label : str = ""
262+ detailed_ground_truth_label : str = ""
263+
233264 type_ : str = "tunnel"
234265
235266
@@ -250,6 +281,10 @@ class Notice:
250281
251282 # TODO srsly what is this?
252283 dst : str
284+
285+ ground_truth_label : str = ""
286+ detailed_ground_truth_label : str = ""
287+
253288 # every evidence needs a uid, notice.log flows dont have one by
254289 # default, slips adds one to them to be able to deal with it.
255290 type_ : str = "notice"
@@ -293,6 +328,9 @@ class Files:
293328 tx_hosts : List [str ]
294329 rx_hosts : List [str ]
295330
331+ ground_truth_label : str = ""
332+ detailed_ground_truth_label : str = ""
333+
296334 type_ : str = "files"
297335
298336 def __post_init__ (self ) -> None :
@@ -338,6 +376,9 @@ class ARP:
338376 dpkts : str = ""
339377 appproto : str = ""
340378
379+ ground_truth_label : str = ""
380+ detailed_ground_truth_label : str = ""
381+
341382 type_ : str = "arp"
342383
343384
@@ -346,13 +387,18 @@ class Software:
346387 starttime : str
347388 uid : str
348389 saddr : str
349- daddr : str
390+ sport : int
350391
351392 software : str
352393
353394 unparsed_version : str
354395 version_major : str
355396 version_minor : str
397+ # software log lines dont have daddr
398+ daddr : str = ""
399+ ground_truth_label : str = ""
400+ detailed_ground_truth_label : str = ""
401+
356402 type_ : str = "software"
357403
358404 def __post_init__ (self ) -> None :
0 commit comments