-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathcanary_config.py
More file actions
74 lines (63 loc) · 1.75 KB
/
Copy pathcanary_config.py
File metadata and controls
74 lines (63 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/python3
"""
Shared configuration for Indicator of Canary tools
Contains common domains, patterns, and constants used across all scripts
"""
import re
# Domains to ignore (legitimate/expected domains)
IGNORE_DOMAINS = {
'purl.org',
'microsoft.com',
'openxmlformats.org',
'w3.org',
'dublincore.org',
'publicdomainpictures.net'
}
# Known canary provider domains (high confidence indicators)
ALERT_DOMAINS = {
'internalcanarytokendomain.org',
'canarytokens.com',
'canarytokens.net',
'allsafelink.com',
'whiteclouddrive.com',
'ittftm.com' # Found in sample data
}
# Suspicious document authors
BAD_AUTHORS = {
'openpyxl',
'AAAAAAAAAAAAAAAA' # Found in sample data
}
# Known canary AWS Account IDs
KNOWN_CANARY_ACCOUNTS = {
'706555150306',
'992382622183'
}
# Known canary IP addresses
KNOWN_CANARY_IPS = {
'52.18.63.80'
}
# URL pattern for extraction
URL_PATTERN = re.compile(r"https?://[\w.-]+(?::\d+)?(?:[/\w .-]*)?", re.IGNORECASE)
# File exclusions for different document types
DOCX_EXCLUDE_FILES = {
'word/document.xml', # Main body content
'word/comments.xml', # Comments
'word/footnotes.xml', # Footnotes
'word/endnotes.xml' # Endnotes
}
XLSX_EXCLUDE_PATTERNS = {
'xl/worksheets/', # Worksheet content
'xl/sharedStrings.xml', # Shared strings (cell content)
'xl/media/' # Embedded media
}
PPTX_EXCLUDE_PATTERNS = {
'ppt/slides/slide', # Slide content
'ppt/notesSlides/', # Notes content
'ppt/media/' # Embedded media
}
# Output colors configuration
COLOR_CONFIG = {
'alert': 'RED', # Known canary domains
'suspicious': 'YELLOW', # Unknown/suspicious domains
'info': 'GREEN' # Informational
}