|
43 | 43 | CORRELATION_TYPES_BY_OBJ = { |
44 | 44 | "author": ["pdf"], |
45 | 45 | "barcode": ["chat", "cve", "cryptocurrency", "decoded", "domain", "image", "message", "screenshot"], |
46 | | - "chat": ["barcode", "chat-subchannel", "chat-thread", "cryptocurrency", "cve", "decoded", "domain", "file-name", "image", "message", "ocr", "pdf", "pgp", "user-account"], |
| 46 | + "chat": ["barcode", "chat-subchannel", "chat-thread", "cryptocurrency", "cve", "decoded", "domain", "file-name", "image", "message", "ocr", "pdf", "pgp", "qrcode", "user-account"], |
47 | 47 | "chat-subchannel": ["chat", "chat-thread", "image", "message", "ocr", "user-account"], |
48 | 48 | "chat-thread": ["chat", "chat-subchannel", "image", "message", "ocr", "user-account"], |
49 | 49 | "cookie-name": ["domain"], |
50 | 50 | "cryptocurrency": ["barcode", "chat", "domain", "item", "message", "ocr", "qrcode"], |
51 | 51 | "cve": ["barcode", "chat", "domain", "item", "message", "ocr", "qrcode"], |
52 | 52 | "decoded": ["barcode", "chat", "domain", "item", "message", "ocr", "qrcode"], |
53 | | - "domain": ["barcode", "chat", "cve", "cookie-name", "cryptocurrency", "dom-hash", "decoded", "etag", "favicon", "gtracker", "hhhash", "item", "mail", "message", "pgp", "screenshot", "ssh-key", "title", "username"], |
| 53 | + "domain": ["barcode", "chat", "cve", "cookie-name", "cryptocurrency", "dom-hash", "decoded", "etag", "favicon", "gtracker", "hhhash", "item", "mail", "message", "pgp", "qrcode", "screenshot", "ssh-key", "title", "username"], |
54 | 54 | "dom-hash": ["domain", "item"], |
55 | 55 | "etag": ["domain"], |
56 | | - "favicon": ["domain", "pdf", "item"], # TODO Decoded |
| 56 | + "favicon": ["domain", "item"], # TODO Decoded |
57 | 57 | "file-name": ["chat", "item", "message", "pdf"], |
58 | 58 | "gtracker": ["domain", "item"], |
59 | 59 | "hhhash": ["domain"], |
60 | 60 | "image": ["barcode", "chat", "chat-subchannel", "chat-thread", "message", "ocr", "qrcode", "user-account"], # TODO subchannel + threads ???? |
61 | 61 | "ip": ["ssh-key"], |
62 | 62 | "item": ["cve", "cryptocurrency", "decoded", "domain", "dom-hash", "favicon", "file-name", "gtracker", "mail", "message", "pdf", "pgp", "screenshot", "title", "username"], # chat ??? |
63 | 63 | "mail": ["domain", "item", "message"], # chat ?? |
64 | | - "message": ["barcode", "chat", "chat-subchannel", "chat-thread", "cve", "cryptocurrency", "decoded", "domain", "file-name", "image", "item", "mail", "ocr", "pdf", "pgp", "user-account"], |
| 64 | + "message": ["barcode", "chat", "chat-subchannel", "chat-thread", "cve", "cryptocurrency", "decoded", "domain", "file-name", "image", "item", "mail", "ocr", "pdf", "pgp", "qrcode", "user-account", "username"], |
65 | 65 | "ocr": ["chat", "chat-subchannel", "chat-thread", "cve", "cryptocurrency", "decoded", "image", "message", "pgp", "user-account"], |
66 | 66 | "pdf": ["author", "chat", "file-name", "item", "message"], |
67 | 67 | "pgp": ["chat", "domain", "item", "message", "ocr"], |
|
73 | 73 | "username": ["domain", "item", "message", "user-account"], |
74 | 74 | } |
75 | 75 |
|
| 76 | +def debug_correlation_asymmetries(): |
| 77 | + missing = [] |
| 78 | + for k, values in CORRELATION_TYPES_BY_OBJ.items(): |
| 79 | + for v in values: |
| 80 | + if k not in CORRELATION_TYPES_BY_OBJ.get(v, []): |
| 81 | + missing.append((k, v)) |
| 82 | + return missing |
| 83 | + |
76 | 84 | def get_obj_correl_types(obj_type): |
77 | 85 | return CORRELATION_TYPES_BY_OBJ.get(obj_type) |
78 | 86 |
|
@@ -263,5 +271,5 @@ def _get_correlations_graph_node(links, nodes, meta, obj_type, subtype, obj_id, |
263 | 271 |
|
264 | 272 |
|
265 | 273 | if __name__ == '__main__': |
266 | | - r = get_obj_one_depth_correlations('item', '', '', {'domain'}, intermediate_types=set(), end='.onion') |
| 274 | + r = debug_correlation_asymmetries() |
267 | 275 | print(r) |
0 commit comments