<?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 Sanjana on Medium]]></title>
        <description><![CDATA[Stories by Sanjana on Medium]]></description>
        <link>https://medium.com/@sharplikekatana?source=rss-630a24f5b72d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*XznaCX0suW7v4wkYgDdweA.png</url>
            <title>Stories by Sanjana on Medium</title>
            <link>https://medium.com/@sharplikekatana?source=rss-630a24f5b72d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 04:56:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sharplikekatana/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[Stop Writing Testbenches, Start Writing Properties: An SVA Tutorial]]></title>
            <link>https://sharplikekatana.medium.com/stop-writing-testbenches-start-writing-properties-an-sva-tutorial-77a4afed0bf3?source=rss-630a24f5b72d------2</link>
            <guid isPermaLink="false">https://medium.com/p/77a4afed0bf3</guid>
            <category><![CDATA[hardware-security]]></category>
            <category><![CDATA[rtl-design]]></category>
            <category><![CDATA[verilog]]></category>
            <category><![CDATA[system-verilog]]></category>
            <dc:creator><![CDATA[Sanjana]]></dc:creator>
            <pubDate>Mon, 02 Nov 2026 13:23:23 GMT</pubDate>
            <atom:updated>2026-11-02T13:23:23.329Z</atom:updated>
            <content:encoded><![CDATA[<p>In digital design, we often treat verification like a game of whack-a-mole. We write a testbench, drive some inputs, look at the waveform, and say, <em>“Well, it worked for this sequence.”</em></p><p>But what if the code is perfect for your specific test, yet fails catastrophically on an input sequence you didn’t think to test?</p><p>Simulation is <strong>existential</strong>. It only proves that a bug <em>might</em> exist if you happen to hit it. It never proves the design is correct.</p><p>Welcome to the world of <strong>SystemVerilog Assertions (SVA)</strong>. Instead of writing stimulus (inputs), we write properties (rules). We tell the simulator: <em>“I don’t care what you feed this design, it must </em><strong><em>never</em></strong><em> do X.”</em></p><p><strong>All the source code, testbenches, and bug-injection files for this tutorial are available on my </strong><a href="https://github.com/sanjanastyles/sva-mealy-moore-tutorial/"><strong>GitHub repo</strong></a><strong>.</strong></p><p>Let’s explore how to write these properties by looking at the most classic interview question in digital logic: <strong>The Mealy vs. Moore FSM.</strong></p><h3>1. The Target Design: A Sequence Detector</h3><p>Let’s build a Finite State Machine (FSM) that detects the non-overlapping sequence 1001.</p><ul><li><strong>Inputs:</strong> clk, rst, d_in</li><li><strong>Output:</strong> detected</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*Wjk_ZOTm586k6mVE_zjDnA.png" /><figcaption>FSM state chart</figcaption></figure><p>A = S0<br>B = S1<br>C = S2<br>D = S3<br>X = input</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*Omvku84tY-4YSv1-nHf5-A.png" /><figcaption>truth table</figcaption></figure><p>Here is the RTL. Notice we are using a <strong>Mealy</strong> architecture — the output depends on both the current state <em>and</em> the current input.</p><pre>module fsm_1001_nov(<br>    input  logic clk, <br>    input  logic rst, <br>    input  logic d_in,    <br>    output logic detected  <br>);<br><br>    localparam s0 = 2&#39;b00, s1 = 2&#39;b01, s2 = 2&#39;b10, s3 = 2&#39;b11;<br>    logic [1:0] ps, ns;<br><br>    // State Register<br>    always_ff @(posedge clk or posedge rst) begin<br>        if (rst) ps &lt;= s0;<br>        else     ps &lt;= ns;<br>    end<br><br>    // Next State &amp; Output Logic<br>    always_comb begin <br>        detected = 1&#39;b0; <br>        ns = s0;         <br><br>        case (ps)<br>            s0: if (d_in) ns = s1; else ns = s0;<br>            s1: if (!d_in) ns = s2; else ns = s1;<br>            s2: if (!d_in) ns = s3; else ns = s1;<br>            s3: begin<br>                ns = s0; <br>                if (d_in) detected = 1&#39;b1; // Mealy Output!<br>            end          <br>            default: ns = s0;  <br>        endcase          <br>    end     <br>endmodule</pre><h3>2. The Trap: Mealy vs. Moore Timing</h3><p>Before we write an assertion, we must understand the timing of our hardware.</p><ul><li><strong>Moore Machine:</strong> Output depends <em>only</em> on the state. When the FSM enters the final state, the output goes high <strong>on the next clock edge</strong>.</li><li><strong>Mealy Machine:</strong> Output depends on the state <em>and</em> the input. When the final 1 arrives, the output goes high <strong>instantly</strong>, in the exact same clock cycle.</li></ul><p>Because our FSM is a <strong>Mealy</strong> machine, detected goes high the <em>moment</em> d_in becomes 1 while we are in state s3 (2&#39;b11). It does not wait for the next clock edge.</p><p>This timing difference dictates how we write our SVA.</p><h3>3. Writing the Properties (SVA)</h3><p>SVA uses <strong>implication operators</strong> to create “If-Then” contracts.</p><ul><li>|-&gt; (Overlapping): If the trigger happens, the result must happen <strong>in the same cycle</strong>.</li><li>|=&gt; (Non-overlapping): If the trigger happens, the result must happen <strong>one cycle later</strong>.</li></ul><p>Because we have a Mealy FSM, we must use |-&gt;. If we use |=&gt;, our assertion will fail (we will prove this shortly).</p><p>Here is our verification module. We use the bind statement to attach these rules to the internals of our FSM without modifying the design code.</p><pre>module fsm_1001_sva (<br>    input logic clk, rst, d_in, detected,<br>    input logic [1:0] ps<br>);<br><br>    // 1. INVARIANT: The FSM must never enter an illegal state (e.g., 2&#39;bxx)<br>    assert property (@(posedge clk) disable iff (rst)<br>        ps inside {2&#39;b00, 2&#39;b01, 2&#39;b10, 2&#39;b11})<br>        else $error(&quot;FSM entered an illegal state!&quot;);<br><br>    // 2. SAFETY: &#39;detected&#39; can only ever be high if we are in state s3.<br>    assert property (@(posedge clk) disable iff (rst)<br>        detected |-&gt; ps == 2&#39;b11)<br>        else $error(&quot;Output went high in the wrong state!&quot;);<br><br>    // 3. THE CORE MEALY PROPERTY: s3 + d_in=1 -&gt; detected NOW<br>    assert property (@(posedge clk) disable iff (rst)<br>        (ps == 2&#39;b11 &amp;&amp; d_in == 1) |-&gt; detected)<br>        else $error(&quot;Mealy detection failed in s3!&quot;);<br><br>    // 4. COVER POINT: Prove the trigger is actually reachable (no vacuous passes)<br>    cover property (@(posedge clk) disable iff (rst)<br>        (ps == 2&#39;b11 &amp;&amp; d_in == 1));<br><br>endmodule</pre><p><em>Note the </em><em>disable iff (rst) clause. During reset, signals are garbage. We tell the assertions to &quot;look away&quot; while reset is active.</em></p><h3>3.1 The Verification Toolbox: Understanding Property Types</h3><p>If you look at the SVA code above, you’ll notice we aren’t just checking one thing. We are building a web of logic. In formal verification, properties fall into a few distinct categories, each answering a different question.</p><h4>1. The Invariant (The Foundation)</h4><blockquote><em>assert property (... ps inside {2&#39;b00, 2&#39;b01, 2&#39;b10, 2&#39;b11});</em></blockquote><p>An <strong>invariant</strong> is a rule that has no trigger. It must hold true in <strong>every single clock cycle</strong>, from the moment reset is released until the end of time.</p><ul><li><strong>What it proves:</strong> It proves your design can never enter an <em>illegal</em> state. For our 2-bit ps register, we defined all four binary combinations (00, 01, 10, 11). However, if a glitch occurs or a reset fails to trigger, ps could become 2&#39;bxx (unknown). This invariant guarantees that the FSM always holds a valid binary value and never propagates &#39;X&#39; into the rest of the chip.</li></ul><h4>2. Safety Properties (The Guardrails)</h4><blockquote><em>assert property (... detected |-&gt; ps == 2&#39;b11);</em></blockquote><p>A <strong>safety property</strong> dictates that “bad things never happen.” It usually takes the form of <em>“If X occurs, Y must be true.”</em></p><ul><li><strong>What it proves:</strong> It proves our output is well-behaved. In this case, we are proving that detected can <em>never</em> go high unless we are explicitly in the final state.</li></ul><h4>3. The Core Contract (The Liveness/Behavioral Logic)</h4><blockquote><em>assert property (... (ps == 2&#39;b11 &amp;&amp; d_in == 1) |-&gt; detected);</em></blockquote><p>This is the heart of our Mealy machine. It combines <strong>liveness</strong> (the FSM eventually reaches the state) with the <strong>behavioral contract</strong> (what happens when it gets there).</p><ul><li><strong>What it proves:</strong> It proves our design actually <em>does its job</em>. If the trigger sequence occurs, the output is legally obligated to fire. This is the property that catches our injected bug in the next section.</li></ul><h4>4. The Cover Point (The Sanity Check)</h4><blockquote><em>cover property (... (ps == 2&#39;b11 &amp;&amp; d_in == 1));</em></blockquote><p>What if you write a perfectly sound safety property, but your design is so broken that it never reaches the state required to test it? The simulation will pass with “0 Errors,” giving you a false sense of security. This is called a <strong>vacuous pass</strong>.</p><ul><li><strong>What it proves:</strong> A cover statement proves that a scenario is actually <em>reachable</em>. It confirms the antecedent (the trigger) of your assertion actually happened. It turns a &quot;pass&quot; into a <em>meaningful</em> pass.</li></ul><p>By combining Invariants, Safety, Contracts, and Covers, you move from just “checking waveforms” to mathematically bounding the entire reality of your hardware.</p><h3>4. The Proof: Bug Injection (Mutation Testing)</h3><p>How do we know our assertions actually work? What if we wrote them wrong, and they are just silently passing?</p><p>We perform <strong>Bug Injection</strong>. We intentionally break the design to see if our SVA catches it.</p><p>Let’s pretend a junior engineer wrote the FSM, but accidentally delayed the output by one clock cycle, turning our Mealy machine into a fake Moore machine.</p><pre>// BUG INJECTED:<br>logic detected_comb, detected_delayed;<br>always_comb begin<br>    detected_comb = (ps == s3 &amp;&amp; d_in);<br>end<br>always_ff @(posedge clk) begin<br>    detected_delayed &lt;= detected_comb; // Delays the output by 1 cycle!<br>end<br>assign detected = detected_delayed; </pre><p><strong>If we run our testbench now, the SVA will report the following errors:</strong></p><p># Time=52000 | rst=0 d_in=1 | ps=11 detected=0<br># ** Error: Mealy detection failed in s3! <strong>← Error 1</strong><br># Time=55000 | rst=0 d_in=1 | ps=00 detected=1<br># ** Error: detected went high in wrong state! <strong>← Error 2</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*L_DUG3gVPsLx1mov_sIZjw.png" /><figcaption>error log</figcaption></figure><p><strong>Why did we get two errors?</strong> This is the power of layered assertions.</p><ol><li><strong>The Missing Pulse:</strong> At t=52ns, the inputs are perfect (ps=s3, d_in=1). The Mealy assertion expects detected to be 1 instantly. But because of the bug, it is still 0. <strong>Error 1 fires.</strong></li><li><strong>The Delayed Pulse:</strong> At the next clock edge (t=55ns), the FSM leaves s3 and goes back to s0 (ps=00). <em>But</em>, the buggy flip-flop finally updates, pushing detected to 1. Our Safety assertion sees this and screams: <em>&quot;Hey! </em><em>detected is 1, but you aren&#39;t in </em><em>s3 anymore!&quot;</em> <strong>Error 2 fires.</strong></li></ol><p>If we had used simulation without assertions, we might look at the waveform and say, <em>“Well, </em><em>detected did go high eventually, so it works.&quot;</em> But the SVA caught the exact nanosecond the timing protocol was violated, and proved exactly <em>why</em> it was illegal.</p><p><em>(If you change the SVA to use </em><em>|=&gt; instead of </em><em>|-&gt;, it will fail on the correct design! This is the ultimate proof of why Mealy and Moore matter).</em></p><h3>Conclusion</h3><p>Simulation gives you confidence. Assertions give you proof. By embedding temporal properties directly into your design, you shift from hoping the design works to mathematically proving it does.</p><p><strong>Don’t forget to grab the full code, including the bug-injection files, on my </strong><a href="https://github.com/sanjanastyles/sva-mealy-moore-tutorial/"><strong>GitHub</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/0*QRYlO1DYBQxBTXYf" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77a4afed0bf3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Rust Embedded Struggle: Driving WS2812 LEDs on ESP32-C3]]></title>
            <link>https://sharplikekatana.medium.com/the-rust-embedded-struggle-driving-ws2812-leds-on-esp32-c3-867c0d166a81?source=rss-630a24f5b72d------2</link>
            <guid isPermaLink="false">https://medium.com/p/867c0d166a81</guid>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[rust]]></category>
            <dc:creator><![CDATA[Sanjana]]></dc:creator>
            <pubDate>Tue, 27 Jan 2026 14:44:19 GMT</pubDate>
            <atom:updated>2026-01-27T14:44:19.880Z</atom:updated>
            <content:encoded><![CDATA[<p>Blinking an LED is the “Hello World” of hardware, but doing it with <strong>Rust</strong> on an <strong>ESP32-C3</strong> (RISC-V) while using an emulator like <strong>Wokwi</strong> is a high-speed collision of different technologies. This post documents how we solved a chain of failures involving OS permissions, architecture mismatches, and simulation quirks.</p><p>Make sure you have <a href="https://www.rust-lang.org/">Rust</a> installed. If not, see the instructions on the <a href="https://rustup.rs/">rustup</a> website.</p><blockquote>When using Unix based systems, installing Rust via a system package manager (e.g. brew, apt etc.) can result in various <a href="https://rust-lang.github.io/rustup/installation/other.html#using-a-package-manager">issues and incompatibilities</a>, so it’s best to use <a href="https://rustup.rs/">rustup</a> instead.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eC09tEXwBjzWyKyH.png" /><figcaption><a href="https://blog.rust-embedded.org/embedded-hal-v1/">https://blog.rust-embedded.org/embedded-hal-v1/</a></figcaption></figure><h3>Phase 1: Environment &amp; Toolchain Setup</h3><h4>RISC-V Devices</h4><p>Before we could compile our project, we had to prepare the environment. Since the ESP32-C3 uses a RISC-V architecture, our standard Rust installation needed to learn how to build for that specific hardware.</p><p>Install the proper toolchain with the rust-src <a href="https://rust-lang.github.io/rustup/concepts/components.html">component</a>:</p><pre>rustup toolchain install stable --component rust-src</pre><p>or</p><pre>rustup toolchain install nightly --component rust-src</pre><p>Install the target:</p><pre>rustup target add riscv32imc-unknown-none-elf # For ESP32-C2 and ESP32-C3<br>rustup target add riscv32imac-unknown-none-elf # For ESP32-C6 and ESP32-H2</pre><h4>Why this matters for our project</h4><ul><li><strong>Targeting the Chip:</strong> Without the riscv32imc target, the compiler would try to build a macOS or Windows binary, which obviously won&#39;t run on a microcontroller.</li><li><strong>The OS and the Target:</strong> This is where the <strong>Operating System</strong> comes into play again. While we are writing code on a “Host” OS (like macOS), we are “Cross-Compiling” for a “Target” OS/Hardware. Errors often arise here if the path to these tools isn’t correctly set in your environment variables.</li><li><strong>Simplified Workflow:</strong> As noted in the documentation, since we are only using the ESP32-C3 (and not the older Xtensa-based ESP32 or S3 chips), we don’t need the specialized espup toolchain—the standard Rust rustup handles RISC-V targets perfectly.</li></ul><h4>The “Simulated Hardware” Setup</h4><ul><li><strong>Wokwi for VS Code</strong>: Instead of the browser, we used the VS Code extension. This allows you to run simulations locally without uploading your binary to a website.</li><li><em>Link</em>: <a href="https://docs.wokwi.com/vscode/getting-started">Wokwi VS Code Extension</a></li><li><strong>Cargo-generate</strong>: Used to create the project structure from the esp-idf-template.</li><li><em>Installation</em>: cargo install cargo-generate</li></ul><h3>Phase 2: Solving the Dependency Crisis</h3><p>Standard drivers on Crates.io often fail on the ESP32-C3 due to a u32/usize type mismatch in the RMT peripheral logic. Additionally, Git authentication issues on macOS often prevent cargo from pulling patched repositories directly.</p><ol><li><strong>Manual Source Retrieval</strong>: We bypassed Git authentication by downloading a patched driver <a href="https://github.com/cat-in-136/ws2812-esp32-rmt-driver">ZIP directly</a>:curl -L -A &quot;Mozilla/5.0&quot; https://github.com/cat-in-136/ws2812-esp32-rmt-driver/archive/refs/heads/master.zip -o driver.zip</li><li><strong>Local Integration</strong>: Extract the ZIP into your SelfProjects folder (outside your app folder) and rename it to ws2812-esp32-rmt-driver.</li></ol><pre>unzip driver.zip<br>mv ws2812-esp32-rmt-driver-main ws2812-esp32-rmt-driver<br>rm driver.zip</pre><p>3.<strong> Cargo Configuration</strong>: In your my-esp-app/Cargo.toml, link the driver as a <strong>Path Dependency</strong> and enable the necessary feature flag:</p><pre>ws2812-esp32-rmt-driver = { path = &quot;../ws2812-esp32-rmt-driver&quot;, features = [&quot;smart-leds-trait&quot;] }<br>smart-leds-trait = &quot;0.3.2&quot;</pre><h3>Phase 3: Hardware &amp; Timing Configuration</h3><p>Embedded systems require explicit hardware definitions. We updated two critical files to bridge the code to the simulation.</p><h4>sdkconfig.defaults (Timing)</h4><p>The WS2812 LED protocol is nanosecond-sensitive. We had to fix the CPU frequency so the RMT peripheral could calculate the correct pulse widths.</p><ul><li>Added CONFIG_ESP32C3_DEFAULT_CPU_FREQ_160=y.</li><li>Added CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ=160.</li></ul><h4>diagram.json (Virtual Wiring)</h4><p>Wokwi requires a specific visual part to render the light, and it must be wired to the correct pin.</p><ul><li><strong>Added Part</strong>: wokwi-neopixel.</li><li><strong>Wired Signal</strong>: Connected esp:8 to the NeoPixel DIN.</li><li><strong>Wired Power</strong>: Connected esp:5V and esp:GND.1 to the LED.</li></ul><h4>1. The “Parts” List (The Hardware)</h4><p>Think of the parts section as your shopping list for the project.</p><ul><li><strong>board-esp32-c3-devkitm-1</strong>: This is your main &quot;brain,&quot; the ESP32-C3 microcontroller.</li><li><strong>wokwi-neopixel</strong>: This is the external RGB LED. We have to add this manually because the little square labeled &quot;GPIO8&quot; on the board is just a drawing—it doesn&#39;t actually light up in the simulator.</li></ul><h4>2. The “Connections” (The Wiring)</h4><p>This section is like a “Connect the Dots” map. Each line represents a physical wire.</p><p><strong>The Serial Monitor (</strong><strong>TX and </strong><strong>RX)</strong>:</p><ul><li>These two lines connect the chip to your computer screen.</li><li>Without these, you wouldn’t see your println! messages like &quot;LED: BLUE&quot; in the terminal.</li></ul><p><strong>The Data Wire (</strong><strong>esp:8 to </strong><strong>rgb1:DIN)</strong>:</p><ul><li><strong>The “Yellow” wire</strong>: This is the most important connection.</li><li>It carries the 800kHz data signal from <strong>Pin 8</strong> of the ESP32 to the <strong>Data In (DIN)</strong> pin of the LED.</li><li><em>Tip</em>: If this is plugged into the wrong pin (like TX or RX), the LED will never blink.</li></ul><p><strong>The Power Wires (</strong><strong>5V and </strong><strong>GND)</strong>:</p><ul><li><strong>The “Red” wire (</strong><strong>5V)</strong>: This provides the &quot;juice&quot; (electricity) to the LED.</li><li><strong>The “Black” wire (</strong><strong>GND)</strong>: This completes the circuit (Ground). Just like a real battery, you need both plus and minus for it to work.</li></ul><h4>3. Attributes (top, left, attrs)</h4><ul><li><strong>top and </strong><strong>left</strong>: These are just coordinates. They tell Wokwi where to place the components on your screen so they don&#39;t overlap.</li><li><strong>v0</strong>: You might notice this in the wire settings; it’s just a internal Wokwi versioning tag for how the wire is drawn.</li></ul><h3>Phase 4: Implementation in main.rs</h3><p><strong>Complete Source Code:</strong> You can find the full, self-contained project — including the patched driver and the diagram.json for Wokwi—on GitHub here: 👉 <a href="https://github.com/sanjanastyles/esp32-c3-blinker"><strong>esp32-c3-blinker</strong></a></p><h4>1. The “Ingredients” (Imports)</h4><ul><li><strong>use anyhow::Result;</strong>: This is a simplified way to handle errors. If something goes wrong (like the hardware isn&#39;t responding), anyhow helps the program tell you why without a lot of messy code.</li><li><strong>use esp_idf_hal::...</strong>: This is the <strong>Hardware Abstraction Layer (HAL)</strong>. It provides &quot;Safe Rust&quot; wrappers so you can control pins and timers without writing dangerous low-level code.</li><li><strong>use ws2812_esp32_rmt_driver::...</strong>: This is the specific &quot;translator&quot; for your LED. It knows how to turn your color choices (like Red or Blue) into the electrical pulses the LED understands.</li><li><strong>use smart_leds_trait::SmartLedsWrite;</strong>: This is a &quot;trait&quot; (think of it as a set of skills). By importing this, you give your LED driver the &quot;skill&quot; to use the .write() command.</li></ul><h4>2. The Setup (Main Function)</h4><ul><li><strong>esp_idf_sys::link_patches();</strong>: A mandatory &quot;glue&quot; line. It ensures that internal software patches for the ESP32 are correctly linked to your code so everything runs smoothly.</li><li><strong>let peripherals = Peripherals::take().unwrap();</strong>: This &quot;grabs&quot; the hardware. It tells the chip: &quot;I am taking control of the pins and internal modules now.&quot; The unwrap() means &quot;if you can&#39;t grab them, just crash the program because we can&#39;t continue&quot;.</li><li><strong>Ws2812Esp32Rmt::new(...)</strong>: This initializes the LED. You are telling it to use <strong>GPIO 8</strong> (the physical pin the LED is on) and a special internal module called <strong>RMT</strong> (Remote Control) to send the signals.</li></ul><h4>3. The Infinite Loop</h4><ul><li><strong>loop { ... }</strong>: Microcontrollers never &quot;finish&quot; their work. They run in an infinite loop until you pull the power.</li><li><strong>led.write(...)</strong>: This sends the color to the LED.</li><li><strong>RGB8::new(255, 0, 0)</strong>: This creates the color <strong>Red</strong>. The numbers represent (Red, Green, Blue) from 0 to 255.</li><li><strong>.iter().cloned()</strong>: The driver expects a &quot;list&quot; of colors (in case you have a long strip of LEDs). This bit of code turns our single color into a format the driver can read.</li><li><strong>FreeRtos::delay_ms(1000);</strong>: This tells the program to &quot;sleep&quot; for 1000 milliseconds (1 second). It uses the <strong>FreeRTOS</strong> operating system to make sure the chip doesn&#39;t waste power while waiting.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F1158808864%3Fapp_id%3D122963&amp;dntp=1&amp;display_name=Vimeo&amp;url=https%3A%2F%2Fvimeo.com%2F1158808864&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F2112966228-7a049f6aec0a21f3982ea57222ee26033accfba3e07670a45a8b74d5471d550e-d_1280%3Fregion%3Dus&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="1256" frameborder="0" scrolling="no"><a href="https://medium.com/media/5342c11d94ef59501754c022bdabb755/href">https://medium.com/media/5342c11d94ef59501754c022bdabb755/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=867c0d166a81" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Breaking AES with Bits and Volts: A Guide to Side-Channel Attacks (Part A)]]></title>
            <link>https://sharplikekatana.medium.com/breaking-aes-with-bits-and-volts-a-guide-to-side-channel-attacks-part-a-d01445dc6f9c?source=rss-630a24f5b72d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d01445dc6f9c</guid>
            <category><![CDATA[hardware]]></category>
            <category><![CDATA[guides-and-tutorials]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Sanjana]]></dc:creator>
            <pubDate>Tue, 13 Jan 2026 18:23:00 GMT</pubDate>
            <atom:updated>2026-01-13T18:23:00.885Z</atom:updated>
            <content:encoded><![CDATA[<p>In digital security, we often think of “hacking” as finding a bug in the code. But what if the code is perfect, yet the <strong>hardware</strong> itself is snitching?</p><figure><img alt="Spearphone side channel attack" src="https://cdn-images-1.medium.com/max/1024/1*a-JqVk23b7NOp4M4n2_3xQ.png" /></figure><h3>1. What is “Leakage”?</h3><p>In digital electronics, leakage is information that “escapes” through physical channels rather than the intended data output. When a computer processes a 1 versus a 0, it’s not just a logical change; it’s a physical event.</p><p>Moving electrons create measurable side effects:</p><ul><li><strong>Power Consumption:</strong> Drawing current from the supply.</li><li><strong>EM Radiation:</strong> Emitting tiny radio waves.</li><li><strong>Heat:</strong> Dissipating thermal energy.</li></ul><h4>Why Real Devices Leak</h4><p>We model this leakage using two primary mathematical proxies:</p><p><strong>A. Hamming Weight (HW): The “How Many”</strong> Maintaining a 1 on a wire often requires different voltage than a 0. If an 8-bit bus is all ones (0b11111111), power consumption peaks. If it&#39;s all zeros, it hits a minimum.</p><ul><li><strong>Logic:</strong> Power ∝ number of set bits.</li></ul><p><strong>B. Hamming Distance (HD): The “How Much Change”</strong> In modern CMOS chips, power is mostly consumed when a bit <strong>flips</strong>.</p><ul><li><strong>Big Spike:</strong> Register changes from 0000 to 1111 (4 flips).</li><li><strong>No Spike:</strong> Register stays 1111 (0 flips).</li><li><strong>Formula:</strong> HD(V0​,V1​)=HW(V0​⊕V1​)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U8rPHVPuqlF45z_-upUoyQ.png" /></figure><h3>2. Building the Simulation: Python Logic</h3><p>To simulate an attack, we first need to create “leaky” data.</p><h4>Dive into the Code</h4><p>You can find the full implementation, including the simulated traces and correlation logic, in the <strong>complete Jupyter Notebook on my GitHub </strong><a href="https://github.com/sanjanastyles/Side-Channel-Attack/blob/main/simulated_sca_pA.ipynb"><strong>here</strong></a></p><h4><strong>The Hamming Weight Function</strong></h4><p>This function acts as our mathematical proxy for physical power spikes.</p><pre>def hamming_weight(x):<br>    return bin(x).count(&quot;1&quot;)</pre><p>If x = 58 (0b00111010), the function returns <strong>4</strong>. Physically, this means 4 bits are HIGH, more transistors are conducting, and more power is consumed.</p><h4>Generating Plaintexts</h4><p>We use NumPy to generate random inputs (plaintexts) that we would “send” to the chip.</p><pre>import numpy as np<br>plaintexts = np.random.randint(0, 256, size=5, dtype=np.uint8)</pre><ul><li><strong>Why </strong><strong>uint8?</strong> AES operates on bytes (0–255).</li><li><strong>Why random?</strong> We need varied data to see how the power spikes change in response to different inputs.</li></ul><h4>The Target: The Secret Key</h4><pre>SECRET_KEY = 0x3A # Decimal 58</pre><p>In this project, we start with <strong>one byte</strong>. While AES uses 16 bytes, SCA is a “divide and conquer” attack. We crack one byte, then move to the next. <strong>Crucially: The attacker knows the plaintext, but NOT this key.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*xox3JDOcnVjK1TXktsVF5w.png" /></figure><h3>The Point of Attack: The AES S-Box</h3><p>Why does the leakage depend on the combination of our Input and the Secret Key?</p><p>In the first round of AES, the very first operation is an <strong>XOR</strong> between the Plaintext (PT) and the Secret Key. The result is then passed into the <strong>S-Box</strong> (a non-linear lookup table).</p><p><strong>The Logic:</strong></p><ol><li><strong>The Formula:</strong> Intermediate = SBox(PT ^ Key)</li><li><strong>The Leak:</strong> When the hardware calculates this, it moves the bits into a register.</li><li><strong>The Correlation:</strong> Because the PT is known and the Key is fixed, the Hamming Weight of the result changes predictably based on the PT. If you change one bit in the PT, the S-Box output changes drastically, creating a unique “power fingerprint.”</li></ol><h3>Recovering the Key with Statistics</h3><p>You might think noise would hide these tiny signals. It doesn’t, and here is why:</p><h4>Signal vs. Noise</h4><p>In a real chip, leakage is tiny compared to “noise” (thermal heat, other chip operations). But noise is <strong>random</strong>, while leakage is <strong>deterministic</strong>.</p><ul><li><strong>Averaging Out:</strong> If you take 1,000 measurements, the random noise fluctuates and eventually averages toward zero. The consistent signal (the key leakage) stays in place.</li></ul><p>If you look at a single power trace, it’s mostly <strong>noise</strong> (other chip functions, heat, interference). However, noise is random.</p><h4>The Correlation Winner</h4><p>By collecting thousands of traces, we use the <strong>Pearson Correlation Coefficient</strong> to find the truth:</p><ul><li><strong>The Hypothesis:</strong> We calculate the expected power for every possible key guess (0–255).</li><li><strong>The Winner:</strong> For wrong keys, your predictions won’t match the traces (Correlation ≈0). For the <strong>correct key</strong>, your guesses will synchronize perfectly with the actual power spikes (Correlation ≈1).</li></ul><p><strong>Why do wrong keys fail?</strong> Thanks to the S-Box’s non-linearity, even being off by one bit in your key guess results in a completely different, unrelated output. Over thousands of traces, these wrong guesses eventually average out to zero.</p><h3>Switching to Attacker Mode</h3><p>Now, we stop simulating and start attacking. To perform a <strong>Chosen-Plaintext Attack</strong>, you need two things:</p><h4>How to get the Plaintext</h4><p>The attacker often controls the input to the device:</p><ul><li><strong>Communication Protocols:</strong> Sending a “challenge” (random numbers) to a smart card.</li><li><strong>Disk Encryption:</strong> Writing specific files to an encrypted drive.</li><li><strong>The Set:</strong> The attacker sends ~1,000 random blocks and records the result for each.</li></ul><h4>How to get the Trace</h4><p>This is the physical “capture” phase:</p><ul><li><strong>Power Analysis:</strong> Placing a small <strong>shunt resistor</strong> in series with the chip’s power line. An oscilloscope measures the voltage drops as the chip works.</li><li><strong>EM Analysis:</strong> Placing a tiny <strong>copper coil (EM probe)</strong> on top of the chip. As electrons move, they create magnetic fields the probe picks up without even touching the wires.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d01445dc6f9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[City of Mystery — Chapter 1]]></title>
            <link>https://sharplikekatana.medium.com/city-of-mystery-chapter-1-aae66e863d05?source=rss-630a24f5b72d------2</link>
            <guid isPermaLink="false">https://medium.com/p/aae66e863d05</guid>
            <category><![CDATA[literature]]></category>
            <category><![CDATA[fiction]]></category>
            <category><![CDATA[storytelling]]></category>
            <category><![CDATA[thriller]]></category>
            <category><![CDATA[literatura]]></category>
            <dc:creator><![CDATA[Sanjana]]></dc:creator>
            <pubDate>Wed, 12 Jun 2024 15:19:31 GMT</pubDate>
            <atom:updated>2024-06-12T15:19:31.797Z</atom:updated>
            <content:encoded><![CDATA[<h3>City of Mystery — Chapter 1</h3><p>Ayesha stood at the entrance of the bustling Mumbai theater, her heart pounding with a mix of excitement and anxiety. This was her first solo outing, a small yet significant step towards independence. The colorful posters and vibrant lights of the theater made her feel like she was in another world.</p><p>Ayesha had recently moved to Mumbai, seeking a fresh start and new opportunities. She had spent the morning poring over maps and transit guides, her head spinning with confusion. After several wrong turns and hesitant inquiries to strangers, she finally boarded the right train, her heart racing with a mixture of fear and excitement. At each stop, she anxiously checked the station names, hoping she wouldn’t miss her destination. When she finally arrived at the station near the theater, a sense of relief washed over her.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Zh0xs929FO32bO8F.jpg" /></figure><p>Despite her relief, the confusion didn’t end there. She wandered through the crowded streets, the unfamiliar surroundings making her feel small and lost. Her nerves were on edge as she asked for directions multiple times, each person pointing her in slightly different directions. But she persevered, determined to make it to the theater.</p><p>Finally, she stood before the entrance, her hard-earned destination within reach. After purchasing her ticket, Ayesha wandered around, trying to find the theater showing the South Indian action movie she had eagerly awaited. Eventually, she found her way, only to realize the movie was dubbed in English instead of the original. Disappointed but undeterred, she decided to watch it anyway.</p><p>As the lights dimmed and the movie began, Ayesha was immediately captivated by the vibrant cinematography and intense action sequences. The film, a high-octane thriller, featured stunning chase scenes through the narrow streets of Chennai, expertly choreographed fight sequences, and a gripping storyline centered around a hero’s quest for justice. The hero, portrayed by a charismatic South Indian actor, exuded a magnetic presence that held the audience’s attention.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RtUbxoHNALxQQA2F" /></figure><p>The plot thickened as the protagonist uncovered a web of corruption and deceit, leading to breathtaking confrontations and edge-of-the-seat moments. Despite the language barrier, Ayesha found herself completely absorbed in the narrative, the English dubbing surprisingly well-done, though she still wished she could hear the original dialogues.</p><p>During the intermission, Ayesha took a moment to stretch and look around. That’s when she noticed the man sitting beside her. He had a neatly trimmed beard and a sharp jawline, exuding a quiet confidence. There was a youthful energy about him, his skin smooth and his eyes bright. He seemed in his early twenties, likely around the same age as Ayesha, and he was taller than her, even while sitting. As she glanced his way, he turned to her with a friendly smile, revealing a set of straight white teeth.</p><p>“Are you a fan of the actor?” he asked, his voice deep and engaging.</p><p>Ayesha welcomed the chance to chat, enjoying the distraction from the tension of the movie. “Yes, I am. What about you?”</p><p>He nodded, his eyes lighting up with enthusiasm. “Absolutely. He’s incredible, isn’t he? The way he handles those fight scenes…”</p><p>Their conversation flowed effortlessly, like two puzzle pieces clicking into place. They bounced between the movie and their favorite actors, their laughter echoing lightly around them. Raj, learning they lived near each other, grinned, “Maybe I can convince you to grab coffee sometime? My treat, for ruining your intermission with movie talk.” Ayesha felt a blush creep up her neck.</p><p>After the movie ended, Ayesha gathered her things, feeling a mix of exhilaration from the film and apprehension about the journey back home. She hesitated near the exit, the thought of navigating the confusing streets and transit system again filling her with dread.</p><p>Raj noticed her hesitation. “Everything okay?” he asked, concern in his eyes.</p><p>Ayesha sighed, the weight of her anxiety finally surfacing. “I’m still new to the city, and it was quite an ordeal getting here. I’m not looking forward to the trip back home.”</p><p>Raj nodded understandingly. “Mumbai can be overwhelming, especially at first. If you don’t mind, I can walk you to the nearest railway station. I’m heading that way myself.”</p><p>Relief washed over Ayesha. “I’d appreciate that. Thank you.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L4qHC34sIivEkY0z" /></figure><p>They exited the theater together, the night air cool against their skin. The bustling city seemed a little less intimidating with Raj by her side. As they walked, Raj began humming a cheerful tune, catching Ayesha’s attention.</p><p>“That song… where’s it from?” she asked, curiosity piqued.</p><p>Raj shrugged, a thoughtful expression crossing his face. “I can’t remember exactly, but I think it’s from a novel I read recently.”</p><p>Ayesha’s eyes lit up. “I love novels, especially detective ones. I wish I could buy more, but they’re so expensive.”</p><p>Their conversation flowed effortlessly as they shared their love for books. Suddenly, they noticed a group of children playing badminton near the railway track. The kids were impressively skilled, the shuttlecock soaring high before being expertly returned.</p><p>Ayesha’s mind drifted to her own childhood, filled with similar carefree games. But their peaceful walk took a dark turn when the shuttlecock flew across the railway track. One of the children, eyes fixed on the sky, darted after it, unaware of the approaching train.</p><p>Ayesha screamed as the train’s headlights illuminated the scene, but it was too late. The train sped past, the child nowhere to be seen. She stood frozen in horror, Raj’s grip on her arm the only thing keeping her grounded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*GjuhYAUxlr5wjNfx" /></figure><p>“We need to report this,” she gasped, her voice trembling. Raj nodded, and they rushed back to the theater, where the nearest police station was located.</p><p>Panting and out of breath, Ayesha narrated the incident to the police, but they struggled to understand her frantic words. Raj placed a reassuring hand on her shoulder and calmly explained what had happened. Ayesha felt darkness closing in, and she collapsed.</p><p>When she regained consciousness, she found herself seated in the police station, with Raj and an officer standing over her. Raj offered her a bottle of water. “You fainted,” he said softly.</p><p>Ayesha nodded, taking a sip of the water. She glanced at the officer, who looked concerned but not overly alarmed. “Thank you,” she murmured, her voice shaky.</p><p>Disoriented and confused, she felt a pang of anger as the officer spoke. “This wouldn’t have happened if you hadn’t panicked,” he said with a sigh.</p><p>The officer shrugged, his gaze lingering on Ayesha. Feeling a strange mix of fear and defiance, she blurted out, “Can I have your cell number, sir? In case something like this happens again?” Before Raj could react, the officer rattled off a string of digits, a hint of amusement in his eyes.</p><p>Taking the number, Ayesha felt a flicker of unease at his reaction. Despite Raj’s obvious discomfort, she tucked the number away, unsure of why but determined to follow her instincts.</p><p>Raj gave her a small smile. “I think we should head home now. It’s been a long night.”</p><p>Ayesha agreed, though a lingering unease gnawed at her. As they walked back towards the station, she couldn’t shake the feeling that something was off. Raj seemed unfazed by the tragedy they had witnessed, his calmness almost eerie.</p><p>At the station, they paused to say their goodbyes. Raj smiled. “It was nice meeting you, Ayesha. Take care.”</p><p>“You too, Raj. Thanks for your help tonight,” she replied, trying to mask her growing suspicion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iujqVaxK790fTUjh" /></figure><p>Ayesha watched Raj disappear into the crowd before she boarded her train. As she sat alone, her mind raced with doubts. She took out her phone and saved the officer’s number, deciding she needed to keep a close eye on the situation.</p><p>On her way home, a notification on her phone caught her attention. It was a Snapchat message from an unknown sender. Hesitantly, she opened it. The video began innocuously, a children’s song playing in the background. But as it continued, the footage took a darker turn.</p><p>The video showed a railway track, eerily similar to the one near the theater. Children were playing badminton, their laughter echoing faintly. Ayesha’s heart pounded as she recognized the scene: the shuttlecock flew across the track, just like it had earlier that evening. One of the children, eyes fixed on the sky, darted after it.</p><p>Ayesha’s breath caught in her throat. The video continued, capturing the exact moment the train’s headlights illuminated the track. The child, oblivious to the danger, kept running. The screen went black just before the train would have hit the child, leaving the outcome to the viewer’s imagination.</p><p>But the most chilling part was the audio. The same tune that Raj had hummed earlier played hauntingly in the background, a sinister undertone to the seemingly innocent scene. A cold sweat broke out on Ayesha’s forehead as realization dawned. Raj was somehow involved.</p><p>As the train rumbled through the night, Ayesha couldn’t shake the unsettling feeling gnawing at her. Her fingers trembled as she replayed the video, the haunting melody echoing in her mind. The scene was too similar, too precise. The child’s fate mirrored what she had witnessed, and the tune linked Raj to the incident in a way that was impossible to ignore.</p><p>She glanced around the dimly lit train compartment, her thoughts racing. How could Raj be involved? And why?</p><p>Before she could piece together the puzzle, her phone buzzed again. Another message from the unknown sender. This time, it was a single line of text:</p><p>“Meet me at the same theater tomorrow night. Come alone.”</p><p>Her heart pounded. She knew she had to go, but the danger was palpable. Clutching her phone, she took a deep breath and steeled herself for what lay ahead.</p><p>To be continued…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*hQj6hNMO5fPFMdG9" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aae66e863d05" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Network Intrusion Detection System (NIDS) on Ubuntu Server]]></title>
            <link>https://sharplikekatana.medium.com/building-a-network-intrusion-detection-system-nids-on-ubuntu-server-35f3ee5456db?source=rss-630a24f5b72d------2</link>
            <guid isPermaLink="false">https://medium.com/p/35f3ee5456db</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[communication]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Sanjana]]></dc:creator>
            <pubDate>Sat, 20 Jan 2024 11:10:17 GMT</pubDate>
            <atom:updated>2024-07-26T07:24:16.851Z</atom:updated>
            <content:encoded><![CDATA[<h4>This blog post will guide you through the exciting journey of setting up a Network Intrusion Detection System (NIDS) on an Ubuntu Server.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/0*l4VWL3Ag5jAcZ8u-.jpg" /><figcaption><a href="https://www.sciencedirect.com/topics/computer-science/network-based-intrusion-detection-system">https://www.sciencedirect.com/topics/computer-science/network-based-intrusion-detection-system</a></figcaption></figure><h3>Prerequisites</h3><p>Before we embark on this adventure, let’s ensure your environment is primed for action:</p><ul><li><strong>Operating System</strong>: Ubuntu Server 22.04.3 (modifications possible for earlier versions or other Debian-based distributions).</li><li><strong>Hardware</strong>: Your system should boast a minimum of 4GB RAM, 60GB hard drive space, and two Ethernet adapters.</li><li><strong>Software Updates</strong>: Keep your server in top shape by running sudo apt update and sudo apt upgrade to ensure all packages are up to date.</li></ul><h4>Setting Up Ubuntu Server on VirtualBox</h4><ol><li><strong>Installation</strong>: Begin by installing Ubuntu Server 22.04.3 on your Virtual Machine using Oracle VM VirtualBox. Ensure you configure two network adapters (Adapter 1 and Adapter 2) as shown in the setup.</li><li><strong>Network Configuration</strong>: Enable both network adapters in your Virtual Machine settings. Connect Adapter 1 to the internet and Adapter 2 for sniffing purposes.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*5v42oFDXe0VGe3aCF4bRjw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*4bth8np_yr2RbIe7W7FrlA.png" /></figure><h4>SSH Connection with Putty</h4><ol><li><strong>Connect via SSH</strong>: Use Putty to connect to your Ubuntu Server using its IPv4 address, Ubuntu server ID, and password.</li></ol><p>2. <strong>Update Packages</strong>: Always start your session with sudo apt update to ensure your packages are up-to-date.</p><p>3. <strong>Check Network Interfaces</strong>: Run ip addr to identify the names of your network interfaces. Note the name of your management interface (e.g., enp0s3).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*BS469xrwst8qkcAfYZC3dQ.png" /></figure><h3>Configuring Promisc Network Interfaces</h3><p>Promiscuous mode, often colloquially referred to as ‘promisc mode,’ denotes a specialized configuration for network interfaces. In this mode, a network interface card (NIC) is empowered to <strong><em>capture and inspect</em> <em>all network traffic</em></strong> passing through a specific network segment. Unlike normal operation, where the NIC filters incoming packets based on their destination MAC addresses, promiscuous mode disregards such filtering. Instead, it allows the NIC to process all packets it encounters. This capability is particularly valuable for network monitoring and analysis tools, facilitating the thorough examination of network activities without limitation to packets addressed specifically to the monitoring device.</p><p>1.<strong>Install Network Manager</strong>: Install the necessary network manager with sudo apt install -y ifupdown.</p><p>2. <strong>Create Configuration File</strong>: Create a configuration file with sudo nano /etc/network/interfaces. Add the following content in the file:</p><pre># Loopback Interface<br>auto lo<br>iface lo inet loopback<br><br># Management interface<br>allow-hotplug enp0s3<br>iface enp0s3 inet dhcp<br><br># Sniffing interface<br>allow-hotplug enp0s8<br>iface enp0s8 inet manual<br>up ifconfig enp0s8 promisc up<br>down ifconfig enp0s8 promisc down</pre><p>The loopback interface (lo), which is a virtual network interface used for communication within the local system. The auto lo line ensures that the loopback interface is automatically brought up during system boot. iface lo inet loopback specifies that the loopback interface should use the loopback address (127.0.0.1).</p><p>The management interface (enp0s3).</p><ul><li>allow-hotplug enp0s3: This line allows the system to hotplug the enp0s3 interface, meaning it will activate when a cable is plugged in.</li><li>iface enp0s3 inet dhcp: This line specifies that the interface should obtain its IP address dynamically using DHCP. The system will automatically configure the IP address, subnet mask, gateway, and DNS servers.</li></ul><p>The sniffing interface (enp0s8).</p><ul><li>allow-hotplug enp0s8: Similar to the management interface, this line allows the system to hotplug the enp0s8 interface.</li><li>iface enp0s8 inet manual: Specifies that the interface configuration should be done manually. This is common for interfaces used in promiscuous mode.</li><li>up ifconfig enp0s8 promisc up: This line, executed when the interface is brought up, sets the interface (enp0s8) to promiscuous mode, allowing it to capture all network traffic, including traffic not destined for the host.</li><li>down ifconfig enp0s8 promisc down: This line, executed when the interface is brought down, turns off promiscuous mode.</li></ul><p>3. <strong>Save and Exit</strong> and then run the following commands:</p><p>sudo service systemd-networkd stop</p><p>This command stops the systemd-networkd service. systemd-networkd is a system service that manages network configurations. By stopping it, you gain control over the network configuration manually.</p><p>sudo apt remove netplan -y</p><p>This command removes netplan, which is a utility for configuring networking on Linux systems. In this case, it is being removed, likely because the user prefers to use traditional interfaces configuration.</p><p>sudo apt install -y net-tools</p><p>This command installs net-tools, a package that includes essential networking commands such as ifconfig. Installing net-tools ensures that these commands are available for use.</p><p>ifconfig</p><p>This command displays information about network interfaces. Running ifconfig provides details such as IP addresses, MAC addresses, and other network-related information.</p><p>sudo reboot</p><p>This command initiates a system reboot. After making changes to network configurations or installing/removing network-related tools, a reboot is often necessary to apply these changes effectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/274/1*UBi-BQIdxdEeI9OPBUafFA.png" /></figure><p>Click on “ok” and After the server restarts, Login again both on VM and on Putty, run ip addr to confirm the status of the network interfaces. Specifically, checking if the interfaces are active with &quot;UP&quot; status and ensuring that the server is in PROMISC mode.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7yjvGA8dhjewUnPp7F3TuQ.png" /></figure><p>The -y option in the commands with apt ensures that the removal or installation is done without prompting for confirmation, making it suitable for automation or scripts.</p><p><em>!SAVE A VM SNAPSHOT!</em></p><h3>Installing Suricata</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1lGIyYyQ8wWAV6JF.png" /></figure><ol><li>sudo apt install software-properties-common This command installs the essential package “software-properties-common”, which provides an abstraction for managing the software package sources.</li><li>sudo add-apt-repository ppa:oisf/suricata-stable.This command adds the Suricata stable repository to your system. This repository contains the latest stable version of Suricata.</li><li>sudo apt update</li><li>sudo apt install -y suricata This command installs Suricata on your system. The -y flag is used to automatically confirm and accept any prompts during the installation process.</li><li>sudo suricata-update After the installation, it’s essential to update Suricata’s rules to ensure it has the latest threat intelligence. Running this command fetches the newest set of rules.</li></ol><h4>Configuring Suricata</h4><p>In the realm of network security, a finely tuned Intrusion Detection System (IDS) is your first line of defense against potential threats. In this section, we will delve into the essential steps to configure Suricata — a powerful IDS — to suit your specific environment.</p><p>Open the configuration file with the following command:<br>sudo nano /etc/suricata/suricata.yaml</p><ol><li><strong>Update Sniffing Interface</strong>: Replace the default sniffing interface (eth0) with your specific interface. For instance, if your sniffing interface is enp0s8, replace all instances of eth0 with enp0s8.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*g8LtIkA7TPeDhrncZ7anYw.png" /></figure><p><strong>2. Define Home Network</strong>: Identify your network and designate it as the home network in the configuration. Locate the HOME_NET section and add the IP address of your current device or the network you plan to use in the future. If unsure about the netmask, use the first three entries of your IP address followed by 0 and /24 (or your subnet bit mask).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*1RzColBo5CUGaiLPbEu7Rw.png" /></figure><p><strong>3. Disable Checksum Validation</strong>: Find the checksum-validation parameter and set it from yes to no. This step is crucial, especially if you&#39;re utilizing packet captures or other methods for TCP traffic replay. Disabling checksum validation prevents potential packet drops caused by checksum issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*GNOF9-yPHViE-5zlrbYqOg.png" /></figure><p>Once you’ve made these adjustments, save the changes to the configuration file. <br>Congratulations! You’ve tailored Suricata to better suit your network environment. These initial tweaks pave the way for more advanced configurations as we progress in securing your network.</p><h4>Creating Suricata Service for Seamless Management</h4><p>To simplify the management of Suricata and eliminate the need for repetitive command-line entries, we’ll set up a service file. This file, when activated, allows you to start and stop Suricata with straightforward service commands. Let’s walk through the process:</p><ol><li><strong>Open the Service File:</strong> Use the following command to create and open the Suricata service file <br>sudo nano /lib/systemd/system/suricata service</li><li>Inside the newly opened file, copy and paste the following configuration:</li></ol><pre>[Unit]<br>Description=Suricata Intrusion Detection Service<br>After=syslog.target network-online.target<br><br>[Service]<br># Environment file to pick up $OPTIONS. On Fedora/EL this would be<br># /etc/sysconfig/suricata, or on Debian/Ubuntu, /etc/default/suricata.<br># EnvironmentFile=-/etc/sysconfig/suricata<br># EnvironmentFile=-/etc/default/suricata<br>ExecStartPre=/bin/rm -f /var/run/suricata.pid<br>ExecStart=/usr/bin/suricata -c /etc/suricata/suricata.yaml --pidfile /var/run/suricata.pid --af-packet<br>ExecReload=/bin/kill -USR2 $MAINPID<br><br>[Install]<br>WantedBy=multi-user.target</pre><p><strong><em>Unit section</em></strong> provides metadata about the service.</p><ul><li>Description gives a human-readable description of the service.</li><li>After specifies that the service should start after syslog.target and network-online.target. This ensures that necessary services are up and running before Suricata starts.</li></ul><p><strong><em>Service section</em></strong> configures how the service should run.</p><ul><li>The commented lines starting with # provide information about the potential use of environment files on different Linux distributions. In this example, they are disabled (# EnvironmentFile=-/etc/sysconfig/suricata and # EnvironmentFile=-/etc/default/suricata).</li><li>ExecStartPre is a command that is executed before the main ExecStart command. In this case, it removes the existing PID file (/var/run/suricata.pid) to ensure a clean start.</li><li>ExecStart is the main command to start Suricata. It specifies the configuration file (/etc/suricata/suricata.yaml), the PID file (/var/run/suricata.pid), and the --af-packet option, enabling Suricata to use the AF_PACKET capture method. AF_PACKET is a socket type that provides a high-performance packet capture mechanism. In the context of Suricata, it enhances the efficiency of capturing network packets for intrusion detection purposes.</li><li>ExecReload defines the command to reload Suricata configuration when requested. It sends the USR2 signal to the main process ($MAINPID).</li></ul><p><strong><em>Install section</em></strong> defines when the service should be activated during the boot process.</p><ul><li>WantedBy=multi-user.target indicates that the service is wanted by the multi-user target, which is a common target for user sessions in a multi-user system.</li></ul><h3>Installing Zeek</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/0*-tk6y0mMFRGrM1h2.png" /></figure><p>Now, let’s proceed with the installation of Zeek, a powerful network monitoring tool that excels in providing detailed metadata about the traffic under scrutiny. Zeek is known for generating various logs containing information ranging from connection records to specifics about the application layer. Additionally, Zeek is highly customizable, allowing for the creation of scripts that perform specialized detections, preprocessing, or the development of entirely new protocol analyzers.</p><p>Follow these commands to install Zeek:</p><ol><li><strong>Check Git Installation</strong>: Before proceeding, ensure that Git is installed on your system. If not, you can install it using the following command (skip if already installed):<br>sudo apt install git -y</li><li><strong>Install Dependencies</strong>: Install the necessary dependencies for Zeek<br>sudo apt install -y cmake make gcc g++ flex bison libpcap-dev libssl-dev python3-dev swig zlib1g-dev</li><li><strong>Clone Zeek Repository</strong>: Clone the Zeek repository using the following command<br>sudo git clone --recursive <a href="https://github.com/zeek/zeek">https://github.com/zeek/zeek</a></li><li><strong>Navigate to Zeek Directory</strong>: Move to the Zeek directory<br>cd zeek</li><li><strong>Configure Zeek</strong>: Run the configure script<br>sudo ./configure</li><li><strong>Build Zeek</strong>: Start the build process, This step may take some time; unleash the magic and let Zeek weave its powerful network monitoring spells<br>sudo make</li><li><strong>Install Zeek</strong>: Complete the installationsudo make install</li><li><strong>Add Zeek to PATH</strong>: To ensure Zeek is accessible system-wide, add its binary path to the sudoers file. Open the sudoers file<br>sudo visudo <br>and then enter :/usr/local/zeek/bin in the file like in the image below</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zIDpSh19jRh2327-Bn5v1g.png" /></figure><p>save that, next we are gonna do is modify the configurations</p><h4>Configuring Zeek</h4><ol><li><strong>Network Configuration</strong>: Zeek’s network configuration involves specifying the IP ranges it will monitor. The default setup covers most private IP ranges. To customize this, edit the networks.cfg file<br> sudo nano /usr/local/zeek/etc/networks.cfg</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N880GsyfnduP-YZRJ1xN-A.png" /></figure><p><strong>2. Node Configuration</strong>: Modify the node.cfg file to set up the Zeek node. While most default values can be retained, change the interface name to match your sniffing interface (e.g., enp0s8)<br> sudo nano /usr/local/zeek/etc/node.cfg<br>Note that this file allows the configuration of a cluster of Zeek nodes to work together if needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kAn9WVer-ifYQzX5ZX_Fvg.png" /></figure><p>3. <strong>Configure zeekctl</strong>: Edit the zeekctl.cfg file to configure zeekctl, which manages login, controls clusters, etc<br> sudo nano /usr/local/zeek/etc/zeekctl.cfg<br>Make the following changes in the configuration file:</p><ul><li>Set all mail settings to 0, as we won’t be utilizing these features.</li><li>Adjust log rotation values. For example, set LogExpireInterval to 48hrs.</li><li>Set Stats log Interval to a small value like 1 or 2 days.</li><li>Set the log path for Zeek to /var/log/zeek/logs.</li></ul><p>Save the changes to the configuration file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*jWAqPm2xWkU7OXUXF6Nb4Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*WFkAFGopr1E0YcpaW5ulHw.png" /></figure><h4>Change Output to JSON:</h4><ol><li>Open the local.zeek file for editing<br>sudo nano /usr/local/zeek/share/zeek/site/local.zeek</li><li>Add the following lines to the file</li></ol><pre># Output to JSON<br>@load policy/tuning/json-logs.zeek</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1qzuuoADOl0TlF34x1sE5Q.png" /></figure><p>3. Save and exit the file</p><h4>Create ZeekCtl Cron Job</h4><ol><li>Open the crontab file for editing:<br>crontab -e<br> The crontab -e command opens the crontab file for the current user in the default text editor. Crontab is a time-based job scheduler in Unix-like operating systems.</li><li>Add the following line to the bottom of the file<br> */5 * * * * /usr/local/zeek/bin/zeekctl cron<br>This cron job is scheduled to run every 5 minutes (*/5 * * * *). The command /usr/local/zeek/bin/zeekctl cron is executed at the specified interval. It triggers ZeekCtl&#39;s cron job, which performs routine maintenance tasks for Zeek, such as log rotation</li><li>Save and exit the crontab file</li><li>As we are gonna be loging into a file directory (zeekctl) that doesn&#39;t exists yet, so we are gonna create the file as:<br>cd /var/log<br>sudo mkdir zeek<br>sudo mkdir zeek/logs</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*JHe1uT9PgTJi1LpssLu8oA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mYEAViy2YnDxL0jLSfLCQA.png" /></figure><h3>Installing Filebeat</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*IigdwhZ9xgaRtcc5.png" /></figure><p>The best way to install Elastic software is to add their repository to your server. This way you<br>can install any component you wish, even those you might not have originally planned. make sure to run the following in the root directory and not in the zeek directory</p><ol><li><strong>Download</strong> the Elastic signing key to ensure software integrity:</li></ol><pre>wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -</pre><p>This command fetches the Elastic signing key securely. The key is used to verify the authenticity of the Elastic software packages.</p><p>2. <strong>Install</strong>: The apt-transport-https package allows APT (Advanced Package Tool) to fetch packages over HTTPS. This step ensures secure communication when fetching Elastic software packages.<br> sudo apt-get install apt-transport-https</p><p>3. <strong>Add the Elastic repository to your system</strong>: This command adds the Elastic repository to the list of package sources on your system. It specifies the URL and repository details for fetching Elastic packages.<br> echo “deb <a href="https://artifacts.elastic.co/packages/7.x/apt">https://artifacts.elastic.co/packages/7.x/apt</a> stable main” | sudo tee /etc/apt/sources.list.d/elastic-7.x.list</p><p>4. <strong>Update the package list:</strong> This command refreshes the package information from the added repositories. It ensures that your system is aware of the available Elastic software packages.<br>sudo apt update</p><p>5. <strong>Install Filebeat:</strong> This command installs Filebeat, a lightweight shipper for forwarding and centralizing log data. Filebeat is part of the Elastic Stack and is used for sending log data to Elasticsearch or Logstash.<br>sudo apt install filebeat</p><p>6. <strong>Filebeat configuration: </strong>This command opens the Filebeat configuration file in the nano text editor. The configuration file is where you specify settings for Filebeat.<br>sudo nano /etc/filbeat/filebeat.yaml</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*J74kmVERoEb8oF45YTHHdg.png" /></figure><p>7. <strong>Enable Zeek and Suricata modules: </strong>Enable Zeek and Suricata modules<br>sudo filebeat modules enable zeek suricata</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*ZwFXFJii0CAoYbWyyvGqpg.png" /></figure><p>8. <strong>Zeek module configuration: <br></strong>sudo nano /etc/filebeat/modules.d/zeek.yml here at the bottom type this:<br>var.paths: [/var/log/zeek/logs/current/*.log]and save<br>This line specifies the paths to Zeek logs that Filebeat should collect. It ensures Filebeat captures the Zeek log data from the specified directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*TDf_5abAM0QFbf4J2McC_g.png" /></figure><p>9. <strong>Set up Filebeat</strong>: This command performs the initial setup for Filebeat. It loads the index template into Elasticsearch and deploys the Filebeat dashboards for visualization.<br> sudo filebeat setup -e</p><h3>Turn it all on and check if it is running</h3><ol><li><strong>Start Suricata service: </strong>This command initiates the Suricata intrusion detection system, starting the service to actively monitor and analyze network traffic for potential security threats.<br>sudo service suricata start<br>sudo zeekctl deploy (if you havent change config next time you can using sudo zeekctl start)</li><li><strong>Deploy Zeek: </strong>The zeekctl deploy command is used to deploy the Zeek network monitoring tool. It configures and activates Zeek based on the specified settings in its configuration files. If you haven&#39;t made changes to the configuration the next time you use it, you can also start Zeek directly using sudo zeekctl start.</li><li><strong>Start Filebeat service: </strong>This command starts the Filebeat service, enabling it to forward log data, including Zeek and Suricata logs, to the specified destination, which is typically Elasticsearch or Logstash in the Elastic Stack.<br>sudo service filebeat start</li><li><strong>Check Suricata service status: </strong>This command checks the status of the Suricata service, providing information on whether it is running, stopped, or encountering any issues.<br>sudo service suricata status</li><li><strong>Check Zeek status:</strong> The sudo zeekctl status command displays the current status of Zeek, showing if it is running and the overall health of the Zeek network monitoring tool.</li><li><strong>Check Filebeat service status</strong>: This command checks the status of the Filebeat service, indicating whether it is running or if there are any problems. If Filebeat is not running, common issues may include syntax errors or misconfigurations in the YAML file.<br>sudo service filebeat status</li></ol><p>By executing these commands, you ensure that Suricata, Zeek, and Filebeat are started and operating as intended, providing a comprehensive network intrusion detection and monitoring system. Monitoring the status allows you to promptly address any issues that may arise during the operation of these components.</p><p>Send some logs to Elasticsearch:<br>One very useful tool to test an IDS is tcp replay. It allows you to pass a recorded packet capture<br>through your sniffing interface. Let’s use one of the provided pcaps to test it out. You should be<br>see a lot of packet traffic whizz across your screen. When it is done go to Kibana and enjoy<br>exploring the data. I recommend the SIEM application as a good starting point.</p><p>sudo apt install tcpreplay -y<br>wget <a href="https://s3.amazonaws.com/tcpreplay-pcap-files/bigFlows.pcap">https://s3.amazonaws.com/tcpreplay-pcap-files/bigFlows.pcap</a><br>sudo tcpreplay -t -v -i enp0s8 bigFlows.pcap(my sniffer is enp0s8, replace with your interface name)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4_aJ8Yb9FYY4ZZes6K4VEg.png" /></figure><h3>Conclusion</h3><p>This NIDS setup combines the strengths of Suricata, Zeek, and Filebeat to provide a robust network intrusion detection capability. Suricata’s real-time signature-based detection and Zeek’s detailed traffic analysis complement each other, while Filebeat ensures that logs are centralized and available for comprehensive analysis and visualization. This multi-layered approach enhances the ability to detect and respond to a wide range of network intrusions.</p><p>Stay tuned for the next steps in our NIDS project! If you have any questions or suggestions, feel free to leave a comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35f3ee5456db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Familiar Echoes]]></title>
            <link>https://sharplikekatana.medium.com/familiar-echoes-3eb069a4e01d?source=rss-630a24f5b72d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3eb069a4e01d</guid>
            <category><![CDATA[fiction]]></category>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[horror]]></category>
            <category><![CDATA[thriller]]></category>
            <category><![CDATA[storytelling]]></category>
            <dc:creator><![CDATA[Sanjana]]></dc:creator>
            <pubDate>Thu, 09 Nov 2023 15:34:50 GMT</pubDate>
            <atom:updated>2023-11-09T15:34:50.477Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EfPXyWcPXKQz-kqm" /><figcaption>Image by Irina Iriser</figcaption></figure><p>In a remote corner of the city, nestled amidst a dense thicket of trees, stood a grand and enigmatic mansion that had long been a source of fascination for Sabrina. At 21 years old, she was a voracious reader, particularly drawn to crime fiction thriller novels. Her obsession with mysteries and the allure of the unknown were what brought her family to this place on Thanksgiving.</p><p>Accompanying her were her 41-year-old mother, Sophia, an independent and resilient woman, and her 17-year-old brother, Max, an inquisitive teenager with an insatiable appetite for adventure. They were here to celebrate the holiday with Sabrina’s newly-wed aunt and uncle, making the mansion their holiday destination.</p><p>The mansion itself was a testament to her uncle’s success, a self-made man who had amassed a fortune and built this grandiose estate independently. The parking lot, lined with the most luxurious cars, one for each family member, spoke volumes about their financial independence.</p><p>The mansion exuded an old-money aesthetic, with its towering, ivy-covered walls and antique wrought-iron gates that creaked ominously when opened. The smell of irony hung in the air, a stark contrast to their previous, normal visit. The mansion’s opulence was evident in the rich, dark wood paneling, intricate chandeliers, and antique furnishings that filled the hallways. The floors, now eerily silent, used to resonate with the echoes of laughter during the family’s previous visits.</p><p>Despite their usual practice of valet parking, there was an unusual absence of valets on this day, which added to the growing sense of unease. They decided to park their humble Honda City car alongside the opulent vehicles, not out of desire for self-reliance and equality, but due to the absence of valet service, further deepening the mystery surrounding their visit.</p><p>The anticipation of the day had been building for weeks. Sabrina had always been captivated by the mysterious atmosphere of her uncle’s mansion, and the prospect of spending the Thanksgiving holiday in this grand estate excited her beyond measure. What she found most intriguing was that her new aunt, a recent addition to the family, shared her passion for the same genre of novels, making each visit to this place a source of joy for Sabrina.</p><p>As the family arrived at the mansion’s doorstep, they noticed the absence of the servants. Instead, a woman with long, ebony hair and a figure reminiscent of a Hollywood model opened the door that was her aunt. Her attire, much like Sabrina’s usual preference, was entirely black, and she had an aura of sophistication that seemed almost otherworldly.</p><p>Concerned about the missing servants, Sophia inquired about their whereabouts, to which the aunt responded that they were all on leave. However, the reason that raised eyebrows and set off an unsettling tone was the mention of her family sleeping in the middle of the afternoon.</p><p>Sabrina’s mother exchanged incredulous glances with her children. “At 2 p.m.? The entire family?” she questioned, the disbelief evident in her voice.</p><p>The aunt, with an uncanny calmness, explained that her family had experienced a rough morning and was simply exhausted. She had only woken up because of the Sabrina’s family’s knocking on the door. Unconvinced but not wanting to intrude, Sabrina’s family decided to give the sleeping family some time to rest and engage in other activities.</p><p>As the hours passed, the aunt’s family remained asleep, prompting Sabrina’s family to grow increasingly concerned. It was during this time that the aunt, in an attempt to ease the tension, suggested they all watch a fun family movie for Thanksgiving. They agreed, and the movie provided a brief respite from the eerie atmosphere.</p><p>The movie concluded after 2.5 hours, but the aunt’s family still hadn’t awakened. This prolonged slumber only heightened the suspicions of Sabrina’s family, who decided it was time to check on the sleeping family.</p><p>However, their attempt to investigate was abruptly interrupted by the aunt. She exclaimed her hunger and suggested that they all go out to get some food. Sabrina, known for her laziness, and her mother, who wasn’t in the best health, stayed behind, while her brother, Max, and the aunt would venture to get some food for the family. Before they left, the aunt said something very unusual, a statement that struck Sabrina as eerily familiar.</p><p>The mansion, hidden away in a remote and desolate corner of the countryside, isolated the family from any form of civilization. The drive to the nearest market would take at least 20 minutes. An eerie silence hung in the air as Sabrina and her mother, Sophia, waited, their anxiety growing with each passing moment.</p><p>Seeking a brief respite from the tension that filled the mansion, Sabrina embarked on an exploration of its winding hallways and mysterious rooms. One particular room caught her attention, a recently added library. It was a personal haven for the aunt, a place for her to indulge in her eccentric literary tastes. The sweet aroma of the library, a stark contrast to the mansion’s overpowering irony smell, which was filled with the fragrance of aged leather-bound books.</p><p>Among the countless books that adorned the shelves, Sabrina’s eyes were drawn to one in particular. Its cover was worn, and its pages showed the marks of time, hinting at its uniqueness. The title alone sent shivers down her spine: “The Symphony of Slaughter.” This was no ordinary book; it detailed a gruesome family massacre, filled with blood-curdling descriptions and unhinged dialogues that seemed to echo the chilling words spoken by her aunt earlier.</p><p>As Sabrina read on, beads of sweat formed on her forehead, her hands trembling with a mixture of fear and disbelief. The horrifying truth slowly unfolded before her, and her heart raced.</p><p>Sabrina sprinted back to the room where she’d left Sophia. Sabrina gripped her mother’s hand tightly and together they rushed to check on the family. The dreadful sight that awaited them was far beyond their worst fears. Sophia’s real brother, mother, father, and niece lay lifeless in their supposed slumber.</p><p>Sophia’s eyes widened in shock and horror, and she staggered back, collapsing on the floor. Sabrina’s heart sank, realizing the weight of the situation and the danger they were in.</p><p>Now was not the time to panic. The aunt’s car, ominously parked in the garage, indicated that the danger was not over. It was a potential trap, signaling that the aunt was back home and potentially aware of their discovery.</p><p>With Sophia’s life hanging in the balance, Sabrina knew they had to act swiftly and silently. Their lives depended on their ability to outmaneuver the aunt and escape the looming nightmare that had befallen them. The mansion, once a place of mystery and allure, had transformed into a haunting prison, and they needed to navigate its treacherous corridors with utmost caution.</p><p>Sabrina acted quickly, gently but swiftly guiding her mother, Sophia, downstairs to the drawing room. With great care, she arranged her mother to appear as if she was asleep, masking the grim reality that now haunted them.</p><p>Just as Sabrina turned away, the air grew tense. A sharp voice pierced the eerie silence. She spun around to find her aunt standing there, wearing a broad and sinister smile. It was a smile that sent shivers down Sabrina’s spine. How could one smile so malevolently after committing such heinous acts — the murder of her husband, mother-in-law, father-in-law, and even a 7-year-old niece? Sabrina dared not let her feelings reflect on her face as she obeyed the aunt’s twisted desires. The aunt’s presence was a constant reminder of the lurking danger, and Sabrina knew they had to escape her grasp and reveal the truth behind the horror they had uncovered.</p><p>As they gathered in the kitchen, Sabrina kept a watchful eye on her brother, Max. The weight of the horrifying discovery pressed upon her, and she knew that her brother’s short temper could lead to unintended consequences. Sabrina devised a plan to keep her short-tempered brother, Max, from learning the full extent of their dire situation. She explained to Max that she wanted to test his skills and asked him to crack the Wi-Fi password stealthily, ensuring that the aunt remained completely unaware of their actions.</p><p>With Max on the task, Sabrina shifted her focus to keeping the aunt occupied with Thanksgiving cooking. This was their best chance to access the Wi-Fi without raising suspicion and to maintain a semblance of normalcy, despite the horrifying truth they had uncovered.</p><p>The tension in the kitchen was palpable as Sabrina and Max worked separately, each aware of the crucial role they played in securing their escape and exposing the aunt’s dark secrets. Sabrina’s determination to protect her family and seek help burned even brighter as they navigated the treacherous situation.</p><p>Sabrina skillfully kept the aunt distracted by suggesting that they cook the family dinner together. Throughout their time in the kitchen, she carefully avoided mentioning the “sleeping” family, maintaining an air of normalcy while her brother, Max, worked on cracking the Wi-Fi password.</p><p>As the minutes ticked by, Sabrina’s heart raced with every passing second. The tension in the room was palpable, and her concentration wavered when she heard a blood-curdling scream. “DIEEEEEEEEEEEEE,” a familiar voice echoed through the mansion.</p><p>Sabrina swiftly turned to see her mother, Sophia, attempting to attack the aunt. But the aunt, despite her elegant appearance, proved to be surprisingly strong. In a harrowing struggle, she overpowered Sophia and nearly slit her throat. With a surge of adrenaline, Sabrina leaped into action, pushing the aunt away from her mother. Together, they fled from the menacing presence.</p><p>As Sabrina glanced back at the aunt, she was struck by the stark transformation in her appearance. The once-beautiful bride from her wedding day had morphed into a nightmarish figure, a stark contrast to the angelic image she had presented back then. The horrifying reality of their situation grew clearer, and Sabrina knew that their battle for survival was far from over.</p><p>Amidst the labyrinthine corridors of the vast mansion, Sabrina knew she had to locate her brother, Max, before the aunt could catch up to them. The grandeur of the mansion now felt more like a trap, its opulence concealing the horrors that had unfolded within its walls.</p><p>With each step, Sabrina’s anxiety mounted, but her determination to protect her family burned brighter. She needed to find Max and access the Wi-Fi to call for help.</p><p>As she hurried through the mansion’s endless twists and turns, Sabrina couldn’t help but reflect on the strange turn of events. Her usually smart and composed mother, Sophia, had reacted in a way that Sabrina had never seen before. The shock of discovering the gruesome truth about her own family had shaken her to the core.</p><p>Sophia, as a mother who knew her children better than anyone, suggested a particular room where Max might be hiding. She understood her son’s habits and preferences, and this knowledge proved invaluable in the tense situation they found themselves in.</p><p>In the darkest depths of the mansion, Sabrina and her family finally located the storage room. This dimly lit spaces, a haven where he often focused on tasks requiring concentration. However, their hideout posed a double-edged sword, as the aunt could discover them at any moment.</p><p>As they huddled together, their voices barely more than hushed whispers, a heavy voice suddenly broke the silence, whispering, “yesss.” It was Max, who had successfully gained access to the Wi-Fi. Sabrina swiftly grabbed the phone from his hand, leaving him startled and bewildered by her actions.</p><p>With trembling fingers, Sabrina dialed 911, her heart pounding as the call rang through. The door to the storage room was flung open, and the aunt loomed in the doorway, brandishing a candle and a menacing knife. In the eerie candlelight, her eyes gleamed blood-red, and the room was filled with the palpable tension of imminent danger.</p><p>Sabrina, her mother, and her brother cowered, doing their best to remain hidden as the call had not yet been received by the operator. The aunt’s unsettling presence filled the room as she taunted, “Sabrina, be a good girl and come out. I know you’re right in this room. There’s no escape.”</p><p>Suddenly, a voice from the phone broke the silence, a lifeline that could spell their salvation. “HELLO?” the operator’s voice pierced through the room, loud enough to grab the aunt’s attention. She appeared right in front of Sabrina with her menacing crimson eyes and an unsettling, teethy smile.</p><p>The aunt’s head moved in a hypnotic, pendulum-like motion, amplifying her chilling aura. However, Sabrina’s determination and quick thinking spurred her to action. She swiftly slipped from beneath the aunt and made her escape, still engaged with the operator on the phone. It was no easy feat to talk to the operator and evade the menacing aunt. The eerie, unsettling tune hummed by the aunt only deepened the sense of dread in that harrowing moment.</p><p>As Sabrina desperately fled from the storage room, her heart pounded like a drum in her chest, and her steps faltered on the long, treacherous stairs. Just as she began to lose her balance, the aunt’s vice-like grip closed around her neck, squeezing the air from her lungs. The gleaming blade of the knife was drawn menacingly, poised to strike at any moment.</p><p>The world around Sabrina seemed to slow to a crawl, the grim reality of her situation pressing in from all sides. It was a dire moment, a precipice between life and death, as the aunt’s sinister smile bore down on her, and the glint of the knife reflected the chilling malevolence in her eyes.</p><p>But then, in a moment of stunning bravery and self-sacrifice, Max, her brother, intervened. He threw himself between Sabrina and the menacing aunt, his arms raised to shield his sister. The aunt’s knife descended, and it was Max who bore the brunt of the blade, his arm bearing the cruel cut.</p><p>In that instant, the world seemed to freeze, and the darkness lifted just enough to reveal the courage that burned brightly in Max’s eyes. His sacrifice marked a critical turning point in their harrowing ordeal, a moment of unshakable determination and love for his sister. It was a heroic act that would not be forgotten.</p><p>With a heroic effort, he pushed the aunt away, the knife sticking to his arm. The struggle was fierce, but the siblings managed to break free and escape the room, leaving the aunt behind, now disarmed.</p><p>As they fled, the blaring sound of approaching sirens pierced the eerie silence of the mansion. The police were on their way, closing in on the scene of the unimaginable horror that had unfolded within those walls.</p><p>As the sirens drew nearer, time seemed to stretch on endlessly, a relentless ordeal that had unfolded over the course of this fateful night. The police arrived to find Sophia, Sabrina’s mother, lying on the floor, her face contorted in pain from the severe injuries she had suffered. It was evident that her selfless bravery had played a pivotal role in their escape, but it had come at a significant cost.</p><p>In the midst of the chaos, the officers swiftly apprehended the aunt. Her expression was a mixture of malevolence and defeat, and it was clear that Sophia’s actions had prevented her from fleeing the scene. A tense standoff had played out, and Sophia’s determination had emerged victorious.</p><p>An ambulance arrived with a sense of urgency. Its paramedics descended upon Sophia, their practiced hands working meticulously to stabilize her. They recognized the extent of her injuries and the heroism that had defined her actions throughout this harrowing ordeal.</p><p>As the police took control of the scene, their stern expressions softened with understanding as they examined the chaos before them. It didn’t take them long to uncover the truth about the aunt. One of the officers, a seasoned detective named Detective Rodriguez, approached Sabrina and her family.</p><p>“We’ve identified her,” Detective Rodriguez said, his voice filled with both sympathy and concern. “Her real name is Izora. She escaped from a mental hospital several months ago. It appears she had been planning this for a while.”</p><p>Sabrina’s heart sank at the revelation. It added a layer of darkness to the already chilling events of the night. The realization that they had been living with a woman who had been declared mentally unstable and dangerous sent shivers down their spines.</p><p>“Izora,” Sabrina whispered the name, trying to comprehend the magnitude of the danger they had narrowly escaped. It was a name that would haunt their nightmares for years to come, a reminder of the sinister presence that had infiltrated their lives.</p><p>As the truth about Izora unfolded, the family was left grappling with the implications of her actions. The mental and emotional toll of the night’s events weighed heavily on their shoulders, and they knew it would take time to heal from the trauma they had endured. The police assured them that Izora would be returned to the mental institution where she belonged, but the scars she left behind would take much longer to fade away.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*EKa-T2lPxOCdFGDi" /><figcaption>Image by Anna Avilova</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3eb069a4e01d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tales from Afar]]></title>
            <link>https://sharplikekatana.medium.com/tales-from-afar-a4533089c5ae?source=rss-630a24f5b72d------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4533089c5ae</guid>
            <category><![CDATA[storytelling]]></category>
            <category><![CDATA[fiction]]></category>
            <category><![CDATA[creativity]]></category>
            <category><![CDATA[relationships]]></category>
            <category><![CDATA[writing]]></category>
            <dc:creator><![CDATA[Sanjana]]></dc:creator>
            <pubDate>Wed, 16 Aug 2023 09:35:18 GMT</pubDate>
            <atom:updated>2023-08-16T09:35:18.796Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*lErRpKWH3tn_unzl" /></figure><p>Valentina’s hands moved with the grace of a maestro, each brushstroke a dance of precision and artistry. Her touch was gentle yet commanding, a reflection of the deep expertise that had been honed over years of dedication. While the allure of prestigious salons beckoned with promises of glossy magazine spreads and celebrity clients, Valentina had chosen a different path.</p><p>Nestled within the walls of a modest, unassuming salon, Valentina had found a sanctuary for her craft. The glossy pages of Elle-News might boast the opulence of the elite establishments, but it was here, amidst the familiar hum of daily life, that Valentina’s heart thrived. The soft camaraderie with her fellow artists, the familiar faces of loyal clients, they were the threads that wove the fabric of her contentment.</p><p>The mirror before her reflected not just the faces of her clients, but also the reflection of a woman who had found her place. Each stroke of makeup was a testament to her dedication, a symphony of colors and textures that she orchestrated with the finesse of a seasoned conductor. And as she met the eyes of her clients in that mirror, there was a shared understanding — an unspoken agreement that she was not just an artist adorning their features, but a guardian of their confidence and beauty.</p><p>Riley, Valentina’s boss, was the driving force behind the salon’s success. She had built the salon from the ground up, a feat that filled her with immense pride. Riley was a strong, self-made woman who recognized Valentina’s talents and commitment. Their bond was palpable as they prepared to embark on a new endeavor together.</p><p>Riley’s presence exuded a commanding energy, a testament to the force of nature she was within the walls of the salon. Her journey from inception to success resonated in the very foundations of the establishment. Each piece of furniture, every mirror on the wall, they bore witness to her unwavering determination.</p><p>“Valentina, we need to leave this instant,” Riley burst into the salon, her voice a mix of urgency and excitement. Valentina, her suitcases already packed and ready, met Riley’s gaze with a mixture of anticipation and readiness. The unspoken understanding between them spoke volumes, a language of trust and shared aspirations.</p><p>Riley’s words, carrying the essence of their dynamic, came with a wry smile. “You never cease to amaze me,” she said, her voice blending admiration and camaraderie. She gestured towards the gray van that had just pulled up. “Let’s get going.”</p><p>With Riley’s words still echoing, a gray van pulled up, and Riley and Valentina disembarked in front of an imposing mansion. As their gazes swept over the imposing structure, Valentina couldn’t help but express her thoughts. “Boss, this is unlike any of our previous clients. Perhaps we should consider enlisting more makeup artists to assist,” she suggested, her voice a blend of respect and practicality.</p><p>Riley nodded thoughtfully. “You have a point,” she agreed, her eyes scanning the mansion’s entrance. “But I believe in your talent to handle this significant event.” She placed a reassuring hand on Valentina’s shoulder. “Believe in yourself.”</p><p>As Valentina opened the van’s trunk to retrieve the suitcases, the air seemed to shimmer with an anticipatory hush. A group of impeccably dressed gentlemen materialized before her, their presence a dance of elegance and fluidity. Their movements held a mesmerizing grace, a choreography perfected through countless rehearsals of experience. With a synchronized motion that seemed almost orchestrated by some unseen conductor, they effortlessly lifted and carried the suitcases into the mansion.</p><p>Riley and Valentina exchanged glances, their eyes reflecting a shared awe for the spectacle before them. The silence of the moment was punctuated by the hushed sound of footsteps on the pavement, their rhythm a testament to the years of practiced precision these men had honed.</p><p>With the suitcases now safely in their hands, Valentina took a deep breath, ready to step forward into this world of splendor. Crossing the threshold, she was enveloped in the opulence of the interior, a sensory embrace. Her eyes were greeted by a panorama of architectural marvels and intricate designs, each corner telling a story of wealth and taste. The décor seemed to pull her into a different era, one where royalty and extravagance were the norm.</p><p>Yet, amidst the awe, a knot of nervousness formed in Valentina’s stomach. The realization that she was here to lend her artistic touch to these esteemed wedding guests weighed on her. These were individuals who were well-acquainted with luxury, who carried an air of refinement that came naturally to them. The task at hand was not merely about makeup; it was about enhancing what was already exquisite, about seamlessly integrating her artistry with their inherent elegance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*KhbXoG6mNxsb5622" /></figure><p>Tension hummed in the air, prickling the fine hairs on Valentina’s skin. Her heart drummed an erratic rhythm, a syncopated beat of nerves and excitement that resonated through her every nerve. An invisible thread seemed to wind around her chest, tightening with each passing moment.</p><p>Then, a voice — an echo of warmth and welcome — swept through the room like a gentle breeze. “Welcome! Welcome.” The words unfurled like soft petals, carrying a soothing undercurrent that eased the knots of apprehension within her. Her gaze, which had been locked in a cautious hesitation, shifted toward the source.</p><p>Before her stood a figure that seemed to be carved from elegance itself. The man’s voice, steeped in familiarity and warmth, introduced him as the bride’s brother. His gesture encompassed his family, who stood in the kitchen — his elegant mother adorned in a vibrant saree, and a man who seemed to embody a legacy of strength. This portrayed a typical Indian family, steeped in tradition and grace, a tableau that resonated with the rich cultural heritage they carried.</p><p>In the days that followed, Valentina and Riley found themselves swept into a whirlwind of activity. The mansion seemed to breathe with anticipation, every corner humming with the promise of the celebration on the horizon. The very walls whispered stories of celebrations long past, and now, Valentina and Riley were poised to become a part of this rich tapestry.</p><p>Amidst the festivities and the preparations that followed, Valentina and Riley’s roles evolved from spectators to essential players in the grand event. Rooms within the mansion were assigned to them, a privilege that transformed them from observers into participants. Each room held a story, a history of laughter, joy, and memories. Now, their presence lent a new chapter to this ongoing tale</p><p>With each brushstroke, Valentina and Riley wove their magic upon the canvas of the wedding guests’ faces. Their hands moved in synchrony, each movement a dance that painted emotions and expressions. The air was heavy with the promise of the festivities, their work an integral part of the symphony that unfolded.</p><p>In a brief interlude, a mango milkshake arrived — a delightful respite in the midst of their creative fervor. Its cool sweetness danced on Valentina’s taste buds, a moment of sensory delight that offered a reprieve from the bustling activity. It was as if someone had intuitively understood her preference, a small but significant gesture that spoke of thoughtfulness.</p><p>But amidst this oasis of calm, Riley’s voice cut through like a lightning bolt. Suddenly, Valentina’s world was shattered by her mentor’s urgent words. The words struck her ears, resonating with an urgency that jolted her senses. “Valentina, there’s been a twist,” Riley said, her tone urgent, “the bride’s makeup artist is indisposed, and you’re expected to take over.”</p><p>Valentina’s stomach clenched, panic rippling through her veins like a wildfire. The weight of the situation settled heavily upon her, threatening to overwhelm her senses. But then, like a steady hand guiding her through a storm, Riley’s words worked their magic. With a reassuring smile, Riley placed a hand on Valentina’s shoulder and said, “This could be the breakthrough your career needs.”</p><p>In those few words, the chaos in Valentina’s mind began to coalesce into a glimmer of possibility. The tumultuous sea of panic started to ebb, replaced by the spark of determination. Riley’s faith in her abilities was a beacon, cutting through the fog of fear. It was a reminder that even in the face of unexpected challenges, there was always room for growth, for stepping into uncharted territories.</p><p>Valentina’s eyes met Riley’s, a silent acknowledgment passing between them. The weight of responsibility mingled with the promise of something greater. With a deep breath, Valentina nodded, a new resolve settling over her. This was a moment to embrace, an opportunity to prove not only to others but to herself that she was capable of more than she’d ever imagined.</p><p>Valentina’s steps carried her into a sanctuary of quietude, a room that stood in stark contrast to the vibrant energy of the bustling guest quarters. The atmosphere seemed to exhale a sense of solitude, as if the walls themselves whispered stories of serenity.</p><p>As her gaze swept across the room, Valentina’s eyes settled on an unassuming makeup box that sat atop a vanity. The box, weathered by time and adorned with faded floral patterns, held a kind of nostalgia that tugged at her heartstrings. It was a relic of days when laughter flowed like melodies, and camaraderie painted each moment in hues of joy.</p><p>With gentle fingers, Valentina traced the contours of the box, her touch a bridge between the past and the present. As the lid yielded to her touch, a symphony of scents erupted — hints of lavender, vanilla, and memories long forgotten mingled in the air. The fragrance was a time machine, whisking her away to moments that had become treasures in the treasury of her mind.</p><p>Within the box lay an Albero watch, its presence a whisper from the past. The watch, bathed in soft light filtering through a nearby window, seemed to shimmer with memories. Each glint from its polished surface was a page from the story they had woven together, a story that had once been her solace.</p><p>But beneath the watch’s elegant façade lay the shadow of a memory, one that Valentina had tried to bury beneath layers of time. As she looked upon the watch, memories emerged like figures from a mist, each carrying the weight of emotions she had thought she had left behind.</p><p>Overwhelmed by the tempest of emotions, her consciousness became a fragile vessel, unable to contain the surge within her heart. Darkness encroached at the edges of her vision, and then, like a wisp of smoke, her world dissolved into the embrace of unconsciousness.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/0*czKwPyRzjYx69mvo.jpeg" /></figure><p>In her younger days, Valentina’s heart had beat to the rhythm of dreams larger than life. She had spent hours tracing her fingers over the glossy pages of fashion magazines, her aspirations soaring as high as the sky. Her bedroom walls were a tapestry of couture gowns and runway shots, a testament to her unwavering desire to become a supermodel.</p><p>Every morning, as the sun’s first rays painted the world with gold, Valentina would stand before her bedroom mirror, practicing poses that she hoped would one day grace the covers of those very magazines. Her reflection became a canvas on which she painted her dreams with the vivid colors of hope.</p><p>She had sculpted her body like an artist, each workout a stroke of determination, each healthy meal a choice to nurture her aspirations. With a near-perfect figure, she had transformed herself into a canvas that designers would be eager to paint upon.</p><p>The day she received her first call from an agency felt like the culmination of a lifetime of yearning. She had danced around her room, the joy bubbling within her chest, threatening to burst forth like champagne from a freshly popped bottle. It was an invitation to step into the world she had always envisioned, a world of runways, lights, and the intoxicating scent of hairspray.</p><p>And then, one fateful day, during an interview that felt like a portal to her destiny, Valentina crossed paths with Amara. The room seemed to hold its breath as Amara entered, an ethereal presence that seemed to glow with an inner light. Valentina’s eyes widened as she took in the delicate curve of Amara’s smile, the graceful sweep of her hair, and the confidence that radiated from her every movement.</p><p>Fate had orchestrated a twist that was as unexpected as it was inevitable. Amara, the embodiment of beauty, was cast as the lead model. Valentina, with a mix of nervousness and excitement, found herself in the role of the supporting model.</p><p>Amara’s eyes sparkled with excitement as she approached Valentina. Her steps were light, carrying an air of genuine enthusiasm that radiated from her. She couldn’t contain her smile as she stood before Valentina, her joy infectious.</p><p>“Valentina!” Amara exclaimed, her voice filled with warmth. Her arms extended, embracing Valentina in a hug that felt like a celebration. “Congratulations!” she continued, her words a genuine reflection of her happiness for Valentina’s accomplishment.</p><p>Amara’s gaze shifted, and she reached into a bag at her side. Her fingers deftly extracted a beautifully wrapped box, adorned with a ribbon that shimmered like a promise. With a flourish, she presented the gift to Valentina, her eyes dancing with anticipation.</p><p>The gift, a luxurious Albero watch, glistened as it caught the light. The way Amara held it, as if offering a piece of her heart, spoke volumes about the meaning behind the gesture. Amara’s gaze was steady, her smile warm and inviting. “”It’s for you, Valentina,” she said, her voice carrying a note of genuine sincerity.</p><p>Valentina’s heart fluttered with a mixture of gratitude and hesitation. She hesitated, her mind conflicted between the allure of the lavish present and the weight of its implications.</p><p>Amara’s persistence didn’t waver. She reached out, placing the watch gently into Valentina’s palm. “I want you to have it,” she said softly, her eyes holding a silent promise.</p><p>Valentina’s gaze shifted from the watch to Amara’s earnest expression. In that moment, it wasn’t about the monetary value of the gift, but about the sentiment behind it. Amara’s determination to bridge the gap between their roles, to share something meaningful despite their differences, was undeniable.</p><p>With a quiet nod, Valentina closed her fingers around the watch, a small smile tugging at her lips. She could feel the weight of their camaraderie, the unspoken understanding that had developed between them. As the watch settled into her hand, it became more than just an accessory; it became a token of their growing friendship, a tangible reminder of the connection they shared.</p><p>As time passed, their friendship deepened, transcending the professional realm. They became roommates, sharing their lives, dreams, singing, dancing late into the night, and collaborating on designing their living space. Their happiness was palpable, their companionship unshakable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*EHa9iIB5zYdCrRRe" /></figure><p>As years went by, both Valentina and Amara’s careers skyrocketed. Valentina, now a teenage supermodel, eagerly anticipated meeting Amara, who had become the new face of Albero. Amidst the celebration, Valentina noticed the long line of fans eager to meet Amara. Some sought inspiration from her success, hoping to replicate her journey for their aspirations. This observation made Valentina reflect on the pressures accompanying Amara’s fame, stirring concern for how Amara would manage the overwhelming attention.</p><p>When the moment for Valentina to greet Amara came at last, their embrace was sincere, embodying their enduring friendship. Valentina’s unwavering support for Amara remained steadfast, as it had from the outset. As the festivities concluded and Valentina prepared to depart, a friend handed her a copy of Amara’s biography magazine.</p><p>In the subsequent nights, as Amara sat exhausted, gazing at the magazine, Valentina offered reassurance. “Don’t worry, it’s a memento of your achievements, and I have no intention of prying into your journey.” Valentina aimed to console Amara, emphasizing her respect for Amara’s boundaries.</p><p>In the days that followed, Valentina took a moment to appreciate the luxurious quality of the biography magazine. As she flipped through the pages, she refrained from reading the content, respecting Amara’s privacy and the boundaries of their friendship. However, a momentary lapse in concentration led Valentina’s gaze to her name, nestled within the pages.</p><p>The words on page 6 jolted Valentina: “Clever Amara gave Valentina a <em>friendship gift </em>just because she knew that Elle-news was recording her. This gave her the boost of popularity she had been manifesting for.” Realizing that her friendship with Amara might have been manipulated for personal gain struck Valentina like a blow. A moment of heart-wrenching clarity shattered the pedestal where she had placed their bond.</p><p>As Valentina continued to read, she unearthed more instances within the magazine that suggested calculated actions on Amara’s part to propel her career. The preponderance of evidence left Valentina heartbroken, the trust she had invested in their friendship now tarnished. The biography, once a celebration of Amara’s achievements, had transformed into a testament to broken trust and unmet expectations.</p><p>Unable to come to terms with the betrayal, Valentina made a life-altering decision. The pain of discovering her friendship had been exploited led her to leave, seeking solace in a different state, far from the world that had once held boundless promise. The modeling career that had once beckoned now felt tainted, forever linked to the deceit she had uncovered.</p><p>With a heavy heart, Valentina bid farewell to the world she had known, forsaking the allure of glitz and glamour for the possibility of a fresh start. The echoes of her past would linger, a constant reminder of the fragility of trust and the complexities of human connections.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*gGJ_mDZ4xPyLoJOp" /></figure><p>Drops of water on her face stirred Valentina awake. She rubbed her eyes, slowly reorienting herself. Standing before her was Amara, her friend and once the source of her heartache. Amara’s unexpected presence was accompanied by genuine concern in her eyes.</p><p>“Amara,” Valentina whispered, the single word carrying a mixture of surprise and curiosity. Amara’s expression and the subsequent words would reshape Valentina’s understanding of their relationship, rewriting the narrative that had held her captive for so long.</p><p>“Amara,” Valentina repeated, her voice now steadier. Amara’s words cut through the haze that had shrouded Valentina’s thoughts. “Valentina, you’re awake,” Amara said softly. Her eyes held a blend of surprise and warmth, as if something transformative had occurred.</p><p>Amara’s subsequent words resonated deeply with Valentina, like a balm for the wounds of the past. “You know,” Amara continued, “despite the rocky beginning, time has a way of changing everything. For me, that change has meant discovering the most genuine friendship with you.”</p><p>Amara’s heartfelt confession struck a resonant chord within Valentina. The pain of the past began to recede, slowly replaced by the weight of shared years and the maturity they had both gained. The honesty in Amara’s words was a catalyst for this transformation, serving as the cornerstone of a renewed bond. This bond was tempered by the wisdom that experience had imparted and the authenticity that had grown from their initial façade.</p><p>As Amara spoke, Valentina’s gaze remained fixed on her friend. The emotions in Amara’s voice were palpable, a delicate balance between vulnerability and determination. “Valentina,” Amara began, her voice carrying a mixture of vulnerability and determination, “I need you to understand why I made the choices I did.”</p><p>Amara’s words resonated with Valentina, unraveling layers of complexity she had never fully grasped. She listened intently as Amara explained the weight of cultural expectations that had shaped her decisions. Growing up within their Indian family had meant navigating suffocating standards, where success wasn’t just a desire but a lifeline. Amara’s candid admission opened a window into her struggles. “If I didn’t make myself successful in my chosen career,” Amara continued, her voice carrying the weight of past battles, “I would have been forced to study medicine against my wishes, and worse, wedded off at an impossibly young age. I fought against those constraints with every fiber of my being.”</p><p>Amara’s vulnerability and honesty deepened the connection between them. The choices Amara had made were no longer just actions but expressions of defiance and reclamation. The weight of cultural expectations, once unseen, had driven Amara’s path. The choices she had made were not mere caprices but a means of carving out her autonomy and pushing back against a fate that had once seemed inescapable.</p><p>“I want you by my side,” Amara confessed, her voice steady but tinged with emotion. Valentina could sense the sincerity in her friend’s words, a sincerity that carried the weight of their shared journey. “I seek your forgiveness, Valentina, not as an obligatory gesture but as a precious offering. It symbolizes the strength of our connection, the path we’ve walked together.” Now, on the cusp of marriage, Amara’s desire for Valentina’s presence transcended mere formality; it was a testament to the deep bond they had forged through the highs and lows of their intertwined lives.</p><p>Valentina’s heart swelled as Amara’s words touched her deeply. Tears welled in her eyes, a testament to the emotions coursing through her. The weight of the past continued to lift, giving way to a sense of renewal and hope. Without hesitation, Valentina closed the distance between them, her feet carrying her into Amara’s open arms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*hwhzmBTK1Th9YPDv" /></figure><p>With all the strength and conviction she could muster, Valentina enveloped Amara in a warm embrace. The hug encapsulated the years of friendship, the challenges they had encountered, and the forgiveness that flowed freely between them. Amara’s embrace provided solace, and at that moment, their history seemed distant compared to the unbreakable bond they now shared.</p><p>Valentina’s tears flowed freely, mingling with the profound relief and joy that surged within her. The embrace symbolized a reconciliation between two individuals, encompassing their shared history and the potential for a beautiful future. Amara’s impending wedding was more than a celebration of love; it was a testament to the resilience of friendship in the face of adversity, a tribute to forgiveness that bridged the gaps of hurt, and a testament to the unending capacity for growth and transformation that time offered.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4533089c5ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ensuring Robust Security: A Guide to Strong and Unique Passwords]]></title>
            <link>https://sharplikekatana.medium.com/ensuring-robust-security-a-guide-to-strong-and-unique-passwords-b321c64b9f94?source=rss-630a24f5b72d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b321c64b9f94</guid>
            <category><![CDATA[policy]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[guides-and-tutorials]]></category>
            <category><![CDATA[passwords]]></category>
            <dc:creator><![CDATA[Sanjana]]></dc:creator>
            <pubDate>Sat, 15 Jul 2023 07:28:46 GMT</pubDate>
            <atom:updated>2023-07-15T07:29:10.728Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s digital age, the importance of strong and unique passwords cannot be overstated. With cyber threats becoming increasingly sophisticated, implementing a comprehensive password policy is crucial for safeguarding sensitive information and maintaining the security of your company’s systems. In this blog post, we will explore the key elements of a password policy that enforces strong and unique passwords and helps prevent various types of attacks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*ZmQIQnq3Yj98pvvlJkyP0Q.png" /></figure><h4>1. Password Complexity:</h4><blockquote>Preventing Password Cracking Attacks</blockquote><p>Creating complex passwords is the first line of defense against password cracking attempts. By encouraging employees to create passwords that are at least 10 characters long and include a combination of uppercase and lowercase letters, numbers, and special characters, you significantly enhance the strength of their passwords. This measure helps thwart brute-force and dictionary-based attacks, as well as rainbow table attacks.</p><ul><li>Passwords must be at least 10 characters long.</li><li>Passwords must contain a combination of uppercase and lowercase letters, numbers, and special characters.</li><li>Avoid using common words, sequential characters (e.g., “12345”), or repeated characters (e.g., “AAAAA”).</li><li>Do not use easily guessable information like names, birthdays, or phone numbers.</li></ul><h4>2. Password Expiration:</h4><blockquote>Mitigating Credential Theft Attacks</blockquote><p>Regularly changing passwords is an effective way to mitigate the risks associated with compromised credentials. By implementing a password expiration policy that requires users to change their passwords every 90 days, you reduce the chances of unauthorized access to user accounts over an extended period. This measure helps mitigate attacks where stolen passwords are used long after the initial compromise.</p><ul><li>Passwords must be changed every 90 days.</li><li>Users will receive email reminders 10 days before their password expires.</li></ul><h4>3. Password History:</h4><blockquote>Preventing Password Reuse and Cracking</blockquote><p>Implementing a password history feature that remembers the previous 5 passwords used by each user is crucial for maintaining security. This policy ensures that employees do not recycle old passwords, which could be more vulnerable to exploitation. By preventing password reuse, you mitigate the risk of attacks that rely on reusing previously compromised passwords and cracking techniques.</p><ul><li>Users cannot reuse their previous 5 passwords</li></ul><h4>4. Account Lockout:</h4><blockquote>Thwarting Brute-Force Attacks</blockquote><p>Account lockout policies are essential for thwarting brute-force attacks. After a certain number of failed login attempts (e.g., 3attempts), automatically locking the account for a specified period (e.g., 15 minutes) discourages hackers from repeatedly guessing passwords. This measure effectively blocks brute-forcing attempts, reducing the risk of unauthorized access.</p><ul><li>After 3 failed login attempts, the account will be locked for 15 minutes.</li><li>Users will receive email notifications when their account is locked.</li></ul><h4>5. Multi-Factor Authentication (MFA):</h4><blockquote>Strengthening Account Security</blockquote><p>Enabling multi-factor authentication (MFA) for all user accounts provides an additional layer of security. MFA requires users to provide an additional form of verification, such as a one-time password or biometric authentication, in addition to their password. This significantly reduces the risk of unauthorized access, even if a password is compromised. MFA helps prevent attacks that rely solely on password theft or cracking.</p><ul><li>MFA should be enabled for all users. Eg: Google</li><li>Use a reliable MFA method, such as SMS verification, authenticator apps, or hardware tokens.</li></ul><h4>6. Account Recovery:</h4><blockquote>Protecting Against Unauthorized Password Resets</blockquote><p>Implementing a secure account recovery process is essential in case users forget their passwords. By including additional verification steps, such as answering security questions or confirming the user’s email address, you ensure that only authorized individuals can regain access to their accounts. This measure helps prevent unauthorized password resets and protects against account takeover attacks.</p><ul><li>Implement a secure account recovery process to help users regain access to their account if they forget their password.</li><li>Users must provide additional verification information to reset their password, such as answering security questions or confirming their email address.</li></ul><h4>7. User Education:</h4><blockquote>Building a Security-Conscious Culture</blockquote><p>Educating employees about the importance of strong passwords and the risks associated with weak passwords is vital. By conducting regular training sessions and providing guidelines on creating and managing secure passwords, you empower employees to be active participants in maintaining robust security. This measure helps prevent attacks that rely on human error, such as password sharing or using easily guessable passwords.</p><ul><li>Regularly educate employees about the importance of strong passwords and the risks associated with weak passwords.</li><li>Provide guidelines and training on creating and managing secure passwords.</li></ul><h4>8. Password Storage:</h4><blockquote>Protecting Against Data Breaches</blockquote><p>Implementing secure password storage mechanisms, such as <strong>salted</strong> and <strong>hashed</strong> passwords, is critical to protect user credentials in the event of a data breach. By utilizing industry-standard practices, you ensure that even if the stored password data is compromised, it remains unusable for malicious purposes. This measure helps prevent attacks that target stored password databases.</p><h4>9. Third-Party Passwords:</h4><blockquote>Minimizing Password-Related Risks</blockquote><p>Encouraging employees to create unique and strong passwords for each third-party service they use minimizes the potential impact of a password compromise on multiple accounts. By prohibiting the use of company passwords for third-party services, you reduce the risk of attacks that exploit password reuse across different platforms.</p><ul><li>Prohibit the use of company passwords for third-party services.</li><li>Encourage users to create unique and strong passwords for each third-party service they use.</li></ul><h4>10. Monitoring and Auditing:</h4><blockquote>Detecting and Responding to Security Incidents</blockquote><p>Continuous monitoring and auditing of user accounts are essential to detect and respond to potential security breaches promptly. By implementing systems that identify suspicious activities and ensure compliance with the password policy, you can proactively prevent or mitigate attacks. Regular reviews of the password policy’s effectiveness help address emerging threats and adapt security measures accordingly.</p><ul><li>Regularly monitor user accounts for suspicious activities, such as unusual login patterns or multiple failed login attempts.</li><li>Implement an Intrusion Detection System (IDS) to continuously monitor user accounts for any suspicious activities or potential security breaches.</li><li>Conduct periodic audits to ensure compliance with the password policy, review system logs, and identify any vulnerabilities or areas for improvement.</li></ul><h3>Conclusion:</h3><p>A strong password policy enhances security by promoting strong and unique passwords, using measures like complexity, expiration, history, lockout, multi-factor authentication, and user education. Secure password storage, managing third-party passwords, and vigilant monitoring further strengthen security. It’s a shared responsibility to prioritize education, implement controls, and regularly update the policy for a strong defense against cyber threats.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b321c64b9f94" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Snapped Phish-ing Line — Tryhackme — Walkthrough]]></title>
            <link>https://sharplikekatana.medium.com/snapped-phish-ing-line-tryhackme-walkthrough-620698c7aee?source=rss-630a24f5b72d------2</link>
            <guid isPermaLink="false">https://medium.com/p/620698c7aee</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[phishing]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[writeup]]></category>
            <dc:creator><![CDATA[Sanjana]]></dc:creator>
            <pubDate>Fri, 14 Jul 2023 10:34:43 GMT</pubDate>
            <atom:updated>2023-07-14T10:41:36.474Z</atom:updated>
            <content:encoded><![CDATA[<h3>Snapped Phish-ing Line — Tryhackme — Walkthrough</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*-dUo2mERChHgKGc0.png" /></figure><h3>An Ordinary Midsummer Day…</h3><p>As an IT department personnel of SwiftSpend Financial, one of your responsibilities is to support your fellow employees with their technical concerns. While everything seemed ordinary and mundane, this gradually changed when several employees from various departments started reporting an unusual email they had received. Unfortunately, some had already submitted their credentials and could no longer log in.</p><p>You now proceeded to investigate what is going on by:</p><ol><li>Analysing the email samples provided by your colleagues.</li><li>Analysing the phishing URL(s) by browsing it using Firefox.</li><li>Retrieving the phishing kit used by the adversary.</li><li>Using CTI-related tooling to gather more information about the adversary.</li><li>Analysing the phishing kit to gather more information about the adversary.</li></ol><h3>Connecting to the machine</h3><p>Start the virtual machine in split-screen view by clicking the green <strong>Start Machine</strong> button on the upper right section of this task. If the VM is not visible, use the blue <strong>Show Split View</strong> button at the top-right of the page. Alternatively, using the credentials below, you can connect to the VM via RDP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*fL9GWM90s_ejU_gJmWQfFw.png" /></figure><p><strong>Username </strong>damianhall <strong>Password </strong>Phish321 <strong>IP </strong>10.10.204.40</p><p><strong>Note: </strong>The phishing emails to be analysed are under the <strong><em>phish-emails</em></strong> directory on the Desktop. Usage of a web browser, text editor and some knowledge of the <strong><em>grep</em></strong> command will help.</p><h3>Let’s Start</h3><p>Start by accessing the TryHackMe room at <a href="https://tryhackme.com/room/snappedphishingline">https://tryhackme.com/room/snappedphishingline</a>.</p><p>Once you’re in, locate and open the “phish-emails” folder on the desktop. Inside this folder, you will find five emails. Begin by examining each email individually to find the answer to the first two questions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/258/1*_SCD7BWmPOKdVmYeMe7I-Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*fqhqZoRppHdznwtm4kLx3A.png" /></figure><p><strong>Who is the individual who received an email attachment containing a PDF?</strong></p><blockquote><strong><em>Answer</em></strong><em>: </em>William McClean</blockquote><p><strong>What email address was used by the adversary to send the phishing emails?</strong></p><blockquote><strong><em>Answer</em></strong><em>: </em>Accounts.Payable@groupmarketingonline.icu</blockquote><p>Defanging is a technique used to neutralize URLs, making them safe to share or research without any harmful consequences.</p><p>Open the email for the user named Zoe Duncan. In this email, you will find an attachment with a .html extension.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*GLwbvPA4vu6EznVZQ2xogg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*hHrlHfLEj4FJoi_e7--usA.png" /></figure><p>Click on the attachment and save it. Open the saved file with a text editor and copy the redirection URL without any apostrophes or quotation marks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*ReyVD7Qi6dw-v6dlnpk1wQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*9n4KiKzPXrJoIxCHA3ZWDg.png" /></figure><p>Next, open the Firefox browser in the local virtual machine provided. You’ll find that the CyberChef tool is conveniently bookmarked for you.</p><p>Launch CyberChef and search for the “defang” operation under the “Operations” tab. Drag and drop the “Defang URL” operation onto the “Recipe” area, and paste the copied URL into the input field.</p><p>The defanged URL will be displayed in the output. This defanged URL is the answer to the first question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*rfMIIWb74qAWQip1U3eunw.png" /></figure><p><strong>What is the redirection URL to the phishing page for the individual Zoe Duncan? (defanged format)</strong></p><blockquote><strong><em>Answer</em></strong><em>: </em>hxxp[://]kennaroads[.]buzz/data/Update365/office365/40e7baa2f826a57fcf04e5202526f8bd/?email=zoe[.]duncan@swiftspend[.]finance&amp;error</blockquote><p>From the defanged URL, you will notice that it redirects to a domain called “kennaroads.buzz.” Visit this website, but you won’t find much of interest on the homepage.</p><p>However, pay attention to the directories and subdirectories mentioned in the URL, particularly “/data.” Navigate to “kennaroads.buzz/data” and locate the mentioned zip archive.</p><p>Right-click on the file, copy the URL, and defang it using CyberChef. Submit the defanged URL as the answer to the relevant question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*B_AvBDsIobqBN8E9HUQO4Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*4bPz3VAdMY3z40jfU_iwxg.png" /></figure><p><strong>What is the URL to the .zip archive of the phishing kit? (defanged format)</strong></p><blockquote><strong><em>Answer</em></strong><em>: </em>hxxp[://]kennaroads[.]buzz/data/Update365[.]zip</blockquote><p><strong>What is the SHA256 hash of the phishing kit archive?</strong></p><p>Download the zip archive to your local virtual machine and open the terminal in the Downloads folder. Execute the following command to obtain the SHA256 hash for the archive.</p><p>sha256sum Update365.zip</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*pi3ac86zctS8dLblXcq5EA.png" /></figure><p>Visit virustotal.com on your own browser (since the provided VM doesn’t have internet access). <br>Click on the “Search” option on the homepage and paste the previously calculated hash. Explore the information available to find the answer to the question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*hbb_GjtMKWKwauxzNI_nVw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*IU2EouONvO263Ruek15rSA.png" /></figure><p><strong>When was the phishing kit archive first submitted? (format: YYYY-MM-DD HH:MM:SS UTC)</strong></p><blockquote><strong><em>Answer: </em></strong>2020–04–08 21:55:50 UTC</blockquote><p>Continue the investigation by searching for the phishing domain “kennaroads.buzz” on VirusTotal. This search will provide you with various details about the domain, potentially including the answer to the next question.</p><p>Take your time to explore the findings and gather the required information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*spmHPzwXmhz7WB0cW814cA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*CpaIGIWCNPJuM8nmk6xUjA.png" /></figure><p><strong>When was the phishing domain that was used to host the phishing kit archive first registered? (format: YYYY-MM-DD)</strong></p><blockquote><strong><em>Answer: </em></strong>2020–06–25</blockquote><p>Dig deeper into the domain and its subdirectories. You’ll discover a file that contains all the stolen credentials. Your task is to identify the user who submitted their details twice. <br>Analyze the available data to find the answer to this question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*Dx7hBPStxWJfcqQ1Y1nKlw.png" /></figure><p><strong>What was the email address of the user who submitted their password twice?</strong></p><blockquote><strong><em>Answer: </em></strong>michael.ascot@swiftspend.finance</blockquote><p>Within the zip archive, search for a file named “submit.php.” This script is responsible for emailing the stolen credentials to the attacker. The email address can be found within the script itself, so examine it carefully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*vY-HuhFQATAwFDlN7YzQog.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*Va07XLPqn1kKYoYY3i-27Q.png" /></figure><p><strong>What was the email address used by the adversary to collect compromised credentials?</strong></p><blockquote><strong><em>Answer: </em></strong><a href="/service/mailto:m3npat@yandex.com">m3npat@yandex.com</a></blockquote><p>While one way to find the email address is by manually checking each text or script file for the string “@gmail.com,” there’s a faster method available since we’re working on Linux. We can utilize the powerful grep command to recursively search for the string across directories and files. This approach will save us time and effort.</p><p>Open a terminal in the directory where you extracted the zip archive or navigate to it using the cd command. Then, execute the following command:</p><p>grep -r “@gmail.com” (“-r” enables a recursive search)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*NshUBUh2Jf_yK9t_YZsyBg.png" /></figure><p><strong>The adversary used other email addresses in the obtained phishing kit. What is the email address that ends in “@gmail.com”?</strong></p><blockquote><strong><em>Answer: </em></strong><a href="/service/mailto:jamestanner2299@gmail.com">jamestanner2299@gmail.com</a></blockquote><p><strong>What is the hidden flag?</strong></p><p>While exploring the zip archive and visible directories, you might not find anything useful. However, the task hints at making adjustments to the phishing URL. Engage in manual brute-forcing until you find something interesting at “kennaroads.buzz/data/Update365/office365/flag.txt.” It might not be the flag itself, but it’s a step closer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*tzjIW7B5-CQSlh8FAtx1Cg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*AuT0rhTporVIRlUZolAwDQ.png" /></figure><p>Copy the string from “flag.txt” and paste it into CyberChef. Based on its appearance, it seems to be a base64-encoded string. Decode it using the appropriate CyberChef operation. Voila! You have the flag, but it’s reversed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*lLOuHAok2svv4bBrTfZeZw.png" /></figure><p>To complete the process, use CyberChef’s “reverse” operation to reverse the text and obtain the final flag. Execute the recipe and unveil the secret message.</p><p>Congratulations! You’ve successfully completed the analysis of the TryHackMe “Snapped Phishing Line” room.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=620698c7aee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Net Sec Challenge — Tryhackme Walkthrough]]></title>
            <link>https://sharplikekatana.medium.com/net-sec-challenge-tryhackme-walkthrough-525e61b70600?source=rss-630a24f5b72d------2</link>
            <guid isPermaLink="false">https://medium.com/p/525e61b70600</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[network]]></category>
            <category><![CDATA[nmap]]></category>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[Sanjana]]></dc:creator>
            <pubDate>Sat, 24 Jun 2023 07:24:04 GMT</pubDate>
            <atom:updated>2023-06-24T07:24:04.056Z</atom:updated>
            <content:encoded><![CDATA[<h3>Net Sec Challenge — Tryhackme Walkthrough</h3><h4>Mastering Net Sec Challenge: A Step-by-Step TryHackMe Walkthrough</h4><p>Hello, fellow cybersecurity enthusiasts! Welcome to this exciting walkthrough where I’ll be sharing the steps I took to conquer a challenging scenario presented by TryHackMe. Join me as we dive into the depths of this virtual labyrinth and unravel the secrets it holds. Get ready to sharpen your skills and enhance your understanding of the cyber-verse!</p><h4>Task 1 Introduction</h4><p>Use this challenge to test your mastery of the skills you have acquired in the Network Security module. All the questions in this challenge can be solved using only nmap, telnet, and hydra.</p><h4>Task 2 Challenge Questions</h4><p>To kick-start our exploration, we’ll break down the command that holds the key to unveiling the secrets within our target. The following Nmap command, when executed correctly, opens the door to a world of possibilities:</p><p>nmap -sC -sV -p- [MACHINE_IP] -vv</p><p>Demystifying the Command:</p><ol><li>-sC: This flag allows us to <strong>run specific scripts</strong> on the target, uncovering potential vulnerabilities and exploring different attack vectors.</li><li>-sV: By utilizing this option, we can identify the <strong>versions of services</strong> running on open ports, enabling us to research any known vulnerabilities associated with those versions.</li><li>-p-: With this flag, Nmap will <strong>scan all ports</strong>, leaving no stone unturned. It ensures a comprehensive analysis of the target&#39;s port landscape.</li><li>-vv: This flag activates the &quot;very verbose&quot; mode, providing <strong>detailed output</strong> that helps us analyze the scan results thoroughly.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*8Jhs2Utpocpg3_KOqyTYwA.png" /></figure><ol><li><strong>What is the highest port number being open less than 10,000?</strong></li></ol><blockquote><strong>Answer</strong>: 8080</blockquote><p><strong>2. There is an open port outside the common 1000 ports; it is above 10,000. What is it?</strong></p><p>For this, we have to perform an nmap scan to scan ports above 10000</p><blockquote><strong>Answer</strong>: 10021</blockquote><p><strong>3. How many TCP ports are open?</strong></p><blockquote><strong>Answer</strong>: 6</blockquote><p><strong>4. What is the flag hidden in the HTTP server header?</strong></p><blockquote><strong>Answer</strong>: THM{web_server_25352}</blockquote><p><strong>5. What is the flag hidden in the SSH server header?</strong></p><blockquote><strong>Answer</strong>: THM{946219583339}</blockquote><p><strong>6. We have an FTP server listening on a nonstandard port. What is the version of the FTP server?</strong></p><blockquote><strong>Answer</strong>: vsftpd 3.0.3</blockquote><p><strong>7. We learned two usernames using social engineering: </strong><strong>eddie and </strong><strong>quinn. What is the flag hidden in one of these two account files and accessible via FTP?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jUq3UWr9w52sybUcrazxfA.png" /></figure><p>hydra -L eddie -P /usr/share/wordlists/rockyou.txt -vV ftp://[MACHINE_IP]:10021</p><p>hydra -L quinn-P /usr/share/wordlists/rockyou.txt -vV ftp://[MACHINE_IP]:10021</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*Hsnw4KEN71oLlhUCDBs-Gg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*nkdsQlJQZA2YsCReloq-lw.png" /></figure><blockquote><strong>Answer</strong>: THM{321452667098}</blockquote><p><strong>8. Browsing to </strong>http://&lt;MACHINE-IP&gt;:8080<strong> displays a small challenge that will give you a flag once you solve it. What is the flag?</strong></p><ol><li>Access the provided URL with your machine’s IP and click “Reset Packet Count.”</li><li>Run the following command with sudo permission, replacing &lt;MACHINE-IP&gt; with the target IP address:</li></ol><p>sudo nmap -sN &lt;MACHINE-IP&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*3VUgK6u2-hbNpTp2dWMkDA.png" /></figure><p>If no flags are found or unexpected results occur, restart the machine and repeat the process.<br>Don’t forget to press the “Reset Packet Count” button after the scan.</p><blockquote><strong>Answer</strong>: THM{f7443f99}</blockquote><h4>Conclusion:</h4><p>In conclusion, host discovery using Nmap is a powerful technique that allows us to identify live hosts on a network. Remember to approach these activities responsibly, obtain proper authorization, and adhere to ethical guidelines. Happy scanning and discovering!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=525e61b70600" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>