<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by P.K RAWAT on Medium]]></title>
        <description><![CDATA[Stories by P.K RAWAT on Medium]]></description>
        <link>https://medium.com/@prabhanjanrawat?source=rss-02abfc1f39be------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Zgl3ayO6h8dlg8YO</url>
            <title>Stories by P.K RAWAT on Medium</title>
            <link>https://medium.com/@prabhanjanrawat?source=rss-02abfc1f39be------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 12:45:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@prabhanjanrawat/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Tailscale Explained: Build Your Own Private Internet]]></title>
            <link>https://medium.com/@prabhanjanrawat/tailscale-explained-build-your-own-private-internet-9cf3568b3b74?source=rss-02abfc1f39be------2</link>
            <guid isPermaLink="false">https://medium.com/p/9cf3568b3b74</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[tailscale]]></category>
            <category><![CDATA[digital-forensics]]></category>
            <dc:creator><![CDATA[P.K RAWAT]]></dc:creator>
            <pubDate>Fri, 25 Sep 2026 16:32:00 GMT</pubDate>
            <atom:updated>2026-09-25T16:32:00.395Z</atom:updated>
            <content:encoded><![CDATA[<p>From opening a Mac development server on an iPhone to reaching a complete homelab from another city — here is a visual, practical guide to what Tailscale can do.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M-T_8sX7YtFjjFRaK9FaDA.png" /></figure><p>Imagine your MacBook is at home, your Windows PC is in an office, your iPhone is on 5G, and a Linux server is running somewhere else. Normally these devices live behind different routers, NAT and firewalls. Tailscale gives them a private encrypted network in which they can communicate as if they were nearby.</p><p><strong>The simple mental model:</strong> Tailscale creates a private “tailnet” between authorized devices. Each device receives a stable private Tailscale address, while Tailscale tries to establish direct peer-to-peer encrypted connections.</p><h3>1. From separate devices to one private network</h3><p>📱<br><strong>iPhone</strong><br>5G / Wi-Fi</p><p>↔</p><p>🔐<br><strong>TAILNET</strong><br>encrypted mesh</p><p>↔</p><p>💻<br><strong>MacBook</strong><br>Home</p><p>🖥️<br><strong>Windows</strong><br>Office</p><p>🐧<br><strong>Linux</strong><br>Server</p><p>This differs from the classic VPN mental model where every packet must pass through one central VPN gateway. A mesh VPN attempts direct device-to-device connectivity when possible. That is especially useful for personal devices, remote administration, development environments and homelabs.</p><h3>2. Scenario: open your Mac project from your iPhone</h3><p>Suppose a web project is running on your Mac on port 8000. Both devices are signed into the same tailnet. If your Mac&#39;s Tailscale IP is 100.90.25.15, Safari on your iPhone can open:</p><pre>http://100.90.25.15:8000</pre><p>Your development server must listen on an interface reachable from Tailscale. For a simple Python server:</p><pre>python3 -m http.server 8000 --bind 0.0.0.0</pre><p>💻 Mac<br><strong>localhost :8000</strong></p><p>→</p><p>🔐 Tailscale<br><strong>100.x.x.x</strong></p><p>→</p><p>📱 iPhone<br><strong>Safari</strong></p><h3>3. MagicDNS: stop memorizing IP addresses</h3><p>Private IPs are useful, but names are easier. With MagicDNS, you can reach devices by their Tailscale machine names. A URL can become something like:</p><pre>http://macbook:8000<br>ssh user@ubuntu-server</pre><p>This is particularly convenient when your tailnet contains many VMs and servers.</p><h3>4. Remote administration without opening router ports</h3><p><strong>SSHLinux administration</strong>Connect to Linux servers and VMs over their private Tailscale path rather than publishing SSH to the internet.</p><p><strong>RDPWindows access</strong>Use the Windows machine’s Tailscale address as the destination for Remote Desktop when your policy permits it.</p><p><strong>WEBInternal dashboards</strong>Reach development servers, monitoring dashboards, admin panels and lab applications privately.</p><p><strong>FILESFile servers</strong>Use services such as SMB on authorized machines without making the file-sharing service publicly reachable.</p><h3>5. Subnet Router: reach devices that cannot run Tailscale</h3><p>This is where Tailscale becomes much more than “VPN software on my laptop.” A subnet router can advertise another private network into your tailnet. Devices on that LAN do not necessarily need Tailscale installed individually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ncMexd35Hff9PB1N" /></figure><p>Imagine a lab network is 192.168.100.0/24. A Linux node can advertise that route:</p><pre>sudo tailscale up --advertise-routes=192.168.100.0/24</pre><p>After the route is approved and access rules permit it, a remote authorized device can reach selected resources on that subnet. This is useful for hypervisors, NAS devices, printers, appliances, IoT networks and legacy systems.</p><h3>6. A practical homelab architecture</h3><pre>TAILSCALE<br>                           │<br>         ┌─────────────────┼─────────────────┐<br>         │                 │                 │<br>      iPhone             MacBook          Windows<br>         │                 │                 │<br>         └─────────────────┼─────────────────┘<br>                           │<br>                    Subnet Router<br>                           │<br>                  192.168.100.0/24<br>             ┌─────────────┼─────────────┐<br>             │             │             │<br>          Proxmox         NAS        Linux/VMs<br>          :8006           SMB       Apps / SSH</pre><p>Instead of publishing Proxmox, SSH, SMB or internal dashboards directly on your router, remote access can remain inside the private overlay network.</p><h3>7. Exit Nodes: make another device your internet gateway</h3><p>Normal Tailscale operation does not need to carry all of your internet browsing traffic. An <strong>exit node</strong> changes that: a selected device can route your internet traffic, behaving more like a conventional VPN gateway.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pM3JhO4_hk4g5CpJ.png" /></figure><p>📱 iPhone<br><strong>Hotel Wi-Fi</strong></p><p>→</p><p>🏠 Home server<br><strong>Exit Node</strong></p><p>→</p><p>🌍 Internet<br><strong>Home egress</strong></p><h3>8. Serve vs Funnel: private sharing and public sharing</h3><p>This distinction is important. <strong>Tailscale Serve</strong> is designed to make a local service available within your tailnet. <strong>Tailscale Funnel</strong>can publish an eligible service to the public internet through an HTTPS URL.</p><p>FEATUREWHO CAN ACCESS?GOOD EXAMPLETailscale IP / MagicDNSAuthorized tailnet devicesYour iPhone → Mac :8000ServeTailnetPrivate internal web applicationFunnelPublic internetTemporary demo for a friend/client</p><p>💻 Local App<br><strong>:8000</strong></p><p>→</p><p>🌪️ Funnel<br><strong>HTTPS</strong></p><p>→</p><p>👤 Friend<br><strong>Normal browser</strong></p><p>Funnel is convenient, but the security model changes: once you deliberately publish something publicly, treat it as an internet-facing application. Do not expose sensitive admin consoles, credentials, forensic evidence or development secrets without appropriate authentication and hardening.</p><h3>9. Access control: not every device needs access to everything</h3><p>A private network should not automatically mean unrestricted access. Tailscale access controls can restrict which users, devices, groups or tagged systems may communicate with particular services. This enables patterns such as allowing an administrator to SSH to servers while ordinary devices can reach only a web application.</p><h3>10. Where Tailscale fits in real life</h3><p><strong>🏠 Home</strong>Reach a home PC, NAS, media service or home automation system while travelling.</p><p><strong>🧑‍💻 Developer</strong>Test a Mac-hosted application from an iPhone or another computer without deploying it first.</p><p><strong>🧪 Homelab</strong>Reach hypervisors, VMs, containers and dashboards without exposing management ports publicly.</p><p><strong>🏢 Small team</strong>Give authenticated users access to internal resources without placing everything on a flat public network.</p><p><strong>☁️ Cloud</strong>Connect authorized endpoints to private cloud networks using routing components.</p><p><strong>✈️ Travel</strong>Use a trusted exit node when you intentionally want internet traffic to egress through another machine.</p><h3>11. A useful learning path</h3><p>Start small: connect an iPhone, Mac and Windows PC and verify device-to-device connectivity. Then enable MagicDNS and access a local web project. Next, add a Linux VM and practice SSH. Once the fundamentals are clear, introduce a subnet router for a lab LAN. Only after that should you experiment with exit nodes, Serve/Funnel and granular access-control policies.</p><h3>12. The bigger idea</h3><p>Tailscale is easiest to understand when you stop thinking of it merely as “a VPN app.” It is an identity-aware private networking layer that can connect devices, servers and networks across locations. A small three-device tailnet can grow into a practical remote-access architecture for development, a homelab, cloud resources or a distributed team.</p><p><strong>Remember:</strong> Private Tailscale addresses are for the tailnet. If a person outside the tailnet needs to see a web project, explicitly sharing it through an appropriate mechanism such as Funnel is different from simply sending them your 100.x.x.x address.</p><h3>References &amp; further reading</h3><p>Tailscale documentation: What is Tailscale?, MagicDNS, Subnet Routers, Exit Nodes, Serve, Funnel and access controls.<br>Visual references used in this article: Tailscale Blog (subnet-router diagram) and PacketSwitch (exit-node illustration).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9cf3568b3b74" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Imaging a LUKS-EncryptedLinux System for Forensic Analysis]]></title>
            <link>https://medium.com/@prabhanjanrawat/imaging-a-luks-encryptedlinux-system-for-forensic-analysis-3acfc00c6cd7?source=rss-02abfc1f39be------2</link>
            <guid isPermaLink="false">https://medium.com/p/3acfc00c6cd7</guid>
            <category><![CDATA[imaging]]></category>
            <category><![CDATA[digital-forensics]]></category>
            <dc:creator><![CDATA[P.K RAWAT]]></dc:creator>
            <pubDate>Thu, 16 Jul 2026 05:09:48 GMT</pubDate>
            <atom:updated>2026-07-16T05:09:48.851Z</atom:updated>
            <content:encoded><![CDATA[<p>FORENSIC WORKFLOW</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nrHTwfxwg2Na7JrnsBB9fQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*id8kasJ5HJ2SvBTO8JHxDA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SB3Ho_FB7C3afG7GQiC1-A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*35fCuIXC7t5pIWz7Bobt2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GoghpXaBl2JVl2EvU5JKMA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2VHbw2k8Yo97FalA2aqKcQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kp9tWqcFQTulJtE8b4bRKQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IeUaFzah-F6AQgPIMGOtww.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pUTQAX6oPhMLt7OtAYBN1A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ENx7-5uU5_nh1v1L2SCtow.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7R7QAcAKxoHVZKYcbT0tgg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u4sXdDneBJprkl_XnqqBCg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3acfc00c6cd7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[# Forensic Recovery from a LUKS-Encrypted Linux System: dd Imaging, Deleted File Recovery, and Full…]]></title>
            <link>https://medium.com/@prabhanjanrawat/forensic-recovery-from-a-luks-encrypted-linux-system-dd-imaging-deleted-file-recovery-and-full-5b7718460cd2?source=rss-02abfc1f39be------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b7718460cd2</guid>
            <category><![CDATA[digital-forensics]]></category>
            <category><![CDATA[forensics]]></category>
            <dc:creator><![CDATA[P.K RAWAT]]></dc:creator>
            <pubDate>Sat, 27 Jun 2026 14:55:52 GMT</pubDate>
            <atom:updated>2026-06-27T14:55:52.488Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*sBv3CbKk9TVC9cR7gTFNTw@2x.jpeg" /></figure><h2># Forensic Recovery from a LUKS-Encrypted Linux System: dd Imaging, Deleted File Recovery, and Full Autopsy Analysis</h2><p>**Unlock the encrypted volume, image it raw, carve deleted files, and run a complete forensic analysis – all from CAINE OS live boot.**</p><p>– -</p><p>&gt; ⚠️ **Disclaimer:** This guide is intended strictly for authorized forensic investigation, data recovery on systems you own, or academic/lab environments. Unauthorized access to encrypted systems is a criminal offense in most jurisdictions. Always operate within the bounds of your legal authority or a signed chain-of-custody agreement.</p><p>– -</p><p>## The Scenario</p><p>You have a Linux machine with a LUKS-encrypted drive. You need to do more than just reset a password – you need to recover deleted files, extract artifacts, and run a proper forensic investigation. The encryption is not a dead end; it’s just the first gate.</p><p>This guide picks up after unlocking the LUKS container and walks you through:</p><ol><li>Mounting the decrypted filesystem for live inspection</li><li>2. Creating a raw `.dd` forensic image of the decrypted volume</li><li>3. Recovering deleted files with **Foremost**, **Scalpel**, and **Bulk Extractor**</li><li>4. Running a full forensic analysis with **Autopsy** and **FTK Imager**</li></ol><p>Everything runs from **CAINE OS** booted from USB – the target drive is never written to.</p><p>– -</p><p>## Prerequisites</p><ul><li>CAINE OS live USB (booted, terminal open)</li><li>- The LUKS passphrase for the target drive</li><li>- A second drive or large USB with enough space for the `.dd` image (same size or larger than the source partition)</li><li>- Tools pre-installed in CAINE: `cryptsetup`, `lvm2`, `dcfldd`/`dd`, `foremost`, `scalpel`, `bulk_extractor`, `autopsy`</li></ul><p>– -</p><p>## Part 1 – Unlock and Mount the Encrypted Volume</p><p>### 1.1 – Identify the Disk Layout</p><p>```bash</p><p>lsblk -f</p><p>```</p><p>Example output:</p><p>```</p><p>sda</p><p>├─sda1. vfat. 271M. /boot/efi</p><p>└─sda2. crypto_LUKS. 476G. (encrypted root)</p><p>sdb. 1.8T. (your evidence/output drive)</p><p>```</p><p>Your encrypted partition is the `crypto_LUKS` one – note its path (`/dev/sda2` here).</p><p>– -</p><p>### 1.2 – Unlock the LUKS Container</p><p>```bash</p><p>sudo cryptsetup open /dev/sda2 cryptroot</p><p>```</p><p>Enter the passphrase. On success, the decrypted device appears at `/dev/mapper/cryptroot`.</p><p>Verify:</p><p>```bash</p><p>ls /dev/mapper/</p><p>```</p><p>You should see `cryptroot` listed.</p><p>– -</p><p>### 1.3 – Activate LVM Volumes</p><p>```bash</p><p>sudo vgscan</p><p>sudo vgchange -ay</p><p>sudo lvs</p><p>```</p><p>Expected:</p><p>```</p><p>VG. LV. Path</p><p>ubuntu. root. /dev/ubuntu/root</p><p>ubuntu. swap. /dev/ubuntu/swap</p><p>```</p><p>– -</p><p>### 1.4 – Mount the Root Filesystem (Read-Only – Always)</p><p>In forensics, you **never mount evidence read-write**. Use the `ro` flag:</p><p>```bash</p><p>sudo mount -o ro /dev/ubuntu/root /mnt</p><p>```</p><p>If there’s a separate `/boot`:</p><p>```bash</p><p>sudo mount -o ro /dev/sda1 /mnt/boot</p><p>```</p><p>The system is now browsable at `/mnt`. You can explore, search, and read files – but nothing is written to the target.</p><p>To browse:</p><p>```bash</p><p>ls /mnt/home/</p><p>ls /mnt/var/log/</p><p>ls /mnt/root/</p><p>```</p><p>– -</p><p>### 1.5 – Optional: Mount to /media Instead</p><p>If you prefer to work under `/media` (CAINE sometimes auto-manages `/mnt`):</p><p>```bash</p><p>sudo mkdir -p /media/evidence</p><p>sudo mount -o ro /dev/ubuntu/root /media/evidence</p><p>```</p><p>Everything from here works identically – just replace `/mnt` with `/media/evidence` in all commands.</p><p>– -</p><p>## Part 2 – Create a Raw Forensic Image (.dd)</p><p>This is the most important step. A `.dd` image is a bit-for-bit copy of the decrypted volume. Every subsequent tool – Foremost, Scalpel, Autopsy, FTK – works from this image, not the live device. This protects the original and gives you a reproducible artifact.</p><p>– -</p><p>### 2.1 – Identify Your Output Drive</p><p>```bash</p><p>lsblk</p><p>```</p><p>Your output/evidence drive is likely `/dev/sdb` or mounted at `/media/caine/ExternalDrive`. Confirm it has enough space:</p><p>```bash</p><p>df -h</p><p>```</p><p>– -</p><p>### 2.2 – Image the Decrypted Volume with dcfldd</p><p>`dcfldd` is `dd` with hashing built in – preferred in forensics because it generates a hash as it images:</p><p>```bash</p><p>sudo dcfldd if=/dev/mapper/cryptroot \</p><p>. of=/media/caine/ExternalDrive/evidence.dd \</p><p>. bs=512 \</p><p>. hash=sha256 \</p><p>. hashlog=/media/caine/ExternalDrive/evidence.sha256.log \</p><p>. status=on</p><p>```</p><p>**What each flag does:**</p><p>| Flag | Purpose |</p><p>| – – – | – – – – -|</p><p>| `if=` | Input: the decrypted LUKS device |</p><p>| `of=` | Output: path on your evidence drive |</p><p>| `bs=512` | Block size (512 bytes = sector-aligned, standard for forensics) |</p><p>| `hash=sha256` | Hash the source while imaging |</p><p>| `hashlog=` | Write the hash to a file for chain of custody |</p><p>| `status=on` | Show live progress |</p><p>If `dcfldd` isn’t available, fall back to `dd` with `conv=noerror,sync`:</p><p>```bash</p><p>sudo dd if=/dev/mapper/cryptroot \</p><p>. of=/media/caine/ExternalDrive/evidence.dd \</p><p>. bs=512 conv=noerror,sync status=progress</p><p>```</p><p>Then hash it manually:</p><p>```bash</p><p>sha256sum /media/caine/ExternalDrive/evidence.dd &gt; /media/caine/ExternalDrive/evidence.sha256.log</p><p>```</p><p>– -</p><p>### 2.3 – Verify the Image Integrity</p><p>```bash</p><p>sha256sum -c /media/caine/ExternalDrive/evidence.sha256.log</p><p>```</p><p>A `OK` result means the image is an exact copy. Document this hash – it’s your chain of custody anchor.</p><p>– -</p><p>## Part 3 – Recover Deleted Files</p><p>All three tools below operate on the `.dd` image, not the mounted filesystem. Never run carving tools directly against a mounted partition.</p><p>– -</p><p>### 3.1 – Foremost</p><p>Foremost is a header/footer file carver – it finds files by their magic bytes regardless of filesystem metadata. Fast and reliable for common file types.</p><p>Create an output directory:</p><p>```bash</p><p>mkdir -p /media/caine/ExternalDrive/foremost_output</p><p>```</p><p>Run against the image:</p><p>```bash</p><p>sudo foremost -t all \</p><p>. -i /media/caine/ExternalDrive/evidence.dd \</p><p>. -o /media/caine/ExternalDrive/foremost_output \</p><p>. -v</p><p>```</p><p>**Flags explained:**</p><p>| Flag | Purpose |</p><p>| – – – | – – – – -|</p><p>| `-t all` | Carve all known file types (jpg, pdf, zip, doc, mp4, etc.) |</p><p>| `-i` | Input image |</p><p>| `-o` | Output directory (must not already exist) |</p><p>| `-v` | Verbose: show progress and stats |</p><p>To carve only specific types:</p><p>```bash</p><p>sudo foremost -t jpg,pdf,docx,zip -i evidence.dd -o foremost_output</p><p>```</p><p>Results are organized by file type in subdirectories. Check `foremost_output/audit.txt` for a full recovery report.</p><p>– -</p><p>### 3.2 – Scalpel</p><p>Scalpel is a fork of Foremost with better performance on large images and finer control over file type rules. It uses a configuration file (`/etc/scalpel/scalpel.conf`) where you uncomment the file types you want to carve.</p><p>Edit the config to enable target types:</p><p>```bash</p><p>sudo nano /etc/scalpel/scalpel.conf</p><p>```</p><p>Uncomment lines for the file types you need. For example, to enable JPEGs, find and uncomment:</p><p>```</p><p>jpg	y	200000000	\xff\xd8\xff\xe0\x00\x10	\xff\xd9</p><p>```</p><p>Save and exit, then run:</p><p>```bash</p><p>mkdir -p /media/caine/ExternalDrive/scalpel_output</p><p>sudo scalpel \</p><p>. -c /etc/scalpel/scalpel.conf \</p><p>. -o /media/caine/ExternalDrive/scalpel_output \</p><p>. /media/caine/ExternalDrive/evidence.dd</p><p>```</p><p>Scalpel tends to recover more intact files than Foremost in fragmented filesystems. Run both and compare – they complement each other.</p><p>– -</p><p>### 3.3 – Bulk Extractor</p><p>Bulk Extractor is different from Foremost and Scalpel. Rather than recovering whole files, it extracts **artifacts** – email addresses, URLs, phone numbers, credit card patterns, GPS coordinates, browser history fragments, and more – directly from raw data, even from compressed or partially overwritten regions.</p><p>It is indispensable for intelligence gathering from an image.</p><p>```bash</p><p>mkdir -p /media/caine/ExternalDrive/bulk_output</p><p>sudo bulk_extractor \</p><p>. -o /media/caine/ExternalDrive/bulk_output \</p><p>. -E pdf \</p><p>. -x jpeg_carved \</p><p>. /media/caine/ExternalDrive/evidence.dd</p><p>```</p><p>**Common flags:**</p><p>| Flag | Purpose |</p><p>| – – – | – – – – -|</p><p>| `-o` | Output directory |</p><p>| `-E pdf` | Enable PDF artifact extraction |</p><p>| `-x jpeg_carved` | Disable JPEG carving (let Foremost handle that) |</p><p>| `-j 4` | Use 4 CPU threads for speed |</p><p>For a full extraction with all scanners:</p><p>```bash</p><p>sudo bulk_extractor \</p><p>. -o /media/caine/ExternalDrive/bulk_output \</p><p>. -j 4 \</p><p>. /media/caine/ExternalDrive/evidence.dd</p><p>```</p><p>Key output files to review:</p><p>| File | Contains |</p><p>| – – – | – – – – -|</p><p>| `email.txt` | Extracted email addresses |</p><p>| `url.txt` | URLs found in raw data |</p><p>| `ccn.txt` | Credit card number patterns |</p><p>| `telephone.txt` | Phone numbers |</p><p>| `exif.txt` | EXIF metadata from images |</p><p>| `json.txt` | JSON data fragments |</p><p>| `histogram/` | Frequency analysis of artifacts |</p><p>– -</p><p>## Part 4 – Full Forensic Analysis with Autopsy</p><p>Autopsy is a GUI-based forensic platform built on The Sleuth Kit. It gives you a complete case management environment: timeline analysis, keyword search, file recovery, hash lookup against NSRL, browser history parsing, and more.</p><p>CAINE ships with Autopsy. Launch it from the terminal:</p><p>```bash</p><p>autopsy</p><p>```</p><p>It will print something like:</p><p>```</p><p>Evidence Locker: /var/lib/autopsy</p><p>Start browser: http://localhost:9999/autopsy</p><p>```</p><p>Open that URL in the browser inside CAINE.</p><p>– -</p><p>### 4.1 – Create a New Case</p><ol><li>Click **New Case**</li><li>2. Enter a case name, investigator name, and description</li><li>3. Set the evidence locker path to your external drive: `/media/caine/ExternalDrive/autopsy_case`</li></ol><p>– -</p><p>### 4.2 – Add the .dd Image as Evidence</p><ol><li>Click **Add Image File**</li><li>2. Set the image path: `/media/caine/ExternalDrive/evidence.dd`</li><li>3. Image type: **Partition** (if you imaged a single LV) or **Disk** (if you imaged the whole disk)</li><li>4. File system type: **ext4** (for standard Ubuntu/Debian/Kali installs)</li><li>5. Mount point: `/`</li><li>6. Enable **MD5/SHA-1 hash calculation** – Autopsy will verify the image integrity automatically</li></ol><p>– -</p><p>### 4.3 – Key Analysis Modules to Run</p><p>Once the image is loaded, navigate to **File Analysis**, **Keyword Search**, and **Image Details**. Core workflows:</p><p>**Deleted file recovery:**</p><p>Navigate to `[image] → [partition] → Deleted Files`. Autopsy lists all unallocated inodes with recoverable content. Click any file to preview and export.</p><p>**Keyword search:**</p><p>Go to **Keyword Search** and enter terms relevant to your investigation. Autopsy searches across file content, metadata, and slack space.</p><p>**Timeline analysis:**</p><p>Under **File Activity Timelines**, generate a timeline of file creation, access, and modification events. This is crucial for establishing a sequence of events.</p><p>**Hash database lookup:**</p><p>Autopsy can compare file hashes against the NIST NSRL database to filter known-good system files and focus on user-created content.</p><p>– -</p><p>## Part 5 – FTK Imager (for Windows Analysis Workstations)</p><p>FTK Imager is a free tool from Exterro (formerly AccessData) that runs on Windows. If your analysis workstation is Windows-based, FTK Imager is the standard way to ingest the `.dd` image you created.</p><p>– -</p><p>### 5.1 – Transfer the Image</p><p>Copy `evidence.dd` and `evidence.sha256.log` to your Windows workstation via external drive or network share.</p><p>– -</p><p>### 5.2 – Open the Image in FTK Imager</p><ol><li>Launch **FTK Imager**</li><li>2. Go to **File → Add Evidence Item**</li><li>3. Select **Image File**</li><li>4. Browse to `evidence.dd`</li><li>5. FTK Imager will parse the partition table and present the filesystem tree</li></ol><p>– -</p><p>### 5.3 – What FTK Imager Can Do</p><p>**Verify image integrity:**</p><p>Go to **File → Verify Drive/Image**. FTK will compute the MD5/SHA-1 and compare against your log. A match confirms an untampered image.</p><p>**Browse and export files:**</p><p>The left pane shows the full filesystem tree including deleted entries (marked with an X). Right-click any file → **Export Files** to extract it.</p><p>**View file content:**</p><p>The bottom panes show hex view, text view, and a file preview for common formats (images, documents, email).</p><p>**Create a case report:**</p><p>Go to **File → Create Disk Image** to make additional image copies in E01/AFF format for lab sharing. Use **File → Export Directory Listing** to export the full file listing as CSV.</p><p>**Carve unallocated space:**</p><p>FTK Imager can export the raw unallocated space as a separate binary file – useful if you want to run Foremost or Scalpel against just the free space rather than the entire image.</p><p>```</p><p>Right-click [Unallocated Space] → Export Files → save as unallocated.bin</p><p>```</p><p>Then carve it:</p><p>```bash</p><p>foremost -t all -i unallocated.bin -o unallocated_carved/</p><p>```</p><p>– -</p><p>## Tool Comparison at a Glance</p><p>| Tool | Type | Best For |</p><p>| – – – | – – – | – – – – -|</p><p>| **Foremost** | File carver | Fast recovery of common file types by header/footer |</p><p>| **Scalpel** | File carver | Configurable carving, better on fragmented data |</p><p>| **Bulk Extractor** | Artifact extractor | Email, URLs, PII, metadata – no filesystem needed |</p><p>| **Autopsy** | Full forensic suite | Case management, timeline, keyword search, deleted files |</p><p>| **FTK Imager** | Imaging + browser | Windows-based ingestion, verification, export |</p><p>– -</p><p>## Recommended Workflow Order</p><p>```</p><p>Boot CAINE</p><p>. ↓</p><p>Unlock LUKS → Mount Read-Only (browse, note what you see)</p><p>. ↓</p><p>Image with dcfldd → Verify SHA-256 hash</p><p>. ↓</p><p>Run Foremost + Scalpel (parallel, separate output dirs)</p><p>. ↓</p><p>Run Bulk Extractor (all scanners, multi-thread)</p><p>. ↓</p><p>Load image into Autopsy (deleted files, timeline, keyword search)</p><p>. ↓</p><p>Transfer image to Windows → Open in FTK Imager (verification, case report)</p><p>```</p><p>– -</p><p>## Clean Up After Investigation</p><p>When you’re done with the live session:</p><p>```bash</p><p>sudo umount /mnt</p><p>sudo vgchange -an</p><p>sudo cryptsetup close cryptroot</p><p>sudo reboot</p><p>```</p><p>The target drive was never written to. Your `.dd` image, hash log, and all tool outputs are on your evidence drive. The chain of custody is intact.</p><p>– -</p><p>## Final Notes</p><p>A few things worth internalizing before you start:</p><p>**Always image first, analyze second.** Running tools directly against a live mounted partition risks modifying access timestamps and destroying the very evidence you’re after. The `.dd` image is your working copy.</p><p>**Hash everything, twice.** Hash the image at creation, hash it again before each analysis session. Any mismatch is a red flag – either the image was corrupted in transfer or something touched it.</p><p>**Deleted ≠ gone.** In ext4, when a file is deleted the inode is marked free but the data blocks often remain intact until overwritten. File carvers work because of this. The longer the system has been running since deletion, the lower the recovery rate – time matters.</p><p>**Encryption was not the wall.** You had the key. The investigation was always possible. Document that the passphrase was provided by the authorized party – it matters for admissibility.</p><p>– -</p><p>*This is Part 2 of a series on forensic recovery with CAINE OS. Part 1 covers chrooting into a LUKS-encrypted system to reset user passwords.*</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b7718460cd2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[# How to Reset a Password on a LUKS-Encrypted Linux System Using CAINE OS Live Boot]]></title>
            <link>https://medium.com/@prabhanjanrawat/how-to-reset-a-password-on-a-luks-encrypted-linux-system-using-caine-os-live-boot-0d7c3c4b526e?source=rss-02abfc1f39be------2</link>
            <guid isPermaLink="false">https://medium.com/p/0d7c3c4b526e</guid>
            <category><![CDATA[digital-forensics]]></category>
            <dc:creator><![CDATA[P.K RAWAT]]></dc:creator>
            <pubDate>Sat, 27 Jun 2026 14:26:28 GMT</pubDate>
            <atom:updated>2026-06-27T14:26:28.734Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*eLQsAFVSH67e7Ea_1cXFeg@2x.jpeg" /></figure><p>**A step-by-step forensic approach to chrooting into a locked system – no reinstall required.**</p><p>– -</p><p>&gt; ⚠️ **Disclaimer:** This guide is intended for legitimate system recovery on machines you own or have explicit authorization to access. Unauthorized access to computer systems is illegal. Use responsibly.</p><p>– -</p><p>## The Scenario</p><p>You’ve locked yourself out of your Linux system. Maybe you forgot the user password, maybe the root account is inaccessible, or maybe you’re doing recovery work on a machine that can’t boot normally. The drive is LUKS-encrypted – so you can’t just mount it and edit `/etc/shadow` from another OS. You need to unlock the container, activate the LVM volumes, mount the filesystem, and chroot in.</p><p>CAINE OS (Computer Aided INvestigative Environment) is a forensics-focused Linux live distribution – and it’s a solid choice for this kind of recovery work. It boots clean, carries the tools you need, and leaves minimal traces on the target system.</p><p>Here’s the exact procedure.</p><p>– -</p><p>## What You’ll Need</p><ul><li>A USB drive with **CAINE OS** burned to it (any recent version works)</li><li>- Physical access to the target machine</li><li>- The **LUKS passphrase** for the encrypted partition (you need this – this guide does not bypass encryption)</li><li>- Basic terminal familiarity</li></ul><p>– -</p><p>## Step 1 – Boot CAINE OS in Live Mode</p><p>Insert the USB, boot from it, and select the live session. Once you’re at the desktop, open a terminal. Everything from here is command-line.</p><p>– -</p><p>## Step 2 – Identify the LUKS Partition</p><p>Run:</p><p>```bash</p><p>lsblk -f</p><p>```</p><p>You’re looking for a partition with `crypto_LUKS` as its filesystem type. A typical output looks like this:</p><p>```</p><p>sda</p><p>├─sda1. vfat. (EFI or /boot)</p><p>└─sda2. crypto_LUKS. (your encrypted root)</p><p>```</p><p>Note the device name – in this example it’s `/dev/sda2`. Yours may differ (`nvme0n1p2`, `sdb2`, etc.).</p><p>– -</p><p>## Step 3 – Unlock the LUKS Container</p><p>```bash</p><p>sudo cryptsetup open /dev/sda2 cryptroot</p><p>```</p><p>You’ll be prompted for the LUKS passphrase. Enter it. If it succeeds silently, you’re through. The decrypted device will now appear as `/dev/mapper/cryptroot`.</p><p>– -</p><p>## Step 4 – Activate the LVM Volume Group</p><p>LUKS usually wraps an LVM setup inside. Scan for volume groups and activate them:</p><p>```bash</p><p>sudo vgscan</p><p>sudo vgchange -ay</p><p>```</p><p>List the logical volumes to confirm what’s available:</p><p>```bash</p><p>sudo lvs</p><p>```</p><p>Expected output:</p><p>```</p><p>VG. LV. Path</p><p>ubuntu. root. /dev/ubuntu/root</p><p>ubuntu. swap. /dev/ubuntu/swap</p><p>```</p><p>Your VG name might be `ubuntu`, `kali`, `debian`, or something custom. The `root` LV is what you need.</p><p>– -</p><p>## Step 5 – Mount the Root Filesystem</p><p>```bash</p><p>sudo mount /dev/ubuntu/root /mnt</p><p>```</p><p>If you have a separate `/boot` partition (check `lsblk` output – it’ll be the `vfat` or `ext4` partition outside the LUKS container):</p><p>```bash</p><p>sudo mount /dev/sda1 /mnt/boot</p><p>```</p><p>On UEFI systems, mount the EFI partition:</p><p>```bash</p><p>sudo mount /dev/sda1 /mnt/boot/efi</p><p>```</p><p>Adjust the partition names to match your actual disk layout.</p><p>– -</p><p>## Step 6 – Bind Mount the Virtual Filesystems</p><p>The chroot environment needs access to the kernel’s virtual filesystems to function properly – things like device nodes, process info, and kernel interfaces:</p><p>```bash</p><p>sudo mount – bind /dev. /mnt/dev</p><p>sudo mount – bind /proc /mnt/proc</p><p>sudo mount – bind /sys. /mnt/sys</p><p>sudo mount – bind /run. /mnt/run</p><p>```</p><p>If you need network access inside the chroot (for example, to run `apt` or `update-grub` with network deps):</p><p>```bash</p><p>sudo cp /etc/resolv.conf /mnt/etc/resolv.conf</p><p>```</p><p>– -</p><p>## Step 7 – Enter the Chroot</p><p>```bash</p><p>sudo chroot /mnt</p><p>```</p><p>Your terminal prompt will change. You are now operating as if you’ve booted directly into the installed system. Commands run here affect the target OS, not CAINE.</p><p>– -</p><p>## Step 8 – Change the Password</p><p>To reset a specific user’s password:</p><p>```bash</p><p>passwd username</p><p>```</p><p>To reset the root password:</p><p>```bash</p><p>passwd</p><p>```</p><p>Enter the new password twice when prompted. That’s it – the change is written immediately to `/etc/shadow` on the target filesystem.</p><p>– -</p><p>## Step 9 – Exit and Clean Up</p><p>Exit the chroot:</p><p>```bash</p><p>exit</p><p>```</p><p>Unmount everything in reverse order:</p><p>```bash</p><p>sudo umount /mnt/run</p><p>sudo umount /mnt/sys</p><p>sudo umount /mnt/proc</p><p>sudo umount /mnt/dev</p><p>sudo umount /mnt/boot/efi. # only if you mounted this</p><p>sudo umount /mnt/boot. # only if you mounted this</p><p>sudo umount /mnt</p><p>```</p><p>Deactivate LVM and close the LUKS container:</p><p>```bash</p><p>sudo vgchange -an</p><p>sudo cryptsetup close cryptroot</p><p>```</p><p>Reboot:</p><p>```bash</p><p>sudo reboot</p><p>```</p><p>Remove the USB when prompted, and the system will boot normally into the installed OS with the new password active.</p><p>– -</p><p>## Troubleshooting</p><p>**`cryptsetup open` fails with “Wrong key”**</p><p>Double-check the passphrase. There’s no workaround – LUKS is designed to make brute force impractical.</p><p>**`vgscan` finds nothing**</p><p>The LUKS unlock may not have completed. Verify `/dev/mapper/cryptroot` exists with `ls /dev/mapper/`.</p><p>**`mount` fails with “unknown filesystem type”**</p><p>You may be trying to mount the wrong logical volume or the EFI partition instead of root. Check `lsblk -f` again after LUKS is open – the logical volumes will appear in the mapper tree.</p><p>**`chroot` fails with “exec format error”**</p><p>Your live OS architecture doesn’t match the target system. CAINE is x86_64; if the target is arm64, you’ll need a matching live environment.</p><p>– -</p><p>## Why CAINE OS Specifically?</p><p>CAINE boots in a mode that intentionally avoids auto-mounting drives – a feature inherited from its forensics design philosophy. This is actually useful here: it means you control exactly what gets mounted and when, reducing the chance of accidentally writing to a partition you didn’t intend to touch. It also ships with `cryptsetup` and LVM tools pre-installed, so no package hunting required.</p><p>– -</p><p>## Applies To</p><p>This procedure works on any Debian/Ubuntu/Kali/Mint system using the standard:</p><p>```</p><p>LUKS → LVM → ext4</p><p>```</p><p>stack – which covers the vast majority of encrypted Linux desktop and laptop installs. For Fedora/RHEL with LUKS directly on a partition (no LVM), skip Steps 4 and go straight to mounting the decrypted device.</p><p>– -</p><p>*Found this useful? If you’re regularly doing recovery or forensics work, CAINE’s full toolkit is worth exploring – it goes well beyond password resets.*</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0d7c3c4b526e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing MISP]]></title>
            <link>https://medium.com/@prabhanjanrawat/installing-misp-9c7ef437dfc5?source=rss-02abfc1f39be------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c7ef437dfc5</guid>
            <dc:creator><![CDATA[P.K RAWAT]]></dc:creator>
            <pubDate>Sun, 09 Feb 2025 19:02:22 GMT</pubDate>
            <atom:updated>2025-02-09T19:02:22.985Z</atom:updated>
            <content:encoded><![CDATA[<h2>Title: How to Install MISP Using Docker Desktop on a Windows PC</h2><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*orohltf31nl2IpZ9LFyHAw@2x.jpeg" /></figure><p>Introduction:</p><p>MISP (Malware Information Sharing Platform &amp; Threat Sharing) is a powerful open-source threat intelligence platform designed for collecting, storing, and sharing cybersecurity indicators. Setting up MISP can be complex, but using Docker simplifies the process by containerizing the application, ensuring easy deployment and management. In this guide, we’ll walk you through the step-by-step process of installing MISP using Docker Desktop on a Windows PC.</p><p>Prerequisites</p><p>Before diving into the installation process, ensure you have the following prerequisites:</p><p>1.	Windows 10/11 (with WSL 2 support)</p><p>2.	Docker Desktop installed and running</p><p>3.	Basic familiarity with command-line tools</p><p>Step 1: Install Docker Desktop on Windows</p><p>1.	Download Docker Desktop:</p><p>•	Go to the official Docker website: https://www.docker.com/products/docker-desktop/</p><p>•	Download the installer compatible with Windows.</p><p>2.	Install Docker Desktop:</p><p>•	Run the installer and follow the on-screen instructions.</p><p>•	During installation, ensure the option for WSL 2 is selected.</p><p>3.	Start Docker Desktop:</p><p>•	After installation, launch Docker Desktop and make sure it’s running properly.</p><p>•	You can verify by running the following command in PowerShell or Command Prompt:</p><p>docker – version</p><p>•	If Docker is running correctly, it will display the installed version.</p><p>Step 2: Enable WSL 2 (If Not Already Enabled)</p><p>1.	Install WSL 2:</p><p>•	Open PowerShell as Administrator and run:</p><p>wsl – install</p><p>•	Reboot your system if prompted.</p><p>2.	Set WSL 2 as Default:</p><p>wsl – set-default-version 2</p><p>3.	Install a Linux Distribution (Optional but recommended):</p><p>•	Install Ubuntu from the Microsoft Store for managing Linux-based Docker containers.</p><p>Step 3: Clone the MISP Docker Repository</p><p>1.	Open PowerShell or Command Prompt and navigate to the directory where you want to download MISP.</p><p>2.	Clone the MISP Docker repository:</p><p>git clone https://github.com/MISP/misp-docker.git</p><p>3.	Navigate to the cloned directory:</p><p>cd misp-docker</p><p>Step 4: Configure Docker for MISP</p><p>1.	Edit the Docker Environment Variables (Optional but recommended):</p><p>•	Open the .env file in the misp-docker folder using any text editor (e.g., Notepad++).</p><p>•	Customize settings like MISP ports, default passwords, etc.</p><p>2.	Pull the Required Docker Images:</p><p>docker-compose pull</p><p>Step 5: Deploy MISP Using Docker Compose</p><p>1.	Start MISP Containers:</p><p>docker-compose up -d</p><p>2.	Verify the Running Containers:</p><p>docker ps</p><p>•	You should see multiple MISP-related containers running (e.g., misp-web, misp-db, etc.).</p><p>Step 6: Access MISP Web Interface</p><p>1.	Open your browser and navigate to:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qE-KFT4wHUQQ4myot6cMzA@2x.jpeg" /></figure><p>http://localhost:8080</p><p>(The default port is 8080 unless you changed it in the .env file.)</p><p>2.	Login Credentials:</p><p>•	Username: admin@admin.test</p><p>•	Password: admin</p><p>Step 7: Post-Installation Configuration</p><p>1.	Change Default Passwords:</p><p>•	After logging in, immediately change the default credentials for security reasons.</p><p>2.	Configure MISP Settings:</p><p>•	Navigate through the Administration panel to adjust settings like email configurations, threat sharing settings, and user roles.</p><p>Step 8: Managing MISP Containers</p><p>1.	Stop MISP Containers:</p><p>docker-compose down</p><p>2.	Restart MISP Containers:</p><p>docker-compose up -d</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G4-BsClZbxhwlMMXhVy7QA@2x.jpeg" /></figure><p>3.	View Logs:</p><p>docker-compose logs -f</p><p>Troubleshooting Tips</p><p>•	Docker Daemon Issues:</p><p>Ensure Docker Desktop is running. Restart it if you face issues.</p><p>•	Port Conflicts:</p><p>If port 8080 is already in use, modify the .env file to use a different port.</p><p>•	Database Connection Errors:</p><p>Ensure the misp-db container is running and healthy. Restart the container if needed.</p><p>Conclusion</p><p>Congratulations! You’ve successfully installed and configured MISP using Docker Desktop on your Windows PC. With this setup, you can now collect, analyze, and share threat intelligence efficiently. Docker makes managing MISP straightforward, allowing you to focus on cybersecurity without worrying about complex installations.</p><p>Stay tuned to Byte Chronicles for more tutorials on cybersecurity tools and tech workflows!</p><p>Let me know if you’d like to add any specific details or modifications!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c7ef437dfc5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>