{
    "id": "e158dd52-4632-4f37-b5ef-5b23d40c75a5",
    "name": "Walking Through NTFS File System Attributes",
    "slug": "walking-through-ntfs-file-system-attributes",
    "status": "published",
    "lab_type": "pta",
    "is_sample": false,
    "duration_in_seconds": 1800,
    "metadata": {
        "courses": [
            "225b7429-bd2e-433e-9168-318d861e97cf"
        ],
        "pta_sdn": "793",
        "pta_namespace": "my.ine",
        "learning_paths": [],
        "has_published_parent": true
    },
    "session": null,
    "company": "a491bc32-c056-4946-9169-cc053387bada",
    "created": "2023-03-10T20:57:28.884858Z",
    "modified": "2024-04-30T14:30:26.127751Z",
    "is_beta": false,
    "lab_objectives": [],
    "main_learning_area": null,
    "learning_areas": [
        {
            "id": "3e1aa06f-2e9f-4789-b50d-aa027ad8dcfa",
            "name": "Cyber Security",
            "slug": "cyber-security"
        }
    ],
    "categories": [],
    "tags": [],
    "difficulty": null,
    "is_web_access": false,
    "is_lab_experience": false,
    "is_featured": false,
    "cve": null,
    "severity": null,
    "year": null,
    "classification": null,
    "external_url": "",
    "solution_video": null,
    "explanation_video": null,
    "description": "# Walking through NTFS File System Attributes\n\n## Scenario\nOne of the important tasks when analyzing a file system is to know how to locate and find a file's true logical location on disk. Which clusters is it occupying and why is extremely important. This lab is designed to understand how to do that manually. You are required to locate a couple of files by analyzing the NTFS attributes and especially the NTFS data-runs used.\n\nUse the forensic image named \"Lab12.001\" file [located at C:\\DFP\\Labs\\Module05\\Lab12\\Lab12.001] for this lab.\n\n## Goals\n- Basic NTFS Attributes Analysis\n- Understand the difference between a resident and non-resident file\n- Parse NTFS Data-runs and use them to locate files\n\n## What you will learn\n- Understand how to analyze NTFS attributes\n- Understand when a file will be stored within the NTFS and when it won't be\n- Understand how to locate files by parse the NTFS data runs for files\n\n## Recommended tools\nFTK Imager",
    "description_html": "<h1>Walking through NTFS File System Attributes</h1>\n<h2>Scenario</h2>\n<p>One of the important tasks when analyzing a file system is to know how to locate and find a file's true logical location on disk. Which clusters is it occupying and why is extremely important. This lab is designed to understand how to do that manually. You are required to locate a couple of files by analyzing the NTFS attributes and especially the NTFS data-runs used.</p>\n<p>Use the forensic image named \"Lab12.001\" file [located at C:\\DFP\\Labs\\Module05\\Lab12\\Lab12.001] for this lab.</p>\n<h2>Goals</h2>\n<ul>\n<li>Basic NTFS Attributes Analysis</li>\n<li>Understand the difference between a resident and non-resident file</li>\n<li>Parse NTFS Data-runs and use them to locate files</li>\n</ul>\n<h2>What you will learn</h2>\n<ul>\n<li>Understand how to analyze NTFS attributes</li>\n<li>Understand when a file will be stored within the NTFS and when it won't be</li>\n<li>Understand how to locate files by parse the NTFS data runs for files</li>\n</ul>\n<h2>Recommended tools</h2>\n<p>FTK Imager</p>",
    "tasks": "## Tasks\n### Task 1: Basic NTFS Attribute Analysis\nUse your file system analysis skills to manually analyze the forensic image [located at C:\\DFP\\Labs\\Module05\\Lab12\\Lab12.001] and report back answers to the questions given below:\n\n* What is the cluster size used for this disk?\n* How many user files (pdf, exe, etc.) did you find and what was the size of each one of them.\n* Locate the MFT entry for each and provide the following:\n  * Attribute ID for the Standard Information Attribute and its size\n  * File Name Attribute and its size\n  * Data Attribute and whether the file is resident or not (check residency flag)\n  * Offset to the data-run, and the data run itself\n  \n\n### Task 2: Parsing the NTFS Dataruns\nUse the data run results you obtained in Task #1 and report the following:\n* What does each part of the data run mean?\n* What is the first cluster for each file?\n* How many clusters are being used for each file?\n* What is the first sector number for each non-resident file?\n* Verify your results with the results automatically given to you by WinHex.",
    "tasks_html": "<h2>Tasks</h2>\n<h3>Task 1: Basic NTFS Attribute Analysis</h3>\n<p>Use your file system analysis skills to manually analyze the forensic image [located at C:\\DFP\\Labs\\Module05\\Lab12\\Lab12.001] and report back answers to the questions given below:</p>\n<ul>\n<li>What is the cluster size used for this disk?</li>\n<li>How many user files (pdf, exe, etc.) did you find and what was the size of each one of them.</li>\n<li>Locate the MFT entry for each and provide the following:</li>\n<li>Attribute ID for the Standard Information Attribute and its size</li>\n<li>File Name Attribute and its size</li>\n<li>Data Attribute and whether the file is resident or not (check residency flag)</li>\n<li>Offset to the data-run, and the data run itself</li>\n</ul>\n<h3>Task 2: Parsing the NTFS Dataruns</h3>\n<p>Use the data run results you obtained in Task #1 and report the following:\n* What does each part of the data run mean?\n* What is the first cluster for each file?\n* How many clusters are being used for each file?\n* What is the first sector number for each non-resident file?\n* Verify your results with the results automatically given to you by WinHex.</p>",
    "published_date": "2020-10-20T15:32:26Z",
    "solutions": "## SOLUTIONS\n### Task 1: Basic NTFS Attribute Analysis\nStart by opening the first disk which is [Lab12.001] [located at C:\\DFP\\Labs\\Module05\\Lab12\\Lab12.001] and loading it using FTK Imager.\n\n![FTKImager](https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/1.jpg)\n\nNow, let's start answering the required questions.\n\nWhat is the cluster size used for this disk?\n\nThis can be found by viewing the volume boot record (VBR). Click on the NTFS Partition \"CarveMe2\" and switch your view to hexadecimal. Bytes 11-12 bytes per sector. Byte 13 will tell you the sectors per cluster. Sweep bytes 11-12, and click on Hex Value Interpreter. \n\n![Bytes per sector](https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/bytespersector.jpg)<bytes per sector.jpg>\n\nNow sweep byte 13 for sectors per cluster\n\n![Sectors Per Cluster](https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/sectorspercluster.jpg)\n\nThere are 512 bytes per sector and 8 secors in a cluster. That means each cluster is 4096kb.\n\nCheck this by switching from Hex Value Interpreter to Properties.\n\n![Cluster Size Properties](https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/clustersizeproperties.jpg)\n\nHow many user files (pdf, exe, etc.) did you find and what was the size of each one of them.\n\n|Item|\tFile Name\t|Size|\n|----|--------------|----|\n|1|bin2sc.py|373 bytes|\n|2|Document1.pdf|531 Kilobytes|\n|3|File02.exe|7.9 Megabytes|\n|4|Photo05.jpg|1.4 Megabytes|\n\nNow we need to locate the MFT entry for each file and report back the following:\n\ta. Attribute ID for the Standard Information Attribute and its size\n\tb. File Name Attribute and its size\n\tc. Data Attribute and whether the file is resident or not (check residency flag)\n\td. Offset to the data-run, and the data run itself\n\n[Answer for the first file:] bin2sc.py\n\nRight click in the hexadecimal space and select find. Search for: \"bin2sec.py\", leaving the options at default. You will need to press F3 to continue to search. You are looking for the filename to me near the FILE0 entry. You should find this at offset 069946608, with FILE0 being at 069946368. You may need to switch to decimal offsets by right clicking in the hexadecimal space and selecting the option.\n\n![bin2sec offset](https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/bin2secstdinfo.jpg)\n\nThe File record header is from offset 1-55, The $STANDARD_INFORMATION attribute begins at offset 56 and continues through the next 80 bytes.\n\nNow, based on the NTFS documentation and the course notes, the standard information attribute has a type ID of 0x10.\n\nTherefore at offset 56 we find 10000000 which is the $STANDARD_INFORMATION attribute id 0x10. To locate the next attribute, we need to calculate the length of the $STANDARD_INFORMATION attribute, which is found in the next four bytes after the 4 bytes related to the attribute type ID. So, here we find the value (0x60000000 little endian) which means this attribute is 0x60 bytes long or 96 bytes (decimal).\n\nThis can be seen in the figure below. \n\n![StdAttribute](https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/stdattributes.jpg)\n\nNow, as you can see, we have arrived at the next attribute which is 0x30000000 or 0x30. The attribute that has an ID of 0x30 is the $FILE_NAME attribute. The size is calculated the same way; we take the next four bytes to get the size of the attribute. Here we see 0x70000000 which means 0x70 or 112 in decimal. This can also be seen in the next figure. \n\n![File Attributes](https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/filenameattrib.jpg)\n\nNow we reach the next attribute which starts with 0x80000000 or 0x80. The $DATA attribute is the one that uses an ID of 0x80. Now, if you go back and look at the size of this file, you will find that it is 373 bytes, which is under 700 bytes, and means we have a resident attribute here. This means the file content is going to be found within the MFT File Record entry, or in other words; within the 1024 bytes, allocated for the entry.\n\nIf we calculate the length of the file, we will find that it is 0x90010000 or 0x0190 bytes long, and this leads that our file has been allocated 400 bytes. Don't forget this includes the header. Before we finish the analysis for this file, just remember that at offset 0x8 we can find a single byte that is used to mark the attribute whether resident or not. So, if you go to offset 0x8, we find that it has the value 0x00, which means our file is resident (non-resident = 0x01).\n\nSince this is not a non-resident file, then we don't have a data run for it. Let us move on to the next file.\n\nAnswer for the second file: Document1.pdf\n\nSame as before, we start by right-clicking on the file and then select Navigation -> Seek FILE Record. Again, at offset 0x14 in hexadecimal, we can find a two bytes value which represents the offset to the first attribute for this file. So, if we check offset 0x14 (20 decimal), we find the value 0x3800 (little endian). This means that our first attribute is at offset 0x38 in hex or 56 in decimal. \n\nAgain, at offset 56 we found 10000000 which is the \\$STANDARD_INFORMATION id 0x10. As we did before, to locate the next attribute, we need to calculate the length of the $STANDARD_INFORMATION attribute, which can be found in the next four bytes after the 4 bytes related to the attribute type ID. So, here we find the value (0x60000000 little endian) which means this attribute is 0x60 bytes long or 96 bytes (decimal). This can be seen in the next figure. \n\nNow, as you can see, we have arrived at the next attribute which is 0x30000000 or 0x30. The attribute that has an ID of 0x30 is the $FILE_NAME attribute. The size is calculated the same way; we take the next four bytes to get the size of the attribute. Here we see 0x78000000 which means 0x78 or 120 in decimal. This can be seen in the next figure. \n\nNow we reach the next attribute which starts with 0x80000000 or 0x80. The $DATA attribute is the one that uses an ID of 0x80. Now, if you go to offset 0x8, we find that it has the value 0x01, which means our file is non-resident. Also, the length of this attribute is 0x48000000 or 0x48 (72 decimal) as seen in the next figure. \n\nTo find where this file is stored, we need to locate the data run for the file. This can be done by checking offset 0x20, which is two bytes long. So, by going to offset 0x20 or 32 in decimal, we find that the data run is located at 0x40 or 64 in decimal. Now, by going to that location, we find the following: \n\nSo, the data run is: 0x2285009107. We will come back to this later in Task #2.\n\nBTW, the values 0xFFFFFFFF82794711 are the marker of the end of the MFT File Record.\n\nNow, all you need to do is repeat the same process for the rest of the files (File02.exe and Photo05.jpg).\n\nSummary of findings:\n\n| File Name | SIA (size)| FNA (size)| Data (size)| Resident| Data-run|\n|-----------| ----------| ----------| -----------| --------| --------|\n|Bin2sc.py| 10 (0x60)| 30 (0x70) | 80 (0x190) | Yes | None|\n|Document1.pdf | 10 (0x60) | 30 (0x78) | 80 (0x48) | No | 0x2285009107 |\n|File02.exe | 10 (0x60)| 30 (0x70) | 80 (0x48) | No| 0x22DD071608|\n|Photo05.jpg | 10 (0x60) | 30 (0x70)| 80 (0x48) | No | 0x2264012D06|\n\n### Task 2: Parsing the NTFS Dataruns\nNow, let's use the results we got in Task #1 to answer the questions below:\n\nWhat does each part of the data run mean?\n[Answer:]\n\nThe data run string is defined like this:\n\nThe first byte is actually divided and parsed like this:\n\na. The first nibble represents the number of bytes that represent the first cluster number\n\nb. The second nibble represents the number of bytes that represent the number of clusters this file is occupying\n\n\n|Byte\t|Bytes\t|Bytes|\n|----------|----------|----------|\n|Nibble Nibble |Representing No. of Clusters|Representing No. of the First Cluster|\n\nSo, as you can see, it all goes down to the first byte in the data run.\n\nLet's answer both questions 2 and 3 together.\n\nWhat is the first cluster for each file?\n\nHow many clusters are being used for each file?\n\nAnswer:\n\nSince the first file is resident, we are not going to calculate where the first cluster is.\n\nThe first cluster for the second file Document1.pdf is calculated like this:\n\nData run: 0x2285009107\n\n2: 91 07 -> number of the first cluster (little endian)\n\n= 1937\n\n2: 85 00 -> number of clusters allocated (little endian)\n\n= 133\n\nAnd for the data run for File02.exe = 0x22DD071608\n\n2: 16 08 -> the first cluster\n\n= 2070\n\n2: DD 07 -> no. of clusters\n\n= 2013\n\nFinally, the data run for file Photo05.jpg = 0x2264012D06\n\n2: 2D 06 -> the first cluster\n\n= 1581 2: 64 01 -> no. of clusters = 356\n\nWhat is the first sector number for each non-resident file?\nAnswer:\n\nHere is when the size of the cluster comes in handy! Now, to locate the first sector for each file, we can do that based on the equation found below:\n\nFirst sector = (First cluster no. * cluster size ) / sector size\n\nMeans, for the second file Document1.pdf\n\nFirst sector = 1937 * 4096 / 512 = 15496\n\nFor the third file File02.exe\n\nFirst sector = 2070 * 4096 / 512 = 16560\n\nMeans, for the second file Photo05.jpg\n\nFirst sector = 1581 * 4096 / 512 = 12648\n\nVerify your results with the results automatically given to you by WinHex.\nAnswer:\n\nThis is easily done by right-clicking on the file and then Navigation List Clusters. The proof for each file is below. (Cluster = First cluster and Total = No. of clusters)\n\n**Document1.pdf**\n\n![Document1Info](https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/Document1Details.jpg)\n\t\n**File02.exe**\n\t\n![File02Info](https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/File02Details.jpg)\n\t\n**Photo05.jpg**\n\n![Photo05Info](https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/Photo05Details.jpg)\n\n\t\t\n**Summary of findings:**\n\n|File Name|First Cluster|No. of clusters|First sector|\n|---------|-------------|---------------|------------|\n|Document1.pdf|1937|133|15496|\n|File02.exe|2070|2013|16560|\n|Photo05.jpg|1581|356|12648|",
    "solutions_html": "<h2>SOLUTIONS</h2>\n<h3>Task 1: Basic NTFS Attribute Analysis</h3>\n<p>Start by opening the first disk which is [Lab12.001] [located at C:\\DFP\\Labs\\Module05\\Lab12\\Lab12.001] and loading it using FTK Imager.</p>\n<p><img alt=\"FTKImager\" src=\"https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/1.jpg\" /></p>\n<p>Now, let's start answering the required questions.</p>\n<p>What is the cluster size used for this disk?</p>\n<p>This can be found by viewing the volume boot record (VBR). Click on the NTFS Partition \"CarveMe2\" and switch your view to hexadecimal. Bytes 11-12 bytes per sector. Byte 13 will tell you the sectors per cluster. Sweep bytes 11-12, and click on Hex Value Interpreter. </p>\n<p><img alt=\"Bytes per sector\" src=\"https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/bytespersector.jpg\" /><bytes per sector.jpg></p>\n<p>Now sweep byte 13 for sectors per cluster</p>\n<p><img alt=\"Sectors Per Cluster\" src=\"https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/sectorspercluster.jpg\" /></p>\n<p>There are 512 bytes per sector and 8 secors in a cluster. That means each cluster is 4096kb.</p>\n<p>Check this by switching from Hex Value Interpreter to Properties.</p>\n<p><img alt=\"Cluster Size Properties\" src=\"https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/clustersizeproperties.jpg\" /></p>\n<p>How many user files (pdf, exe, etc.) did you find and what was the size of each one of them.</p>\n<table>\n<thead>\n<tr>\n<th>Item</th>\n<th>File Name</th>\n<th>Size</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>bin2sc.py</td>\n<td>373 bytes</td>\n</tr>\n<tr>\n<td>2</td>\n<td>Document1.pdf</td>\n<td>531 Kilobytes</td>\n</tr>\n<tr>\n<td>3</td>\n<td>File02.exe</td>\n<td>7.9 Megabytes</td>\n</tr>\n<tr>\n<td>4</td>\n<td>Photo05.jpg</td>\n<td>1.4 Megabytes</td>\n</tr>\n</tbody>\n</table>\n<p>Now we need to locate the MFT entry for each file and report back the following:\n    a. Attribute ID for the Standard Information Attribute and its size\n    b. File Name Attribute and its size\n    c. Data Attribute and whether the file is resident or not (check residency flag)\n    d. Offset to the data-run, and the data run itself</p>\n<p>[Answer for the first file:] bin2sc.py</p>\n<p>Right click in the hexadecimal space and select find. Search for: \"bin2sec.py\", leaving the options at default. You will need to press F3 to continue to search. You are looking for the filename to me near the FILE0 entry. You should find this at offset 069946608, with FILE0 being at 069946368. You may need to switch to decimal offsets by right clicking in the hexadecimal space and selecting the option.</p>\n<p><img alt=\"bin2sec offset\" src=\"https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/bin2secstdinfo.jpg\" /></p>\n<p>The File record header is from offset 1-55, The $STANDARD_INFORMATION attribute begins at offset 56 and continues through the next 80 bytes.</p>\n<p>Now, based on the NTFS documentation and the course notes, the standard information attribute has a type ID of 0x10.</p>\n<p>Therefore at offset 56 we find 10000000 which is the $STANDARD_INFORMATION attribute id 0x10. To locate the next attribute, we need to calculate the length of the $STANDARD_INFORMATION attribute, which is found in the next four bytes after the 4 bytes related to the attribute type ID. So, here we find the value (0x60000000 little endian) which means this attribute is 0x60 bytes long or 96 bytes (decimal).</p>\n<p>This can be seen in the figure below. </p>\n<p><img alt=\"StdAttribute\" src=\"https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/stdattributes.jpg\" /></p>\n<p>Now, as you can see, we have arrived at the next attribute which is 0x30000000 or 0x30. The attribute that has an ID of 0x30 is the $FILE_NAME attribute. The size is calculated the same way; we take the next four bytes to get the size of the attribute. Here we see 0x70000000 which means 0x70 or 112 in decimal. This can also be seen in the next figure. </p>\n<p><img alt=\"File Attributes\" src=\"https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/filenameattrib.jpg\" /></p>\n<p>Now we reach the next attribute which starts with 0x80000000 or 0x80. The $DATA attribute is the one that uses an ID of 0x80. Now, if you go back and look at the size of this file, you will find that it is 373 bytes, which is under 700 bytes, and means we have a resident attribute here. This means the file content is going to be found within the MFT File Record entry, or in other words; within the 1024 bytes, allocated for the entry.</p>\n<p>If we calculate the length of the file, we will find that it is 0x90010000 or 0x0190 bytes long, and this leads that our file has been allocated 400 bytes. Don't forget this includes the header. Before we finish the analysis for this file, just remember that at offset 0x8 we can find a single byte that is used to mark the attribute whether resident or not. So, if you go to offset 0x8, we find that it has the value 0x00, which means our file is resident (non-resident = 0x01).</p>\n<p>Since this is not a non-resident file, then we don't have a data run for it. Let us move on to the next file.</p>\n<p>Answer for the second file: Document1.pdf</p>\n<p>Same as before, we start by right-clicking on the file and then select Navigation -&gt; Seek FILE Record. Again, at offset 0x14 in hexadecimal, we can find a two bytes value which represents the offset to the first attribute for this file. So, if we check offset 0x14 (20 decimal), we find the value 0x3800 (little endian). This means that our first attribute is at offset 0x38 in hex or 56 in decimal. </p>\n<p>Again, at offset 56 we found 10000000 which is the \\$STANDARD_INFORMATION id 0x10. As we did before, to locate the next attribute, we need to calculate the length of the $STANDARD_INFORMATION attribute, which can be found in the next four bytes after the 4 bytes related to the attribute type ID. So, here we find the value (0x60000000 little endian) which means this attribute is 0x60 bytes long or 96 bytes (decimal). This can be seen in the next figure. </p>\n<p>Now, as you can see, we have arrived at the next attribute which is 0x30000000 or 0x30. The attribute that has an ID of 0x30 is the $FILE_NAME attribute. The size is calculated the same way; we take the next four bytes to get the size of the attribute. Here we see 0x78000000 which means 0x78 or 120 in decimal. This can be seen in the next figure. </p>\n<p>Now we reach the next attribute which starts with 0x80000000 or 0x80. The $DATA attribute is the one that uses an ID of 0x80. Now, if you go to offset 0x8, we find that it has the value 0x01, which means our file is non-resident. Also, the length of this attribute is 0x48000000 or 0x48 (72 decimal) as seen in the next figure. </p>\n<p>To find where this file is stored, we need to locate the data run for the file. This can be done by checking offset 0x20, which is two bytes long. So, by going to offset 0x20 or 32 in decimal, we find that the data run is located at 0x40 or 64 in decimal. Now, by going to that location, we find the following: </p>\n<p>So, the data run is: 0x2285009107. We will come back to this later in Task #2.</p>\n<p>BTW, the values 0xFFFFFFFF82794711 are the marker of the end of the MFT File Record.</p>\n<p>Now, all you need to do is repeat the same process for the rest of the files (File02.exe and Photo05.jpg).</p>\n<p>Summary of findings:</p>\n<table>\n<thead>\n<tr>\n<th>File Name</th>\n<th>SIA (size)</th>\n<th>FNA (size)</th>\n<th>Data (size)</th>\n<th>Resident</th>\n<th>Data-run</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Bin2sc.py</td>\n<td>10 (0x60)</td>\n<td>30 (0x70)</td>\n<td>80 (0x190)</td>\n<td>Yes</td>\n<td>None</td>\n</tr>\n<tr>\n<td>Document1.pdf</td>\n<td>10 (0x60)</td>\n<td>30 (0x78)</td>\n<td>80 (0x48)</td>\n<td>No</td>\n<td>0x2285009107</td>\n</tr>\n<tr>\n<td>File02.exe</td>\n<td>10 (0x60)</td>\n<td>30 (0x70)</td>\n<td>80 (0x48)</td>\n<td>No</td>\n<td>0x22DD071608</td>\n</tr>\n<tr>\n<td>Photo05.jpg</td>\n<td>10 (0x60)</td>\n<td>30 (0x70)</td>\n<td>80 (0x48)</td>\n<td>No</td>\n<td>0x2264012D06</td>\n</tr>\n</tbody>\n</table>\n<h3>Task 2: Parsing the NTFS Dataruns</h3>\n<p>Now, let's use the results we got in Task #1 to answer the questions below:</p>\n<p>What does each part of the data run mean?\n[Answer:]</p>\n<p>The data run string is defined like this:</p>\n<p>The first byte is actually divided and parsed like this:</p>\n<p>a. The first nibble represents the number of bytes that represent the first cluster number</p>\n<p>b. The second nibble represents the number of bytes that represent the number of clusters this file is occupying</p>\n<table>\n<thead>\n<tr>\n<th>Byte</th>\n<th>Bytes</th>\n<th>Bytes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Nibble Nibble</td>\n<td>Representing No. of Clusters</td>\n<td>Representing No. of the First Cluster</td>\n</tr>\n</tbody>\n</table>\n<p>So, as you can see, it all goes down to the first byte in the data run.</p>\n<p>Let's answer both questions 2 and 3 together.</p>\n<p>What is the first cluster for each file?</p>\n<p>How many clusters are being used for each file?</p>\n<p>Answer:</p>\n<p>Since the first file is resident, we are not going to calculate where the first cluster is.</p>\n<p>The first cluster for the second file Document1.pdf is calculated like this:</p>\n<p>Data run: 0x2285009107</p>\n<p>2: 91 07 -&gt; number of the first cluster (little endian)</p>\n<p>= 1937</p>\n<p>2: 85 00 -&gt; number of clusters allocated (little endian)</p>\n<p>= 133</p>\n<p>And for the data run for File02.exe = 0x22DD071608</p>\n<p>2: 16 08 -&gt; the first cluster</p>\n<p>= 2070</p>\n<p>2: DD 07 -&gt; no. of clusters</p>\n<p>= 2013</p>\n<p>Finally, the data run for file Photo05.jpg = 0x2264012D06</p>\n<p>2: 2D 06 -&gt; the first cluster</p>\n<p>= 1581 2: 64 01 -&gt; no. of clusters = 356</p>\n<p>What is the first sector number for each non-resident file?\nAnswer:</p>\n<p>Here is when the size of the cluster comes in handy! Now, to locate the first sector for each file, we can do that based on the equation found below:</p>\n<p>First sector = (First cluster no. * cluster size ) / sector size</p>\n<p>Means, for the second file Document1.pdf</p>\n<p>First sector = 1937 * 4096 / 512 = 15496</p>\n<p>For the third file File02.exe</p>\n<p>First sector = 2070 * 4096 / 512 = 16560</p>\n<p>Means, for the second file Photo05.jpg</p>\n<p>First sector = 1581 * 4096 / 512 = 12648</p>\n<p>Verify your results with the results automatically given to you by WinHex.\nAnswer:</p>\n<p>This is easily done by right-clicking on the file and then Navigation List Clusters. The proof for each file is below. (Cluster = First cluster and Total = No. of clusters)</p>\n<p><strong>Document1.pdf</strong></p>\n<p><img alt=\"Document1Info\" src=\"https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/Document1Details.jpg\" /></p>\n<p><strong>File02.exe</strong></p>\n<p><img alt=\"File02Info\" src=\"https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/File02Details.jpg\" /></p>\n<p><strong>Photo05.jpg</strong></p>\n<p><img alt=\"Photo05Info\" src=\"https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3524/Photo05Details.jpg\" /></p>\n<p><strong>Summary of findings:</strong></p>\n<table>\n<thead>\n<tr>\n<th>File Name</th>\n<th>First Cluster</th>\n<th>No. of clusters</th>\n<th>First sector</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Document1.pdf</td>\n<td>1937</td>\n<td>133</td>\n<td>15496</td>\n</tr>\n<tr>\n<td>File02.exe</td>\n<td>2070</td>\n<td>2013</td>\n<td>16560</td>\n</tr>\n<tr>\n<td>Photo05.jpg</td>\n<td>1581</td>\n<td>356</td>\n<td>12648</td>\n</tr>\n</tbody>\n</table>",
    "flags": [],
    "min_points_to_pass": null,
    "access_type": "default",
    "user_status": "unstarted",
    "user_lab_status": null,
    "user_status_modified": null,
    "user_flags": [],
    "global_running_session": null
}