Skip to content

The Eclectic Light Company

Macs & painting – 🦉 No AI content
Main navigation
  • Downloads
  • Freeware
  • All Macs
  • M1-M5 Macs
  • Troubleshooting
  • Painting
  • Mac Front Page
hoakley April 28, 2026 Macs, Technology

Finder comments, steganography and malware

Parts of macOS go back a long way, and have scars to prove it. Among those are Finder comments: text you can easily add to a file’s metadata in the Finder’s Get Info dialog. Like all good metadata, it’s also searchable in Spotlight, so can be used to organise and categorise your documents. However, there are some catches that can make that unreliable.

Finder comment

To see what I mean, you’ll need an app like my free Metamer, a simple metadata editor, or xattred, to display extended attributes. Pick an old file you can sacrifice for this purpose. Select it in the Finder, and Get Info for it. In the Comments section, type in a comment.

comment1

Open that file in Metamer, and select the FinderComment item in its combo box menu.

comment2

Your freshly written Finder Comment has already been added as an extended attribute.

Open the file in xattred, and you’ll see that text as a String in a property list for that extended attribute.

comment3

Now change the name of that file, perhaps by adding a short suffix. Get Info and the Finder Comment is still there.

comment4

Look at the extended attribute using Metamer or xattred, and you’ll see that the String in the property list has been deleted, and the extended attribute no longer contains the text still displayed in the Get Info dialog.

comment5

This is because

  • the primary copy of the Finder Comment goes into the hidden .DS_Store file in the same folder as the document, and that’s the one used by the Finder;
  • a secondary copy is saved in a xattr of type com.apple.metadata:kMDItemFinderComment for the file, which the Finder knows nothing about.

You can experience other strange effects from this dissociation between those two copies, and their different behaviours. As a result I don’t recommend use of Finder comments, because of their unreliability.

Steganography

Finder comments and other metadata provide a scheme for steganography in macOS. This was first used by Wdef, one of the original viruses that affected Classic Mac OS in about 1990, and was resurrected 30 years later in 2020, when Phil Stokes of Sentinel Labs reported a Bundlore variant abusing the Resource fork, then as now an extended attribute of type com.apple.ResourceFork.

Just recently, William Charles Gibson and Ryan Conry of Cisco Talos have described how a similar technique could be used “to stage payloads in a way that evades static file analysis”. They propose using a payload script, encoded using Base64, and written to Finder comment metadata.

Writing the malicious Finder comment is simple to achieve using the AppleScript code
set comment of newFile to "$PAYLOAD"
and retrieval, decoding and execution by the command
mdls -name kMDItemFinderComment -raw ~/Desktop/remote_test.txt | base64 -D | bash
also run from within AppleScript.

There are three disadvantages in using a Finder comment for this purpose, its fragility as shown above, its visibility to the user in the Finder’s Get Info dialog, and reliance on Spotlight indexing and search. If you want to use file metadata for steganography, then you’re better off using an extended attribute directly, accessing it with the xattr command tool, which is robust, remains with the file rather than in a hidden .DS_Store file, and doesn’t need to be indexed by Spotlight or found using mdls.

That also gives you a wider choice of extended attribute. If traceability isn’t important, a custom xattr can be used with the PS flags to ensure its persistence in copies, saves, syncs and backups. There’s a long list of those supported in macOS, including kMDItemProjects, which is stored in the com.apple.metadata:kMDItemProjects xattr and treated as having PS flags, and most importantly isn’t exposed to the user in the Finder’s Get Info dialog.

At this stage you might want to check how thoroughly your malware protection checks extended attributes for malicious content. As a rough guess, I suspect the answer is not at all.

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Share on Reddit (Opens in new window) Reddit
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Threads (Opens in new window) Threads
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Email a link to a friend (Opens in new window) Email
  • Print (Opens in new window) Print
Like Loading...

Related

Posted in Macs, Technology and tagged .DS_Store, comment, extended attributes, Finder, malware, metadata, Spotlight, steganography, xattr. Bookmark the permalink.

6Comments

