<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Infrastructure-Security on krash.dev</title><link>https://krash.dev/tags/infrastructure-security/</link><description>Recent content in Infrastructure-Security on krash.dev</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 14 Aug 2026 08:29:09 +0530</lastBuildDate><atom:link href="https://krash.dev/tags/infrastructure-security/rss.xml" rel="self" type="application/rss+xml"/><item><title>DNS Over HTTPS (DoH): What, Why, and How It Works</title><link>https://krash.dev/posts/dns-over-https/</link><pubDate>Tue, 23 Jun 2026 00:00:00 +0000</pubDate><guid>https://krash.dev/posts/dns-over-https/</guid><description>&lt;p&gt;You&amp;rsquo;re at a coffee shop. You join the free Wi-Fi, type &lt;code&gt;bank.example.com&lt;/code&gt;, and start checking your balance. The connection to your bank is locked behind that reassuring little padlock — TLS, encrypted, private.&lt;/p&gt;
&lt;p&gt;Except the &lt;em&gt;question you asked first&lt;/em&gt; wasn&amp;rsquo;t private at all.&lt;/p&gt;
&lt;p&gt;Before your browser could open that encrypted tunnel, it had to ask a simple question:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;&amp;ldquo;What&amp;rsquo;s the IP address for bank.example.com?&amp;rdquo;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;That question — a DNS lookup — left your laptop unencrypted, in a 40-year-old format (&lt;a href="https://datatracker.ietf.org/doc/html/rfc1035" target="_blank" rel="noopener noreferrer"&gt;RFC 1035&lt;/a&gt;
), for anyone on that Wi-Fi (and your ISP, and a few hops in between) to read, log, or quietly change.&lt;/p&gt;</description></item><item><title>Production Grade Bash Scripts</title><link>https://krash.dev/posts/writing-production-grade-bash-script/</link><pubDate>Wed, 16 Apr 2025 00:00:00 +0000</pubDate><guid>https://krash.dev/posts/writing-production-grade-bash-script/</guid><description>&lt;p&gt;Most shell scripts start innocent, just a few lines to glue things together. Blink twice, and it’s deploying infrastructure, rotating secrets, restarting servers, and possibly provisioning a small nation-state. It’s doing things for the people, by the people, held together by &lt;code&gt;echo&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This isn’t another “bash scripting 101” tutorial. You already know how to loop over a list and grep things. This is about writing scripts that survive real-world conditions: bad input, missing dependencies, flaky networks, and humans.&lt;/p&gt;</description></item><item><title>Kubernetes Components</title><link>https://krash.dev/posts/kubernetes/kubernetes-components/</link><pubDate>Sun, 18 Jun 2023 00:00:00 +0000</pubDate><guid>https://krash.dev/posts/kubernetes/kubernetes-components/</guid><description>&lt;p&gt;In this blog post, we are going to talk about different components used in Kubernetes and what purpose each component serve. We will be talking about the following -&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Pods&lt;/li&gt;
&lt;li&gt;Service&lt;/li&gt;
&lt;li&gt;Ingress&lt;/li&gt;
&lt;li&gt;ConfigMap&lt;/li&gt;
&lt;li&gt;Secret&lt;/li&gt;
&lt;li&gt;Deployment&lt;/li&gt;
&lt;li&gt;StatefulSet&lt;/li&gt;
&lt;li&gt;ReplicaSet&lt;/li&gt;
&lt;li&gt;DaemonSet&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Use-case that will be used througout the blog will be hosting a web application with application code and database in different pods.&lt;/p&gt;
&lt;img loading="lazy" decoding="async" src="../../images/setup-k8s-c.png" alt="Setup"&gt;&lt;p&gt;Before starting this blog, if you want to learn about the underlying concepts - Read &amp;ldquo;&lt;a href="https://krash.dev/posts/kubernetes/kubernetes-concept/"&gt;Kubernetes Concept&lt;/a&gt;
&amp;rdquo;&lt;/p&gt;</description></item><item><title>Docker Security</title><link>https://krash.dev/posts/docker-security/</link><pubDate>Thu, 02 Feb 2023 00:00:00 +0000</pubDate><guid>https://krash.dev/posts/docker-security/</guid><description>&lt;p&gt;&lt;em&gt;Last Updated on &lt;strong&gt;2nd Feb 2023&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;h1 id="containers"&gt;Containers?&lt;a class="heading-anchor" href="#containers" aria-label="Link to this section"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Why do we need containers over VMs -&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Efficient Resource Consumption between containers&lt;/li&gt;
&lt;li&gt;Once License for services/OS&lt;/li&gt;
&lt;li&gt;Low Compute Overhead&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What does docker engine does?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Emulates Filesystem&lt;/li&gt;
&lt;li&gt;Gives each container unique process ID&lt;/li&gt;
&lt;li&gt;Isolation of container process&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Communication between the architecture components -&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components
&lt;ul&gt;
&lt;li&gt;Docker client (The one user interacts with)&lt;/li&gt;
&lt;li&gt;Docker Host
&lt;ul&gt;
&lt;li&gt;Docker Daemon&lt;/li&gt;
&lt;li&gt;Images&lt;/li&gt;
&lt;li&gt;Containers&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Registry&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Docker client using serveral API calls sends the commands to Docker Engine which is being forwarded to containerd.&lt;/li&gt;
&lt;li&gt;Commuication between docker daemon and containerd is facilated through &lt;a href="https://krash.dev/posts/grpc-concepts"&gt;gRPC&lt;/a&gt;
 calls.&lt;/li&gt;
