未加星标

The ._ (dot-underscore) file format

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二05 | 时间 2018 | 作者 红领巾 ] 0人收藏点击收藏

If you've ever looked at removable media and found several hidden files which start with ._ and there exists one for almost every file (or folder) on the disk, this is the result of having that media being used on macOS.

macOS keeps a copy of file metadata in a separate area, known as Extended Attributes (xattr) on HFS+ or APFS. However, when writing to external media which is not formatted as HFS+ or APFS (this not having the capability to store extended attributes), it will write this information out as a separate file which will have the same name, just prefixed with dot-underscore ._ as seen in the screenshot below.


The ._ (dot-underscore) file format
Figure 1 - Screenshot showing exFAT volume on External USB disk

While this is well known for many years, this information is often overlooked in a forensic investigation. On media that has interacted with both macOS and windows (or even linux), macOS will create these files and delete them too when the original file is deleted. However, if the file is deleted or renamed on Windows or Linux, then the dot-underscore files will be left behind untouched . A while back, Lee Whitfield touched upon this here specifically pointing out its use for knowing the date & time that a file was copied onto the media. However, there is useful information inside the file too.

This file can contain useful metadata such as kMDItemWhereFroms ( URL of file if downloaded from internet ) and kMDItemDownloadedDate ( Date & Time when it was downloaded ) among other extended attributes.

After a bit of reverse engineering, I wrote an 010 hex editor template to parse this information, it is available at https://github.com/ydkhatri/MacForensics/blob/master/DotUnderscore_macos.bt .

In the screenshot below, you can see it being run on one such file.


The ._ (dot-underscore) file format
Figure 2 - DotUnderscore_macOS.bt template output

Here is analysis from the data extracted:

Attribute Name Value Meaning kMDItemWhereFroms https://upload.wikimedia.org/wikipedia/commons/3/3c/Thiruvalluvar_Statue_at_Kanyakumari_beach.jpg URL from where it was downloaded kMDItemDownloadedDate 0x41BFB51D1CFFA4F8 11/09/2017 23:32:44 com.apple.quarantine 0083;5a04e59c;Safari;A451620D-2B49-49BD-ADC1-88DEBEA66582 File was downloaded using the Safari browser

kMDItemDownloadedDate is stored in a plist as a date value, which is stored as a 64-bit double that is the number of seconds since 01/01/2001

The template does not parse the plist for you, you can export it out and open in any plist viewer to view the human-readable date value.

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

代码区博客精选文章
分页:12
转载请注明
本文标题:The ._ (dot-underscore) file format
本站链接:https://www.codesec.net/view/610815.html


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(51)