top of page

Search Results

497 results found with an empty search

  • How Windows Knows Your Files Came from the Internet: Alternate Data Streams (Zone.Identifier)

    Updated in 17 Feb,2025.. Ever downloaded a Word document or PowerPoint presentation and noticed it says "Trust this file to edit"? That happens because Windows tags downloaded files with something called a Zone.Identifier. This tag helps the system figure out if a file came from the Internet, and in some cases, even where it came from. Pretty cool, right? What Is Zone.Identifier and How Does It Work? Windows has been using the Zone.Identifier tag since Windows XP SP2. Whenever you download a file from the Internet to an NTFS drive, an alternate data stream (ADS) gets added to it. This extra data doesn’t change the file itself but contains useful information about its origin. Most web browsers (like Chrome, Edge, and Firefox) and apps like email clients automatically tag files this way. This process is known as "Mark of the Web" (MotW) . It uses the Windows API function IAttachmentExecute to make sure files are handled safely. However, there are some exceptions—Internet Explorer, for example, only tags certain file types, and PowerShell or FTP downloads often don’t get tagged at all. What’s Inside a Zone.Identifier? If you inspect a Zone.Identifier ADS using a tool like FTK Imager, you’ll see details like: ZoneID  – A number indicating the security zone the file came from. Here are the possible values: 0  – My Computer (local files) 1  – Intranet (internal network) 2  – Trusted sites 3  – Internet (most web downloads) 4  – Untrusted (flagged as risky by Microsoft SmartScreen) ReferrerURL  – The website the file was downloaded from (if available) HostURL  – The direct download link (if available) Not all browsers store ReferrerURL or HostURL, especially in private browsing modes. ------------------------------------------------------------------------------------------------ Example : Analyzing Zone.Identifier ADS: By analyzing the presence of Zone.Identifier ADS, f orensic analysts can identify potentially malicious files that were downloaded from the interne t. **This analysis is particularly useful when examining critical system directories like C:\Windows\System32, where the presence of ZoneID=3 can raise red flags. ** Applications in Forensic Investigations: ADS analysis, especially focusing on Zone.Identifier streams, can provide valuable insights into the origins of files, aiding forensic investigations in various scenarios, including malware analysis, digital forensics, and e-discovery. ----------------------------------------------------------------------------------------------------- ********************** Update Made on January 2025 I want to introduce you to one of the best tools I always use, which is also a part of the KAPE toolkit. The tool is called MFTECmd.exe . This tool parses key artifacts such as $MFT, $J, $Boot, $SDS, and $I30  and provides the output in a CSV format. Do check out the article Link below: https://www.cyberengage.org/post/mftecmd-mftexplorer-a-forensic-analyst-s-guide Now, you might be wondering why I’m telling you about this tool. Let me explain. Here’s an example: Suppose you’ve parsed an $MFT  file using MFTECmd.exe , and you have a file on the device . Now, the client wants to know how this file ended up on the system . Did the user download it? If so, from which link? If y ou’ve used MFTECmd.exe , you don’t need to worry . Simply open the output in Timeline Explorer , navigate to the Zone ID Contents  column , and check the information. As shown in the screenshot below, Zone ID 3  indicates the file was downloaded from the internet. Moreover, the URL is also mentioned in the output. See how easy and efficient it is to gather this information! ********************** ------------------------------------------------------------------------------------------------------------- How Attackers Exploit Alternate Data Streams Hackers and red-team testers love alternate data streams because they allow them to hide files in plain sight. For example, instead of storing malware as a regular .exe file, they can embed it inside an ADS attached to a harmless-looking text file. A common attack trick is running a malicious DLL stored in an ADS using rundll32.exe. Standard file listing tools won’t even see the hidden ADS, making it much harder for security tools to detect the malware. How You Can Spot and Investigate ADS Thankfully, there are ways to uncover these hidden streams: Use CMD : Run dir /r to list all data streams attached to files. Use PowerShell : Run Get-Item * -Stream * to find hidden ADS in a folder. Use forensic tools : Software like istat and icat can dig even deeper into ADS details. One place you’ll always find a ton of alternate data streams is the Downloads folder  since every file you grab from the Internet gets tagged with a Zone.Identifier. ------------------------------------------------------------------------------------------------------------- Why This Matters A huge number of security breaches start with a simple file download. Understanding how Windows tracks downloaded files can help spot suspicious activity early. If you see a weird-looking program in C:\Windows\System32 with a Zone.Identifier tag, you know something’s off. By knowing how to check for alternate data streams, you can catch hidden threats and stay one step ahead of attackers. ----------------------------------------------Dean---------------------------------------------------

  • Exploring macOS Extended Attributes: The Hidden Metadata You Didn’t Know Existed

    If you've ever wondered how macOS knows where a downloaded file came from or why certain files prompt security warnings, the answer lies in Extended Attributes (xattrs) . These hidden pieces of metadata provide valuable information about files, including download history, quarantine status, and even timestamps. ------------------------------------------------------------------------------------------------------------ File Quarantine: macOS’s Built-in Security Check One of macOS’s security features is file quarantine , which helps prevent malicious files from running unchecked. Whenever you download a file from the internet using Safari, Chrome, or other applications, macOS records details like: Download source  (e.g., the website URL) Timestamp of download The application used to download the file For instance, if you download googlechrome.dmg  from Google, macOS stores this metadata in the file’s extended attributes. The next time you open it, the system will verify whether it's safe to run. ------------------------------------------------------------------------------------------------------------ Where Are These Files Stored? By default, most downloads are saved in the ~/Downloads  directory . If you haven’t cleaned it out in a while, you likely have months (or even years!) of accumulated downloads, each packed with hidden metadata. To check if a file has extended attributes, open Terminal  and run: ls -la If you add an @ at the end of the permissions, the file has extended attributes . To view them: ls -l@ Decoding Extended Attributes macOS assigns various extended attributes (xattrs)  to files. Some of the most common include: com.apple.quarantine  – Stores security-related information, including the download timestamp, application used, and quarantine event ID. com.apple.metadata:kMDItemWhereFroms  – Contains the URL  where the file was downloaded from. xattr -p com.apple.metadata:kMDItemWhereFroms uac-3.0.0.tar.gz Once you run the above command output will be in hex format. Use cyberchef to decode it to get the URL Output example: Use Cyber chef to decode: com.apple.metadata:kMDItemDownloadedDate  – Stores the download timestamp in a binary format. To extract these attributes, use the xattr  command: xattr -p com.apple.metadata:kMDItemWhereFroms This will reveal the exact source from where the file originated! ------------------------------------------------------------------------------------------------------------ I know I know you will say dean, its very difficult to copy hex from every file and put into cyber-chef is there is better way, I will say yes Command : xattr -xl com.apple.metadata:kMDItemWhereFroms ------------------------------------------------------------------------------------------------------------- Different Browsers, Different Metadata Not all browsers store extended attributes in the same way: Safari : Stores all metadata, including download date and source. Chrome : Does not save the kMDItemDownloadedDate attribute. Firefox : Only records quarantine metadata (com.apple.quarantine). ------------------------------------------------------------------------------------------------------------- Beyond Browsers: AirDrop, Mail, and DMG Files Extended attributes aren’t just limited to web downloads . Other macOS applications use them as well: AirDrop : Stores sender details and metadata about transferred files. Mail Attachments : On some newer systems, when an email attachment has been downloaded, a few extended attributes get attached to that file. com_apple_mail_dateReceived : timestamp when the email message was received com_apple_mail_dateSent: timestamp when the email message was sent com_apple_mail_isRemoteAttachment : binary value if the attachment is local (0) or remote (1) DMG Files : macOS adds attributes like com.apple.diskimages.fsck   to track whether a disk image has been opened. com.apple.diskimages.recentcksum : Checksum information, including a Unix epoch timestamp of when the file was downloaded ------------------------------------------------------------------------------------------------------------- Investigating Property Lists from Extended Attributes(You can take this another method to parse) When analyzing macOS files, extended attributes (xattrs) often hold valuable metadata. Some of these attributes contain binary property lists (PLISTs) , which store structured information about the file. Extracting and decoding these PLISTs can reveal useful insights, such as the source of a downloaded file  or other metadata added by the system. Extracting PLIST Data from Extended Attributes To extract an extended attribute’s content, we use the xattr command. However, simply running xattr -p  prints the data in hex format , which isn’t very useful. For example, if we check the com.apple.metadata:kMDItemWhereFroms, we get a hex dump: xattr -p com.apple.metadata:kMDItemWhereFroms Converting Hex to Binary PLIST We can use xxd with the -r (reverse) and -p (plain) options to revert the hex dump back into binary format and save it as a file: xattr -p com.apple.metadata:kMDItemWhereFroms | xxd -r -p > wherefroms.plist Now, wherefroms.plist contains the original property list, but it’s still in binary format. To read it in human-friendly form , we need to convert it into a readable structure. Reading a Binary PLIST in Plaintext To print a binary PLIST directly to the terminal in a readable format, use: xattr -p com.apple.metadata:kMDItemWhereFroms | xxd -r -p | plutil -p - This command chain: Extracts the metadata (xattr -p). Converts it from hex to binary (xxd -r -p). Parses the binary PLIST into human-readable text (plutil -p -). ------------------------------------------------------------------------------------------------------------- Final Thoughts Extended attributes might be hidden from plain sight, but they play a crucial role in macOS’s security and file management system. Whether you’re a security researcher, a forensic investigator, or just a curious Mac user, knowing how to inspect and interpret these attributes can be incredibly useful. So, the next time you download a file, remember—macOS is keeping track, and now, so can you! 🚀 ---------------------------------------------------Dean---------------------------------------

  • Understanding Partitioning Schemes, FileVault 2 and macOS Encryption: A User-Friendly Guide

    When it comes to Mac systems, partitioning schemes play a crucial role in organizing data, managing storage, and ensuring smooth system operations. Whether you're installing macOS, working with external drives, or handling disk images, understanding these schemes can help you navigate storage management more efficiently. The Three Main Partitioning Schemes Mac systems primarily use three types of partition schemes: GUID Partition Scheme (GPT)  – The default for modern macOS installations . Apple Partition Scheme (APM)  – Used mainly on older PowerPC Macs . Master Boot Record (MBR)  – Mostly found on external drives and Windows-compatible disks. GUID Partition Scheme (GPT) – The Modern Standard Intel-based Macs (since 2006) and ARM-based M1/M2 Macs The GUID Partition Table (GPT) is the standard. It allows: Larger disk sizes  compared to older schemes. Up to 128 partitions  (as opposed to MBR’s limit of four primary partitions). Unique identification (GUIDs)  for disks and partitions, making them easier to manage. Backup of partition tables , which enhances reliability in case of corruption. With Apple’s newer macOS versions, GPT remains the backbone of partitioning, even as Apple transitions from EFI (Extensible Firmware Interface) to the “Apple APFS iSC” system for ARM-based Macs. Apple Partition Map (APM) – The Legacy Scheme Before Intel Macs came around, PowerPC-based Mac systems relied on the Apple Partition Map (APM ) . It worked fine for its time, but it had limitations , such as smaller disk size support . Since modern macOS versions no longer support APM for bootable drives, it’s mostly a relic of the past. Master Boot Record (MBR) – The Windows-Friendly Option MBR is a partitioning scheme commonly associated with Windows and external drives. While macOS can read and write to MBR-formatted disks, it isn’t used for booting macOS . It has significant limitations: Maximum of four primary partitions . Doesn’t support large storage devices as effectively as GPT. How macOS Structures Storage with APFS Apple’s APFS (Apple File System)  introduced a new way to manage disk partitions. While it still uses GPT, the way macOS organizes volumes has changed significantly. Here’s a typical structure: /dev/disk0  – The physical drive. /dev/disk1  – The APFS container that holds multiple volumes: /dev/disk1s1  – OS Volume (user data and system files). /dev/disk1s2  – Preboot Volume (boot-related data). /dev/disk1s3  – Recovery Volume (for troubleshooting and reinstalling macOS). /dev/disk1s4  – VM Volume (swap space and hibernation data). macOS Catalina (10.15) and Beyond Starting with macOS Catalina , Apple split the system into two separate partitions: System Partition (Read-Only, Mounted at ‘/’)  – Stores macOS core files. Data Partition (Mounted at /System/Volumes/Data/ )  – Stores user files and applications. This change mirrors how iOS devices handle system and user data separately, improving security and stability. macOS Big Sur (11.0) and Later – APFS Snapshots Apple took it further by introducing APFS snapshots  in macOS Big Sur . Instead of directly modifying the system partition, updates are now applied to a snapshot, ensuring safer and more reliable system updates. The key difference: The actual system partition  is now a sealed APFS snapshot  mounted at ‘/’. Understanding Disk Images (.DMG Files) Mac users frequently encounter DMG (Disk Image) files , used for installing software and storing disk copies. These images can use various partitioning schemes, including: GUID Partition Scheme  (common for system images and large software installations). Apple Partition Scheme  (for compatibility with older Macs). MBR  (for cross-platform use). No partition at all  (for simple data storage). Disk images can also include encryption and compression, making them flexible for security and storage management. Sparse Images and Sparse Bundles Mac’s Legacy FileVault  encryption uses two types of disk images: Sparse Disk Image (.sparseimage)  – A single growing file that expands as needed. Sparse Bundle (.sparsebundle)  – A collection of smaller files, more efficient for backups. These can be created and managed using Disk Utility  or the hdiutil  command. Useful macOS Disk Commands Mac includes powerful terminal commands for managing partitions and disk images: diskutil list  – Lists all disks and partitions. diskutil info /dev/disk(X)  – Provides detailed information about a disk. hdiutil create -help  – Displays available options for creating disk images. These commands help with troubleshooting, formatting, and analyzing disk structures efficiently. When it comes to securing your Mac, FileVault 2 is Apple's built-in full-disk encryption solution, introduced with macOS X Lion. What is FileVault 2? FileVault 2 encrypts your entire disk (except for the EFI and Recovery partitions), making sure that even if someone gets hold of your Mac, they can't access your files without your password. During setup, macOS presents a recovery key, which you can store with Apple or keep for yourself. This key is crucial—it’s the only way to regain access if you forget your password. Enterprise-Level FileVault 2 Management If you're in a business or IT environment, you might need extra tools to manage FileVault 2 across multiple devices. Here are some popular ones: Cauliflowervest  ( GitHub ) Crypt  ( GitHub ) JAMF Casper Suite  ( Website ) Legacy FileVault (The Old Version) Before FileVault 2, there was the original FileVault, now called Legacy FileVault , introduced in macOS 10.3. Unlike FileVault 2, it only encrypted your home directory, leaving everything else exposed. It stored the encrypted data in a sparse disk image, which wasn’t as secure or efficient as modern full-disk encryption. Encryption on T2 and M1 Macs: A Built-in Shield If your Mac reports “Encrypted at Rest,”  it means your T2 or M1 Mac is already hardware-encrypted, even if FileVault isn’t enabled. This provides an extra layer of protection, ensuring your data remains safe. CoreStorage: Apple’s Virtual Volume Management CoreStorage is Apple's way of managing virtual disk volumes and plays a key role in FileVault 2 encryption. Here’s a quick breakdown: Logical Volume Group (LVG):  The top-level structure, linked to a physical disk. Physical Volume (PV):  The actual disk or disk image (can span multiple disks, like in Fusion Drives). Logical Volume Family (LVF):  Contains one or more Logical Volumes. Logical Volume (LV):  The place where your file system lives. In macOS 10.10 and later, CoreStorage is enabled by default on new installs, but it doesn't necessarily mean encryption is turned on. Checking Your Disk Encryption Status To see whether your Mac is encrypted, use the diskutil  command: diskutil cs list This command lists all CoreStorage Logical Volume Groups and their encryption status. If the output shows AES-XTS encryption , that means FileVault 2 is protecting your data. Exploring Disk Partitions with Disk Utility Want to check your partitions? Run: diskutil list This command shows all your drives, their partitions, and their unique disk identifiers (formatted as disk#s#). You can also use Disk Utility.app  (found in /Applications/Utilities/) to view and manage partitions visually. APFS and FileVault 2: A New Era With the introduction of APFS (Apple File System), storage is now more flexible, allowing multiple volumes within a single container. Here’s how it works: APFS Container:  The main storage unit. Container Disks:  The logical disks within the APFS container. Physical Store Disks:  The actual hardware (SSDs, etc.). Each APFS volume has a role (e.g., Preboot, Recovery, VM, or the main OS volume ). FileVault 2 encrypts only the OS/User volume while leaving Preboot, Recovery, and VM unencrypted. The Sealed System Volume (SSV): Next-Level Security Starting with macOS 11, Apple introduced Signed System Volume (SSV) , adding cryptographic protections to prevent unauthorized system modifications. If you see the term “broken”  in diskutil output, don’t worry—it’s normal! It just means that macOS is using a sealed snapshot for security. Fusion Drives and Encryption Some Mac models (like late Mac Minis and iMacs) come with a Fusion Drive , which combines an SSD and HDD for better performance. Even in these setups, CoreStorage helps manage storage allocation, ensuring frequently used files remain on the SSD for faster access. DIY Fusion Drive Example Here’s an example where two USB thumb drives were combined to create a Fusion Drive: /dev/disk4: ~32GB /dev/disk6: ~8GB /dev/disk7 (MacHD_FUSION): The combined single partition Even though this is an unencrypted CoreStorage setup, FileVault 2 can still be enabled for added security. ----------------------------------------------------------------------------------------------------- Final Thoughts Mac’s partitioning schemes have evolved significantly, from APM  to GPT , and now to APFS-based containers . Understanding these changes helps users better manage their storage, troubleshoot issues, and optimize performance. as well as With built-in encryption on newer Macs and the flexibility of APFS and CoreStorage, Apple continues to enhance security while keeping things user-friendly. Have you enabled FileVault 2 on your Mac? If not, now’s a great time to take that extra step in securing your data! ------------------------------------------Dean----------------------------------------------------

  • APFS Disk Acquisition: From Live Data Capture to Seamless Image Mounting

    Updated on 20 Feb,2025 Understanding .plist Files (Property List Files) .plist files in macOS are like the registry  in Windows. They store important configuration settings for apps and the system. These files come in two flavors: XML Format This is the older, more human-readable format . If you open an XML .plist, you’ll see it starts with # Shows Access, Modify, and Change timestamps in seconds For nanosecond accuracy, use: stat -f %Fa # Access time stat -f %Fm # Modification time stat -f %Fc # Change time GetFileInfo : This command gives you additional details about the file, including creation and modification times. GetFileInfo ---------------------------------------------------------------------------------------------- Hard Drive Acquisition: The Hardware Hurdles Macs come in different flavors when it comes to storage. If you can remove the hard drive, you might be able to use traditional forensic acquisition methods. However, some Macs, especially MacBook Airs, use non-standard SSDs that are soldered directly onto the board. This means you can’t just pull out the drive and image it easily. For those lucky enough to be working with a removable drive, websites like iFixit  provide great guides on how to take Macs apart. Just be warned—some models are notoriously difficult to dismantle! If the SSD is non-removable, your best bet is a live acquisition method, such as Target Disk Mode or logical acquisition while the system is running. -------------------------------------------------------------------------------------------------------- Encryption Challenges: FileVault Can Slow You Down macOS uses two types of encryption: Legacy FileVault   – Encrypts only the user’s home directory. FileVault 2  – Provides full-disk encryption. If you’re dealing with an encrypted disk, you can still image it, but you’ll need the user’s password to decrypt the data. If the system is already up and running, your best bet is to acquire data in an unencrypted state while you have access. -------------------------------------------------------------------------------------------------------- Target Disk Mode (TDM): Your Best Friend If the Mac is functional, Target Disk Mode (TDM)  can be a lifesaver. This turns the Mac into an external drive, allowing you to connect it to another system via FireWire or Thunderbolt. However, note that: Some MacBook Airs don’t have FireWire or Thunderbolt ports, making TDM impossible. If the system uses FileVault 2 , you’ll need to unlock the encrypted volume first. If the Mac has a Boot Camp partition  (a Windows partition), you’ll see two separate volumes. Newer Macs with Apple Silicon (M1/M2)  require additional security steps. To enable Target Disk Mode, restart the Mac while holding “T”  until the appropriate symbol appears on the screen. -------------------------------------------------------------------------------------------------------- Dealing with Open Firmware and EFI Passwords Older Macs may have an Open Firmware password , and newer systems use an EFI password  for added security. If you’re locked out, you can try the following: Change the RAM amount and reboot. Reset the PRAM by holding Command + Option + P + R  at startup. If it’s an EFI password, you’ll need to send a request to Apple with a key hash (good luck with that). -------------------------------------------------------------------------------------------------------- System Integrity Protection (SIP): Another Hurdle System Integrity Protection (SIP) is macOS’s security feature that prevents unauthorized modifications to system files, even with root access. If SIP is enabled, you may run into acquisition errors To disable SIP: Boot into Recovery Mode  (Restart + hold CMD + R ). Open Terminal and run: csrutil disable Reboot the system. However, if the user has encryption enabled and you don’t have the password, disabling SIP won’t help much. -------------------------------------------------------------------------------------------------------- Important concept to understand while acquisition for MACOS Disk Arbitration: Controlling Auto-Mounting Disk Arbitration automatically mounts disks when connected , which can cause unwanted writes to forensic evidence . You can check if it’s enabled and disable it if needed. To disable Disk Arbitration: sudo launchctl unload /System/Library/LaunchDaemons/com.apple.diskarbitrationd.plist To enable it again: sudo launchctl load /System/Library/LaunchDaemons/com.apple.diskarbitrationd.plist To check if it’s running: ps auxw | grep diskarbitrationd -------------------------------------------------------------------------------------------------------- Boot Camp and Multi-Boot Systems Many Macs have Boot Camp , which allows them to dual-boot macOS and Windows. If you’re imaging a system in Target Disk Mode , be aware that Windows partitions might automatically mount when connected to a Windows system. Some users even triple-boot with Linux using tools like rEFInd . -------------------------------------------------------------------------------------------------------- Tips for Disk Acquisition Live collection  is usually your best bet. Capturing data from a running system avoids many of the challenges mentioned above. Here are a few strategies: Endpoint monitoring tools  like EDR  (Endpoint Detection and Response) are essential for tracking suspicious activity or capturing data. Examples include Velociraptor  or remote access agents like F-Response . Forensic tools : If you have access to commercial forensic software, you’re in good hands. Some commonly used options include: Cellebrite Digital Collector FTK Imager OpenText EnCase Magnet Acquire Direct Access Methods :If you have direct access to the system but not commercial tools, you can still use open-source solutions. dd  or dcfldd/dc3dd : These tools can create a disk image that can be sent to external storage or even a remote address using netcat . Sumuri PALADIN : A live forensic USB tool for capturing disk images. --------------------------------------------------------------------------------------------------------- Lets start what you came for Mounting APFS and HFS+ Images on macOS (With or Without FileVault) If you’re dealing with forensic images on macOS, mounting APFS or HFS+ images is a key step in analyzing disk contents . Whether your image is encrypted with FileVault or not, here’s a simple, hands-on guide to getting it done. Mounting APFS Images (macOS 10.13 and Later) Step 1: Create Mount Points Before you mount an image, create directories to serve as mount points: mkdir /Volumes/apfs_image/ mkdir /Volumes/mounted_apfs/ If you have an E01 forensic image, you need to convert it to DMG using xmount: sudo xmount --in ewf C ollectedimage.E01 --out dmg /Volumes/apfs_image/ Step 2: Attach the DMG Without Mounting Use hdiutil to attach the DMG without auto-mounting: hdiutil attach -nomount /Volumes/apfs_image/Collectedimage.dmg This creates a /dev/disk# entry for the attached image. Step 3: Find the APFS Volume Run: diskutil ap list Locate the correct volume with OS or user data. Step 4: Unlock FileVault (If Encrypted) If FileVault is enabled, unlock the disk: diskutil ap unlockVolume -nomount It will prompt you for the password. Step 5: Mount the APFS Volume Now, mount the APFS volume in read-only mode: sudo mount_apfs -o rdonly,noexec,noowners /dev/disk# /Volumes/mounted_apfs/ Your APFS image is now accessible at /Volumes/mounted_apfs/. --------------------------------------------------------------------------------------------------------- Unmounting APFS Images When you’re done, cleanly unmount the image: diskutil list diskutil eject /dev/disk# mount umount /Volumes/mounted_apfs/ If it refuses to unmount, force it: sudo umount -f /Volumes/mounted_apfs/ --------------------------------------------------------------------------------------------------------- Mounting HFS+ Images Method 1: Using xmount Step 1: Create Mount Points mkdir /Volumes/hfs_image/ mkdir /Volumes/mounted_hfs/ Step 2: Convert and Attach Image sudo xmount --in ewf hfs_Collectedimage.E01 --out dmg /Volumes/hfs_image/ hdiutil attach -nomount /Volumes/hfs_image/Collectedimage.dmg Step 3: Mount the HFS+ Volume sudo mount_hfs -j -o rdonly,noexec,noowners /dev/disk# /Volumes/mounted_hfs/ Now, you can access the mounted volume. Method 2: Using ewfmount If xmount isn’t available, ewfmount is an alternative. Step 1: Create Mount Points mkdir /Volumes/hfs_ewf/ mkdir /Volumes/mounted_hfs/ Step 2: Mount the E01 Image ewfmount hfs_Collectedimage.E01 /Volumes/hfs_ewf/ Step 3: Create a Symbolic Link ln -s /Volumes/hfs_ewf/ewf1 /Volumes/hfs_ewf/Collectedimage.dmg Step 4: Attach and Mount hdiutil attach -nomount /Volumes/hfs_ewf/Collectedimage.dmg sudo mount_hfs -o rdonly,noexec,noowners /dev/disk# /Volumes/mounted_hfs/ Mounting HFS+ 4K Images (With or Without FileVault) Some images use a 4K block size, which requires a different approach. Step 1: Create a Mount point Step 2: Convert to DMG sudo xmount --in ewf hfs_Collectedimage.E01 --out /Volumes/hfs_image/ Step 2: Attach the DMG With 4K Block Size hdiutil attach -nomount -blocksize 4096 /Volumes/hfs_image/Collectedimage.dmg Step 3: Unlock FileVault (If Needed) diskutil cs unlockVolume Step 4: Mount the HFS+ Volume sudo mount_hfs -o rdonly,noexec,noowners /dev/disk# /Volumes/mounted_hfs/ Now your HFS+ 4K image is mounted and accessible. If Commercial Tools Aren’t Available: Mounting the image on macOS  is straightforward, but it requires a few key options: rdonly : Mounts the image as read-only, ensuring no accidental changes. noexec : Prevents any code from executing on the mounted image. noowners : Ignores ownership settings, minimizing access issues. ------------------------------------------------------------------------------------------------------------- Mounting in Linux Mounting an APFS image on Linux is possible but requires FUSE  (Filesystem in Userspace) drivers. Here’s a simplified guide: Install APFS FUSE Drivers : First, you’ll need to install the necessary dependencies and clone the APFS FUSE repository from GitHub. sudo apt update sudo apt install libicu-dev bzip2 cmake libz-dev libbz2-dev fuse3 clang git libattr1-dev libplist-utils -y cd /opt git clone https://github.com/sgan81/apfs-fuse.git cd apfs-fuse git submodule init git submodule update mkdir build cd build cmake .. make ln /opt/afps-fuse/build/apfs-dump /usr/bin/apfs-dump ln /opt/afps-fuse/build/apfs-dump-quick /usr/bin/apfs-dump-quick ln /opt/afps-fuse/build/apfs-fuse /usr/bin/apfs-fuse ln /opt/afps-fuse/build/apfsutil /usr/bin/apfsutil NOTE: ln commands are to make it easier to run the commands without n eeding to add the /opt/apfsfuse/ build folder to the path . This may vary depending on your environment. Mount the Image : After setting up FUSE, you can mount the image using this command: mkdir /mnt/apfs_mount #create mount point cd /mnt/ewf_mount #change to the directory where the E01 file is located. apfs-fuse -o ro,allow_other ewf1 /mnt/apfs_mount # mount the image read only If you want a script to automate this for Debian-based distros   (like Ubuntu), check out the one available at this link. https://github.com/TazWake/Public/blob/master/Bash/apfs_setup.sh ------------------------------------------------------------------------------------------------------------- Final Thoughts In forensic investigations, especially on macOS systems, APFS disk acquisition  can be tricky. Between encrypted disks, System Integrity Protection (SIP), and Apple's tight security measures, your best option is often live data capture. Mounting forensic disk images on macOS, whether APFS or HFS+, takes a few careful steps, especially when dealing with FileVault encryption. With xmount, ewfmount, and hdiutil, you have multiple ways to mount images while keeping them forensically sound. ------------------------------------------------Dean------------------------------------------------------

  • Identifying Malicious Software: A Guide for Incident Responders

    One of the most critical challenges faced by incident responders is the rapid identification of suspicious and malicious software on a computer system. With thousands of files and folders present, security professionals must employ various techniques to detect threats efficiently. This process involves analyzing files, performing live response (examining a system while it's running), and conducting temporal analysis (also known as timelining) to trace malicious activity. However, attackers constantly evolve their techniques to evade detection. Some common methods are: Deleting system logs and file metadata  to erase traces of unauthorized access. Obfuscating malware  by renaming files or modifying execution behaviors to mimic legitimate processes. Using packed executables —these files encapsulate malicious code in an encrypted or obfuscated format to evade detection. Implementing custom encryption techniques  to prevent analysis by traditional security tools. To counter these techniques, incident responders can leverage powerful tools like Sigcheck, file entropy YARA, Maldump, and Capa. These tools facilitate rapid triage and analysis of suspicious files, helping to determine whether further investigation or reverse engineering is necessary. ------------------------------------------------------------------------------------------------------------- Sigcheck: Analyzing Code Signing and Anomalies Sigcheck is a widely used tool from Microsoft's Sysinternals suite designed to analyze executable files, verify digital signatures, and detect anomalies . It helps analysts quickly identify unsigned binaries, which are often associated with malware. Why is Code Signing Important? Most legitimate software is digitally signed, ensuring its authenticity and integrity. However, malware authors sometimes obtain stolen or fraudulent certificates to sign their malicious programs. For example, in 2022, malicious drivers were discovered using stolen NVIDIA certificates. Key Features of Sigcheck: Identify Unsigned Binaries:  Using the -u and -s options, analysts can recursively scan directories for unsigned executables. Check for Suspicious Digital Signatures:  Even signed malware can be detected if issued by an unfamiliar or untrusted entity. I ntegration with VirusTotal :  Sigcheck can perform hash lookups to check if a file has been flagged as malicious by security vendors. Entropy Analysis :  High entropy values often indicate packed or encrypted malware. Sigcheck uses Shannon's entropy scale (0 to 8) to assess randomness within files. Example Usage: E:\Malware discovery tool\Sigcheck>sigcheck.exe -a -c -e -h C:\Windows > Sigcheck.csv OR E:\Malware discovery tool\Sigcheck>sigcheck.exe -a -c -h C:\Windows >output.csv This command scans the Windows directory for unsigned files, potentially revealing malware attempting to blend in with legitimate system files. ------------------------------------------------------------------------------------------------------------- File Entropy • Windows system executables average score: 4 - 6 • Packed or evasive malware average score: 6 - 8 A few things to keep in mind: Legitimate files tend to have an entropy between 4.8 and 7.2. Files with an entropy above 7.2 tend to be malicious. Nearly 30% of all of the malicious samples have an entropy near 8.0 while only 1% of legitimate samples have an entropy near 8.0. Approximately 55% of all malicious samples have a entropy of 7.2 or more versus 8% of legitimate samples. Now if you don't want to download extra tool, you can use sigcheck itself (this tool also give entropy score ------------------------------------------------------------------------------------------------------------- YARA: Signature-Based Detection for Malware Classification YARA is one of the most effective tools for identifying malware based on patterns and signatures. Originally developed by VirusTotal, it has become a standard for cybersecurity professionals. How YARA Works: YARA rules define patterns that malware analysts use to detect threat s. These patterns can be based on strings, regular expressions, or more advanced conditions. Example YARA Rule: rule SuspiciousPE { strings: $mz = "MZ" $string1 = "malicious_code" $string2 = "cmd.exe" condition: $mz at 0 and 2 of ($string*) } This rule detects executable files (MZ signature) that contain suspicious strings related to command execution. Benefits of YARA: Scalability:  YARA rules can be applied across multiple systems for quick detection. Flexibility:  Supports regex and logical conditions for precise malware identification. Automation:  Can be integrated with security solutions for real-time monitoring. Example Usage: yara -r rules.yar C:\SuspiciousFolder or E:\Malware discovery tool\yara-v4.5.2-2326-win64>yara64.exe yara\apt_apt12_malware.yar "C:\Users\Akash's\Downloads" This command scans the folder against predefined YARA rules to detect potential threats. ------------------------------------------------------------------------------------------------------------- Understanding Antivirus Quarantine Mechanisms When an a ntivirus detects a suspicious file, it moves it to a quarantine folder . This prevents the file from executing, thereby neutralizing any potential threats. Different antivirus vendors implement their own formats and security measures to make these quarantined files inaccessible or encrypted . If you have access to the live system, the easiest way to recover these files is by using the antivirus software’s built-in recovery options. However, if you are working with a disk image or a copied folder, things can get trickier. Security researchers have reverse-engineered many antivirus quarantine formats and developed tools to extract these files. Extracts: Avast Antivirus Avira Antivirus Eset NOD32 FortiClient G Data Kaspersky for Windows Server Malwarebytes Microsoft Defender This is where maldump  comes in handy. Introducing maldump: A Powerful Open-Source Tool maldump  is a Python-based open-source tool designed to identify and extract quarantined files from various antivirus solutions. One of its standout features is its ability to scan a mounted disk image (such as a forensic triage image) and detect quarantined files across multiple vendors. Key Features of maldump Automatic Detection : It scans known vendor folder locations and identifies quarantined files. Metadata Extraction : Provides valuable details like quarantine timestamps, file hashes, and original file names. File Recovery : Extracts quarantined files for further analysis. Compatibility : Works with both live file systems and mounted forensic images. How to Use maldump To get started, you need Python installed on your system. maldump is pre-installed , but if you need to install it manually, refer to its GitHub repository . Basic Commands: Identify Quarantine Files: maldump -l /path/to/mounted/image This command lists all quarantined files found in the specified directory. Extract Metadata: maldump -m /path/to/mounted/image -o metadata.csv This saves metadata (hashes, timestamps, etc.) in a CSV file for further investigation. Recover Quarantined Files: maldump -q /path/to/mounted/image -o extracted_files/ This extracts all identified quarantine files to a specified folder. Full Scan and Extraction: maldump -a /path/to/mounted/image -o full_output/ This command performs a complete scan, extracts metadata, and recovers all quarantined files. Important Considerations Permissions : Running maldump with administrator privileges ensures access to all necessary files. Folder Structure : If you only have a quarantine folder, you may need to recreate the expected directory structure for proper extraction. Log Collection : Always collect logs and quarantine folders when performing forensic investigations to avoid missing critical data. ------------------------------------------------------------------------------------------------------------- Using capa for Deeper Malware Analysis Once you have extracted a quarantined file, the next step is to analyze its behavior . This is where capa , an open-source malware analysis tool developed by FireEye FLARE, comes into play. Why Use capa? Malware analysis requires advanced skills, but capa simplifies the process by automatically identifying known patterns and techniques used in malicious software . It disassembles the file, compares it against a set of predefined rules, and generates a human-readable report. https://github.com/mandiant/capa/releases/tag/v9.0.0 Key Features of capa Automated Static Analysis : Analyzes a binary file without executing it. Comprehensive Rule Set : Uses a crowd-sourced database of malware characteristics. ATT&CK Mapping : Maps detected techniques to MITRE ATT&CK for better understanding of attacker behavior. Multiple Formats Supported : Works with executables, shellcode, and memory dumps. How to Use capa Basic Analysis of an Executable E:\Malware discovery tool\capa-v9.0.0-windows>capa.exe "E:\Malware discovery tool\maldump-0.5.0\maldump\maldump.exe" This provides an overview of the malware’s capabilities. Verbose Mode for In-Depth Analysis E:\Malware discovery tool\capa-v9.0.0-windows>capa.exe -v "E:\Malware discovery tool\maldump-0.5.0\maldump\maldump.exe" This displays detailed rule matches within the code. Shellcode Analysis E:\Malware discovery tool\capa-v9.0.0-windows>capa.exe -f sc64 "E:\Malware discovery tool\maldump-0.5.0\maldump\maldump.exe" This analyzes 64-bit shellcode, useful for investigating in-memory threats. Export Results in JSON E:\Malware discovery tool\capa-v9.0.0-windows>capa.exe -j "E:\Malware discovery tool\maldump-0.5.0\maldump\maldump.exe" > out.jsonson This outputs the results in JSON format for further processing. Output: Understanding capa Output The results include: Capabilities (e.g., process injection, file modification, registry manipulation) Malware Behavior Catalog (MBC) and ATT&CK technique references Specific code locations matching known malware patterns One key takeaway is that capa helps identify potential threats but does not provide absolute conclusions. For example, legitimate tools like PowerShell  may exhibit the same capabilities as malware . Therefore, capa’s results should be correlated with other forensic findings. ------------------------------------------------------------------------------------------------------------- Conclusion Mastering the extraction and analysis of quarantined antivirus files is an essential skill for malware investigators and cybersecurity professionals. With maldump , you can quickly locate and recover quarantined files from different antivirus solutions. Pairing it with capa  enables deeper malware analysis, helping you understand the behavior and potential threats posed by extracted files. --------------------------------------------------Dean---------------------------------------------------

  • Equifax to WazirX: Lessons in Cybersecurity Failures

    Case Study I : Equifa Data Breach The 2017 Equifax data breach is one of the most significant cybersecurity incidents in recent history. It exposed sensitive information of approximately 147 million people , including Social Security numbers, birth dates, and addresses. But what makes this breach so noteworthy isn't just its scale— it's the series of preventable mistakes that allowed it to happen. Let’s break down what went wrong and explore what organizations and individuals can learn from this cautionary tale. How It Started: A Missed Opportunity to Patch In March 2017, the U.S. Department of Homeland Security issued a warning about a critical vulnerability—CVE-2017-5638 —in Apache Struts, a widely used web application framework. Equifax was notified and passed this information along to its IT teams, with a directive to patch the software within 48 hours, as per company policy. Here’s the kicker: even though Equifax had a policy in place, the vulnerability wasn’t patched. Internal scans conducted by Equifax failed to identify the vulnerable system. This failure was the first of many cracks in their vulnerability management process. By May 2017, attackers exploited the unpatched vulnerability to gain access to Equifax’s systems . For nearly two months, they quietly siphoned off data . During this time, Equifax remained unaware that anything was amiss. The Detection Delay It wasn’t until July 29, 2017, that Equifax noticed suspicious network traffic on their consumer dispute website. Upon investigation, they discovered the breach and took immediate action to block the activity. The affected web application was taken offline the following day. Unfortunately, by then, the damage was done. What Went Wrong? A Breakdown of Failures Missed Patching Opportunity: Equifax had clear instructions to patch vulnerable software, but poor implementation and oversight led to the vulnerability being missed. Expired Security Certificates: While they had an intrusion detection system in place, its expired certificate rendered it useless for monitoring critical activity. Once updated, the breach was identified quickly—but far too late. Lack of Asset Management: Equifax didn’t maintain an up-to-date database of its software and dependencies. This would have helped identify where Apache Struts was running and ensured it was patched promptly. Data Not Encrypted: Despite holding highly sensitive data, Equifax failed to encrypt critical information like Social Security numbers, usernames, and passwords. Poor Segmentation and Privilege Control: Attackers were able to move freely across systems after gaining access, a clear violation of the Principle of Least Privilege (PoLP). Better segmentation and access controls could have limited the scope of the breach. Short Log Retention: Equifax kept logs for only 30 days , hindering their ability to investigate and understand the full scope of the attack. How Equifax Could Have Prevented This Preventing a breach like this requires more than policies on paper—it demands robust implementation and follow-through . Some steps that could have made a difference: Maintain a Complete Software Inventory: Knowing what software is installed and where it’s running is essential for timely patching and vulnerability management. Improve Vulnerability Scanning: Equifax’s scanning tools failed to detect the vulnerable system. Advanced scanning methods and manual verification could have closed this gap . Encrypt Sensitive Data: Encryption is a no-brainer for protecting critical information. Even if attackers gain access, encrypted data remains useless without the decryption keys. Enforce the Principle of Least Privilege: By limiting access to only what is necessary, organizations can reduce the damage attackers can do after a breach. Proactive Threat Hunting: A dedicated threat hunting team could have spotted unusual data exfiltration patterns before the breach became catastrophic. Enhance Monitoring and Logging: Continuous monitoring and retaining logs for a longer period are crucial for detecting and responding to threats. Why This Matters to Everyone The Equifax breach is a wake-up call for both businesses and individuals. Companies need to take cybersecurity seriously—not just as a technical requirement but as a fundamental part of protecting customers' trust . Individuals, on the other hand, should stay vigilant about protecting their own data by monitoring credit reports, using strong passwords, and enabling two-factor authentication wherever possible. Official Report: https://oversight.house.gov/wp-content/uploads/2018/12/Equifax-Report.pdf ------------------------------------------------------------------------------------------------------------- Case Study II : WazirX Data Breach In July 2024, WazirX, a prominent cryptocurrency exchange based in India , suffered a significant security breach resulting in the loss of approximately $230 million in digital assets.  This incident highlights the critical need for robust security measures in the rapidly evolving world of digital finance. Let's explore the details of the breach, the factors that contributed to it, and the lessons that can be drawn to enhance cybersecurity in similar platforms. What Happened? On July 18, 2024, WazirX detected unauthorized transactions amounting to $230 million . The breach was traced back to a compromised wallet, which allowed attackers to siphon off a substantial portion of the exchange's holdings. In response, WazirX promptly halted withdrawals and trading activities to prevent further losses and initiated an investigation into the incident. How Was It Discovered? The breach was identified when WazirX's security systems flagged unusual withdrawal patterns from one of its wallets. Upon closer examination, it became evident that the wallet had been compromised, leading to the unauthorized transfer of funds. The exchange's swift action in suspending operations helped contain the breach, although a significant amount had already been lost. Points of Failure Several factors contributed to the success of the attack: Compromised Wallet Security: The attackers were able to gain unauthorized access to one of WazirX’s wallets. This incident points to potential vulnerabilities in their wallet security protocols, such as: Lack of multi-signature authentication , which requires multiple private keys for transactions to be approved. Inadequate protection of private keys , which may have been leaked, intercepted, or poorly stored. Insufficient safeguards like time-based withdrawal limits or geofencing to add additional layers of security. Inadequate Monitoring: While WazirX eventually flagged unusual withdrawal patterns, the initial unauthorized access went undetected . This lack of vigilance can be attributed to: Weak anomaly detection algorithms  that f ailed to recognize suspicious activity early. Insufficient integration of real-time monitoring tools with the broader security infrastructure. Reliance on periodic checks instead of continuous monitoring. Lack of Immediate Response Mechanisms: The delay in detecting and mitigating the breach suggests deficiencies in incident response protocols , such as: No automated responses  to block transactions or freeze the compromised wallet upon detecting unusual activity. Delayed human intervention, indicating a possible lack of staff trained to act swiftly during security incidents. Absence of a predefined escalation procedure  to address high-priority breaches. What Really Caused the Incident? The root cause of the WazirX breach appears to be a combination of technical and procedural shortcomings: Human Error:  Mismanagement of critical security infrastructure, such as failing to properly secure the compromised wallet or configure monitoring tools, played a significant role. Overlooked Security Fundamentals:  WazirX did not fully implement widely accepted best practices in cryptocurrency security, such as the use of hardware security modules (HSMs) for private key storage. Insufficient Investment in Security:  The breach highlights a lack of prioritization in areas like: Regular penetration testing   to identify potential vulnerabilities. Continuous updates to security systems to keep up with emerging threats. Comprehensive security training for employees handling sensitive operations. Lessons Learned The WazirX breach offers several critical insights for cryptocurrency exchanges and similar platforms: Enhance Wallet Security:  Implement multi-signature wallets and advanced authentication mechanisms to ensure that no single point of failure can lead to a breach. Real-Time Monitoring:  Establish continuous monitoring systems capable of detecting and responding to suspicious activities instantly to mitigate potential breaches. Regular Security Audits:  Conduct frequent security assessments and penetration testing to identify and address vulnerabilities proactively. User Education:  Educate users about security best practices, including recognizing phishing attempts and securing personal authentication methods. Incident Response Planning:  Develop and regularly update comprehensive incident response plans to ensure swift and effective action when breaches occur. Conclusion The 2017 Equifax breach was a wake-up call for the world , highlighting the devastating consequences of neglecting cybersecurity basics. It spurred conversations about data protection, regulatory compliance, and the need for robust security measures. However, as the 2024 WazirX breach painfully demonstrates, many organizations still fail to prioritize security adequately. Despite the lessons from past incidents, breaches continue to occur due to preventable errors like poor configuration, inadequate monitoring, and insufficient protection of sensitive assets. These failures not only jeopardize user trust but also expose organizations to immense financial and reputational damage. It's clear that awareness is not enough . To truly address the growing threat landscape, organizations must adopt a proactive stance on cybersecurity. Dean

  • Part 3 Code Injection : How to detect it and Finding Evil in Memory with MemProcFS FindEvil Plugin

    When it comes to modern cyber threats, attackers are getting craftier with their code injection techniques. The old-school methods are still around, but more sophisticated attackers are now directly manipulating memory structures to blend in and avoid detection. These techniques include modifying memory permissions, hijacking execution pointers, and even patching legitimate code. While this might sound scary, the good news is that we can still detect these attacks—though it requires a deeper dive into how processes manage memory. -------------------------------------------------------------------------------------------------------- Power of Volatility for Detection We can still catch these manipulations using memory forensics tools like Volatility . By comparing multiple memory structures, we can spot inconsistencies that indicate something fishy is going on. A great example of this is the ldrmodules  plugin in Volatility . This tool examines the different ways Windows tracks loaded DLLs and cross-references them with memory-mapped files. Here's what it looks at: Process ID (PID)  and Process Name Base Address  of the DLL in memory Lists from the PEB  tracking loaded DLLs Mapped Path  of the DLL from the VAD tree A legitimate DLL will appear in all these lists and have a valid disk path. If any of these are missing or mismatched, it could indicate code injection. ------------------------------------------------------------------------------------------------------------- Real-World Red Flags Lets take an real world example: We took a closer look at a potentially infected process, powershell.exe (PID: 5352) , using ldrmodules  in our forensic analysis. Right away, we found entries with no MappedPath information . What does that mean? Well, normally, when a program loads a DLL, it gets mapped from disk into memory through standard Windows APIs. But in this case, there was no mapped path to a file on disk — which strongly suggests that the DLLs were injected directly into memory instead of being loaded the usual way. Why is that a red flag? Because malware often avoids writing files to disk to evade antivirus detection and forensic analysis.  If security tools can’t scan files on disk, they have a harder time catching the malware. ------------------------------------------------------------------------------------------------------------- The Process Environment Block (PEB) and More Suspicious Clues Digging deeper, we checked the Process Environment Block (PEB ) —which keeps track of all loaded DLLs in a process. Normally, every DLL should show up in these linked lists, but one particular section (0x6c10000) wasn’t in any of the usual lists. Another section ( 0x7ff78357000 ) was present in most lists except one called InInit . That missing entry in InInit might seem normal at first (because the main process executable isn’t listed there by design). However, the real concern is that i t also lacks a MappedPath to disk . For example, the legitimate msiexec.exe file should have been mapped from C:\WINDOWS\system32\ or C:\Windows\SysWOW64\ but instead, it wasn’t pointing to anything on disk. That’s a seems to be a key sign of process hollowing. ------------------------------------------------------------------------------------------------------------- What is Process Hollowing? Process hollowing is when malware starts a legitimate process, then removes its original code and replaces it with its own malicious code—all without touching the disk . Since the process still looks legitimate from the outside, it can easily evade security tools that focus on scanning files instead of memory. How Do We Confirm This? Using f orensic tools like malfind  (which detects injected memory sections) and ldrmodules  (which identifies suspicious DLLs), we can spot these anomalies. Here’s how: Compare memory addresses  – If the base addresses reported by ldrmodules don’t matc h what dlllist reports, something’s fishy . Look for missing mapped paths  – If a DLL is running in memory but has no corresponding file on disk, it’s likely injected. Use automated detection tools  – Volatility’s HollowFind  plugin (created by Monnappa K A) is specifically designed to detect process hollowing techniques like this. ---------------------------------------------------------------------------------------------------------------- MemProcFS’s FindEvil plugin is a game-changer. It goes beyond traditional scanning methods by digging deep into memory structures to uncover signs of manipulation. Key Plugins in FindEvil PEB_MASQ: Spotting Process Name Spoofing Attackers love to hide in plain sight, and one way they do that is by altering the Process Environment Block (PEB) to fake a process name or file path. PEB_MASQ detects this trick by cross-checking the PEB details with the Virtual Address Descriptor (VAD) tree . If something doesn’t match up, you know you’ve got a problem. PE_NOLINK: Detecting Hidden DLLs Ever heard of DLL injection? This technique lets malware run inside legitimate processes, making detection difficult. PE_NOLINK works similarly to Volatility’s ldrmodules plugin but takes it a step further. It identifies DLLs with PE headers that exist in memory but are missing from the PEB lists. Be mindful, though—false positives happen, especially if memory paging or PEB corruption is in play. PE_PATCHED: Finding Tampered Code Modern malware doesn’t just inject code—it modifies legitimate executable pages to stay hidden. This technique is often used for evading Windows Defender’s AMSI scans. P E_PATCHED detects these changes by analyzing Page Table Entries (PTEs), specifically prototype PTEs that track modified memory pages . While effective, expect a lot of noise—especially from SysWOW64 processes and .NET applications like PowerShell. Beyond These Three: More Cross-Referencing Plugins MemProcFS includes other powerful plugins such as: PE_INJECT:  Finds reflectively loaded PE files in private memory. PRIVATE_RWX/RX & NOIMAGE_RWX/RX:  Flags suspicious memory permissions that could indicate injected shellcode. FindEvil offers a more thorough analysis of injected code . However, Volatility users can supplement their toolkit with the ptemalfind plugin by Frank Block, which also relies on PTE data to detect advanced injections. Understanding FindEvil’s Output FindEvil pulls data from multiple sources, so its output columns can look overwhelming at first. Here are the most useful ones: PID & Process:  Identifies the affected process. Type & Virtual Address:  Shows where the suspicious memory section is located. VadName:  Helps correlate the memory section with known files or structures. PTE Flags & VadFlagsType:  Useful for detecting unexpected permission changes. Adding YARA Scanning for Better Detection One of the coolest upgrades to MemProcFS is its built-in YARA scanning . This allows you to automatically scan memory against known malware signatures. When enabled, YARA matches appear at the top of the FindEvil output, helping you quickly pinpoint malicious processes. ------------------------------------------------------------------------------------------------------------- If you want to learn more about MemProcFS and MemProcFS Analyzer, i have created an complete article with indepth overview which will help you get started link below do check it out https://www.cyberengage.org/post/memprocfs-memprocfs-analyzer-comprehensive-analysis-guide ------------------------------------------------------------------------------------------------------------- Next Steps After Finding Suspicious Memory Sections So, you’ve spotted something shady—what now? Take notes : Document process names, virtual addresses, and anything odd in the VAD. Extract the memory sections : MemProcFS reconstructs files found in memory, storing them in the files and vmemd folders for further analysis. Use a hex editor or malware analysis tools : Open extracted memory sections to confirm whether they contain malicious code. Conclusion MemProcFS FindEvil is an incredibly powerful tool for detecting hidden malware and process manipulation. By cross-referencing memory structures and leveraging YARA rules, it provides an in-depth look at suspicious activity that many traditional security tools might miss. If you’re serious about memory forensics, this tool should be in your arsenal! ----------------------------------------------Deam--------------------------------------------------------

  • Part 2 Code Injection: How to Detect It

    Lets continue where we left off The simplest form of this attack involves forcing a process to load a new DLL (Dynamic Link Library). Traditional detection tools, like Volatility’s dlllist or ldrmodules, can easily spot this. However, as security tools got better at detecting it, attackers evolved, developing more advanced techniques that try to bypass these detections. But here’s the catch—no matter how stealthy an attack is, it always leaves behind clues. The key to forensic investigation is finding those clues. How to Detect Code Injection Most code injection techniques follow a common three-step pattern . Even advanced variants like reflective DLL injection share similar traits. The trick is to look at the process’s memory structures, particularly the VAD (Virtual Address Descriptor) tree , which keeps track of all memory sections. Here’s the step-by-step process to detect injected code: Check Memory Permissions  – One of the biggest red flags in process memory is a section with PAGE_EXECUTE_READWRITE permissions. Normally, memory sections shouldn’t be both writable and executable—it’s a dangerous combination that allows injected code to be written and executed. Verify If the Memory Section Is Mapped to a File  – On Windows, legitimate code (DLLs, EXEs) is loaded from disk. If a memory section is executable but isn’t mapped to a file, that’s highly suspicious. Confirm the Presence of Executable Code  – Just because a memory section looks suspicious doesn’t mean it’s necessarily malware. Some legitimate applications (like .NET or JIT compilers) have memory pages with unusual permissions. To confirm if the injected code is truly malicious, forensic tools check for actual executable content like a Portable Executable (PE) file  or shellcode . ------------------------------------------------------------------------------------------------------------- Using Volatility to Detect Code Injection Luckily, you don’t have to manually go through every memory section. Tools like Volatility’s malfind plugin  and MemProcFS findevil  automate this process. These tools scan process memory for suspicious sections and provide easy-to-read output for analysts. How malfind Works The malfind plugin scans memory and looks for sections that: Have executable  permissions Are not mapped to a file on disk Contain actual executable code If it finds a match, it flags the section for further review. With the --dump option, malfind can even extract these sections so they can be analyzed further using tools like IDA Pro , YARA , or an antivirus scanner. Example command: python3 vol.py -f /mnt/c/Users/Akash\'s/Downloads/solarmarker/solarmarker.img windows.malfind > /mnt/c/Users/Akash\'s/Downloads/malfind.txt - -------------------------------------------------------------------------------------------------------- Giving you hint which make your analysis easier When you run malfind and found EBP and ESP  it often indicates that some part of the memory that is traditionally not executable (such as the stack) now contains executable code. ---------------------------------------------------------------------------------------------------------- Advanced Detection Techniques While malfind is a great first step , attackers have developed methods to bypass it by modifying memory markers. Here are additional techniques that can help: YARA rules  – Custom rules to scan memory dumps for known malware patterns Strings analysis  – Looking for suspicious keywords inside dumped memory sections Behavioral monitoring  – Watching for unusual process behavior (e.g., svchost.exe spawning a reverse shell) ---------------------------------------------------------------------------------------------------------- Evolution of Code Injection Volatility’s malfind  becoming effective at detecting reflective injection. However, attackers countered by cleaning up after themselves . For instance, the CoreFlood botnet  cleared the first page (4096 bytes) of the loaded DLL to evade detection. Similarly, groups like APT29 (Russia)  and APT32 (Vietnam)  use Cobalt Strike payloads  that erase their headers post-execution. Winnti RAT , linked to a Chinese nation-state group, adopts similar evasion strategies. Detecting Stealthier Code Injections To counter these sophisticated injection methods, analysts must go deeper. Memory dumping  helps identify obfuscated code: Volatility malfind’s --dump option : Extracts suspicious memory sections for further analysis. String Analysis & YARA Rules : Identifies patterns in dumped memory sections. Reverse Engineering : The most thorough but resource-intensive approach. Behavioral analysis—such as monitoring parent-child process relationships  and orphaned files —remains effective. ------------------------------------------------------------------------------------------------------ MemProcFS and the “FindEvil” Plugin Newer memory forensic tools like MemProcFS  offer enhanced detections through its FindEvil  plugin. When enabled, this feature generates findevil.txt, flagging suspicious memory regions: Process Irregularities: PROC_NOLINK : Unlinked processes (possibly malicious). PROC_PARENT : Unexpected parent-child process relationships. PROC_USER : System processes running under incorrect user accounts. Memory Page Flags: PE_INJECT : Executable memory sections lacking proper image mappings. NOIMAGE_RWX / NOIMAGE_RX : Suspicious permissions outside image memory. PRIVATE_RWX / PRIVATE_RX : Executable code in private memory sections. ------------------------------------------------------------------------------------------------------------- We will continue remaining part of code injection into next article stay connected and keep learning ------------------------------------------------------------------------------------------------------------- Conclusion As attackers refine their methods, defenders must continuously adapt. Memory forensic techniques—combined with behavioral analysis—offer powerful tools for detecting modern injection techniques. -------------------------------------------------Dean--------------------------------------------------

  • Why Code Injection is a Hacker's Favorite Trick and How to Detect It through Memory forensic

    A common question that comes up a lot is: "If code injection is so easy to detect, why do attackers keep using it?" The simple answer? It’s only easy  to detect if you’re performing deep memory analysis. Most security tools don’t do that by default, and attackers have found smarter ways to hide. Plus, code injection solves a ton of problems for malware , making it an effective technique even today. ------------------------------------------------------------------------------------------------------------- Why Code Injection Works So Well Code injection is like a digital disguise. Instead of running as a suspicious-looking standalone program, malware hides inside legitimate processes. This makes it much harder for an admin or security tool to spot it. Here’s how attackers take advantage of it: Blending in with legitimate processes   – Instead of creating a new process , attackers inject their code into something already running , like your web browser or system utilities. Inheriting permissions  – If the injected process has high-level privileges, the malware gets the same access. This is a common trick used by credential stealers to hijack the LSASS process and grab login hashes or Kerberos tickets . Avoiding detection  – Security tools often look for new or untrusted processes. But if malware is running inside an already trusted app (like your browser), it flies under the radar. ------------------------------------------------------------------------------------------------------------- Process Migration: Staying One Step Ahead Hackers don’t just inject their code and call it a day. They also move it around to avoid getting caught. This is called process migration . Imagine an attacker exploits a vulnerability in your browser and gets some initial access. But what if you close your browser? Their malware dies with it. To prevent this, they migrate the malicious code to a more persistent process—something critical that rarely gets shut down. Hacking tools like Metasploit  and Cobalt Strike  even have built-in features to automate process migration, making this a common tradecraft among cybercriminals. ------------------------------------------------------------------------------------------------------------- Common Code Injection Techniques There are a lot of ways to inject malicious code, and some are stealthier than others. Let’s break down the most popular ones: 1. DLL Injection This is one of the easiest ways to perform code injection, thanks to Windows' architecture. If an attacker has admin rights, they can: Allocate memory in a target process Write a malicious DLL into it Use Windows functions like VirtualAllocEx() and CreateRemoteThread() to execute it Some advanced methods, like Reflective DLL Injection , bypass API monitoring tools and load malicious DLLs without ever writing them to disk. This makes them harder to detect with traditional antivirus solutions. 2. Process Hollowing This is a bit different from DLL injection. Instead of injecting into a running process, the attacker: Creates a legitimate Windows process in a suspended  state Replaces its memory with malicious code Restarts the process, now running as malware while keeping the original process name This is how malware like Stuxnet, DarkComet, and Kronos  stay hidden while running inside trusted processes. 3. Atom Bombing & Hooking Atom Bombing : Uses the global atom table to inject code into another process. SetWindowsHookEx Hooking : Forces a process to load a malicious DLL by hooking its function calls. Even PowerShell  can be abused for code injection! Attackers often use script-based techniques to execute payloads in memory, avoiding traditional detection methods. ------------------------------------------------------------------------------------------------------------- How to Detect Code Injection Even though code injection is sneaky, it always leaves traces behind. Memory forensics is one of the best ways to uncover it. Here are the key methods: Check for injected DLLs  – Many injection techniques still rely on Windows’ normal DLL loading process, which means you can look at process memory structures to find unexpected DLLs. Look for suspicious executable memory   – Attackers might try to avoid API calls, but at some point, the injected code has to be executable . If you find unusual executable pages in memory, it’s a red flag. Compare kernel vs. userland process data  – Advanced malware manipulates memory permissions, changes execution pointers, and even patches loaded code. Comparing different memory sources can reveal these inconsistencies. ------------------------------------------------------------------------------------------------------------- Tools for Detecting Code Injection 1. Volatility Memory Forensics Framework Volatility has been a go-to tool for analyzing memory dumps. It includes several plugins that help uncover hidden malware techniques: ldrmodules : Detects DLLs that are either unlinked or loaded from unusual locations —both major red flags. malfind : Scans for suspicious memory allocations that might indicate reflective injection or process hollowing. hollowfind : Specifically designed to detect process hollowing by comparing data structures within a process. threadmap : Focuses on identifying malicious threads, making it harder for attackers to hide their tracks. ptemalfind : Uses kernel-based page table information to identify hollowed processes, offering stronger detection against advanced evasion tactics. One thing to note—some of these plugins are only available in Volatility 2, while newer ones like ptemalfind  are designed for Volatility 3. 2. MemProcFS This is another powerful memory analysis tool that takes things a step further. Its findevil  plugin helps detect different types of code injections, making it a great addition to your forensic toolkit. 3. Live Memory Analysis Tools As attackers get more sophisticated, relying solely on RAM dumps isn’t always enough . Some malware, like those using the Gargoyle memory evasion technique , remain dormant most of the time and only execute briefly, making them harder to catch in static memory dumps. That’s where live memory analysis comes in: Moneta  (by Forrest Orr) and Hollows Hunter  (by hasherezade) are great tools for detecting live injection attempts. Many Endpoint Detection and Response (EDR)  solutions are now integrating similar live memory scanning capabilities. ----------------------------------------------------------------------------------------------------------- How Attackers Perform DLL Injection One of the simplest and most common code injection techniques is DLL injection . Here’s how it works: Attach to the Target Process:  The attacker uses the OpenProcess() function to gain access to a victim process. This requires the SeDebugPrivilege , which admin accounts usually have. Allocate Memory:  The attacker then uses VirtualAllocEx()  to create a small memory space inside the victim process, where the malicious DLL’s path will be written using WriteProcessMemory(). Execute the Malicious Code:  Finally, CreateRemoteThread()  is used to force the victim process to load the malicious DLL via LoadLibraryA(). This method works well, but it has one major limitation: the DLL must exist on disk . Security tools can easily detect suspicious DLLs being loaded from unexpected locations (like a Temp folder instead of System32) . -------------------------------------------------------------------------------------------------------- Reflective Code Injection: A Stealthier Alternative To bypass the requirement of having a DLL on disk, attackers developed reflective code injection . This method allows malware to load itself directly into memory without relying on Windows’ LoadLibrary() function. As a result, it doesn’t appear in standard DLL lists, making it much harder to detect. Some of the most well-known attack tools use reflective injection: Metasploit & Cobalt Strike : Use this technique for deploying their backdoors. PowerSploit & Empire : Popular PowerShell frameworks that leverage reflective injection. DoublePulsar : A powerful backdoor linked to nation-state actors, further advancing reflective injection techniques. -------------------------------------------------------------------------------------------------------- I know I know theory theory and few will understand what the theory say. So make thing easy for you lets do practical How to Spot Code Injection in Action Even though attackers are getting smarter, memory forensics still provides excellent ways to uncover their tracks. Command: python3 vol.py -f /mnt/c/Users/Akash\'s/Downloads/solarmarker/solarmarker.img windows.ldrmodules > /mnt/c/Users/Akash\'s/Downloads/ldrmodules.txt Let’s take an example where a DLL is injected into powershell.exe: Using the ldrmodules plugin in Volatility, you might see something like this: Process: powershell.exe (PID 5352) MappedPath: C:\Users\Admin\AppData\Temp\user32.dll Most legitimate DLLs are loaded from C:\Windows\System32 or C:\Program Files. A DLL from a Temp folder is a huge red flag. Another trick is to check the InInit = False list column . If the process itself isn’t listed there, it could indicate malicious tampering. Security tools like MemProcFS  also help by comparing data structures like PEB (Process Environment Block) and VAD (Virtual Address Descriptor) to spot anomalies. ------------------------------------------------------------------------------------------------------------- We will continue the discussion about code injection analysis and understanding through memory forensic in next article as well. Stay connected! ------------------------------------------------------------------------------------------------------------- Wrapping Up Code injection remains one of the most dangerous malware techniques, but with the right tools and approach, you can detect and stop these attacks. By leveraging forensic tools like Volatility, MemProcFS, and live memory scanners , security teams can identify suspicious activity before it escalates into a full-blown compromise. ---------------------------------------------Dean---------------------------------------------------

  • Electron Application Forensics and Analyzing LevelDB in Digital Forensics: A Simple Guide

    Electron is a game-changer in the world of app development. It allows developers to create desktop applications using web technologies like JavaScript, HTML, and CSS. Apps built with Electron look and feel like native applications, but under the hood, they are essentially Chrome-based web apps with a Node.js backend. This gives them access to the file system and operating system, making them powerful and versatile. ----------------------------------------------------------------------------------------------------------- Why Should We Care About Electron in Forensics? From a forensic perspective, Electron apps are interesting for two main reasons: Electron is Chromium-based  – It follows the same structure as Google Chrome, meaning it generates similar artifacts. Each Electron app maintains its own browser-like database  – Unlike traditional browsers, each Electron-based app creates and manages its own Chromium databases. This is crucial because popular apps like Discord, Microsoft Teams, Slack, and WhatsApp Desktop use Electron , and each of them stores user data in separate locations . If you’re investigating a system, chances are you’ll find multiple Electron applications, each leaving behind valuable forensic artifacts. ----------------------------------------------------------------------------------------------------------- Where to Find Electron App Data Identifying an Electron app is easy. Look for Chrome-like folders  in unexpected places, specifically under: %UserProfile%\AppData\Roaming Each Electron app keeps its own set of Chromium-based databases, but unlike standard Chrome browsers, they don’t use the full suite of Chrome databases. Instead, they rely mainly on: Chromium Cache LevelDB databases  (IndexedDB, LocalStorage, SessionStorage) ----------------------------------------------------------------------------------------------------------- Understanding Electron’s Storage Structure 1. Chromium Cache Every Electron app has its own cache, just like Chrome. This cache stores local copies of resources fetched from the web, making it an excellent source of forensic data. Standard forensic tools used to analyze Chrome’s cache will also work here. Expect to find: User-uploaded images Downloaded files JSON-formatted chat messages (especially in apps like Discord) Cached web pages 🔎 Forensic Tip:  Look for cached URLs containing parameters like messages?limit= in Discord. These often contain entire chat histories! 2. LevelDB Databases – The Real Goldmine LevelDB is where Electron apps store persistent  data. It holds everything from user credentials to chat messages, making it a critical artifact for forensic analysis. There are three major types of storage: IndexedDB:  Stores JavaScript objects (often in JSON format). This is where apps keep user data like contacts, messages, and logs. Local Storage:  Stores long-term text-based data. For example, Discord keeps login and username details here, while Microsoft Teams tracks file transfers and message drafts . Session Storage:  Similar to Local Storage but only lasts for the duration of a session. Once the app is closed, this data disappears. What’s Inside a LevelDB Database? LevelDB databases contain multiple files, but the most important ones are: .log files  – Store recent transactions, often containing recoverable deleted data. .ldb files  – Compressed storage files that hold processed data. MANIFEST and CURRENT files  – Metadata files used to manage the database structure. 🔎 Forensic Tip:  .log files are gold! They don’t use compression and often store old deleted data. Check them first! Challenges in Analyzing LevelDB While LevelDB is a treasure trove of data, it’s also incredibly difficult to parse . It uses multiple data formats (ASCII, UTF-8, UTF-16, and binary blobs). Data is compressed using Google’s Snappy algorithm . It employs key sharing , meaning duplicate data is stored only once and referenced elsewhere. These complexities make simple string searches ineffective unless your tool can fully reconstruct the database. How to Analyze Electron Artifacts Despite the challenges, there are tools that can help with Electron forensic investigations: ChromeCacheView  – Extracts cached files and metadata from Chromium-based apps. LevelDB parsers  – There aren’t many, but some tools attempt to dump key/value pairs. Manual Analysis  – Sometimes, it’s best to extract the database files and examine them manually. ----------------------------------------------------------------------------------------------------------- LevelDB Magnet AXIOM now includes a built-in LevelDB viewer, which is a big step forward in forensic investigations. However, it’s essential to understand its strengths and limitations. When you open a LevelDB database from the File System  view in AXIOM, the tool attempts to pull out data from key/value pairs. These pairs usually contain simple text or JSON, making it easier to extract useful information. Investigating Microsoft Teams Data Imagine you’re analyzing a system where Microsoft Teams is installed. You navigate to %UserProfile%\AppData\Roaming\Microsoft\Teams  and find LevelDB files inside. AXIOM’s viewer allows you to browse this data in different formats, such as JSON view  or hex view , and you can even use external tools for deeper analysis. Searching within the database helps filter out irrelevant data, making it easier to spot valuable evidence. However, AXIOM only parses individual  .ldb files and doesn’t process the entire LevelDB database structure, which includes .log files . This means you get a partial view, which isn’t always enough for a complete investigation. ----------------------------------------------------------------------------------------------------------- Going Deeper with RabbitHole One of the best tools for analyzing LevelDB data is RabbitHole, developed by Alex Caithness from CCL Solutions Group. This commercial tool can process LevelDB files along with other data formats like Mozilla LZ4, Snappy, SQLite, Base64, OLE, Plists, and protobufs . RabbitHole’s biggest advantage is its ability to reconstruct LevelDB databases properly. When you open an .ldb or .log file, RabbitHole gathers all related files and presents the data in a structured format. It helps forensic analysts understand how LevelDB is organized, which is crucial for examining Electron applications  like Microsoft Teams. ----------------------------------------------------------------------------------------------------------- Why Analyzing LevelDB is Challenging LevelDB databases are complex and often contain a massive amount of repetitive data. Since they store temporary data in .log files  before moving it to .ldb files , duplication is common. Understanding this structure is key to extracting valuable forensic evidence. ----------------------------------------------------------------------------------------------------------- Other Tools: LevelDB Recon and Custom Parsers Apart from RabbitHole, LevelDB Recon  by Arsenal Recon  is another tool designed to help make sense of LevelDB data. However, every Electron application  stores its data differently, meaning you often need a dedicated parser for each app. Final Thoughts Analyzing LevelDB isn’t straightforward, but with the right tools and approach, you can uncover valuable forensic evidence. AXIOM’s built-in viewer  is a good start, but tools like RabbitHole  provide a much deeper level of analysis. Since Electron applications store data differently , forensic analysts must be flexible and use a mix of tools to extract meaningful insights. If you work in digital forensics, learning how to investigate LevelDB  databases will give you a significant edge when dealing with modern applications like Microsoft Teams, Slack, and Discord . Stay curious, experiment with different tools, and always verify your findings! -------------------------------------------Dean--------------------------------------------------

  • Private Browsing: What Really Gets Left Behind? and Recovering Deleted Browser Artifacts.

    Private Browsing Private browsing modes in popular browsers like Chrome, Edge, and Firefox promise to leave no trace behind. They prevent history, cookies, and other browsing data from being stored on disk. However, you know that nothing is truly hidden. ----------------------------------------------------------------------------------------------------------- How Private Browsing Works When you open a private browsing window, your browser stops saving data to its usual storage locations. Instead of writing history, cache, and cookies to disk, everything remains in system memory (RAM) . The moment you close the browser, this data disappears—at least in theory. Where Private Browsing Leaves Traces Even though private browsing tries to keep your activities hidden, data can still leak in the following ways: 1. Memory-Based Artifacts (RAM Dumps, Pagefile, and Hibernation Files) Since private browsing keeps data in memory, it can still be retrieved if a forensic investigator captures a RAM dump before the system shuts down. The pagefile.sys  and hiberfil.sys  files store virtual memory on disk , potentially containing traces of private browsing sessions. 2. File Opened in External Viewers If you open a downloaded file in an external program like Windows Media Player or Notepad, Windows may log that activity. These logs can appear in LNK (shortcut) files  or Windows Event Logs , revealing that a file was accessed—even if its origin remains unknown. 3. Downloads Still Exist Any file you download while in private mode still gets saved on disk. Although the browser won’t keep a download history, timestamps on the file system can indicate when a file was created. 4. Bookmarks and Private Mode Indicators In Firefox ,*\* bookmarks added in private mode have empty title and last_visit_date fields*/*. In Chrome , the *\* visit_count is set to 0, and the hidden field is set to 1*/* . These subtle indicators can reveal private browsing activity. ----------------------------------------------------------------------------------------------------------- What About Tor Browser? Tor Browser is designed for anonymity and privacy, forcing all activity into private mode. It runs on a modified version of Firefox and stores almost nothing on disk. However, you can still find traces of its use: Execution Artifacts : Tor’s presence can be confirmed through Windows system logs like Prefetch , SRUM , and UserAssist . Tor Installation Folders : If Tor was used, investigators can check for tor.exe and Start Tor Browser.exe in system logs or removable drives. Tor Configuration Files : The State file inside the Tor folder logs version details and the last execution date. ----------------------------------------------------------------------------------------------------------- How Forensic Investigators Recover Private Browsing Data Memory Analysis  – The most effective way to recover private browsing data is through memory forensics. RAM dumps, hiberfil.sys , and pagefile.sys  can contain traces of visited websites. File and Data Carving  – Specialized forensic tools like Magnet Axiom, FTK, and Belkasoft  can extract deleted or hidden artifacts from unallocated disk space. Comparing Memory with Browser Data  – Investigators can cross-reference memory data with existing browser databases to find missing pieces of the puzzle. ----------------------------------------------------------------------------------------------------------- Can You Ever Be Truly Private? Modern browsers are getting better at hiding private browsing data, but forensic are evolving too. The best way to stay private online is to: Use RAM-only browsing solutions  (like Tails OS or live USB operating systems). Avoid downloading files  or opening them in external programs. Understand that your activity might still be stored in memory , even if no history appears in the browser. While private browsing may protect you from casual snooping, it is not foolproof. You have multiple ways to uncover digital footprints—so if you really need privacy, take extra precautions. ----------------------------------------------------------------------------------------------------------- Recovering Deleted Browser Artifacts. Browsers hold a treasure trove of data that can be crucial for digital forensics. But here’s the catch—modern browsers now give users advanced privacy options to delete their traces. This makes our job as investigator a bit trickier. The Challenge of Selective Deletion In the past, when users cleared their browsing history, it was often an all-or-nothing action. If we knew a browser was being used but found little to no artifacts, we could assume data had been deleted and possibly argue data spoliation. Now, browsers like Firefox and Chrome allow users to selectively delete data. For example: Clear Recent History : Users can remove only certain types of data (like history but not cookies) and choose a specific timeframe (last hour, today, etc.). Forget About This Site : This option lets users remove all traces of a specific site, including history, downloads, and bookmarks. We must now look deeper to detect these selective deletions. One trick is to examine databases where records are assigned sequential ID numbers—gaps in the sequence may indicate data was deleted. Firefox’s places.sqlite  database is a great example of where to look for such gaps. Recovering Deleted Browser Data When artifacts are deleted, all hope is not lost! Here are some effective techniques: Check for Unallocated Data : Deleted records often remain in database unallocated space. Specialized tools can extract this data from both ESE (Extensible Storage Engine)  and SQLite  databases. SQLite Recovery : Many browsers store data in SQLite databases, and deleted records can persist for a long time. Some of the best tools for recovering deleted SQLite data include: Sanderson Forensics SQLite Recovery  (paid) Cellebrite and Oxygen Forensic tools  (paid) FQLite  (free) – A powerful open-source tool with a user-friendly interface. ESE Database Carving : Internet Explorer and Edge store browsing data in ESE databases. ESECarve  tool is an excellent option for recovering deleted entries. Filesystem Carving : Even if a database has been wiped, fragments of the data might still exist in filesystem free space. Tools like Magnet Axiom  and Digital Detective Blade  support SQLite carving from free space. Final Thoughts Privacy settings in modern browsers make it easier for users to cover their tracks, but with the right forensic techniques, deleted data can still be recovered. Whether you're analyzing SQLite or ESE databases, using the right tools can make all the difference. As forensic analysts, our job isn’t just about finding artifacts—it’s about understanding how  and why  they were deleted. With these techniques, you’ll be better equipped to uncover the truth hidden beneath the surface. ------------------------------------------------------Dean-------------------------------------

  • Investigating Edge-Based Browsers: A Forensic Guide/Browser analysis Book

    In today's digital age, understanding browser data is essential for cybersecurity investigations and digital forensics. Browsers store a wealth of information that can provide critical insights into user behavior, online activities, and potential security threats. Determine Sites Visited The first step in browser data analysis is to identify the websites visited by the user. This involves reviewing various browser data components: Review History Data : Search Keywords : Identify the keywords searched by the user. Review Transition Info : Check for typed URLs to understand direct user navigation. Audit Preferences File : Look for visited sites and synchronization information stored in the preferences file. Parse Download History : Analyze the list of downloaded files to identify potentially relevant downloads. Audit Bookmarks : Review the list of bookmarked sites to understand user interests and frequently visited websites. Analyze Collections Database : Look for collections of websites saved by the user for future reference. Look for Other Profiles : Investigate if there are multiple user profiles within the browser to uncover additional data sources. Fill in Evidence Gaps Next, it's essential to fill in any evidence gaps by reviewing additional browser data components: Review Cache Domains : Analyze specific file types of interest stored in the browser cache. Review Cookie Domains : Examine cookies to identify user sessions and interactions with websites. Search Session Recovery Files : Look for session recovery files that store data from the user's browsing sessions. Analyze Web Data, Shortcuts, and Network Action Predictor Entries : Review these data components to uncover further evidence of user activities. Audit Browser Extensions : Investigate installed browser extensions to understand their potential impact on user behavior. Snapshots Folder : Check the snapshots folder for saved browser states that can provide additional insights. Review IE History : If Internet Explorer was used, review its history data for relevant information. Deep Dive Analysis For a more thorough investigation, perform a deep dive analysis on specific browser data components: Search Web Storage : Examine web storage for data stored by websites, including local storage and session storage. Review Sync Data Database : Analyze synchronization data to understand how user data is synced across devices. Audit Edge Jumplist Entries : Review the Edge jumplist entries to identify recently accessed websites and files. Carve Deleted SQLite : Recover deleted SQLite database files that may contain valuable information. Review Memory-Based Artifacts : Investigate incognito artifacts and other memory-based data that may provide additional evidence. Targeted Analysis Using Volume Shadow Copies : Utilize volume shadow copies to recover and analyze older versions of browser data. By systematically following these steps, cybersecurity investigators and digital forensic analysts can uncover a comprehensive picture of user activities and potential security threats. Browser data analysis is a powerful tool in the fight against cybercrime, providing invaluable insights that can make or break an investigation. -------------------------------------------------Dean--------------------------------------------------

bottom of page