&lt;li&gt;Docker Client communicates with the Docker Daemon through a domain socket (if local) and through a TCP Socket (if remote).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What does &lt;code&gt;runc&lt;/code&gt; do?&lt;/p&gt;</description></item><item><title>Zone Identifier - Is your file downloaded from the internet?</title><link>https://krash.dev/posts/zone-identifier/</link><pubDate>Thu, 06 Oct 2022 00:00:00 +0000</pubDate><guid>https://krash.dev/posts/zone-identifier/</guid><description>&lt;p&gt;Have you ever wondered, why your file is not working after downloading it from the internet? How does system know if the file is downloaded from the internet?&lt;/p&gt;
&lt;p&gt;The answers to this is &lt;strong&gt;Zone.Identifiers&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id="what-are-zone-identifiers"&gt;What are Zone Identifiers?&lt;a class="heading-anchor" href="#what-are-zone-identifiers" aria-label="Link to this section"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Zone Identifiers is an alternate data stream that points, from where the file came on the users&amp;rsquo; computer.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Alternate Data Streams are included with files on WIndows. This is typically the case with downloaded and blocked files.&lt;/p&gt;</description></item><item><title>Understanding DKIM - Email Security Series</title><link>https://krash.dev/posts/email-security/dkim/</link><pubDate>Tue, 26 Jul 2022 00:00:00 +0000</pubDate><guid>https://krash.dev/posts/email-security/dkim/</guid><description>&lt;p&gt;DKIM is a technological advancement in the field of email security. SPF prevents non-authorized servers from sending emails, but it does not prevent all attempts at spoofing. This is where our next level of security comes into play.&lt;/p&gt;
&lt;p&gt;DKIM or Domain Keys Identified Mail aids to the security of the email as it adds a digital signature to every outgoing message, allowing receiving servers to verify that the message came from your organization. It ensures that the content of the email remains untampered/compromised and can be trusted.&lt;/p&gt;</description></item><item><title>Understanding SPF - Email Security Series</title><link>https://krash.dev/posts/email-security/spf/</link><pubDate>Mon, 25 Jul 2022 00:00:00 +0000</pubDate><guid>https://krash.dev/posts/email-security/spf/</guid><description>&lt;p&gt;Sender Policy Framework or SPF is an email authentication platform. It helps in specifying who is allowed to send emails from your domain. Making it harder for fraudsters to spoof sender information.&lt;/p&gt;
&lt;div class="callout callout--note"&gt;
 &lt;div class="callout__label"&gt;Note&lt;/div&gt;
 RFC 7208 - &lt;a href="https://datatracker.ietf.org/doc/html/rfc7208" target="_blank" rel="noopener noreferrer"&gt;&lt;a href="https://datatracker.ietf.org/doc/html/rfc7208" target="_blank" rel="noopener noreferrer"&gt;https://datatracker.ietf.org/doc/html/rfc7208&lt;/a&gt;
