{
    "id": "7499f53e-db30-444c-b3b0-138c2bd2e774",
    "name": "Locating Hidden Partitions & Partition Gaps",
    "slug": "locating-hidden-partitions-partition-gaps",
    "status": "published",
    "lab_type": "pta",
    "is_sample": false,
    "duration_in_seconds": 1800,
    "metadata": {
        "courses": [
            "225b7429-bd2e-433e-9168-318d861e97cf"
        ],
        "pta_sdn": "790",
        "pta_namespace": "my.ine",
        "learning_paths": [],
        "has_published_parent": true
    },
    "session": null,
    "company": "a491bc32-c056-4946-9169-cc053387bada",
    "created": "2023-03-10T20:52:26.055117Z",
    "modified": "2024-04-30T14:44:18.564293Z",
    "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": "## Scenario\nYou were asked to investigate a hard disk drive of an employee named John Doe, that is suspected of hiding some tools and files on his computer somehow. The IT team at the company has already checked his disk but found nothing, but they are sure he is hiding his data somehow on the disk.\n\nYou went there and took a forensic image of his hard disks as seen in the figure below:\n\n![Disk Manager View](https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3512/1.png)\n\n## Goals\n- Understand how to parse disks that are using an extended partition table.\n- Locate partition gaps and hidden partitions\n\n## What you will learn\n- Understand how to walk through a disk using an extended partition table structures\n- Locate partition gaps on the disk and investigate if they contain anything useful\n- Find if any hidden partitions exist on the hard disk drive\n\n## Recommended tools\n- Autopsy, Disk Editor, or The Slueth Kit (TSK)\n- Eric Zimmerman's bstrings or the Linux strings command",
    "description_html": "<h2>Scenario</h2>\n<p>You were asked to investigate a hard disk drive of an employee named John Doe, that is suspected of hiding some tools and files on his computer somehow. The IT team at the company has already checked his disk but found nothing, but they are sure he is hiding his data somehow on the disk.</p>\n<p>You went there and took a forensic image of his hard disks as seen in the figure below:</p>\n<p><img alt=\"Disk Manager View\" src=\"https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3512/1.png\" /></p>\n<h2>Goals</h2>\n<ul>\n<li>Understand how to parse disks that are using an extended partition table.</li>\n<li>Locate partition gaps and hidden partitions</li>\n</ul>\n<h2>What you will learn</h2>\n<ul>\n<li>Understand how to walk through a disk using an extended partition table structures</li>\n<li>Locate partition gaps on the disk and investigate if they contain anything useful</li>\n<li>Find if any hidden partitions exist on the hard disk drive</li>\n</ul>\n<h2>Recommended tools</h2>\n<ul>\n<li>Autopsy, Disk Editor, or The Slueth Kit (TSK)</li>\n<li>Eric Zimmerman's bstrings or the Linux strings command</li>\n</ul>",
    "tasks": "## Tasks\n\n### Task 1: Parsing The Extended Partition\nYour evidence file can be found at C:\\DFP\\Labs\\Module04\\Lab9\\Lab9.001 .\n\nUse your disk analysis skills to manually parse the extended partition and identify all logical partitions found on the disk. Report back the starting sector, size and type of each partition found.\n\n### Task 2: Locate Hidden Partitions\nUse your disk analysis skills to identify if there are any hidden partitions, and explain why you believe they were hidden. Be sure to incorporate skills learned in previous labs.\n\nHINT: Think about what would happen if the suspect modified the byte containing information about the type of a partition. Wouldn't he be able to hide a partition from the system this way?\n\n### Task 3: Searching Partition Gaps for Hidden Data\nUse your disk analysis skills to extract and search partition gaps for hidden data. WinHex's File Recovery by Type functionality and Eric Zimmerman's bstrings [located at C:\\DFP\\Tools\\Utilities] or the Linux strings command will certainly prove handy in solving this task.",
    "tasks_html": "<h2>Tasks</h2>\n<h3>Task 1: Parsing The Extended Partition</h3>\n<p>Your evidence file can be found at C:\\DFP\\Labs\\Module04\\Lab9\\Lab9.001 .</p>\n<p>Use your disk analysis skills to manually parse the extended partition and identify all logical partitions found on the disk. Report back the starting sector, size and type of each partition found.</p>\n<h3>Task 2: Locate Hidden Partitions</h3>\n<p>Use your disk analysis skills to identify if there are any hidden partitions, and explain why you believe they were hidden. Be sure to incorporate skills learned in previous labs.</p>\n<p>HINT: Think about what would happen if the suspect modified the byte containing information about the type of a partition. Wouldn't he be able to hide a partition from the system this way?</p>\n<h3>Task 3: Searching Partition Gaps for Hidden Data</h3>\n<p>Use your disk analysis skills to extract and search partition gaps for hidden data. WinHex's File Recovery by Type functionality and Eric Zimmerman's bstrings [located at C:\\DFP\\Tools\\Utilities] or the Linux strings command will certainly prove handy in solving this task.</p>",
    "published_date": "2020-10-20T15:32:26Z",
    "solutions": "## SOLUTIONS\n\n### Task 1: Parsing The Extended Partition\nExamine the evidence file named \"[Lab9.001]\" [located at C:\\DFP\\Labs\\Module04\\Lab9\\Lab9.001] using the forensic tool of your choice (Autopsy or MMLS.exe is recommended), which would lead us to the following Please note:\n- I have colored each partition entry in the MBR disk structure\n- You will need to locate and extract TheSluethkit from the C:\\DFP\\Tools\\Windows\\sleuthkit-4.12.0-win32.zip\n\n![Partitions](https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3512/2.jpg)\n\nView the partition in the tool of your choice\n\n![MMLS Partitions](https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3512/mmls_part_output.jpg)\n![Autopsy Partitions](https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3512/autopsy_part_output.jpg)\n\nThe output should show you a list of partitions, primary and extended. When examiniing a partition structure they are typicaly continous. The sector stop and the sector start for the next partition should be adjacent to each other, with no missing sectors in between. If you see that sectors are not contimous, then you have what is called a partition gap. This is not normal behavior for partition creation, and is generally intentionally created by a human. Typically the threat actor will use a tool such as fdisk, gparted, or diskpart to manually create and delete partitions--custom picking the sector starts and length.\n\nWe definitely can observe some gaps.We now need to figure out how this disk is structured and understand where each partition starts and ends.\n\nManually document the partitions. I recommend creating a table. Start with you first partition and take note of the start sector, end sector, length, partition type, and whether or not there is a gap between the previous partition. Look for allocated vs unallocated partition tables.\n\n**NOTE:** Before continuing, take the time to study the partition tables generated by your tool and do the analysis yourself.\n\nYou should come up with the following partitions\n\n|Partition Number|Start Sector|End Sector|Length|Partition Type|Gap Detected|\n|:--------------:|:----------:|:--------:|:----:|:------------:|:----------:|\n|1|128|204927|204800|Linux (0x83)|No|\n|2|205056|409855|204800|Win95 FAT32 (0x0b)|**YES**|\n|3|409984|614783|204800|Linux (0x83)|**YES**|\n|4|614912|819711|204800|NTFS/exFAT (0x07)|**YES**|\n|5|819840|1024639|204800|NTFS/exFAT (0x07)|**YES**|\n\nFrom this, we know that the first partition is after 128 sectors from the beginning of the disk, and its capacity is 204800 sectors. From the menu and using the go to offset button, use it to move 128 sectors.\n\nThis will lead us to the first partition holding a FAT32 file system as seen below:\n\nNow we see that this partition has 204800 sectors\n\nThis should lead us to the following:\n\nIf we add the values in the sectors preceding partition #1 (128) with the sectors in the partition (204800), we get 204928, which exactly where the next partition starts.\n\nBefore we proceed, if you look at the Partition Type Indicator of the second partition, we notice that it is 0x05, which refers to an extended partition. And since it is an extended partition, I just want to remind you that they use the following MBR structure:\n\nEntry\tSize in Bytes\tDescription\n1\t446\tZeros\n2\t16\tDescribe the first partition\n3\t16\tThe location of the next partition\n4\t32\tZeros\n5\t2\tThe end of sector marker 55 AA\nTotal\t512\t\n\nAnother important note to remember is the last extended partition table will only have one 16 byte entry, and the rest will be zeros. So, we can understand that this is the last logical partition in the extended structure by checking the second entry of the partition table found. If the entry has values, then this is the location of that partition; if it holds only zeros, then we have reached the last partition as we said.\n\nContinueing on, if we add the size of sectors we found in the previous step, which was 204800 sectors, we will reach the next extended partition, which will also hold an MBR boot structure. This can be seen below:\n\nThe beginning of the sector has all zeros as we expected, and then we see that there are also 128 sectors before we reach the first partition. Please remember that this is a relative offset and not one calculated from the beginning of the disk. Also, note the size of the disk is 204800 sectors. So, let us do this again, add 128 sectors to our current position. This would take us to the first partition, and then from there add the size 204800 sectors to go to the next partition.\n\nNote: since the second partition entry is not zero, it means there are still some partitions on this disk.\n\nAs we see below, we got a partition holding an NTFS file system:\n\nAdding its size would lead us to the next partition, so let us do that.\n\nAs expected, we reached another extended MBR Boot Record.\n\nSo the partition is also after 128 sectors and its size is 204800 sectors, plus we still have other partitions to follow, because the second partition table is not empty (zeros). Let's continue. Now we reach another NTFS file system.\n\nAdding the size of it should lead us to another MBR partition.\n\nNow this time notice the first partition is after 128 sectors as we saw in all partitions we went through since the beginning, and the size of it is the same too. But, take a closer look at the second partition entry, it is empty and filled with zeros, which means we reached the end of the partitions on this disk.\n\nLet us create a summary of findings using the table below to answer the questions that were required from us (Report back the starting sector, size and type of each partition found.):\n\n|Partition #|Starting Sector|Size in Bytes|Type ID / Name|\n|:-----------:|:---------------:|:-------------:|:--------------:|\n|1|128|104857600|83 / Linux|\n|2|205056|104857600|0B / FAT32|\n|3|409984|104857600|83 / Linux|\n|4|614912|104857600|07 / NTFS|\n|5|819840|104857600|07 / NTFS|\n\n[Note:] if you are asking yourself from where or how did we calculate the starting sector of each partition relative to the beginning of the disk, all you need to do is the following:\n\nA) Partition #1 = Preceding Sectors Value (128)\n\n= 128\n\nB) Partition #2 = Value found in (A) + Preceding Sectors Value (128) + Size (204800)\n\n= 128 + 128 + 204800 = 205056\n\nC) Partition #3 = Value found in (B) + Preceding Sectors Value (128) + Size (204800)\n\n= 205056 + 128 + 204800 = 409984\n\nD) Partition #4 = Value found in (C) + Preceding Sectors Value (128) + Size (204800)\n\n= 409984 + 128 + 204800 = 614912\n\nE) Partition #3 = Value found in (D) + Preceding Sectors Value (128) + Size (204800)\n\n= 614912 + 128 + 204800 = 819840\n\nAnd that's it; we managed to parse the whole disk, even though it was using a somehow complicated disk structure.\n\n### Task 2: Locate Hidden Partitions\nNow if you go back to the partition table in Autopsy in task #1, you can see that we found Linux partition types. If you examine the findings you will see that autopsy identifies the partition as \"0x83 Linux\". This is from reading the partition table. However, when you click on the partition, it looks like a Windows volume. This is clearly not a linux file system! If you right click and select File System details, autopsy identifies it as a FAT32 partition. If you right click the partition and select \"View in a New Window\", the hexadecimal data confirms the signature of an FAT32 partition.\n\nIn our table partitions, #1 and #3 are reported as Linux, while in the figure above we see that the first is a FAT32 partition, and the third is an NTFS partition. The type of partition is found in the partition entry of each MBR boot record. So, let us locate the entry for the first partition. We already did this in the previous task, so it would be easy to locate the partition entry now by you.\n\nAs we can see, the entry shows a 0x83 Linux partition, but when we look at the content of the partition we find that is not true.\n\nSo, it seems the employee is modifying this byte, so the Windows system is unable to recognize its existence! If we were to write the byte back to 0x0B which refers to a FAT32 file system, windows would recognize and mount the file system.\n\nLet's check the third partition, which was also identified in its partition table as a Linux partition. Go to the partition itself to check its content. We are supposed to find that it is a linux partition. However, it clearly has the structure of NTFS, which means this is an NTFS partition, and even though the employee changed it from the partition table entry, forensic tools such as Autopsy correctly identify the volume.\n\nLet us verify that by exploring the content as we did previously\n\nAs we can see here again, the contents are fully displayed, which means we were right with our hypothesis about what happened here too.\n\nNow, all we would need to do is to, in a hex editor, change the MBR Boot Record for that partition and change the value from 0x83 to 0x0B. \n\n### Task 3: Searching Partition Gaps for Hidden Data\nIt seems our suspect not only managed to hide some partitions from the IT staff, but he even might have hidden some data on the partition gaps that are created on the disk, usually when the disk was partitioned.\n\nIf you look at the figure below, we can see that we have XX partition gaps and two unpartitioned spaces:\n\nWalk through these gaps by selecting each one and then scrolling through them, just to take a look at what is there and if you could identify anything useful. If you don't want to do this, then move on with the lab, we will be doing it by using the tools we have.\n\nKnowing that there are gaps in the partition table and hopefully you have seen suspicious remnants, but we are not quite there yet. We need to process the image for unallocated files.\n\nUse photorec tool located in c:\\DFP\\Tools to accomplish this. Open the image in photorec:\n```\nc:\\DFP\\Labs\\Module4\\Lab9>photorec_win.exe c:\\DFP\\Labs\\Module4\\Lab9\\Lab9.001\n```\n\nOnce the output is exported review the output for suspicious files.\n\nCongrats; we found a hidden picture.\n\n![Hidden Picture](https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3512/33.png)\n\nLet us move on to investigate the rest of the partition gaps.\n\nNext we need to use Eric Zimmerman's Bstrings.exe tool [located at C:\\DFP\\Tools\\Utilities] to search for hidden stuff. After downloading the tool, extract the partition gap by saving it for simplicity to the same location of the tool.\n\nUse the command below to do the following:\n\n```\nbstrings.exe -f Gap4\n```\n\nbstrings.exe is the tool we're using, and the \"-f\" option is to select a file for searching, and the file we used is named Gap4 (I named it that way). Make sure to adjust your commands in order to get something like this:\n\n![Sring Output](https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3512/34.png)\n\nAwesome! We found that he is using these partition gaps to not only hide his maps but even hide his suspicious plans as you can see in the figure above.\n\n## Wrap-Up\n\nCongrats we finished our investigation Successfully!",
    "solutions_html": "<h2>SOLUTIONS</h2>\n<h3>Task 1: Parsing The Extended Partition</h3>\n<p>Examine the evidence file named \"[Lab9.001]\" [located at C:\\DFP\\Labs\\Module04\\Lab9\\Lab9.001] using the forensic tool of your choice (Autopsy or MMLS.exe is recommended), which would lead us to the following Please note:\n- I have colored each partition entry in the MBR disk structure\n- You will need to locate and extract TheSluethkit from the C:\\DFP\\Tools\\Windows\\sleuthkit-4.12.0-win32.zip</p>\n<p><img alt=\"Partitions\" src=\"https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3512/2.jpg\" /></p>\n<p>View the partition in the tool of your choice</p>\n<p><img alt=\"MMLS Partitions\" src=\"https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3512/mmls_part_output.jpg\" />\n<img alt=\"Autopsy Partitions\" src=\"https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3512/autopsy_part_output.jpg\" /></p>\n<p>The output should show you a list of partitions, primary and extended. When examiniing a partition structure they are typicaly continous. The sector stop and the sector start for the next partition should be adjacent to each other, with no missing sectors in between. If you see that sectors are not contimous, then you have what is called a partition gap. This is not normal behavior for partition creation, and is generally intentionally created by a human. Typically the threat actor will use a tool such as fdisk, gparted, or diskpart to manually create and delete partitions--custom picking the sector starts and length.</p>\n<p>We definitely can observe some gaps.We now need to figure out how this disk is structured and understand where each partition starts and ends.</p>\n<p>Manually document the partitions. I recommend creating a table. Start with you first partition and take note of the start sector, end sector, length, partition type, and whether or not there is a gap between the previous partition. Look for allocated vs unallocated partition tables.</p>\n<p><strong>NOTE:</strong> Before continuing, take the time to study the partition tables generated by your tool and do the analysis yourself.</p>\n<p>You should come up with the following partitions</p>\n<table>\n<thead>\n<tr>\n<th align=\"center\">Partition Number</th>\n<th align=\"center\">Start Sector</th>\n<th align=\"center\">End Sector</th>\n<th align=\"center\">Length</th>\n<th align=\"center\">Partition Type</th>\n<th align=\"center\">Gap Detected</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"center\">1</td>\n<td align=\"center\">128</td>\n<td align=\"center\">204927</td>\n<td align=\"center\">204800</td>\n<td align=\"center\">Linux (0x83)</td>\n<td align=\"center\">No</td>\n</tr>\n<tr>\n<td align=\"center\">2</td>\n<td align=\"center\">205056</td>\n<td align=\"center\">409855</td>\n<td align=\"center\">204800</td>\n<td align=\"center\">Win95 FAT32 (0x0b)</td>\n<td align=\"center\"><strong>YES</strong></td>\n</tr>\n<tr>\n<td align=\"center\">3</td>\n<td align=\"center\">409984</td>\n<td align=\"center\">614783</td>\n<td align=\"center\">204800</td>\n<td align=\"center\">Linux (0x83)</td>\n<td align=\"center\"><strong>YES</strong></td>\n</tr>\n<tr>\n<td align=\"center\">4</td>\n<td align=\"center\">614912</td>\n<td align=\"center\">819711</td>\n<td align=\"center\">204800</td>\n<td align=\"center\">NTFS/exFAT (0x07)</td>\n<td align=\"center\"><strong>YES</strong></td>\n</tr>\n<tr>\n<td align=\"center\">5</td>\n<td align=\"center\">819840</td>\n<td align=\"center\">1024639</td>\n<td align=\"center\">204800</td>\n<td align=\"center\">NTFS/exFAT (0x07)</td>\n<td align=\"center\"><strong>YES</strong></td>\n</tr>\n</tbody>\n</table>\n<p>From this, we know that the first partition is after 128 sectors from the beginning of the disk, and its capacity is 204800 sectors. From the menu and using the go to offset button, use it to move 128 sectors.</p>\n<p>This will lead us to the first partition holding a FAT32 file system as seen below:</p>\n<p>Now we see that this partition has 204800 sectors</p>\n<p>This should lead us to the following:</p>\n<p>If we add the values in the sectors preceding partition #1 (128) with the sectors in the partition (204800), we get 204928, which exactly where the next partition starts.</p>\n<p>Before we proceed, if you look at the Partition Type Indicator of the second partition, we notice that it is 0x05, which refers to an extended partition. And since it is an extended partition, I just want to remind you that they use the following MBR structure:</p>\n<p>Entry   Size in Bytes   Description\n1   446 Zeros\n2   16  Describe the first partition\n3   16  The location of the next partition\n4   32  Zeros\n5   2   The end of sector marker 55 AA\nTotal   512 </p>\n<p>Another important note to remember is the last extended partition table will only have one 16 byte entry, and the rest will be zeros. So, we can understand that this is the last logical partition in the extended structure by checking the second entry of the partition table found. If the entry has values, then this is the location of that partition; if it holds only zeros, then we have reached the last partition as we said.</p>\n<p>Continueing on, if we add the size of sectors we found in the previous step, which was 204800 sectors, we will reach the next extended partition, which will also hold an MBR boot structure. This can be seen below:</p>\n<p>The beginning of the sector has all zeros as we expected, and then we see that there are also 128 sectors before we reach the first partition. Please remember that this is a relative offset and not one calculated from the beginning of the disk. Also, note the size of the disk is 204800 sectors. So, let us do this again, add 128 sectors to our current position. This would take us to the first partition, and then from there add the size 204800 sectors to go to the next partition.</p>\n<p>Note: since the second partition entry is not zero, it means there are still some partitions on this disk.</p>\n<p>As we see below, we got a partition holding an NTFS file system:</p>\n<p>Adding its size would lead us to the next partition, so let us do that.</p>\n<p>As expected, we reached another extended MBR Boot Record.</p>\n<p>So the partition is also after 128 sectors and its size is 204800 sectors, plus we still have other partitions to follow, because the second partition table is not empty (zeros). Let's continue. Now we reach another NTFS file system.</p>\n<p>Adding the size of it should lead us to another MBR partition.</p>\n<p>Now this time notice the first partition is after 128 sectors as we saw in all partitions we went through since the beginning, and the size of it is the same too. But, take a closer look at the second partition entry, it is empty and filled with zeros, which means we reached the end of the partitions on this disk.</p>\n<p>Let us create a summary of findings using the table below to answer the questions that were required from us (Report back the starting sector, size and type of each partition found.):</p>\n<table>\n<thead>\n<tr>\n<th align=\"center\">Partition #</th>\n<th align=\"center\">Starting Sector</th>\n<th align=\"center\">Size in Bytes</th>\n<th align=\"center\">Type ID / Name</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"center\">1</td>\n<td align=\"center\">128</td>\n<td align=\"center\">104857600</td>\n<td align=\"center\">83 / Linux</td>\n</tr>\n<tr>\n<td align=\"center\">2</td>\n<td align=\"center\">205056</td>\n<td align=\"center\">104857600</td>\n<td align=\"center\">0B / FAT32</td>\n</tr>\n<tr>\n<td align=\"center\">3</td>\n<td align=\"center\">409984</td>\n<td align=\"center\">104857600</td>\n<td align=\"center\">83 / Linux</td>\n</tr>\n<tr>\n<td align=\"center\">4</td>\n<td align=\"center\">614912</td>\n<td align=\"center\">104857600</td>\n<td align=\"center\">07 / NTFS</td>\n</tr>\n<tr>\n<td align=\"center\">5</td>\n<td align=\"center\">819840</td>\n<td align=\"center\">104857600</td>\n<td align=\"center\">07 / NTFS</td>\n</tr>\n</tbody>\n</table>\n<p>[Note:] if you are asking yourself from where or how did we calculate the starting sector of each partition relative to the beginning of the disk, all you need to do is the following:</p>\n<p>A) Partition #1 = Preceding Sectors Value (128)</p>\n<p>= 128</p>\n<p>B) Partition #2 = Value found in (A) + Preceding Sectors Value (128) + Size (204800)</p>\n<p>= 128 + 128 + 204800 = 205056</p>\n<p>C) Partition #3 = Value found in (B) + Preceding Sectors Value (128) + Size (204800)</p>\n<p>= 205056 + 128 + 204800 = 409984</p>\n<p>D) Partition #4 = Value found in (C) + Preceding Sectors Value (128) + Size (204800)</p>\n<p>= 409984 + 128 + 204800 = 614912</p>\n<p>E) Partition #3 = Value found in (D) + Preceding Sectors Value (128) + Size (204800)</p>\n<p>= 614912 + 128 + 204800 = 819840</p>\n<p>And that's it; we managed to parse the whole disk, even though it was using a somehow complicated disk structure.</p>\n<h3>Task 2: Locate Hidden Partitions</h3>\n<p>Now if you go back to the partition table in Autopsy in task #1, you can see that we found Linux partition types. If you examine the findings you will see that autopsy identifies the partition as \"0x83 Linux\". This is from reading the partition table. However, when you click on the partition, it looks like a Windows volume. This is clearly not a linux file system! If you right click and select File System details, autopsy identifies it as a FAT32 partition. If you right click the partition and select \"View in a New Window\", the hexadecimal data confirms the signature of an FAT32 partition.</p>\n<p>In our table partitions, #1 and #3 are reported as Linux, while in the figure above we see that the first is a FAT32 partition, and the third is an NTFS partition. The type of partition is found in the partition entry of each MBR boot record. So, let us locate the entry for the first partition. We already did this in the previous task, so it would be easy to locate the partition entry now by you.</p>\n<p>As we can see, the entry shows a 0x83 Linux partition, but when we look at the content of the partition we find that is not true.</p>\n<p>So, it seems the employee is modifying this byte, so the Windows system is unable to recognize its existence! If we were to write the byte back to 0x0B which refers to a FAT32 file system, windows would recognize and mount the file system.</p>\n<p>Let's check the third partition, which was also identified in its partition table as a Linux partition. Go to the partition itself to check its content. We are supposed to find that it is a linux partition. However, it clearly has the structure of NTFS, which means this is an NTFS partition, and even though the employee changed it from the partition table entry, forensic tools such as Autopsy correctly identify the volume.</p>\n<p>Let us verify that by exploring the content as we did previously</p>\n<p>As we can see here again, the contents are fully displayed, which means we were right with our hypothesis about what happened here too.</p>\n<p>Now, all we would need to do is to, in a hex editor, change the MBR Boot Record for that partition and change the value from 0x83 to 0x0B. </p>\n<h3>Task 3: Searching Partition Gaps for Hidden Data</h3>\n<p>It seems our suspect not only managed to hide some partitions from the IT staff, but he even might have hidden some data on the partition gaps that are created on the disk, usually when the disk was partitioned.</p>\n<p>If you look at the figure below, we can see that we have XX partition gaps and two unpartitioned spaces:</p>\n<p>Walk through these gaps by selecting each one and then scrolling through them, just to take a look at what is there and if you could identify anything useful. If you don't want to do this, then move on with the lab, we will be doing it by using the tools we have.</p>\n<p>Knowing that there are gaps in the partition table and hopefully you have seen suspicious remnants, but we are not quite there yet. We need to process the image for unallocated files.</p>\n<p>Use photorec tool located in c:\\DFP\\Tools to accomplish this. Open the image in photorec:\n<pre class=\"codehilite\"><code>c:\\DFP\\Labs\\Module4\\Lab9&gt;photorec_win.exe c:\\DFP\\Labs\\Module4\\Lab9\\Lab9.001</code></pre></p>\n<p>Once the output is exported review the output for suspicious files.</p>\n<p>Congrats; we found a hidden picture.</p>\n<p><img alt=\"Hidden Picture\" src=\"https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3512/33.png\" /></p>\n<p>Let us move on to investigate the rest of the partition gaps.</p>\n<p>Next we need to use Eric Zimmerman's Bstrings.exe tool [located at C:\\DFP\\Tools\\Utilities] to search for hidden stuff. After downloading the tool, extract the partition gap by saving it for simplicity to the same location of the tool.</p>\n<p>Use the command below to do the following:</p>\n<pre class=\"codehilite\"><code>bstrings.exe -f Gap4</code></pre>\n\n<p>bstrings.exe is the tool we're using, and the \"-f\" option is to select a file for searching, and the file we used is named Gap4 (I named it that way). Make sure to adjust your commands in order to get something like this:</p>\n<p><img alt=\"Sring Output\" src=\"https://assets.ine.com/content/labs/cybersecurity-labs/jason/LAB-3512/34.png\" /></p>\n<p>Awesome! We found that he is using these partition gaps to not only hide his maps but even hide his suspicious plans as you can see in the figure above.</p>\n<h2>Wrap-Up</h2>\n<p>Congrats we finished our investigation Successfully!</p>",
    "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
}