Add yours
  1. 1
    joethewalrus's avatar
    joethewalrus on April 28, 2026 at 8:05 am
    Reply

    Fascinating! Being extremely out-of-date, I thought the biggest risk with Finder comments was that rebuilding the disk’s pre-OS X desktop using a Mac OS version older than 8.0 resulted in the complete loss of comments.

    Thank you for pulling me ahead three decades into the present.

    LikeLiked by 1 person

    • 2
      hoakley's avatar
      hoakley on April 28, 2026 at 11:12 am
      Reply

      Thank you, Joe. If you use one of the tools to delete .DS_Store files like Blue Harvest, it will also do just that.
      Howard.

      LikeLike

  2. 3
    Malcolm Hall's avatar
    Malcolm Hall on April 28, 2026 at 8:52 am
    Reply

    Do you recommend using tags? Which are essentially a list of comments. Do those have the same bug?

    LikeLiked by 1 person

    • 4
      hoakley's avatar
      hoakley on April 28, 2026 at 11:15 am
      Reply

      Finder tags are much better-behaved and only use a xattr. Although they have their quirks, explained here, they remain a reliable way to categorise items into one of seven categories, but don’t store any more extensive metadata.
      Howard.

      LikeLike

  3. 5
    Mark's avatar
    Mark on April 28, 2026 at 10:40 am
    Reply

    As someone who produces anti-malware software (ClamXAV), I’d like to chime in to try and ease the nerves of anyone who may be concerned by the last paragraph.

    While most malware scanners probably won’t check extended attributes, there is no process within macOS by which malicious commands hidden within those attributes could be executed automatically. You still need some way to get those commands out of the attributes to run them.

    Howard alludes to that when he talks about “retrieval, decoding and execution”, but the other tool performing this “retrieval, decoding and execution” process (AppleScript in this example) is precisely where the malware can be spotted.

    In reality, it’s no different to a dropper that downloads the malicious payload from a URL before decoding and executing it – just in this situation, you’re getting the payload out of the extended attributes instead of a web address.

    LikeLiked by 1 person

    • 6
      hoakley's avatar
      hoakley on April 28, 2026 at 11:22 am
      Reply

      Thank you.
      As xattrs have already been used to contain malicious code, and this has now been explained in detail in a PoC, I don’t think we should be surprised to see them used again. Sure, their use requires user actions, but isn’t that exactly what ClickFix is intended to do, and apparently does so successfully? As the authors of that article claim, this could be used “to stage payloads in a way that evades static file analysis”.
      Howard.

      LikeLike

Leave a reply to Malcolm Hall Cancel reply

Quick Links

  • Free Software Menu
  • System Updates
  • Mac Troubleshooting Summary
  • M-series Macs
  • Painting

Search

Monthly archives

  • April 2026 (68)
  • March 2026 (82)
  • February 2026 (71)
  • January 2026 (72)
  • December 2025 (75)
  • November 2025 (74)
  • October 2025 (75)
  • September 2025 (78)
  • August 2025 (76)
  • July 2025 (77)
  • June 2025 (74)
  • May 2025 (76)
  • April 2025 (73)
  • March 2025 (78)
  • February 2025 (67)
  • January 2025 (75)
  • December 2024 (74)
  • November 2024 (73)
  • October 2024 (78)
  • September 2024 (77)
  • August 2024 (75)
  • July 2024 (77)
  • June 2024 (71)
  • May 2024 (79)
  • April 2024 (75)
  • March 2024 (81)
  • February 2024 (72)
  • January 2024 (78)
  • December 2023 (79)
  • November 2023 (74)
  • October 2023 (77)
  • September 2023 (77)
  • August 2023 (72)
  • July 2023 (79)
  • June 2023 (73)
  • May 2023 (79)
  • April 2023 (73)
  • March 2023 (76)
  • February 2023 (68)
  • January 2023 (74)
  • December 2022 (74)
  • November 2022 (72)
  • October 2022 (76)
  • September 2022 (72)
  • August 2022 (75)
  • July 2022 (76)
  • June 2022 (73)
  • May 2022 (76)
  • April 2022 (71)
  • March 2022 (77)
  • February 2022 (68)
  • January 2022 (77)
  • December 2021 (75)
  • November 2021 (72)
  • October 2021 (75)
  • September 2021 (76)
  • August 2021 (75)
  • July 2021 (75)
  • June 2021 (71)
  • May 2021 (80)
  • April 2021 (79)
  • March 2021 (77)
  • February 2021 (75)
  • January 2021 (75)
  • December 2020 (77)
  • November 2020 (84)
  • October 2020 (81)
  • September 2020 (79)
  • August 2020 (103)
  • July 2020 (81)
  • June 2020 (78)
  • May 2020 (78)
  • April 2020 (81)
  • March 2020 (86)
  • February 2020 (77)
  • January 2020 (86)
  • December 2019 (82)
  • November 2019 (74)
  • October 2019 (89)
  • September 2019 (80)
  • August 2019 (91)
  • July 2019 (95)
  • June 2019 (88)
  • May 2019 (91)
  • April 2019 (79)
  • March 2019 (78)
  • February 2019 (71)
  • January 2019 (69)
  • December 2018 (79)
  • November 2018 (71)
  • October 2018 (78)
  • September 2018 (76)
  • August 2018 (78)
  • July 2018 (76)
  • June 2018 (77)
  • May 2018 (71)
  • April 2018 (67)
  • March 2018 (73)
  • February 2018 (67)
  • January 2018 (83)
  • December 2017 (94)
  • November 2017 (73)
  • October 2017 (86)
  • September 2017 (92)
  • August 2017 (69)
  • July 2017 (81)
  • June 2017 (76)
  • May 2017 (90)
  • April 2017 (76)
  • March 2017 (79)
  • February 2017 (65)
  • January 2017 (76)
  • December 2016 (75)
  • November 2016 (68)
  • October 2016 (76)
  • September 2016 (78)
  • August 2016 (70)
  • July 2016 (74)
  • June 2016 (66)
  • May 2016 (71)
  • April 2016 (67)
  • March 2016 (71)
  • February 2016 (68)
  • January 2016 (90)
  • December 2015 (96)
  • November 2015 (103)
  • October 2015 (119)
  • September 2015 (115)
  • August 2015 (117)
  • July 2015 (117)
  • June 2015 (105)
  • May 2015 (111)
  • April 2015 (119)
  • March 2015 (69)
  • February 2015 (54)
  • January 2015 (39)

