<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Cybersecurity on Nalar</title>
    <link>https://nalar.dev/cybersecurity/</link>
    <description>Recent content in Cybersecurity on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 01 Sep 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://nalar.dev/cybersecurity/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Practical Threat Modeling with Trust Boundaries and Abuse Cases</title>
      <link>https://nalar.dev/practical-threat-modeling-with-trust-boundaries/</link>
      <pubDate>Tue, 01 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/practical-threat-modeling-with-trust-boundaries/</guid>
      <description>&lt;p&gt;Threat modeling is most useful before a vulnerability becomes a patch request. It gives a team a structured way to ask how a system can be misused, which assumptions are security-sensitive, and where defenses should exist.&lt;/p&gt;&#xA;&lt;p&gt;A useful threat model does not need to be a large document. For many services, a one-page data-flow sketch plus a prioritized set of abuse cases is enough to improve design decisions.&lt;/p&gt;&#xA;&lt;h2 id=&#34;begin-with-assets-and-security-goals&#34;&gt;Begin with assets and security goals&lt;/h2&gt;&#xA;&lt;p&gt;Start by identifying what the system is trying to protect.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Reduce Software Supply Chain Risk with Dependency Controls</title>
      <link>https://nalar.dev/reduce-software-supply-chain-risk-with-dependency-controls/</link>
      <pubDate>Tue, 01 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/reduce-software-supply-chain-risk-with-dependency-controls/</guid>
      <description>&lt;p&gt;Modern applications routinely execute code downloaded from package registries, container registries, build actions, and language-specific ecosystems. That convenience creates supply chain risk: an attacker does not need to compromise your source repository if they can compromise something your build trusts.&lt;/p&gt;&#xA;&lt;p&gt;No single control eliminates this risk. The practical approach is to reduce unnecessary trust and make dependency changes visible.&lt;/p&gt;&#xA;&lt;h2 id=&#34;treat-dependency-resolution-as-a-security-boundary&#34;&gt;Treat dependency resolution as a security boundary&lt;/h2&gt;&#xA;&lt;p&gt;A manifest may specify broad version ranges, while a lockfile records the exact dependency graph selected for a build.&lt;/p&gt;</description>
    </item>
    <item>
      <title>.htaccess Rules to Prevent PHP Execution</title>
      <link>https://nalar.dev/.htaccess-rules-to-prevent-php-execution/</link>
      <pubDate>Wed, 03 Sep 2025 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/.htaccess-rules-to-prevent-php-execution/</guid>
      <description>&lt;p&gt;Public upload directories are a common security-sensitive part of web applications. If an attacker manages to upload a file such as &lt;code&gt;shell.php&lt;/code&gt; and the web server executes it, the upload feature can become a route to remote code execution.&lt;/p&gt;&#xA;&lt;p&gt;On Apache, a directory-specific &lt;strong&gt;&lt;code&gt;.htaccess&lt;/code&gt; configuration&lt;/strong&gt; can help prevent script execution in locations that should contain only static files.&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-htaccess-can-help&#34;&gt;Why &lt;code&gt;.htaccess&lt;/code&gt; Can Help&lt;/h2&gt;&#xA;&lt;p&gt;Apache supports &lt;code&gt;.htaccess&lt;/code&gt; files for directory-level configuration when the server permits the relevant overrides. This makes it possible to apply security rules to a specific directory without changing every virtual-host setting.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Creating a CA Bundle and Converting an SSL Certificate to .PFX</title>
      <link>https://nalar.dev/creating-a-ca-bundle-and-converting-an-ssl-certificate-to-.pfx/</link>
      <pubDate>Wed, 03 Sep 2025 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/creating-a-ca-bundle-and-converting-an-ssl-certificate-to-.pfx/</guid>
      <description>&lt;p&gt;Managing SSL/TLS certificates is a routine task for many developers and system administrators. One common requirement is to &lt;strong&gt;combine intermediate certificates into a CA bundle&lt;/strong&gt; and then &lt;strong&gt;convert the certificate and private key into a &lt;code&gt;.pfx&lt;/code&gt; file&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;code&gt;.pfx&lt;/code&gt; format, also known as PKCS#12, is commonly used when importing certificates into &lt;strong&gt;Windows Server and IIS&lt;/strong&gt;, Microsoft Exchange, and other applications that expect a PKCS#12 bundle.&lt;/p&gt;&#xA;&lt;p&gt;This guide walks through the process.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Block IP Ranges with `.htaccess`</title>
      <link>https://nalar.dev/how-to-block-ip-ranges-with-.htaccess/</link>
      <pubDate>Wed, 03 Sep 2025 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/how-to-block-ip-ranges-with-.htaccess/</guid>
      <description>&lt;p&gt;One useful feature of Apache is the flexibility of &lt;code&gt;.htaccess&lt;/code&gt;. In addition to URL rewriting and caching rules, &lt;code&gt;.htaccess&lt;/code&gt; can also &lt;strong&gt;restrict access based on IP addresses&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;If you are dealing with spam bots, brute-force attempts, or unwanted traffic from a particular network, one quick option is to block an individual IP address or an entire range.&lt;/p&gt;&#xA;&lt;h2 id=&#34;block-a-single-ip-address&#34;&gt;Block a Single IP Address&lt;/h2&gt;&#xA;&lt;p&gt;To block one IP address, use:&lt;/p&gt;&#xA;&lt;div &#xA;    x-data=&#34;{&#xA;        code: $el.querySelector(&#39;code&#39;).innerText&#xA;    }&#34;&#xA;    class=&#34;relative my-4 rounded-lg group&#34;&#xA;&gt;&#xA;    &lt;button&#xA;        @click=&#34;navigator.clipboard.writeText(code); $el.innerText = &#39;Copied!&#39;; setTimeout(() =&gt; $el.innerText = &#39;Copy&#39;, 2000)&#34;&#xA;        class=&#34;absolute top-2 right-2 bg-neutral-700 text-white text-xs px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity&#34;&#xA;    &gt;&#xA;        Copy&#xA;    &lt;/button&gt;&#xA;    &#xA;    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-apache&#34; data-lang=&#34;apache&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;RequireAll&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Require &lt;span style=&#34;color:#66d9ef&#34;&gt;all&lt;/span&gt; granted&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Require not ip &lt;span style=&#34;color:#ae81ff&#34;&gt;192.168.1.100&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;/RequireAll&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This blocks &lt;code&gt;192.168.1.100&lt;/code&gt; while allowing other clients to access the site.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Whitelist IP Address Ranges with .htaccess</title>
      <link>https://nalar.dev/how-to-whitelist-ip-address-ranges-with-.htaccess/</link>
      <pubDate>Wed, 03 Sep 2025 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/how-to-whitelist-ip-address-ranges-with-.htaccess/</guid>
      <description>&lt;p&gt;&lt;code&gt;.htaccess&lt;/code&gt; is useful for more than URL rewriting and caching. It can also provide an additional access-control layer, including &lt;strong&gt;restricting an application to specific IP addresses or IP ranges&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This technique can be useful when:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;An application is still in development and should only be available to an internal team.&lt;/li&gt;&#xA;&lt;li&gt;You want to protect sensitive paths such as &lt;code&gt;/admin&lt;/code&gt; or &lt;code&gt;/api&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;A server should only be reachable from an office network or VPN.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;whitelist-one-ip-address&#34;&gt;Whitelist One IP Address&lt;/h2&gt;&#xA;&lt;p&gt;To allow only one IP address:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
