<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Hossein Kamali on Medium]]></title>
        <description><![CDATA[Stories by Hossein Kamali on Medium]]></description>
        <link>https://medium.com/@0x484b?source=rss-242e86a7ca83------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qe39mA2fAYFP6uN-anR9RQ.png</url>
            <title>Stories by Hossein Kamali on Medium</title>
            <link>https://medium.com/@0x484b?source=rss-242e86a7ca83------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 00:26:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@0x484b/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[File Structure | Digital Forensics]]></title>
            <link>https://0x484b.medium.com/file-structure-digital-forensics-9de105c4d77c?source=rss-242e86a7ca83------2</link>
            <guid isPermaLink="false">https://medium.com/p/9de105c4d77c</guid>
            <category><![CDATA[dfir]]></category>
            <category><![CDATA[digital-forensics]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[file-structure]]></category>
            <dc:creator><![CDATA[Hossein Kamali]]></dc:creator>
            <pubDate>Sun, 06 Jun 2021 11:41:11 GMT</pubDate>
            <atom:updated>2021-06-07T10:19:38.222Z</atom:updated>
            <content:encoded><![CDATA[<p>regardless of the operating system, every file has a specific structure to arrange its components, those components are file name, size, signature, contents, etc. the file structure is universal and the same for any operating system.</p><h3>Metadata</h3><p>metadata, in general, is defined as Data describing other data. file metadata is the data that describes the file itself and is used by the OS application to make an opening, recognition, and processing that the file easier.</p><p>metadata is found in a different location, but as a starting point, the three locations you need to start looking for metadata when analyzing a file are:</p><ul><li><strong>MFT Record</strong></li><li><strong>File Header</strong></li><li><strong>Magic Number</strong></li></ul><h3>MFT Record</h3><p>The NTFS file system contains a file called the master file table, or MFT. There is at least one entry in the MFT for every file on an NTFS file system volume, including the MFT itself. All information about a file, including its size, time and date stamps, permissions, and data content, is stored either in MFT entries or in space outside the MFT that is described by MFT entries. As files are added to an NTFS file system volume, more entries are added to the MFT and the MFT increases in size on the other hand each file has one or more MFT records.</p><p>MFT records can be used when searching for files within the file system. this record used a piece of evidence to prove the existence of lost or deleted files. <strong>directory snoop</strong> is a great tool to perform the MFT record search and required task. another great tool <strong>DiskExplorer for NTFS</strong> from Runtime Software.</p><h3>File Header</h3><p>file header is a unique identification section found at beginning/head of every file. header usually contains data used by the application that opens the file. the header could contain things like: name, author, date of creation, size, etc.</p><p>different files have different headers and it is important to remember that some headers are known standard and others are preparatory, also some files don’t have a header at all. for example, txt files don’t have a header.</p><p>final note, most file formats have a header and a trailer. e.g. PDF files have a section called XREF in addition to the header and trailer. we can check header and trailer of files with hex editor.</p><h3>Magic Number</h3><p>the magic number is another method used by applications (mostly Unix/Linux). Magic numbers are the first bits of a file that uniquely identify the type of file.</p><p>the magic number is a unique string, usually at the beginning of the file, which can be used to identify the type of the file. in Linux, the <strong>file </strong>command can be used to identify the type of the file.</p><p>in this story, I decided to analyze Docx and JPEG file format that describing metadata topic.</p><ul><li><strong>DOCX Files Analysis</strong></li></ul><p>A WordprocessingML or docx file is a zip file (a package) containing a number of “parts” — typically UTF-8 or UTF-16 encoded XML files, though strictly defined, a part is a stream of bytes.</p><p>On the other hand, docx files are compressed files that contain XML files and binary files. you can verify that by opening and docx file in WinRAR or WinZip as below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eA2jQQL43Voo9O7UV-koZg.jpeg" /></figure><p>docx files start with <strong>50 4B 03 04 14 00 06 00 08 00 00 00 21 </strong>as bellow:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k3mF5YuTSjuB1PDdr50c8Q.jpeg" /></figure><p>trailer or the last section of the file, usually start with <strong>docProps/app.xml </strong>string.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cKQRoxAP2srtbrf-W58Wiw.jpeg" /></figure><p>the docx metadata are usually found in the <strong>docProps</strong> file within the compressed document in the form of XML files. each docx folder contains two files:</p><ul><li>Core</li><li>app</li></ul><p>the core files contain fields that are used to describe the origin of the document. fields such as the author’s name, the last editor, and the creating and editing dates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G8J0-8Rjqi6IJ2r7uc0UgA.jpeg" /></figure><p>also, app.xml file usually contains data describing the content within the document. the file describes the number of words, characters, lines, and the application which was used to create the document.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6FpT9zUGL_-1RijFU3TWPA.jpeg" /></figure><ul><li><strong>JPEG files Analysis</strong></li></ul><p>jpeg has pre-defined file structure: header , metadata and a footer. JPEG files can be found many extensions such as “JPG, jpg and jfif”. sometimes the terms JFIF, TFIF, EXIF and JPEG are used interchangeably. a JPEG file usually:</p><ul><li>start with <strong>FF D8</strong> bytes.</li><li>consists of <strong>section </strong>and the value <strong>FF</strong> is typically used as a delimiter to indicate the start of a new section.</li></ul><p>in many case (not always though) the <strong>FF D8</strong> at the beginning of the image is followed by <strong>FF E0</strong> (in some case <strong>FF E1</strong>).It does not have a length of the file embedded, thus we need to find JPEG trailer, which is <strong>FF D9</strong>.</p><h3>Metadata Type</h3><p>metadata files which are relevant to forensic investigation and can be categorized into three main types:</p><ul><li>System metadata</li><li>Substantive metadata</li><li>Embedded metadata and External metadata</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9de105c4d77c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Digital Forensics — Data Acquisition]]></title>
            <link>https://0x484b.medium.com/digital-forensics-data-acquisition-5bb741ead30a?source=rss-242e86a7ca83------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bb741ead30a</guid>
            <category><![CDATA[dfir]]></category>
            <category><![CDATA[digital-investigation]]></category>
            <category><![CDATA[digital-forensics]]></category>
            <dc:creator><![CDATA[Hossein Kamali]]></dc:creator>
            <pubDate>Sun, 06 Jun 2021 09:19:20 GMT</pubDate>
            <atom:updated>2021-06-07T10:53:51.804Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is Data Acquisition in Digital Forensics</h3><h3>Data Acquisition</h3><p>Data Acquisition means is the process of taking an image from a suspect’s machine.</p><p>Type of Data Acquisition:</p><ul><li>Static Acquisition = gathering non-volatile data, for example, gathering data from disk, USB, cd/DVD.</li><li>Dynamic Acquisition = gathering volatile data, for example, gathering data from memory.</li></ul><p><em>important to note: imaging isn’t copying</em></p><ul><li>imaging means take a mirroring the device’s entire storage on a file.</li><li>copying means take a mirroring only the useful data from the source device.</li></ul><h3>Dead Acquisition</h3><p>Dead Acquisition refers to the attempt to acquire data from the suspect’s machine without the operating system. Reason: the suspect’s OS cannot be trusted.</p><h3>Storage Format</h3><p>there are many disk image formats:</p><ul><li>RAW: is the simplest format to save an image.</li></ul><p>popular tools <em>DD</em> for Linux and <em>RAWWrite studio</em> for windows</p><pre>dd if=[src] of=[dst]</pre><ul><li>EnCase Forensic Evidence File (EWF/EVF)</li><li>ILook Investigator IDIF, IRBF and IEIF</li><li>PyFlag Seekable GZIP (sgzip)</li><li>Advanced Forensics Format (AFF)</li></ul><p>Besides a RAW format, there is a proprietary format such as AFF for forensics images. AFF is open and extensible and unencumbered by patents and trade secrets. Its open-source implementation is distributed under a license that allows its code to be freely integrated into other open-source and propriety programs. with AFF we can store more than one terabyte of data from imaged hard drives using less than 200 GB of storage.</p><p>AFF features:</p><ul><li>Ability to store disk images with or without compression.</li><li>Ability to store disk images of any size.</li><li>Ability to store metadata within disk images or separately.</li><li>Ability to store images in a single file of any size or split among multiple files</li><li>Extensibility and simple design.</li><li>save disk space.</li><li>Provisions for certifying the authenticity of evidence files with traditional hash functions (e.g., MD5 and SHA-1) and advanced digital signatures based on X.509(v)3 certificates.</li></ul><h3>Acquisition Methods</h3><ul><li>Disk-to-Image File(imaging): Forensic investigators commonly use this data acquisition method. It is a flexible method, which allows the creation of one or more copies, or bit-for-bit replications of the suspect drive. ProDiscover, EnCase, FTK, The Sleuth Kit, X-Ways Forensics, ILook Investigator, etc. are the popular tools used to read the disk-to-image files.</li><li>Disk-to-Disk(cloning): Sometimes it is not possible to create a bit-stream disk-to-image file due to software or hardware errors or incompatibilities. Investigators face such issues while trying to acquire data from older drives and create a bit-stream disk-to-disk copy of the original disk or drive. Tools like EnCase, SafeBack and Norton Ghost can help create disk-to-disk bit-stream copies of the suspect drive. These tools can modify the target disk’s geometry (its head, cylinder, and track configuration) to match the data copied from the original suspect drive.</li><li>Logical Data Acquisition: this is the preferred method with large data storage such as RAID servers. This method captures only specific files or file types of interest to the case. It is used when time is limited.</li><li>Sparse Data Acquisition: this method is similar to creating a logical acquisition but it also collects deleted data (unallocated). Also, this method is used when an investigator doesn’t need to examine the whole drive.</li></ul><p>an investigator must consider the following when determining data Acquisition Methods:</p><ol><li>The size of the source disk.</li><li>Can you retain the source disk as evidence or must you return it to the owner?</li><li>Time to do perform the acquisition.</li><li>Location of the evidence.</li></ol><p>anyway, there is no one right method that works every time. different cases have different circumstances, and with different circumstances, different methods are needed.</p><h3>Live Data Acquisition</h3><p>live data Acquisition means collect data while the machine is running. when investigator needs volatile data and volatile data reside in RAM or Cache. there are the following two types of volatile data:</p><ol><li>System Information: is a generic term that describes basic system information about the machine, system profile (details about configuration), login activity, current system date and time, command history, current system uptime, running processes, open files, startup files, clipboard data, logged on users, DLLs, or shared libraries.</li><li>Network Configuration: Network information is the network-related information stored in the suspicious system and connected network devices. Volatile network information includes open connections and ports, routing information and configuration, ARP cache, shared files, services accessed, etc.</li></ol><h3>Forensics Tools</h3><p>list of forensics tools followed by:</p><ul><li>Access Data FTK Imager: FTK Imager is one of the most famous tools in the forensics world. the tool allows the investigator to acquire various type of storage device and store then in different format for analysis. it is extremely important to remember to use <em>write blocking</em> when acquiring images for a hard disk, so that it won’t destroy or alter important data an the disk</li><li>Live response Collection: is a very handy framework from BriMor Labs, which can collect various and useful information from a machine. the tool offers many acquistion type, each one is used depending on the data we’re interested in.</li><li>Volatility Framework: the Volatility framework is a completely open collection of tools, implemented in python under GNU license for extraction of digital artifact from volatile memory sample.</li><li>Bulk Extractor: bulk_extractor is a computer forensics tool that scans a disk image, a file, or a directory of files and extracts useful information without parsing the file system or file system structures. The results can be easily inspected, parsed, or processed with automated tools.</li><li>Autopsy: Autopsy is a GUI-based open source digital forensic program to analyze hard drives and smart phones effectively. An autopsy is used by thousands of users worldwide to investigate what actually happened on the computer.</li></ul><p>A curated list of awesome free (mostly open-source) forensic analysis tools and resources please visit -&gt; <a href="https://github.com/cugu/awesome-forensics">https://github.com/cugu/awesome-forensics</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bb741ead30a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>