Tags

APFS Apple Apple silicon backup Big Sur Blake Bonnard bug Catalina Consolation Console Corinth Delacroix Disk Utility Doré El Capitan extended attributes Finder firmware Gatekeeper Gérôme High Sierra history history of painting iCloud Impressionism landscape LockRattler log M1 Mac Mac history macOS macOS 10.12 macOS 10.13 macOS 10.14 macOS 10.15 macOS 11 macOS 12 macOS 13 macOS 14 macOS 15 malware Metamorphoses Mojave Monet Monterey Moreau myth narrative OS X Ovid painting performance Pissarro Poussin privacy Renoir riddle Rubens security Sierra SilentKnight Sonoma SSD Swift Time Machine Tintoretto Turner update upgrade Ventura xattr Xcode XProtect

Statistics

  • 22,162,238 hits
Blog at WordPress.com.
Footer navigation
  • About & Contact
  • Free Software Menu
  • Macs
  • Painting
  • Downloads
  • SilentKnight, Skint, SystHist, silnite, LockRattler & Scrub
  • XProCheck, T2M2, LogUI, Ulbow, blowhole and log utilities
  • Mints: a multifunction utility
  • xattred, SpotTest, Providable, Spotcord, Metamer & xattr tools
  • Versatility & Revisionist
  • DelightEd & Podofyllin
  • Precize, Alifix, UTIutility, Sparsity, alisma, Taccy, Signet
  • System Updates
  • Spundle, Cormorant, Stibium, DropSum, Dintch, Fintch and cintch
  • Virtualisation on Apple silicon
  • Cirrus & Bailiff
  • Text Utilities: Textovert, Disclipper, Nalaprop, Dystextia and others
  • sysctl information
  • Extended attributes (xattrs)
  • 32-bitCheck & ArchiChect
  • Keychains & Permissions
  • PDF
  • VisualLookUpTest
  • Updates
  • Long Reads
  • Mac Troubleshooting Summary
  • Saturday Mac Riddles
  • Last Week on My Mac
  • Painting topics
  • Mac problem-solving
  • M-series Macs
Secondary navigation
  • Search

Post navigation

The bicentenary of Frederic Edwin Church: 1849-57
Jerusalem Delivered: Overview and contents

Begin typing your search above and press return to search. Press Esc to cancel.

  • Comment
  • Reblog
  • Subscribe Subscribed
    • The Eclectic Light Company
    • Join 9,138 other subscribers
    • Already have a WordPress.com account? Log in now.
    • The Eclectic Light Company
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • View post in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...
 

    %d