2022-10-18 12:52:05 +00:00
|
|
|
-- Surface ISO/DMG disk images that were downloaded from unexpected places
|
|
|
|
--
|
|
|
|
-- references:
|
2022-10-19 20:56:32 +00:00
|
|
|
-- * https://attack.mitre.org/techniques/T1566/001/ (Phishing: Spearphishing Attachment)
|
|
|
|
-- * https://attack.mitre.org/techniques/T1204/002/ (User Execution: Malicious File)
|
2022-10-18 12:52:05 +00:00
|
|
|
-- * https://unit42.paloaltonetworks.com/chromeloader-malware/
|
|
|
|
--
|
|
|
|
-- false positives:
|
|
|
|
-- * disk images downloaded from a location not in the exception list
|
|
|
|
--
|
|
|
|
-- platform: darwin
|
2023-09-01 21:27:27 +00:00
|
|
|
-- tags: persistent filesystem spotlight often
|
2022-10-19 20:19:53 +00:00
|
|
|
SELECT
|
|
|
|
file.path,
|
|
|
|
file.size,
|
|
|
|
datetime(file.btime, 'unixepoch') AS file_created,
|
|
|
|
magic.data,
|
2023-01-18 14:49:56 +00:00
|
|
|
hash.sha256,
|
|
|
|
signature.identifier,
|
|
|
|
signature.authority,
|
2022-10-19 20:19:53 +00:00
|
|
|
ea.value AS url,
|
|
|
|
REGEX_MATCH (ea.value, '/[\w_-]+\.([\w\._-]+)[:/]', 1) AS domain,
|
|
|
|
REGEX_MATCH (ea.value, '/([\w_-]+\.[\w\._-]+)[:/]', 1) AS host
|
|
|
|
FROM
|
|
|
|
mdfind
|
|
|
|
LEFT JOIN file ON mdfind.path = file.path
|
2023-01-18 14:49:56 +00:00
|
|
|
LEFT JOIN hash ON mdfind.path = hash.path
|
2022-10-19 20:19:53 +00:00
|
|
|
LEFT JOIN extended_attributes ea ON mdfind.path = ea.path
|
2023-01-18 14:49:56 +00:00
|
|
|
LEFT JOIN magic ON mdfind.path = magic.path
|
|
|
|
LEFT JOIN signature ON mdfind.path = signature.path
|
2022-10-19 20:19:53 +00:00
|
|
|
WHERE
|
|
|
|
(
|
|
|
|
mdfind.query = "kMDItemWhereFroms != '' && kMDItemFSName == '*.iso'"
|
|
|
|
OR mdfind.query = "kMDItemWhereFroms != '' && kMDItemFSName == '*.dmg'"
|
2023-01-13 18:47:02 +00:00
|
|
|
OR mdfind.query = "kMDItemWhereFroms != '' && kMDItemFSName == '*.pkg'"
|
2022-10-19 20:19:53 +00:00
|
|
|
)
|
|
|
|
AND ea.key = 'where_from'
|
|
|
|
AND file.btime > (strftime('%s', 'now') -86400)
|
|
|
|
AND domain NOT IN (
|
|
|
|
'adobe.com',
|
2023-01-24 01:33:52 +00:00
|
|
|
'akmedia.digidesign.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'alfredapp.com',
|
2023-09-01 21:09:47 +00:00
|
|
|
'amazon.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'android.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'ankiweb.net',
|
2022-10-19 20:19:53 +00:00
|
|
|
'apple.com',
|
|
|
|
'arc.net',
|
2023-07-03 11:16:14 +00:00
|
|
|
'asana.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'astutegraphics.com',
|
|
|
|
'backblazeb2.com',
|
2023-01-24 01:33:52 +00:00
|
|
|
'balena.io',
|
2022-10-19 20:19:53 +00:00
|
|
|
'balsamiq.com',
|
2024-08-27 22:40:43 +00:00
|
|
|
'bblmw.com',
|
2023-09-01 21:09:47 +00:00
|
|
|
'bluestacks.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'boxcdn.net',
|
2024-08-27 22:40:43 +00:00
|
|
|
'box.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'brave.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'byfly.by',
|
2022-10-19 20:19:53 +00:00
|
|
|
'canon.co.uk',
|
|
|
|
'cdn.mozilla.net',
|
|
|
|
'charlesproxy.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'chatgpt.com',
|
2023-02-09 01:06:26 +00:00
|
|
|
'cloudfront.net',
|
|
|
|
'cron.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'csclub.uwaterloo.ca',
|
2024-09-23 15:07:53 +00:00
|
|
|
'curseforge.com',
|
2024-08-27 22:40:43 +00:00
|
|
|
'c-wss.com',
|
2023-09-01 21:09:47 +00:00
|
|
|
'descript.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'desktop.evernote.com',
|
2023-01-24 01:33:52 +00:00
|
|
|
'digidesign.com',
|
2023-08-15 22:13:06 +00:00
|
|
|
'discordapp.net',
|
2024-08-27 22:40:43 +00:00
|
|
|
'discord.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'dl.meitu.com',
|
2023-09-01 21:09:47 +00:00
|
|
|
'dl.sourceforge.net',
|
2022-10-19 20:19:53 +00:00
|
|
|
'docker.com',
|
2023-01-24 01:33:52 +00:00
|
|
|
'dogado.de',
|
|
|
|
'download.prss.microsoft.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'duckduckgo.com',
|
|
|
|
'eclipse.org',
|
2024-08-27 22:40:43 +00:00
|
|
|
'emeet.com',
|
2023-01-24 01:33:52 +00:00
|
|
|
'epson.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'eventideaudio.com',
|
2023-01-24 01:33:52 +00:00
|
|
|
'fcix.net',
|
2024-09-23 15:07:53 +00:00
|
|
|
'figma.com',
|
|
|
|
'foundry.com',
|
2023-01-24 01:33:52 +00:00
|
|
|
'gaomon.net',
|
|
|
|
'getutm.app',
|
2022-10-19 20:19:53 +00:00
|
|
|
'gimp.org',
|
|
|
|
'github.io',
|
|
|
|
'githubusercontent.com',
|
2023-01-24 01:33:52 +00:00
|
|
|
'google.ca',
|
2024-09-23 15:07:53 +00:00
|
|
|
'google.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'grammarly.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'imazing.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'integodownload.com',
|
2023-01-24 01:33:52 +00:00
|
|
|
'irccloud.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'jetbrains.com',
|
2023-03-14 23:00:44 +00:00
|
|
|
'kagi.com',
|
2024-11-13 21:34:12 +00:00
|
|
|
'kolide.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'libreoffice.org',
|
2024-09-23 15:07:53 +00:00
|
|
|
'live.com',
|
2023-01-24 01:33:52 +00:00
|
|
|
'logitech.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'loom.com',
|
2023-02-09 01:06:26 +00:00
|
|
|
'macbartender.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'macroplant.com',
|
|
|
|
'maxon.net',
|
2022-10-19 20:19:53 +00:00
|
|
|
'microsoft.com',
|
|
|
|
'minecraft.net',
|
|
|
|
'mirrorservice.org',
|
2024-09-23 15:07:53 +00:00
|
|
|
'mm.cfix.net',
|
|
|
|
'mm.fcix.net',
|
2022-10-19 20:19:53 +00:00
|
|
|
'mojang.com',
|
|
|
|
'mozilla.org',
|
2023-03-14 23:00:44 +00:00
|
|
|
'mutedeck.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'mysql.com',
|
2023-08-15 22:13:06 +00:00
|
|
|
'notion.so',
|
2024-08-27 22:40:43 +00:00
|
|
|
'notion-static.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'ocf.berkeley.edu',
|
2024-09-23 15:10:05 +00:00
|
|
|
'odvdev.at',
|
2024-09-23 15:07:53 +00:00
|
|
|
'office.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'oobesaas.adobe.com',
|
2023-08-15 22:13:06 +00:00
|
|
|
'openra.net',
|
2023-01-24 01:33:52 +00:00
|
|
|
'oracle.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'osuosl.org',
|
2024-09-23 15:07:53 +00:00
|
|
|
'overwolf.com',
|
|
|
|
'pathofexile.com',
|
2023-10-31 15:40:10 +00:00
|
|
|
'perforce.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'poecdn.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'pqrs.org',
|
2024-09-23 15:07:53 +00:00
|
|
|
'proxmox.com',
|
2023-01-24 01:33:52 +00:00
|
|
|
'prusa3d.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'raspberrypi.com',
|
|
|
|
'redhat.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'remarkable.com',
|
2023-06-07 13:55:17 +00:00
|
|
|
'rewind.ai',
|
2023-07-03 11:16:14 +00:00
|
|
|
's3.amazonaws.com',
|
2023-02-09 01:06:26 +00:00
|
|
|
'securew2.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'signal.org',
|
2024-09-23 15:07:53 +00:00
|
|
|
'siliconmotion.com',
|
2023-01-24 01:33:52 +00:00
|
|
|
'skype.com',
|
2023-10-31 15:40:10 +00:00
|
|
|
'slack.com',
|
2024-08-27 22:40:43 +00:00
|
|
|
'slack-edge.com',
|
2023-02-09 01:06:26 +00:00
|
|
|
'stclairsoft.com',
|
2023-01-24 01:33:52 +00:00
|
|
|
'steampowered.com',
|
2023-10-31 15:40:10 +00:00
|
|
|
'synaptics.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'tableplus.com',
|
2023-01-24 01:33:52 +00:00
|
|
|
'teams.cdn.office.net',
|
2023-02-09 01:06:26 +00:00
|
|
|
'techsmith.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'tweaknews.eu',
|
2022-10-19 20:19:53 +00:00
|
|
|
'ubuntu.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'ultimaker.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'umd.edu',
|
2023-03-14 23:00:44 +00:00
|
|
|
'usa.canon.com',
|
2023-05-11 15:29:55 +00:00
|
|
|
'uubyte.com',
|
2023-01-24 01:33:52 +00:00
|
|
|
'vc.logitech.com',
|
2023-10-31 15:40:10 +00:00
|
|
|
'vimcal.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'virtualbox.org',
|
2024-09-23 15:07:53 +00:00
|
|
|
'viture.dev',
|
2023-06-07 13:55:17 +00:00
|
|
|
'vmware.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'warp.dev',
|
2023-01-13 20:24:18 +00:00
|
|
|
'webex.com',
|
2023-01-24 01:33:52 +00:00
|
|
|
'whatsapp.com',
|
|
|
|
'xtom.com',
|
2024-10-25 15:29:40 +00:00
|
|
|
'gitbutler.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'xx.fbcdn.net',
|
2024-03-29 12:07:01 +00:00
|
|
|
'yubico.com',
|
2024-08-27 22:40:43 +00:00
|
|
|
'zoo.dev',
|
2023-08-15 22:13:06 +00:00
|
|
|
'zoomgov.com',
|
2024-08-27 22:40:43 +00:00
|
|
|
'zoom.us',
|
2023-01-24 01:33:52 +00:00
|
|
|
'zsa.io'
|
2022-10-19 20:19:53 +00:00
|
|
|
)
|
2023-04-17 20:20:35 +00:00
|
|
|
-- NOTE: Do not put all of storage.googleapis.com or similarly generic hosts here
|
2022-10-19 20:19:53 +00:00
|
|
|
AND host NOT IN (
|
2023-04-21 00:45:35 +00:00
|
|
|
'adoptium.net',
|
2023-10-31 15:40:10 +00:00
|
|
|
'arc.net',
|
2024-01-26 19:07:37 +00:00
|
|
|
'asana.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'awscli.amazonaws.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'balsamiq.com',
|
2023-07-13 23:43:35 +00:00
|
|
|
'bearly.ai',
|
2024-09-23 15:07:53 +00:00
|
|
|
'blyt.net',
|
2023-02-09 01:06:26 +00:00
|
|
|
'brave.com',
|
2023-10-31 15:40:10 +00:00
|
|
|
'calibre-ebook.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'chatgpt.com',
|
2023-05-23 15:31:37 +00:00
|
|
|
'cron.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'discord.com',
|
|
|
|
'dl.discordapp.net',
|
2024-10-30 12:40:25 +00:00
|
|
|
'dl2.discordapp.net',
|
2023-02-09 01:06:26 +00:00
|
|
|
'dl.google.com',
|
|
|
|
'duckduckgo.com',
|
|
|
|
'dygma.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'emacsformacosx.com',
|
2024-01-26 19:07:37 +00:00
|
|
|
'epson.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'evernote.com',
|
2024-10-25 15:29:40 +00:00
|
|
|
'multipass.run',
|
2024-09-23 15:07:53 +00:00
|
|
|
'fbcdn.net',
|
2024-01-26 19:07:37 +00:00
|
|
|
'figma.com',
|
2023-10-31 15:40:10 +00:00
|
|
|
'flipperzero.one',
|
2024-10-29 17:08:43 +00:00
|
|
|
'fnord.com',
|
2023-02-09 01:06:26 +00:00
|
|
|
'getkap.co',
|
|
|
|
'github.com',
|
2024-10-25 15:29:40 +00:00
|
|
|
'gitbutler.com',
|
2023-10-31 15:40:10 +00:00
|
|
|
'go.dev',
|
2024-09-23 15:07:53 +00:00
|
|
|
'imazing.com',
|
2024-01-26 19:07:37 +00:00
|
|
|
'kittycad.io',
|
2023-02-09 01:06:26 +00:00
|
|
|
'krisp.ai',
|
2024-09-23 15:07:53 +00:00
|
|
|
'macroplant.com',
|
2023-02-09 01:06:26 +00:00
|
|
|
'mail.google.com',
|
|
|
|
'manual.canon',
|
2024-09-23 15:07:53 +00:00
|
|
|
'manytricks.com',
|
|
|
|
'maxon.net',
|
2023-10-31 15:40:10 +00:00
|
|
|
'mimestream.com',
|
|
|
|
'mnvoip.mm.fcix.net',
|
2023-03-21 18:07:06 +00:00
|
|
|
'mutedeck.com',
|
2023-02-09 01:06:26 +00:00
|
|
|
'obdev.at',
|
|
|
|
'obsidian.md',
|
|
|
|
'obsproject.com',
|
2023-10-31 15:40:10 +00:00
|
|
|
'opalcamera.com',
|
2024-10-30 12:40:25 +00:00
|
|
|
'openai.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'persistent.oaistatic.com',
|
2024-10-29 17:08:43 +00:00
|
|
|
'portswigger-cdn.net',
|
2023-02-24 21:30:17 +00:00
|
|
|
'posit.co',
|
2023-10-31 15:40:10 +00:00
|
|
|
'presenting.app',
|
2023-03-21 18:07:06 +00:00
|
|
|
'proton.me',
|
|
|
|
'rancherdesktop.io',
|
2023-02-24 21:30:17 +00:00
|
|
|
'rectangleapp.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
's3.amazonaws.com',
|
|
|
|
'scribehow.com',
|
|
|
|
'shottr.cc',
|
|
|
|
'sipapp.fra1.digitaloceanspaces.com',
|
|
|
|
'sipapp.io',
|
|
|
|
'sourceforge.net',
|
|
|
|
'sourcegraph.com',
|
2023-02-09 01:06:26 +00:00
|
|
|
'stclairsoft.s3.amazonaws.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'store.steampowered.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'superkey.app',
|
2024-09-26 16:40:04 +00:00
|
|
|
'superhuman.com',
|
2023-02-09 01:06:26 +00:00
|
|
|
'tableplus.com',
|
|
|
|
'textexpander.com',
|
2024-10-31 20:31:34 +00:00
|
|
|
'tosmediaserver.schwab.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'transmissionbt.com',
|
2023-02-09 01:06:26 +00:00
|
|
|
'ubuntu.com',
|
2024-09-23 15:07:53 +00:00
|
|
|
'ultimaker.com',
|
|
|
|
'universal-blue.discourse.group',
|
2023-02-09 01:06:26 +00:00
|
|
|
'warp-releases.storage.googleapis.com',
|
2022-10-19 20:19:53 +00:00
|
|
|
'wavebox.io',
|
2023-02-09 01:06:26 +00:00
|
|
|
'www.google.com',
|
2023-02-24 21:30:17 +00:00
|
|
|
'www.messenger.com',
|
2024-01-26 19:07:37 +00:00
|
|
|
'zed.dev',
|
2024-09-23 15:07:53 +00:00
|
|
|
'zoo.dev',
|
2023-02-24 21:30:17 +00:00
|
|
|
'zoom.us'
|
2022-10-19 20:19:53 +00:00
|
|
|
)
|
|
|
|
-- Yes, these are meant to be fairly broad.
|
|
|
|
AND host NOT LIKE 'download%'
|
|
|
|
AND host NOT LIKE 'cdn%'
|
2023-07-03 11:16:14 +00:00
|
|
|
AND host NOT LIKE '%.cdn.%.com'
|
2022-10-19 20:19:53 +00:00
|
|
|
AND host NOT LIKE '%.edu'
|
|
|
|
AND host NOT LIKE 'github-production-release-asset-%.s3.amazonaws.com'
|
|
|
|
AND host NOT LIKE '%.org'
|
|
|
|
AND host NOT LIKE 'dl.%'
|
|
|
|
AND host NOT LIKE 'dl-%'
|
|
|
|
AND host NOT LIKE 'mirror%'
|
|
|
|
AND host NOT LIKE 'driver.%'
|
|
|
|
AND host NOT LIKE 'support%'
|
2023-09-20 13:30:46 +00:00
|
|
|
AND host NOT LIKE 's3.%.amazonaws.com'
|
2024-08-27 22:40:43 +00:00
|
|
|
AND host NOT LIKe '%.s3.%.amazonaws.com'
|
2022-10-19 20:19:53 +00:00
|
|
|
AND host NOT LIKE 'software%'
|
|
|
|
AND host NOT LIKE 'www.google.%'
|
|
|
|
AND host NOT LIKE '%release%.storage.googleapis.com'
|
2023-04-17 20:20:35 +00:00
|
|
|
AND ea.value NOT LIKE 'https://storage.googleapis.com/copilot-mac-releases/%'
|
2024-11-13 21:34:12 +00:00
|
|
|
AND ea.value NOT LIKE 'https://storage.googleapis.com/kolide-k2-production-downloads-f414/%'
|
2022-10-19 20:19:53 +00:00
|
|
|
GROUP BY
|
|
|
|
ea.value
|