&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;SPF Records are used to specify the origin of the email to the world. It can be considered as a public list that specifies where an email is sent from.&lt;/p&gt;
&lt;h2 id="how-does-spf-records-look-like"&gt;How does SPF records look like?&lt;a class="heading-anchor" href="#how-does-spf-records-look-like" aria-label="Link to this section"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;SPF is configured and managed as a TXT record inside the DNS server your domain uses.&lt;/p&gt;</description></item><item><title>Linux - Command Line Struggles</title><link>https://krash.dev/posts/linux-commands/</link><pubDate>Mon, 04 Jul 2022 00:00:00 +0000</pubDate><guid>https://krash.dev/posts/linux-commands/</guid><description>&lt;h2 id="configure-network-using-ip-command-in-ubuntu-server"&gt;Configure Network Using &lt;code&gt;ip&lt;/code&gt; Command in Ubuntu Server&lt;a class="heading-anchor" href="#configure-network-using-ip-command-in-ubuntu-server" aria-label="Link to this section"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Temporary Method -&lt;/strong&gt;&lt;/p&gt;
&lt;div class="code-block"&gt;
 &lt;div class="code-block__head"&gt;
 &lt;span class="code-block__lang"&gt;bash&lt;/span&gt;
 &lt;button class="code-copy" type="button" aria-label="Copy code to clipboard"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"&gt;&lt;rect x="9" y="9" width="13" height="13" rx="2" ry="2"/&gt;&lt;path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/&gt;&lt;/svg&gt;&lt;span class="code-copy__label"&gt;copy&lt;/span&gt;&lt;/button&gt;
 &lt;/div&gt;
 &lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ ip a &lt;span class="c1"&gt;# to get the interface name after connecting LAN&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ sudo ip a add 192.168.1.8/24 dev &amp;lt;network-interface-name&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ ip link &lt;span class="nb"&gt;set&lt;/span&gt; dev &amp;lt;network-interface-name&amp;gt; up
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ sudo ip route add default via 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Permanent Solution -&lt;/strong&gt;
Ref: &lt;a href="https://netplan.io/examples/" target="_blank" rel="noopener noreferrer"&gt;https://netplan.io/examples/&lt;/a&gt;
&lt;/p&gt;</description></item><item><title>Kubernetes Concept</title><link>https://krash.dev/posts/kubernetes/kubernetes-concept/</link><pubDate>Mon, 17 Jan 2022 00:00:00 +0000</pubDate><guid>https://krash.dev/posts/kubernetes/kubernetes-concept/</guid><description>&lt;p&gt;I have been wanting to learn about &lt;del&gt;kubernetes&lt;/del&gt; k8s since long, and create this blog series. Here we are finally started (thanks to &lt;a href="https://blog.null.community/study-group-cloud-security/" target="_blank" rel="noopener noreferrer"&gt;null cloud security study group&lt;/a&gt; ), so without wasting too much time let&amp;rsquo;s get started. I am learning this having a security mindset, to find common misconfigurations and understand the development process to understand the mitigation.&lt;/p&gt;
&lt;p&gt;K8s is a &lt;strong&gt;container orchestrator&lt;/strong&gt;. Before diving too much into the depth let&amp;rsquo;s see what orchestrators/orchestrations are.&lt;/p&gt;</description></item></channel></rss>