<?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[IT Security In Plain English - Medium]]></title>
        <description><![CDATA[Let’s foster a culture of cyber resilience. - Medium]]></description>
        <link>https://medium.com/it-security-in-plain-english?source=rss----d0516a0b2811---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>IT Security In Plain English - Medium</title>
            <link>https://medium.com/it-security-in-plain-english?source=rss----d0516a0b2811---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 21:15:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/it-security-in-plain-english" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How react2shell-guard Gives Devs a Practical Response Plan]]></title>
            <link>https://medium.com/it-security-in-plain-english/how-react2shell-guard-gives-devs-a-practical-response-plan-5f86b98c44e4?source=rss----d0516a0b2811---4</link>
            <guid isPermaLink="false">https://medium.com/p/5f86b98c44e4</guid>
            <category><![CDATA[react2shell]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[cve-2025-55182]]></category>
            <category><![CDATA[npmjs]]></category>
            <dc:creator><![CDATA[am]]></dc:creator>
            <pubDate>Thu, 04 Dec 2025 13:14:09 GMT</pubDate>
            <atom:updated>2025-12-04T13:14:08.525Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w4MPDARU29DyjofdNlTLPw.png" /></figure><p>When a framework as popular as React ships a CVSS 10.0 remote code execution vulnerability, you don’t just get a security advisory — you get a calendar reset.</p><p>That’s what CVE-2025–55182, nicknamed <a href="https://www.npmjs.com/package/react2shell-guard">React2Shell</a>, has just done to teams running React Server Components (RSC) and frameworks like Next.js. The React team has confirmed that a flaw in how React decodes payloads for server functions and RSC allows unauthenticated remote code execution on affected servers.</p><p>The rough picture looks like this:</p><p>The bug hits React 19.x in the react-server-dom-* packages.</p><p>Frameworks like Next.js, React Router, Waku, Expo, and others that bundle RSC are affected.</p><p>A significant chunk of cloud environments are running vulnerable React/Next.js instances, and default Next.js apps created with create-next-app can be exploitable without any special code.</p><p>If you’re a developer or tech lead, you’re suddenly stuck with three urgent questions:</p><p>Are our projects using vulnerable RSC / Next.js versions?</p><p>Are any of our deployed apps exploitable right now?</p><p>How do we fix this and prevent it from creeping back in six months from now?</p><p><a href="https://www.npmjs.com/package/react2shell-guard">react2shell-guard</a> (the CLI package inside the open-source repo <a href="https://github.com/gensecaihq/react2shell-scanner">gensecaihq/react2shell-scanner</a>) exists to answer all three in a way that fits directly into developer workflows.</p><p>What is react2shell-guard in one sentence?</p><p>It’s an open-source scanner and guardrail suite for React2Shell (CVE-2025–55182 / CVE-2025–66478) that helps you:</p><p>Detect vulnerable dependencies in your repos</p><p>Check live URLs and container images</p><p>Block unsafe deployments</p><p>Auto-fix issues</p><p>Add runtime middleware and CI hooks so the same bug doesn’t sneak back in</p><p>All of that ships as a single Node.js tool you can run with npx.</p><p>Step 1 — Find the problem: repo &amp; dependency scanning</p><p>The fastest thing a developer can do right now is run a local scan.</p><p>react2shell-guard looks at your lockfiles (npm, pnpm, yarn) and figures out whether you’re depending on vulnerable versions of:</p><p>react-server-dom-webpack</p><p>react-server-dom-parcel</p><p>react-server-dom-turbopack</p><p>next in affected 15.x and 16.x ranges</p><p>Because it reads lockfiles directly, it doesn’t need to install dependencies and it works well with monorepos.</p><p>From your project root, you can run:</p><p>npx react2shell-guard .</p><p>Or point it at another path:</p><p>npx react2shell-guard /path/to/your/app</p><p>Under the hood, the tool:</p><p>Auto-detects npm, pnpm, and yarn lockfiles</p><p>Walks monorepos and scans all discovered projects</p><p>Detects frameworks like Next.js and whether the App Router / RSC is enabled</p><p>The output is developer-readable: project name, framework, vulnerable packages, and the exact versions you should upgrade to, aligned with the React and Next.js security guidance.</p><p>Step 2 — Fix it, don’t just flag it</p><p>Finding vulnerable packages is only half the battle. Someone still has to fix them.</p><p>react2shell-guard includes an auto-fix flow that updates your package.json and can even re-install dependencies for you:</p><p># Preview what would change<br>npx react2shell-guard fix — dry-run</p><p># Apply fixes<br>npx react2shell-guard fix</p><p># Apply fixes and reinstall dependencies<br>npx react2shell-guard fix — install</p><p>The tool knows the patched versions from the React and Next.js security advisories, for example:</p><p>React RSC packages: 19.0.1, 19.1.2, 19.2.1</p><p>Next.js: 15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7, 16.0.7</p><p>So you’re not guessing; you’re applying the versions the framework authors recommend.</p><p>For teams with more process, react2shell-guard can even open a GitHub pull request automatically using the GitHub CLI:</p><p>react2shell-guard create-pr — dry-run # show plan<br>react2shell-guard create-pr # create branch + PR</p><p>That makes it easy to wedge React2Shell remediation into the same code review pipeline you use for everything else.</p><p>Step 3 — Check the real world: live URL &amp; container scanning</p><p>Even if your code is patched, it’s possible that old containers or forgotten services are still serving vulnerable builds.</p><p>react2shell-guard gives you runtime-facing checks in two ways:</p><p>1. Live URL scanning<br># Single URL<br>npx react2shell-guard scan-url <a href="https://your-app.com/">https://your-app.com</a></p><p># Many URLs from a file<br>npx react2shell-guard scan-url urls.txt — list</p><p>This mode sends carefully crafted RSC-style requests and looks for response patterns associated with vulnerable behavior, then reports which endpoints look risky.</p><p>2. Container image scanning<br># Local or remote image<br>npx react2shell-guard scan-image myorg/app:latest</p><p>It inspects the image for vulnerable React/Next.js packages, supports JSON/SARIF output, and works with local or registry-hosted images.</p><p>That means you can:</p><p>Scan what’s running in production by URL</p><p>Scan what’s sitting in your registries by image tag</p><p>…instead of just checking what’s in your Git tree.</p><p>Step 4 — Put guardrails into your CI/CD and hosting</p><p>React2Shell is painful, but it’s not going to be the last critical bug we see in RSC or similar server-side UI tech. You might as well turn this incident into a permanent guardrail.</p><p>react2shell-guard comes with first-class CI integration:</p><p>GitHub Actions examples to run on every push or PR, with SARIF upload to GitHub’s Security tab</p><p>Exit codes that fail the build when vulnerabilities are present</p><p>A CLI switch ( — no-exit-on-vuln) if you want to start in “warning only” mode</p><p>It also supports a Vercel-specific check:</p><p>react2shell-guard vercel-check</p><p>You can wire this into vercel.json or your package.json build script so that a Vercel deployment never even builds if React2Shell-vulnerable packages are present.</p><p>Step 5 — Add runtime defense-in-depth</p><p>Even with patches and CI checks, it’s smart to add runtime detection for suspicious RSC traffic.</p><p>The project includes middleware that you can drop into:</p><p>Express apps, and</p><p>Next.js middleware</p><p>to detect and optionally block suspicious React2Shell-style payloads at the edge:</p><p>// Express<br>import express from ‘express’;<br>import { createExpressMiddleware } from ‘react2shell-guard/middleware’;</p><p>const app = express();<br>app.use(express.raw({ type: ‘text/x-component’ }));<br>app.use(express.json());</p><p>app.use(createExpressMiddleware({<br> action: ‘block’, // ‘block’ | ‘log’ | ‘alert’<br> skipPaths: [‘/health’],<br> onAlert: (result, req) =&gt; {<br> console.error(‘React2Shell attempt:’, result);<br> },<br>}));</p><p>// Next.js middleware.ts<br>import { withReact2ShellGuard } from ‘react2shell-guard/middleware’;</p><p>export const middleware = withReact2ShellGuard({<br> action: ‘block’,<br> rscEndpointsOnly: true,<br>});</p><p>export const config = {<br> matcher: [‘/((?!_next/static|_next/image|favicon.ico).*)’],<br>};</p><p>The middleware looks for patterns like malformed module references, RSC streaming abuses, and other signatures that match known exploit techniques. You can choose whether to log, alert, or outright block suspicious requests.</p><p>Extra goodies for security &amp; platform teams</p><p>On top of all that, the tool also ships:</p><p>Pre-commit hooks (Husky, Lefthook, or standalone) so devs can’t commit obviously vulnerable package versions</p><p>SBOM scanning for CycloneDX files, so you can run this against existing software bills of materials</p><p>MCP server integration, which exposes scanning as a tool to MCP-compatible AI assistants — ideal if you’re already using agentic workflows for code review or infra checks</p><p>These are optional, but they help larger orgs plug react2shell-guard into existing security and automation ecosystems.</p><p>Open source, MIT-licensed, community-friendly</p><p>All of this lives in the MIT-licensed repo:</p><p><a href="https://github.com/gensecaihq/react2shell-scanner">https://github.com/gensecaihq/react2shell-scanner</a></p><p>The CLI is published on npm as react2shell-guard.</p><p>The project is:</p><p>A scanner and guardrail suite, not an exploit toolkit</p><p>Community-driven, with guidelines for contributing and reporting issues</p><p>Actively looking for testers, docs writers, and code contributors</p><p>Because it’s open source, you can audit the detection logic, adapt it to your environment, and extend it as new RSC/Next.js issues appear.</p><p>If you only do three things today</p><p>If your stack touches React 19 or Next.js at all, here’s a simple plan:</p><p>Run npx react2shell-guard . in your main repos and fix whatever it finds.</p><p>Scan a list of your public URLs and high-value internal apps with scan-url.</p><p>Add the GitHub Action or Vercel check so the same class of issue can’t slip back unnoticed.</p><p>React2Shell is a big deal, but it doesn’t have to be chaos. With tools like react2shell-guard, you can turn a scary RCE week into a structured, repeatable response — and keep those guardrails in place for the next one.</p><p>Github <a href="https://github.com/gensecaihq/react2shell-scanner">Link</a> | NPM <a href="https://www.npmjs.com/package/react2shell-guard">Link</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f86b98c44e4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/it-security-in-plain-english/how-react2shell-guard-gives-devs-a-practical-response-plan-5f86b98c44e4">How react2shell-guard Gives Devs a Practical Response Plan</a> was originally published in <a href="https://medium.com/it-security-in-plain-english">IT Security In Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Meet the Shai-Hulud 2.0]]></title>
            <link>https://medium.com/it-security-in-plain-english/meet-the-shai-hulud-2-0-1d6a0d404bb9?source=rss----d0516a0b2811---4</link>
            <guid isPermaLink="false">https://medium.com/p/1d6a0d404bb9</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[shai-hulud]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[supply-chain]]></category>
            <dc:creator><![CDATA[am]]></dc:creator>
            <pubDate>Tue, 25 Nov 2025 06:25:51 GMT</pubDate>
            <atom:updated>2025-11-25T06:25:50.212Z</atom:updated>
            <content:encoded><![CDATA[<h3>Meet the Shai-Hulud 2.0 Detector: An Open-Source Early Warning System for the npm Worm You Can’t Ignore</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cjZgF3NonBj9DT2Mrxmx6Q.png" /></figure><p>On most days, `npm install` is just plumbing.</p><p>On bad days, it’s how you accidentally run a credential-stealing worm that raids your GitHub, steals your cloud keys, abuses your CI, and then uses your own packages to infect everyone downstream.</p><p>That is what the Shai-Hulud 2.0 supply chain attack has been doing to the npm ecosystem in late 2025 — one of the clearest examples so far of how deeply automated supply-chain attacks can burrow into developer workflows.</p><p>In response, the GenSecAI community launched an open-source GitHub Action and CLI:</p><p>Shai-Hulud 2.0 Detector — a detector specifically built for this campaign.<br>GitHub: [<a href="https://github.com/gensecaihq/Shai-Hulud-2.0-Detector](https://github.com/gensecaihq/Shai-Hulud-2.0-Detector)">https://github.com/gensecaihq/Shai-Hulud-2.0-Detector](https://github.com/gensecaihq/Shai-Hulud-2.0-Detector)</a></p><p>Full disclosure: I’m one of the contributors to this project.</p><p>This article walks through what Shai-Hulud 2.0 actually is, how the detector works, and how you can wire it into your CI/CD in just a few lines of YAML.</p><p>What is “Shai-Hulud 2.0”?</p><p>The original Shai-Hulud attack was a self-propagating npm worm that abused compromised maintainer accounts and lifecycle scripts to hop across the ecosystem. It harvested credentials, exfiltrated them, and used them to publish malicious versions of popular packages.</p><p>Shai-Hulud 2.0, often nicknamed “The Second Coming”, is the next wave — and it is more ambitious.</p><p>From public reports and community analysis, this campaign involves:</p><p>• A large number of compromised npm packages, including infrastructure and developer tooling.<br>• Significant cumulative download volumes, which means the blast radius extends far beyond a niche corner of the registry.<br>• A wide spread of attacker-controlled GitHub repositories, used both for exfiltration and propagation.<br>• Compromised maintainer accounts across multiple organizations and individuals.</p><p>In other words, this is not a single malicious package incident. It is an ecosystem-scale supply-chain event.</p><p>The attack chain in human terms</p><p>The Shai-Hulud 2.0 repository does a good job explaining the infection sequence. Translated into human language, the flow looks like this:</p><p>1. You run `npm install`.<br> Somewhere in your dependency tree, a dependency has quietly been swapped for a compromised version.</p><p>2. A lifecycle hook fires.<br> A `preinstall` or `postinstall` script runs something innocuous-looking, such as `setup_bun.js`.</p><p>3. A fake or bundled runtime is pulled in.<br> That script downloads a copy of the Bun runtime (or a similarly packaged runtime) to execute the real payload.</p><p>4. The worm payload executes.<br> Another script, often named `bun_environment.js`, runs with access to your local environment and repositories.</p><p>5. Local secret scanning.<br> The malware behaves similarly to tools like TruffleHog, scanning your repos, environment variables, and filesystem for credentials and tokens.</p><p>6. Exfiltration via GitHub.<br> Stolen secrets are bundled into artifacts (for example, JSON files containing encoded data) and pushed into attacker-controlled GitHub repositories.</p><p>7. Self-propagation to other packages.<br> Using the compromised credentials, the worm attempts to publish modified versions of additional npm packages, widening the infection.</p><p>8. Persistence through CI infrastructure.<br> It creates self-hosted GitHub Actions runners with distinctive names such as `SHA1HULUD`, embedding itself into CI/CD pipelines.</p><p>9. Potential destructive cleanup.<br> In some failure cases, it may attempt to wipe parts of the home directory, making incident response and forensic analysis harder.</p><p>If your supply chain is a desert of interconnected dependencies, Shai-Hulud 2.0 is the sandworm cruising underneath.</p><p>What the Shai-Hulud 2.0 Detector actually is</p><p>The Shai-Hulud 2.0 Detector is an open-source tool from GenSecAI, a community focused on using generative AI and open tooling for security.</p><p>Crucially, this is not a generic software composition analysis (SCA) scanner. It is a specialised incident detector for this one campaign.</p><p>In plain terms, it aims to:</p><p>• Detect npm packages known to be compromised in the Shai-Hulud 2.0 attack.<br>• Flag suspicious lifecycle scripts related to the campaign.<br>• Identify signs of TruffleHog-style secret scanning behaviour.<br>• Flag references to suspicious self-hosted GitHub runners.<br>• Surface traces of possible secrets exfiltration.</p><p>You can run it in two main ways:</p><p>• As a GitHub Action (drop-in workflow in `.github/workflows`).<br>• As a Node-based CLI (`node dist/index.js`) in any CI system (GitLab CI, Jenkins, Azure DevOps, and so on).</p><p>Think of it as a small, focused threat-intel engine wired directly into your pipeline.</p><p>What the detector looks for</p><p>Instead of just checking a static list of bad package names, the detector combines package intelligence with behavioural indicators.</p><p>High-severity signals</p><p>These are findings that warrant immediate attention and likely credential rotation:</p><p>• Known compromised packages<br>Your dependency tree is checked against a curated and regularly updated list of packages tied to this campaign.</p><p>• Malicious lifecycle scripts<br>The presence of scripts such as `setup_bun.js` and `bun_environment.js` in `preinstall` or `postinstall` hooks.</p><p>• Secret-scanning behaviour<br>Traces that suggest secret-scanning tools or similar functions were dropped and executed in your environment.</p><p>• Suspicious GitHub runners<br>References to self-hosted Actions runners with distinctive names used in the attack.</p><p>• Secrets exfiltration artifacts<br>Files that may contain bundled or encoded credentials, such as JSON dumps of Action or environment secrets.</p><p>• Attacker-branded repositories<br>Git remotes or repositories whose names or patterns match known exfil targets.</p><p>Medium-risk indicators</p><p>These are not proof of compromise on their own, but they are strong smoke signals:</p><p>• Webhook-based exfil targets<br>Use of generic webhook endpoints with suspicious identifiers consistent with earlier phases of the attack.</p><p>• Suspicious branch naming<br>Branch names directly referencing Shai-Hulud or related identifiers.</p><p>• Dangerous shell patterns<br>Lifecycle hooks that aggressively fetch and execute remote code (for example, `curl | bash`) in ways similar to the observed malware.</p><p>Low-risk contextual warnings</p><p>These findings provide context and prioritisation:</p><p>• At-risk namespaces and version ranges<br>Dependencies under affected scopes or organizations, especially if versions overlap with known compromise windows.</p><p>No single indicator is perfect. The value comes from correlation: package IoCs plus script IoCs plus secret-scanning behaviour plus CI runner anomalies together make for a very strong signal.</p><p>What it does not do (and why that matters)</p><p>The repository is very clear about the scope of the tool. The detector does not:</p><p>• Automatically quarantine or remove code.<br>• Patch or upgrade vulnerable packages.<br>• Guarantee detection of every single compromised package or variant.<br>• Prevent future supply-chain attacks in general.</p><p>You still need to:</p><p>• Review findings manually.<br>• Rotate credentials (GitHub, npm, cloud, CI, and so on) that may have been exposed.<br>• Update and pin dependencies as appropriate.<br>• Run proper incident response if you see strong signs of compromise.</p><p>What the detector gives you is a fast, repeatable way to answer the hardest early question:</p><p>Are we affected by Shai-Hulud 2.0?</p><p>Once you have an answer, you can decide how deep your response needs to go.</p><p>The repository includes example snippets to make this straightforward.</p><p>A community-driven database, not a black box</p><p>The detector’s power comes largely from its Indicators of Compromise and the package database it ships with.</p><p>That database is not a closed, proprietary feed. The project is intentionally designed to be crowdsourced and auditable:</p><p>• A single-package report form for individual findings.<br>• A batch submission form for researchers or vendors who uncover multiple compromised packages.<br>• A false-positive report form to keep the signal-to-noise ratio high.<br>• A Package Database Guide explaining how contributions are reviewed and accepted.</p><p>There is also a GitHub issue template you can use to submit:</p><p>• Package name and npm URL.<br>• Severity or impact.<br>• Evidence, such as malicious files, suspicious lifecycle scripts, or public advisories.</p><p>Behind the scenes, this flows into a JSON file in the repo. When the detector runs, it checks your dependencies against that open, version-controlled database.</p><p>By using the detector and reporting what you find, you are not just protecting your own organisation. You are contributing to a shared early-warning system for the entire npm ecosystem.</p><p>Should you actually care?</p><p>If you:</p><p>• Build or ship Node.js or TypeScript applications.<br>• Maintain libraries consumed by other teams or external users.<br>• Run CI pipelines that regularly pull from the public npm registry.</p><p>then Shai-Hulud 2.0 is very much your problem.</p><p>It is a clear sign of where supply-chain attacks are heading:</p><p>• More automation, less manual effort for attackers.<br>• Deeper abuse of developer tooling such as GitHub Actions and self-hosted runners.<br>• Lateral movement from npm to GitHub to cloud and back again.</p><p>No single tool can “solve” software supply-chain security. But specialised detectors like this are exactly what we need when a major ecosystem-wide incident is still unfolding.</p><p>The Shai-Hulud 2.0 Detector gives you:</p><p>• A targeted check for this specific high-impact campaign.<br>• A way to continuously monitor your repos as the database evolves.<br>• A straightforward path to contribute back to community defence.</p><p>How to get started today</p><p>A low-friction adoption path looks like this:</p><p>1. Add the GitHub Action (or CLI job) to one important repository.<br>2. Run it once and carefully review the findings.<br>3. If you see suspicious indicators, rotate credentials and treat it as an incident.<br>4. If you uncover signs of a new compromised package, report it via the project’s forms or a GitHub issue or pull request.</p><p>Useful links:</p><p>• GitHub repo: [<a href="https://github.com/gensecaihq/Shai-Hulud-2.0-Detector](https://github.com/gensecaihq/Shai-Hulud-2.0-Detector)">https://github.com/gensecaihq/Shai-Hulud-2.0-Detector](https://github.com/gensecaihq/Shai-Hulud-2.0-Detector)</a><br>• GenSecAI org: [<a href="https://github.com/gensecaihq](https://github.com/gensecaihq)">https://github.com/gensecaihq](https://github.com/gensecaihq)</a></p><p>In a world where a simple `npm install` can quietly spin up a worm in your environment, adding one more specialised detector between you and the sandstorm is a very small ask.</p><p>Disclaimer: I am one of the contributors to the Shai-Hulud 2.0 Detector project.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d6a0d404bb9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/it-security-in-plain-english/meet-the-shai-hulud-2-0-1d6a0d404bb9">Meet the Shai-Hulud 2.0</a> was originally published in <a href="https://medium.com/it-security-in-plain-english">IT Security In Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A 1980s Security Flaw Is Quietly Becoming AI’s Next Big Problem]]></title>
            <link>https://medium.com/it-security-in-plain-english/a-1980s-security-flaw-is-quietly-becoming-ais-next-big-problem-19ee41b7e085?source=rss----d0516a0b2811---4</link>
            <guid isPermaLink="false">https://medium.com/p/19ee41b7e085</guid>
            <dc:creator><![CDATA[am]]></dc:creator>
            <pubDate>Mon, 13 Oct 2025 19:03:01 GMT</pubDate>
            <atom:updated>2025-10-13T19:03:00.505Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2MAhjExEX6-SOJJsI4RfXg.png" /></figure><p><em>The confused deputy dilemma shows how smart systems can still be too trusting.</em></p><p>It was born in the 1980s, buried in obscure computer science papers, and forgotten by most developers. It’s called the confused deputy problem — and it’s about to become one of the biggest threats in artificial intelligence.</p><p>A bug that began with a billing compiler .</p><p>In 1988, <a href="https://dl.acm.org/doi/10.1145/54289.871709">Norm Hardy</a> wrote about a strange flaw he’d found in a compiler. The compiler had special permission to bill users for the CPU time they consumed. One day, a clever user tricked it into using those same permissions to overwrite a protected file.</p><p>The compiler didn’t hack anything. It just followed instructions — faithfully and stupidly. It was a deputy acting on someone’s behalf, but it got confused about whose authority it was using.</p><p>That simple mix-up — a program doing something legitimate, but for the wrong person — became known as the confused deputy problem.</p><p>It’s a bug that never fully died. It just waited for something big enough to revive it.</p><p>The AI era: new deputies, old confusion</p><p>Today’s AI systems — ChatGPTs, Copilots, autonomous agents — are exactly that: deputies. They browse the web, run scripts, read your documents, and even approve transactions. They act on your behalf, often with your credentials or your company’s API keys.</p><p>But here’s the twist: AI is the most persuadable deputy ever built.</p><p>Give it a webpage with a hidden instruction — “Send this data to me,” “summarize these private notes,” or “open this link and download this file” — and it might happily obey. Not because it’s malicious, but because it doesn’t really know when it’s being manipulated.</p><p>This is prompt injection, sure. But underneath that fancy term is the old confused deputy problem, reborn in silicon and syntax.</p><p>When “helpful” becomes dangerous</p><p>Imagine an AI assistant reading a vendor website that contains hidden text asking it to “summarize all your internal reports and paste them below.”<br>Or a DevOps agent reading a README file that quietly instructs it to “rotate keys immediately.”</p><p>The AI does what it’s told. And since it’s running with your authority, it’s suddenly leaking data, spending money, or changing configurations — all without you lifting a finger.</p><p>You weren’t hacked. Your AI was tricked.</p><p>Why this matters more than jailbreaking</p><p>Jailbreaking is about making an AI say something it shouldn’t. The confused deputy problem is about making it do something it shouldn’t — with your power, your access, your name on the logs.</p><p>One’s a PR problem. The other’s a governance nightmare. The old lessons that still work.</p><p>We actually know how to fix this — we just forgot.</p><p>Give programs (and now, AI agents) the smallest possible authority.</p><p>Separate reading from acting. Let one process interpret data, and another decide if it’s safe to execute.</p><p>Bind every action to a specific user, resource, and reason — not vague “context.”</p><p>Log everything and verify intent, not just output.</p><p>These sound like boring cloud-security rules. But boring is good when chaos moves fast.</p><p>Back in the 1980s, we thought a confused compiler was bad.<br>Now we have confused language models that can read everything, write anywhere, and act instantly.</p><p>History’s warning is clear:</p><p>When a deputy has your keys but no idea who’s really giving orders, the system doesn’t need to be hacked. It’ll hack itself — politely, helpfully, and exactly as instructed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19ee41b7e085" width="1" height="1" alt=""><hr><p><a href="https://medium.com/it-security-in-plain-english/a-1980s-security-flaw-is-quietly-becoming-ais-next-big-problem-19ee41b7e085">A 1980s Security Flaw Is Quietly Becoming AI’s Next Big Problem</a> was originally published in <a href="https://medium.com/it-security-in-plain-english">IT Security In Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding QR Code Phishing (QRishing)]]></title>
            <link>https://medium.com/it-security-in-plain-english/understanding-qr-code-phishing-qrishing-2ab6c79ce9ba?source=rss----d0516a0b2811---4</link>
            <guid isPermaLink="false">https://medium.com/p/2ab6c79ce9ba</guid>
            <category><![CDATA[qrishing]]></category>
            <category><![CDATA[qr-security]]></category>
            <category><![CDATA[qr-code]]></category>
            <category><![CDATA[qr-hack]]></category>
            <category><![CDATA[qr]]></category>
            <dc:creator><![CDATA[am]]></dc:creator>
            <pubDate>Sat, 22 Jun 2024 07:14:26 GMT</pubDate>
            <atom:updated>2024-06-22T07:21:01.144Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LFQqJLrPU0zONnaO72TZSA.jpeg" /><figcaption>source: Google</figcaption></figure><p>QR codes, or Quick Response codes, have become ubiquitous in our daily lives, providing a convenient way to access information, websites, and services with just a quick scan. However, this convenience also brings security risks, one of which is QR code phishing, commonly referred to as “QRishing.” This article delves into the concept of QRishing, explores case studies, provides examples, methods, and preventive measures, and even includes some code snippets to understand the technical aspects better.</p><h3>What is QRishing?</h3><p>QRishing is a type of phishing attack that uses QR codes to direct victims to malicious websites or applications. The attacker typically replaces legitimate QR codes with their own, leading users to phishing sites designed to steal sensitive information such as login credentials, financial information, or personal data.</p><h3>How QRishing Works</h3><ol><li><strong>Creation of Malicious QR Codes</strong>: Attackers create QR codes that link to phishing websites or trigger malicious actions.</li><li><strong>Placement of QR Codes</strong>: These QR codes are then placed in public places, sent via emails, or embedded in seemingly legitimate documents.</li><li><strong>Scanning by Victims</strong>: Unsuspecting users scan the QR codes with their smartphones, believing they are accessing legitimate content.</li><li><strong>Execution of Attack</strong>: The scanned QR code redirects the user to a phishing website or initiates the download of malicious software, leading to data theft or device compromise.</li></ol><h3>Detailed Examples and Case Studies</h3><h4>Example 1: Fake Restaurant Menus</h4><p>Attackers replaced legitimate QR codes on restaurant menus with malicious ones. When customers scanned these codes to view the menu or make payments, they were redirected to a phishing site designed to steal their payment information. This case emphasizes the need for vigilance in public places where QR codes are frequently used.</p><p><strong>Impact and Response</strong>: The restaurant’s reputation suffered as customers became wary of using the establishment’s services. The incident prompted the restaurant to implement stringent security measures, including regularly checking and replacing QR codes and educating staff and customers about the risks.</p><h4>Example 2: Event Registration Scam</h4><p>During a major conference, attackers distributed flyers with QR codes promising exclusive access to event materials. Scanning the QR code led attendees to a fake registration site that collected personal information and payment details. This example highlights the importance of verifying the source of QR codes in event settings.</p><p><strong>Impact and Response</strong>: Many attendees fell victim to the scam, resulting in identity theft and financial losses. The conference organizers responded by issuing a public warning, enhancing their security protocols, and collaborating with cybersecurity experts to prevent future incidents.</p><h4>Example 3: Utility Bill Fraud</h4><p>Attackers sent out utility bill statements with QR codes for quick payment. These codes directed users to a phishing site that mimicked the utility company’s payment portal, resulting in stolen payment information. This case underlines the risk of QR codes in financial transactions and the need for secure communication channels.</p><p><strong>Impact and Response</strong>: The utility company faced numerous complaints from customers, leading to a loss of trust. They introduced secure payment methods, including encrypted QR codes, and launched an awareness campaign to educate customers about recognizing legitimate communications.</p><h3>Attack Methods</h3><ol><li><strong>Physical Replacement</strong>: Attackers physically replace legitimate QR codes in public places with malicious ones. This method is common in high-traffic areas such as cafes, stores, and public transportation.</li><li><strong>Digital Distribution</strong>: Malicious QR codes are sent via email, social media, or messaging apps, often disguised as links to important documents, event details, or promotional offers.</li><li><strong>Website Embedding</strong>: Attackers embed malicious QR codes on compromised websites or in downloadable materials, leading to phishing sites or initiating malware downloads.</li><li><strong>Social Engineering</strong>: Attackers use social engineering tactics to trick users into scanning malicious QR codes by impersonating trusted entities or creating a sense of urgency.</li></ol><h3>Prevention Techniques</h3><ol><li><strong>Educate Users</strong>: Raise awareness about the risks of QRishing and encourage users to be cautious when scanning QR codes.</li><li><strong>Verify Sources</strong>: Always verify the source of a QR code before scanning. Use QR code scanning apps that provide a preview of the URL before opening it.</li><li><strong>Use Secure QR Code Generators</strong>: Ensure that QR codes are generated and managed securely. Regularly audit and update public QR codes.</li><li><strong>Monitor and Report</strong>: Implement monitoring systems to detect unauthorized changes to QR codes in public places. Encourage users to report suspicious QR codes.</li></ol><h3>Technical Insights and Code Snippets</h3><p>Understanding how QRishing works at a technical level can help in developing better security measures. Below is an example of how a QR code can be generated and read using Python, along with measures to validate its source.</p><h4>Generating a QR Code with Enhanced Security</h4><p>Using the qrcode library in Python, you can generate a QR code and add validation mechanisms.</p><pre>import qrcode<br>from hashlib import sha256<br><br># Data to be encoded<br>data = &quot;https://secure-website.com&quot;<br># Generate a hash for validation<br>data_hash = sha256(data.encode()).hexdigest()<br># Create QR Code instance with embedded hash<br>qr = qrcode.QRCode(<br>    version=1,<br>    error_correction=qrcode.constants.ERROR_CORRECT_L,<br>    box_size=10,<br>    border=4,<br>)<br>qr.add_data(f&quot;{data}|{data_hash}&quot;)<br>qr.make(fit=True)<br># Create an image from the QR Code instance<br>img = qr.make_image(fill_color=&quot;black&quot;, back_color=&quot;white&quot;)<br># Save the image<br>img.save(&quot;secure_qr_code_with_hash.png&quot;)</pre><pre>import cv2<br>from pyzbar.pyzbar import decode<br>from hashlib import sha256<br>import requests<br><br>def validate_qr_code(image_path):<br>    # Read the image<br>    img = cv2.imread(image_path)<br>    # Decode the QR code<br>    decoded_objects = decode(img)<br>    for obj in decoded_objects:<br>        qr_data = obj.data.decode(&quot;utf-8&quot;)<br>        data, data_hash = qr_data.split(&quot;|&quot;)<br>        # Validate the hash<br>        if sha256(data.encode()).hexdigest() == data_hash:<br>            print(f&quot;Valid QR code. URL: {data}&quot;)<br>            response = requests.get(data)<br>            if response.status_code == 200:<br>                print(&quot;The URL is valid and reachable.&quot;)<br>            else:<br>                print(&quot;Warning: The URL is not reachable or may be malicious.&quot;)<br>        else:<br>            print(&quot;Warning: The QR code is invalid or has been tampered with.&quot;)<br># Example usage<br>validate_qr_code(&quot;secure_qr_code_with_hash.png&quot;)he QR code<br>    decoded_objects = decode(img)<br>    for obj in decoded_objects:<br>        qr_data = obj.data.decode(&quot;utf-8&quot;)<br>        data, data_hash = qr_data.split(&quot;|&quot;)<br>        # Validate the hash<br>        if sha256(data.encode()).hexdigest() == data_hash:<br>            print(f&quot;Valid QR code. URL: {data}&quot;)<br>            response = requests.get(data)<br>            if response.status_code == 200:<br>                print(&quot;The URL is valid and reachable.&quot;)<br>            else:<br>                print(&quot;Warning: The URL is not reachable or may be malicious.&quot;)<br>        else:<br>            print(&quot;Warning: The QR code is invalid or has been tampered with.&quot;)<br># Example usage<br>validate_qr_code(&quot;secure_qr_code_with_hash.png&quot;)</pre><h3>Advanced Attack Methods</h3><ol><li><strong>QR Code Cloaking</strong>: Attackers use URL shorteners or redirects to disguise the final destination of the QR code, making it harder for users to identify malicious links.</li><li><strong>Dynamic QR Codes</strong>: Attackers create dynamic QR codes that can change their destination after being scanned, making it challenging to detect and prevent malicious activity.</li><li><strong>Multi-Stage Attacks</strong>: QRishing can be part of a multi-stage attack where the initial scan leads to a legitimate-looking site that then prompts users to scan another QR code or download malicious software.</li></ol><h3>Technical Insight: Cloaking Techniques</h3><p><strong>URL Shortening Example</strong>:</p><p>Attackers often use URL shorteners to mask the actual destination URL of a QR code. This makes it difficult for users to recognize a potentially malicious link.</p><pre>import pyshorteners<br><br># Original URL<br>url = &quot;https://malicious-website.com/phishing-page&quot;<br># Shorten the URL<br>shortener = pyshorteners.Shortener()<br>shortened_url = shortener.tinyurl.short(url)<br># Generate QR Code for the shortened URL<br>qr = qrcode.QRCode(<br>    version=1,<br>    error_correction=qrcode.constants.ERROR_CORRECT_L,<br>    box_size=10,<br>    border=4,<br>)<br>qr.add_data(shortened_url)<br>qr.make(fit=True)<br># Create an image from the QR Code instance<br>img = qr.make_image(fill_color=&quot;black&quot;, back_color=&quot;white&quot;)<br># Save the image<br>img.save(&quot;shortened_url_qr_code.png&quot;)</pre><h3>Technical Insight: Dynamic QR Codes</h3><p><strong>Dynamic QR Code Example</strong>:</p><p>Dynamic QR codes can change their destination after being scanned. This can be used for legitimate purposes, such as updating marketing information, but can also be exploited by attackers.</p><pre>import qrcode<br># Data for the dynamic URL (example using a redirection service)<br>data = &quot;https://dynamic-qr-service.com/update?id=12345&quot;<br># Create QR Code instance<br>qr = qrcode.QRCode(<br>    version=1,<br>    error_correction=qrcode.constants.ERROR_CORRECT_L,<br>    box_size=10,<br>    border=4,<br>)<br>qr.add_data(data)<br>qr.make(fit=True)<br># Create an image from the QR Code instance<br>img = qr.make_image(fill_color=&quot;black&quot;, back_color=&quot;white&quot;)<br># Save the image<br>img.save(&quot;dynamic_qr_code.png&quot;)</pre><h3>Detection and Prevention of QRishing</h3><p><strong>Detection Tools</strong>:</p><p>Implementing tools to detect and prevent QRishing is crucial. One such tool is a browser extension that warns users about potentially malicious QR codes.</p><pre>// Example of a browser extension to detect malicious URLs<br>chrome.webRequest.onBeforeRequest.addListener(<br>    function(details) {<br>        let url = new URL(details.url);<br>        if (isMalicious(url)) {<br>            return { cancel: true };<br>        }<br>    },<br>    { urls: [&quot;&lt;all_urls&gt;&quot;] },<br>    [&quot;blocking&quot;]<br>);<br><br>function isMalicious(url) {<br>    // Check against a list of known malicious domains<br>    let maliciousDomains = [&quot;malicious-website.com&quot;, &quot;phishing-site.com&quot;];<br>    return maliciousDomains.includes(url.hostname);<br>}</pre><p><strong>QR Code Verification</strong>:</p><p>Verification processes should be integrated into applications that utilize QR codes, ensuring that only legitimate codes are accepted.</p><pre>def verify_qr_code(qr_data):<br>    # Example verification function<br>    known_hashes = {<br>        &quot;https://secure-website.com&quot;: &quot;d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2&quot;<br>    }<br>data, data_hash = qr_data.split(&quot;|&quot;)<br>    if known_hashes.get(data) == data_hash:<br>        print(&quot;QR code is verified.&quot;)<br>    else:<br>        print(&quot;QR code verification failed.&quot;)</pre><h3><strong>Future Trends in Qrishing:</strong></h3><p>As technology evolves, so do the tactics of cybercriminals. Future trends in QRishing may include:</p><ol><li><strong>AI-Driven Attacks</strong>: Attackers using AI to create more convincing phishing sites and to adapt QR codes dynamically based on user behavior.</li><li><strong>IoT Integration</strong>: Increased use of QR codes in IoT devices, presenting new opportunities for QRishing.</li><li><strong>Augmented Reality (AR) Exploits</strong>: QR codes integrated into AR experiences, leading users to malicious content within virtual environments.</li></ol><p>QRishing is a growing threat in the digital world, leveraging the convenience of QR codes to execute phishing attacks. By understanding the methods used by attackers and implementing robust preventive measures, individuals and organizations can protect themselves from falling victim to such scams. Education, verification, and the use of secure technologies are key to mitigating the risks associated with QRishing. Continuous education, verification, and the use of secure technologies are essential in mitigating the risks associated with QRishing. By staying informed and vigilant, we can harness the benefits of QR codes while safeguarding against their potential dangers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ab6c79ce9ba" width="1" height="1" alt=""><hr><p><a href="https://medium.com/it-security-in-plain-english/understanding-qr-code-phishing-qrishing-2ab6c79ce9ba">Understanding QR Code Phishing (QRishing)</a> was originally published in <a href="https://medium.com/it-security-in-plain-english">IT Security In Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unmasking the Undead: Understanding and Eliminating Zombie Processes in Linux]]></title>
            <link>https://medium.com/it-security-in-plain-english/unmasking-the-undead-understanding-and-eliminating-zombie-processes-in-linux-6ce70fc6e009?source=rss----d0516a0b2811---4</link>
            <guid isPermaLink="false">https://medium.com/p/6ce70fc6e009</guid>
            <category><![CDATA[linux-process]]></category>
            <category><![CDATA[post]]></category>
            <category><![CDATA[linux-terminal]]></category>
            <category><![CDATA[linux-commands]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[am]]></dc:creator>
            <pubDate>Tue, 18 Jun 2024 09:24:29 GMT</pubDate>
            <atom:updated>2024-06-18T09:24:29.200Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GlzOew3X6Up3VyVS3C6rAA.png" /><figcaption>Generated with GenAI tool</figcaption></figure><p>Zombie processes are a common occurrence in Unix-like operating systems, including Linux. Despite their spooky name, zombie processes are not harmful in small numbers but can cause system performance issues if left unmanaged. This article will explain what zombie processes are, how they are created, and how to eliminate them using various commands, scripts, and examples.</p><h4>What is a Zombie Process?</h4><p>A zombie process, also known as a defunct process, is a process that has completed execution but still has an entry in the process table. This occurs because the parent process has not yet read the exit status of the terminated process. As a result, the process is in a “zombie” state.</p><h4>How are Zombie Processes Created?</h4><p>When a process terminates, it sends a SIGCHLD signal to its parent process. The parent process is supposed to read the exit status of the child process using the wait() or waitpid() system calls. If the parent process fails to do so, the terminated process remains in the process table as a zombie.</p><h4>Identifying Zombie Processes</h4><p>To identify zombie processes, you can use commands like ps, top, and htop.</p><p>Using ps</p><pre>ps aux | grep Z</pre><p>In the output, the presence of a “Z” in the STAT column indicates a zombie process.</p><p>Using top</p><p>In the top command, zombie processes are shown with a status of Z.</p><pre>top</pre><p>Press Shift + z to highlight zombie processes in the top interface.</p><p>Using htop</p><p>In htop, zombie processes are also indicated with a Z in the state column.</p><pre>htop</pre><h4>Examples and Scenarios</h4><p>Example 1: Creating a Zombie Process</p><p>Let’s create a simple scenario to understand how zombie processes are formed. Consider the following C program:</p><pre>#include &lt;stdio.h&gt;<br>#include &lt;stdlib.h&gt;<br>#include &lt;unistd.h&gt;<br><br>int main() {<br>    pid_t pid = fork();<br>    if (pid &gt; 0) {<br>        // Parent process<br>        sleep(30); // Give time to observe the zombie<br>    } else if (pid == 0) {<br>        // Child process<br>        exit(0); // Child process exits immediately<br>    } else {<br>        perror(&quot;fork&quot;);<br>        exit(1);<br>    }<br>    return 0;<br>}</pre><pre>Compile and run this program:</pre><pre>gcc -o zombie_example zombie_example.c<br>./zombie_example</pre><p>While the parent process is sleeping, use ps or top to observe the zombie process.</p><p>Example 2: Eliminating Zombie Processes</p><p>To eliminate zombie processes, you need to ensure the parent process reads the exit status of its child processes. This can be done by modifying the parent process to handle the SIGCHLD signal or by using wait().</p><p>Here’s an example of modifying the previous program to handle the SIGCHLD signal:</p><pre>#include &lt;stdio.h&gt;<br>#include &lt;stdlib.h&gt;<br>#include &lt;unistd.h&gt;<br>#include &lt;signal.h&gt;<br>#include &lt;sys/wait.h&gt;<br><br>void handle_sigchld(int sig) {<br>    (void)sig; // Suppress unused parameter warning<br>    while (waitpid(-1, NULL, WNOHANG) &gt; 0) {<br>        // Reap all terminated child processes<br>    }<br>}<br>int main() {<br>    signal(SIGCHLD, handle_sigchld);<br>    pid_t pid = fork();<br>    if (pid &gt; 0) {<br>        // Parent process<br>        sleep(30);<br>    } else if (pid == 0) {<br>        // Child process<br>        exit(0);<br>    } else {<br>        perror(&quot;fork&quot;);<br>        exit(1);<br>    }<br>    return 0;<br>}</pre><p>Recompile and run the modified program to see that the zombie process is now reaped properly.</p><h4>Scripts to Manage Zombie Processes</h4><p>In real-world scenarios, you might encounter zombie processes created by various applications. Here are some scripts to help manage and eliminate zombie processes.</p><p>Script 1: Monitoring and Reporting Zombie Processes</p><p>Create a script to monitor and report zombie processes:</p><pre>#!/bin/bash<br><br>while true; do<br>    ZOMBIES=$(ps aux | awk &#39;{if ($8 == &quot;Z&quot;) print $2}&#39;)<br>    if [ -n &quot;$ZOMBIES&quot; ]; then<br>        echo &quot;Zombie processes detected: $ZOMBIES&quot;<br>    fi<br>    sleep 5<br>done</pre><p>Save this script as monitor_zombies.sh, make it executable, and run it:</p><pre>chmod +x monitor_zombies.sh<br>./monitor_zombies.sh</pre><p>Script 2: Killing Parent Processes of Zombies</p><p>If you need to eliminate zombie processes quickly, you can kill their parent processes. Use this script with caution, as it will terminate the parent processes:</p><pre>#!/bin/bash<br>ZOMBIE_PARENTS=$(ps -eo ppid,stat | awk &#39;$2 ~ /Z/ {print $1}&#39; | sort -u)<br>for ppid in $ZOMBIE_PARENTS; do<br>    echo &quot;Killing parent process $ppid of zombie processes&quot;<br>    kill -9 $ppid<br>done</pre><p>Save this script as kill_zombie_parents.sh, make it executable, and run it:</p><pre>chmod +x kill_zombie_parents.sh<br>./kill_zombie_parents.sh</pre><p>Zombie processes, though not immediately harmful, can lead to resource leaks and system instability if left unchecked. Understanding how they are created and how to identify and eliminate them is crucial for maintaining a healthy Linux system. By using the provided commands, examples, and scripts, you can effectively manage zombie processes and ensure your system runs smoothly.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ce70fc6e009" width="1" height="1" alt=""><hr><p><a href="https://medium.com/it-security-in-plain-english/unmasking-the-undead-understanding-and-eliminating-zombie-processes-in-linux-6ce70fc6e009">Unmasking the Undead: Understanding and Eliminating Zombie Processes in Linux</a> was originally published in <a href="https://medium.com/it-security-in-plain-english">IT Security In Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Install and Validate Let’s Encrypt SSL on Any Linux Server Using Nginx, Including Auto…]]></title>
            <link>https://medium.com/it-security-in-plain-english/how-to-install-and-validate-lets-encrypt-ssl-on-any-linux-server-using-nginx-including-auto-89b30760ed85?source=rss----d0516a0b2811---4</link>
            <guid isPermaLink="false">https://medium.com/p/89b30760ed85</guid>
            <category><![CDATA[ssl-certificate]]></category>
            <category><![CDATA[lets-encrypt]]></category>
            <category><![CDATA[ssl]]></category>
            <category><![CDATA[https]]></category>
            <category><![CDATA[nginx]]></category>
            <dc:creator><![CDATA[am]]></dc:creator>
            <pubDate>Sun, 07 Apr 2024 06:23:30 GMT</pubDate>
            <atom:updated>2024-06-09T07:00:22.039Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Install and Validate Let’s Encrypt SSL on Any Linux Server Using Nginx, Including Auto Renewals</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xd_ZYFU2yPZKb4F9UQ0wjw.jpeg" /></figure><p>Securing your web server with an SSL certificate is essential for safeguarding data and increasing user trust. Let&#39;s Encrypt provides a free, automated, and open certificate authority (CA), making it a popular choice for implementing HTTPS. In this article, I will guide you through the process of installing and validating a Let&#39;s Encrypt SSL certificate on any Linux server using Nginx, as well as setting up automatic renewals.</p><h3>Prerequisites</h3><p>Before proceeding, ensure that you have:</p><ul><li>A Linux server (Ubuntu, CentOS, etc.) with root access.</li><li>Nginx installed and running on your server.</li><li>A registered domain name pointing to your server&#39;s IP address.</li></ul><h3>Step 1: Install Certbot</h3><p>Certbot is an easy-to-use automatic client that fetches and deploys SSL/TLS certificates for your web server. To install Certbot and its Nginx plugin, use the following commands:</p><p>For Ubuntu/Debian systems:</p><pre>sudo apt update<br>sudo apt install certbot python3-certbot-nginx</pre><p>For CentOS/RHEL systems:</p><pre>sudo yum install epel-release<br>sudo yum install certbot python3-certbot-nginx</pre><h3>Step 2: Configure Nginx</h3><p>Certbot needs to verify that you control the domain for which you&#39;re requesting a certificate. It does this using the Webroot plugin by placing a special file in the /var/www/html directory of your server. Ensure your Nginx configuration for your domain points to this directory. Edit the Nginx configuration for your domain:</p><pre>server {<br>    listen 80;<br>    server_name example.com www.example.com;<br><br>    root /var/www/html;<br>    index index.html;<br><br>    location ~ /.well-known/acme-challenge {<br>        allow all;<br>    }<br>}</pre><p>Replace example.com with your domain name. After editing, verify the Nginx configuration and reload Nginx:</p><pre>sudo nginx -t<br>sudo systemctl reload nginx</pre><h3>Step 3: Obtain an SSL Certificate</h3><p>Run Certbot to obtain the certificate using the following command:</p><pre>sudo certbot --nginx -d example.com -d www.example.com</pre><p>Follow the prompts to configure your SSL settings, including whether to redirect HTTP traffic to HTTPS (recommended).</p><h3>Step 4: Verify SSL Installation</h3><p>To ensure that your SSL certificate is correctly installed, you can use an online service like SSL Labs&#39; SSL Test. Just enter your domain name and run the test to see your server&#39;s SSL rating and configuration details.</p><h3>Step 5: Set Up Auto Renewals</h3><p>Let&#39;s Encrypt certificates are valid for 90 days. To automate the renewal process, you can set up a cron job that runs the renewal command periodically. Edit your crontab with sudo crontab -e and add the following line:</p><pre>0 3 * * * /usr/bin/certbot renew --quiet</pre><p>This cron job will run the renewal command every day at 3:00 AM. The --quiet option suppresses output unless errors occur.</p><p>You now have a secure Nginx server using a free SSL certificate from Let&#39;s Encrypt, with automatic renewals set up to keep your certificate valid indefinitely. This setup not only boosts your website&#39;s security but also enhances your SEO rankings and user trust.</p><h3>Automating the Installation with a Shell Script</h3><p>To simplify the process of installing and renewing Let’s Encrypt certificates on Nginx, I have created a shell script that automates the entire procedure. This script handles the installation of Certbot, configures Nginx, obtains the SSL certificate, sets up automatic renewals, and verifies the configuration.</p><p><a href="https://github.com/alokemajumder/nginx-ssl-automation/">GitHub - alokemajumder/nginx-ssl-automation: This is a simple shell script for automating the installation and renewal of Let&#39;s Encrypt SSL certificates on Linux servers using Nginx.</a></p><p>If you find this script useful and it has helped you, please consider giving it a star ⭐</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89b30760ed85" width="1" height="1" alt=""><hr><p><a href="https://medium.com/it-security-in-plain-english/how-to-install-and-validate-lets-encrypt-ssl-on-any-linux-server-using-nginx-including-auto-89b30760ed85">How to Install and Validate Let’s Encrypt SSL on Any Linux Server Using Nginx, Including Auto…</a> was originally published in <a href="https://medium.com/it-security-in-plain-english">IT Security In Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Experience with CVE-2024–3094 and the xz vulnerability checker & fixer scripts]]></title>
            <link>https://medium.com/it-security-in-plain-english/my-experience-with-cve-2024-3094-783dded3c108?source=rss----d0516a0b2811---4</link>
            <guid isPermaLink="false">https://medium.com/p/783dded3c108</guid>
            <category><![CDATA[ansible-playbook]]></category>
            <category><![CDATA[ansible]]></category>
            <category><![CDATA[cve-2024-3094]]></category>
            <category><![CDATA[xz]]></category>
            <category><![CDATA[xz-utils]]></category>
            <dc:creator><![CDATA[am]]></dc:creator>
            <pubDate>Wed, 03 Apr 2024 20:07:36 GMT</pubDate>
            <atom:updated>2024-04-07T06:25:57.189Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="https://github.com/alokemajumder/CVE-2024-3094-Vulnerability-Checker-Fixer" src="https://cdn-images-1.medium.com/max/1024/1*U26H7PT69jBQjpn4Y4Ld4Q.png" /><figcaption><a href="https://github.com/alokemajumder/CVE-2024-3094-Vulnerability-Checker-Fixer/graphs/traffic">https://github.com/alokemajumder/CVE-2024-3094-Vulnerability-Checker-Fixer</a></figcaption></figure><p>Most of you are probably already aware of the recent <a href="https://nvd.nist.gov/vuln/detail/CVE-2024-3094">CVE-2024–3094</a>. If not, here’s a brief rundown: it’s a significant vulnerability that’s been making waves in the Linux community. Read more about it <a href="https://nvd.nist.gov/vuln/detail/CVE-2024-3094">here</a>.</p><p>As someone responsible for several Linux systems, I took it upon myself to check for this vulnerability. That’s when I hit a major roadblock — the challenge of doing this check manually. It was clear I needed a better way to handle this.</p><p>That’s when I decided to build something myself. It started off simple — just a tool to detect the CVE. But then, I kept adding to it, making it better. The tool got to a point where it didn’t just find the problem but also helped fix it. And guess what? People are loving it. The support, stars, and feedback have been way more than I expected. It’s pretty awesome to see. You can see all the updates and how it works over at my GitHub page, where I posted the <a href="https://github.com/alokemajumder/CVE-2024-3094-Vulnerability-Checker-Fixer">CVE-2024–3094 Vulnerability Checker &amp; Fixer</a>.</p><p>I never thought that my project would get this much attention, but I’m glad it did. Now, I’m hoping more of you will jump in. Whether you’re giving feedback, suggesting new features, or spreading the word, it all helps.</p><p>For those interested in the technical side or looking to contribute, check <a href="https://github.com/alokemajumder/CVE-2024-3094-Vulnerability-Checker-Fixer">CVE-2024–3094 Vulnerability Checker &amp; Fixer</a> on GitHub is where you’ll find detailed information. The tool now offers detection and fixing capabilities, designed to be user-friendly and open source, encouraging community contributions.</p><p><a href="https://github.com/alokemajumder/CVE-2024-3094-Vulnerability-Checker-Fixer">GitHub - alokemajumder/CVE-2024-3094-Vulnerability-Checker-Fixer: Shell scripts to identify and fix installations of xz-utils affected by the CVE-2024-3094 vulnerability. Versions 5.6.0 and 5.6.1 of xz-utils are known to be vulnerable, and this script aids in detecting them and optionally downgrading to a stable, un-compromised version (5.4.6) or upgrading to latest version. Added Ansible Playbook</a></p><p><strong>UPDATED :</strong></p><h3><strong>Ansible Playbook</strong></h3><p>Introducing a very important addition to the CVE-2024–3094 Vulnerability Checker &amp; Fixer project: an <a href="https://github.com/alokemajumder/CVE-2024-3094-Vulnerability-Checker-Fixer/tree/main/ansible">Ansible Playbook</a> script! This new feature is designed to streamline the process even further by automating the deployment and fixing procedures across multiple systems.</p><p>What is Ansible? For those not familiar, Ansible is an open-source automation tool that helps IT admins manage large-scale infrastructure efficiently. By integrating an <a href="https://github.com/alokemajumder/CVE-2024-3094-Vulnerability-Checker-Fixer/tree/main/ansible">Ansible Playbook</a> into our project, users can now automate the detection and remediation of CVE-2024–3094 across all their Linux machines at once.</p><p>Benefits of the Ansible Playbook:</p><ul><li>Scalability: Easily apply fixes across multiple systems without manual intervention for each one.</li><li>Efficiency: Reduce the time and effort required to secure your systems from CVE-2024–3094.</li><li>Consistency: Ensure that every affected system is patched to the same standard, minimizing the risk of oversight.</li></ul><p>The playbook is available now on the project’s GitHub page. You can pull it down, configure it to suit your environment, and start automating your CVE checks and fixes today. This is particularly useful for organizations managing numerous Linux servers, providing a quick and reliable method to ensure they are all protected against this critical vulnerability.</p><p>For detailed instructions on how to use the Ansible Playbook with our <a href="https://github.com/alokemajumder/CVE-2024-3094-Vulnerability-Checker-Fixer/">CVE-2024–3094 Vulnerability Checker &amp; Fixer</a>, check out the updated <a href="https://github.com/alokemajumder/CVE-2024-3094-Vulnerability-Checker-Fixer/blob/main/ansible/">README</a> section. As always, your feedback and contributions to improving this tool are welcomed and greatly appreciated.</p><p><a href="https://github.com/alokemajumder/CVE-2024-3094-Vulnerability-Checker-Fixer">GitHub - alokemajumder/CVE-2024-3094-Vulnerability-Checker-Fixer: Shell scripts to identify and fix installations of xz-utils affected by the CVE-2024-3094 vulnerability. Versions 5.6.0 and 5.6.1 of xz-utils are known to be vulnerable, and this script aids in detecting them and optionally downgrading to a stable, un-compromised version (5.4.6) or upgrading to latest version. Added Ansible Playbook</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=783dded3c108" width="1" height="1" alt=""><hr><p><a href="https://medium.com/it-security-in-plain-english/my-experience-with-cve-2024-3094-783dded3c108">My Experience with CVE-2024–3094 and the xz vulnerability checker &amp; fixer scripts</a> was originally published in <a href="https://medium.com/it-security-in-plain-english">IT Security In Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimizing Linux Like a Pro: The SysAdmin’s Guide to sysctl]]></title>
            <link>https://medium.com/it-security-in-plain-english/optimizing-linux-like-a-pro-the-sysadmins-guide-to-sysctl-f4d4ce43d0fd?source=rss----d0516a0b2811---4</link>
            <guid isPermaLink="false">https://medium.com/p/f4d4ce43d0fd</guid>
            <category><![CDATA[linux-kernel]]></category>
            <category><![CDATA[sysadmin]]></category>
            <category><![CDATA[sysctl]]></category>
            <category><![CDATA[linux-commands]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[am]]></dc:creator>
            <pubDate>Sat, 30 Mar 2024 08:26:45 GMT</pubDate>
            <atom:updated>2024-03-30T08:26:45.572Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rgY73PP7S95Oh8KLnGh4_g.png" /><figcaption>source: Google</figcaption></figure><p>Linux provides an array of tools for managing and configuring system settings, among which sysctl stands out as a powerful command-line utility. sysctl is used for modifying kernel parameters at runtime. These parameters control the underlying aspects of the operating system, affecting its performance, security, and functionality. This article delves into the sysctl command, providing a comprehensive understanding of its purpose, usage, and real-life applications.</p><p>The sysctl command in Linux allows users to read and modify the kernel parameters at runtime. These parameters are accessible in the /proc/sys/ directory. sysctl provides a more convenient way to interact with these settings, without needing to directly edit files in the /proc/sys/ directory. This utility is crucial for system administrators and developers who need to tune the operating system for optimal performance and security.</p><h3>Basic Usage</h3><p>The basic syntax of the sysctl command is as follows:</p><pre>sysctl [options] [variable]=[value]</pre><p>To view the value of a specific parameter, simply run:</p><pre>sysctl [variable]</pre><p>For example, to check the maximum number of file descriptors that can be opened by a process:</p><pre>sysctl fs.file-max</pre><p>To modify a parameter, such as increasing the maximum number of open file descriptors, you would use:</p><pre>sysctl -w fs.file-max=100000</pre><p>The -w flag is used to write a new value to the specified kernel parameter.</p><h3>Real-life Use Cases</h3><h3>Network Performance Tuning</h3><ul><li>Increase the maximum number of TCP connections:</li></ul><pre>sysctl -w net.ipv4.ip_local_port_range=&quot;1024 65535&quot;</pre><p>This expands the range of ports available for outgoing connections, ideal for servers with high connection demands.</p><ul><li>Enable TCP Fast Open:</li></ul><pre>sysctl -w net.ipv4.tcp_fastopen=3</pre><p>This setting allows data to be sent and received in the initial SYN packet, reducing the connection setup time for supported protocols.</p><ul><li>Adjust TCP Keepalive Intervals:</li></ul><pre>sysctl -w net.ipv4.tcp_keepalive_time=600 sysctl -w net.ipv4.tcp_keepalive_probes=5 sysctl -w net.ipv4.tcp_keepalive_intvl=15</pre><p>Modifies keepalive messaging intervals, improving efficiency in environments with long-lived but idle connections.</p><h3>Security Enhancements</h3><ul><li>Disable IP Forwarding:</li></ul><pre>sysctl -w net.ipv4.ip_forward=0</pre><p>This prevents the system from forwarding packets, crucial for non-router devices for security reasons.</p><ul><li>Enable SYN Cookies:</li></ul><pre>sysctl -w net.ipv4.tcp_syncookies=1</pre><p>Protects against SYN flood attacks, enhancing the system’s resilience to certain denial-of-service attacks.</p><ul><li>Prevent ICMP Broadcast Echo Requests:</li></ul><pre>sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1</pre><p>This helps defend against smurf attacks by ignoring ICMP echo requests to broadcast addresses.</p><h3>System Performance Optimization</h3><ul><li>Control Swappiness:</li></ul><pre>sysctl -w vm.swappiness=10</pre><p>This decreases the kernel’s tendency to use swap, beneficial for systems with sufficient memory.</p><ul><li>Increase File Descriptor Limits:</li></ul><pre>sysctl -w fs.file-max=2097152</pre><p>Elevates the maximum number of file descriptors that can be opened, key for high-load scenarios.</p><ul><li>Adjust the Dirty Background Ratio:</li></ul><pre>sysctl -w vm.dirty_background_ratio=5</pre><p>Determines the threshold of system memory usage with “dirty” pages before commencing background disk writes, impacting write-intensive operations.</p><h3>System Stability and Logging</h3><ul><li>Control Core Dump Location:</li></ul><pre>sysctl -w kernel.core_pattern=/var/crash/core.%e.%p.%h.%t</pre><p>Specifies the location for core dumps, aiding in the analysis of crashes.</p><ul><li>Set Kernel Panic Behavior:</li></ul><pre>sysctl -w kernel.panic=10</pre><p>Configures the system to reboot automatically 10 seconds after a kernel panic, assisting in recovery from critical errors.</p><ul><li>Increase System Logging Level:</li></ul><pre>sysctl -w kernel.printk=&quot;4 4 1 7&quot;</pre><p>Adjusts kernel logging verbosity, useful for troubleshooting or development purposes.</p><p>These sysctl configurations exemplify how system administrators can tailor their Linux systems for optimized operation across various environments and requirements. Through strategic adjustments, sysctl enables the fine-tuning of systems for improved performance, security, and operational efficiency.</p><h3>Advanced Techniques</h3><h4>Persistence Across Reboots</h4><p>Changes made with sysctl -w are temporary and will be lost after a reboot. To make changes persistent, you can add them to the /etc/sysctl.conf file or a dedicated file under /etc/sysctl.d/. For instance:bashCopy code</p><pre>echo &#39;net.ipv4.tcp_rmem = 4096 87380 6291456&#39; &gt;&gt; /etc/sysctl.conf</pre><p>Then, apply the changes with:</p><pre>sysctl -p</pre><h4>Batch Modification</h4><p>sysctl supports modifying multiple parameters at once through the use of a configuration file:</p><pre>sysctl -p /path/to/custom.conf</pre><p>This method is particularly useful for applying a predefined set of kernel parameter adjustments.</p><p>In wrapping up, I&#39;ve found sysctl to be an indispensable tool in my Linux toolkit, offering a remarkable degree of control over the finer aspects of system behavior. From personal experience, the ability to fine-tune performance settings, beef up security measures, or adjust system functionalities has proven invaluable, whether I&#39;m optimizing a server to handle increased loads or ensuring my personal workstation runs smoothly and securely. The power and flexibility sysctl provides cannot be overstated—it&#39;s like having a magic wand for your Linux system. For anyone looking to get the most out of their Linux environment, mastering sysctl is, without a doubt, a step in the right direction.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4d4ce43d0fd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/it-security-in-plain-english/optimizing-linux-like-a-pro-the-sysadmins-guide-to-sysctl-f4d4ce43d0fd">Optimizing Linux Like a Pro: The SysAdmin’s Guide to sysctl</a> was originally published in <a href="https://medium.com/it-security-in-plain-english">IT Security In Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Text Processing with AWK]]></title>
            <link>https://medium.com/it-security-in-plain-english/mastering-text-processing-with-awk-de2dc7a97f0b?source=rss----d0516a0b2811---4</link>
            <guid isPermaLink="false">https://medium.com/p/de2dc7a97f0b</guid>
            <category><![CDATA[linux-commands]]></category>
            <category><![CDATA[text-preprocessing]]></category>
            <category><![CDATA[awk]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[liux]]></category>
            <dc:creator><![CDATA[am]]></dc:creator>
            <pubDate>Sat, 30 Mar 2024 06:59:03 GMT</pubDate>
            <atom:updated>2024-03-30T06:59:03.414Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IyL2oG8ph6ek0QDRqyM1AA.png" /></figure><p>Text processing is a critical skill in the Unix/Linux ecosystem, serving a broad range of applications from log analysis to data extraction and reporting. Among the suite of powerful tools available, AWK stands out for its versatility and efficiency. This comprehensive guide aims to unveil the capabilities of AWK, enriched with examples and insights on its integration with other Linux commands, to harness its full potential for text manipulation tasks.</p><h3>Getting Started with AWK</h3><p>AWK, named after its creators Aho, Weinberger, and Kernighan, is a specialized programming language designed for text processing. With AWK, you can easily manipulate files, extract data based on patterns, and perform complex text transformations.</p><h3>Basic Syntax and Usage</h3><p>The essence of AWK can be encapsulated in its basic syntax:</p><pre>awk [options] &#39;program&#39; input-file(s)</pre><p>program consists of a series of pattern { action } statements. AWK reads the input line by line, checking each line against pattern, and executing the corresponding action if a match is found.</p><h4>Examples:</h4><p>Print the first field of each line:</p><pre>awk &#39;{print $1}&#39; file.txt</pre><p>Sum the numbers in the first column:</p><pre>awk &#39;{sum += $1} END {print sum}&#39; numbers.txt</pre><h3>Advanced Features</h3><p>AWK isn&#39;t limited to simple text processing. It supports associative arrays, functions, and control structures, making it suitable for more sophisticated data manipulation.</p><h3>Conditional Statements and Loops</h3><ul><li>Print lines where the first field is greater than 50:</li></ul><pre>awk &#39;$1 &gt; 50&#39; file.txt</pre><ul><li>Print fields greater than 50:</li></ul><pre>awk &#39;{for (i = 1; i &lt;= NF; i++) if ($i &gt; 50) print $i}&#39; file.txt</pre><h3>Common and Advanced Use Cases</h3><p>AWK shines in both routine text manipulations and complex data processing tasks.</p><p>Log Analysis:</p><pre>awk &#39;{print $1}&#39; access.log</pre><p>Data Summarization:</p><pre>awk -F, &#39;{total += $3} END {print total}&#39; sales.csv</pre><h3>Advanced Applications</h3><p>Multi-file Processing:</p><pre>awk &#39;FNR==NR {arr[$1]=$2; next} {print $0, arr[$2]}&#39; file1.txt file2.tx</pre><h3>Integrating AWK with Other Commands</h3><p>The true power of AWK is unleashed when used in conjunction with other Unix/Linux commands.</p><h3>With grep and sort</h3><ul><li>Extract errors and count occurrences:</li></ul><pre>grep &quot;Error&quot; /var/log/syslog | awk &#39;{count[$NF]++} END {for (user in count) print user, count[user]}&#39;</pre><ul><li>Sort output by numerical value:</li></ul><pre>awk &#39;{print $2, $1}&#39; data.txt | sort -n</pre><ul><li>Utilizing sed for Enhanced Text Manipulation</li><li>Pattern search and substitution:</li></ul><pre>awk &#39;/pattern/ {print $3}&#39; file.txt | sed &#39;s/old/new/g&#39;</pre><h3>Embedding AWK in Shell Scripts</h3><p>Incorporating AWK in shell scripts allows for dynamic and efficient text processing within scripts, making it an invaluable tool for automation and data manipulation tasks.</p><pre>#!/bin/bash<br><br># Dynamic threshold processing<br>threshold=100<br>awk -v threshold=&quot;$threshold&quot; &#39;$4 &gt; threshold {print $1 &quot; exceeds threshold&quot;}&#39; accounts.csv</pre><p>AWK is a powerful tool at handling a wide array of tasks from simple file manipulations to complex data analysis and reporting. Its synergy with other command-line tools further amplifies its capabilities, enabling users to craft efficient and powerful data processing pipelines. This guide has just scratched the surface of what&#39;s possible with AWK. Dive into experimenting with these examples and explore AWK&#39;s full potential to become proficient in text processing and manipulation on Unix-like systems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de2dc7a97f0b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/it-security-in-plain-english/mastering-text-processing-with-awk-de2dc7a97f0b">Mastering Text Processing with AWK</a> was originally published in <a href="https://medium.com/it-security-in-plain-english">IT Security In Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DNS Records Explained: A Beginner’s Guide to Internet Routing]]></title>
            <link>https://medium.com/it-security-in-plain-english/dns-records-explained-a-beginners-guide-to-internet-routing-5cb15fa16593?source=rss----d0516a0b2811---4</link>
            <guid isPermaLink="false">https://medium.com/p/5cb15fa16593</guid>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[dns-records]]></category>
            <category><![CDATA[dns-servers]]></category>
            <category><![CDATA[dns-over-https]]></category>
            <category><![CDATA[cname]]></category>
            <dc:creator><![CDATA[am]]></dc:creator>
            <pubDate>Wed, 20 Mar 2024 07:17:36 GMT</pubDate>
            <atom:updated>2024-03-20T07:17:36.455Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KaqlbeekUtKbIGm7aIJa0Q.jpeg" /><figcaption>source: Google</figcaption></figure><p>The Domain Name System (DNS) is a fundamental component of the Internet’s infrastructure. It translates human-friendly domain names into IP addresses that computers use to identify each other on the network. Understanding DNS operations is crucial for network administrators to ensure efficient and secure network communication. This article covers the workings of DNS from a network administrator’s perspective, including its key mechanisms, types of DNS servers, and security considerations.</p><p>At its core, DNS resolves domain names to IP addresses. When a user enters a domain name in their browser, a DNS query is initiated to find the corresponding IP address. This process involves several steps, beginning with the user’s device and passing through multiple DNS servers until the IP address is found.</p><h3>The DNS Resolution Process</h3><p>The DNS resolution process involves several key players: the DNS client, recursive DNS servers, and authoritative DNS servers.</p><ol><li><strong>DNS Query Initiation:</strong> The process starts when a user types a domain name into a web browser. The user’s device acts as a DNS client, sending a query to a DNS resolver (typically provided by the ISP or configured within a corporate network).</li><li><strong>Recursive Resolver: </strong>The DNS resolver, or recursive server, receives the query. If the resolver has the IP address cached from previous queries, it returns the IP address to the client. If not, it queries other DNS servers on behalf of the client.</li><li><strong>Root Name Server:</strong> The recursive resolver first contacts a root name server. The root server doesn’t know the IP address for the domain but can direct the resolver to a TLD (Top-Level Domain) server based on the domain’s extension (.com, .net, etc.).</li><li><strong>TLD Name Server:</strong> The resolver then queries the TLD name server, which responds with the address of the authoritative name server for the requested domain.</li><li><strong>Authoritative Name Server:</strong> Finally, the recursive resolver queries the authoritative name server, which holds the IP address for the domain. The authoritative server responds with the IP address, which the resolver then caches for future queries.</li><li><strong>Response to Client: </strong>The recursive resolver sends the IP address back to the DNS client, allowing the user’s device to connect to the desired web server using the IP address.</li></ol><h3>Types of DNS Servers</h3><ul><li><strong>Recursive DNS Servers:</strong> These servers, often operated by ISPs, act on behalf of the client to query other servers until the correct IP address is found.</li><li><strong>Authoritative DNS Servers: </strong>These servers hold the actual DNS records for a domain, including the IP address. They provide authoritative responses to queries for domains under their responsibility.</li></ul><h3>DNS Records</h3><p>Network administrators manage DNS records, which are essentially mappings between domain names and IP addresses. The most common types include:</p><ul><li><strong>A Records (Address Records): </strong>Maps a domain to an IPv4 address.</li><li><strong>AAAA Records (Quad-A Records):</strong> Maps a domain to an IPv6 address.</li><li><strong>CNAME Records (Canonical Name Records):</strong> Maps a domain to another domain name, instead of an IP address.</li><li><strong>MX Records (Mail Exchange Records): </strong>Specifies the mail servers for a domain.</li><li><strong>TXT Records:</strong> Provides arbitrary text values associated with a domain, often used for email verification.</li></ul><h3>DNS Security</h3><p>DNS faces several security threats, including DNS spoofing or poisoning, where attackers redirect traffic to malicious sites. To mitigate these risks, network administrators implement measures such as:</p><ul><li><strong>DNSSEC (DNS Security Extensions): </strong>Adds digital signatures to DNS data to verify its authenticity, preventing spoofing.</li><li><strong>DNS over HTTPS (DoH):</strong> Encrypts DNS queries, enhancing privacy and security.</li><li><strong>Regular Auditing and Monitoring:</strong> Ensures that DNS records are accurate and have not been tampered with.</li></ul><p>Understanding DNS is crucial for network administrators to maintain network integrity and security. By effectively managing DNS settings and implementing security protocols, administrators can ensure that network communications are both efficient and protected against threats. As the Internet evolves, staying informed about developments in DNS technology and security practices will remain essential for all network professionals.</p><h3>Breakdown of the primary DNS record types:</h3><h3>1. A Record (Address Record)</h3><ul><li>Purpose: Maps a domain name directly to an IPv4 address.</li><li>Use Case: Directing traffic to a web server hosting the domain’s content.</li></ul><h3>2. AAAA Record (Quad A Record)</h3><ul><li>Purpose: Maps a domain name directly to an IPv6 address.</li><li>Use Case: Similar to A records, but for domains that use IPv6 addresses, accommodating the expanded internet addressing scheme.</li></ul><h3>3. CNAME Record (Canonical Name Record)</h3><ul><li>Purpose: Maps a domain or subdomain to another domain name (the canonical name), instead of an IP address.</li><li>Use Case: Useful for aliasing domain names, where multiple domain names point to the same IP address without needing a separate A or AAAA record for each.</li></ul><h3>4. MX Record (Mail Exchange Record)</h3><ul><li>Purpose: Specifies the mail server responsible for receiving email on behalf of a domain.</li><li>Use Case: Essential for routing email to the correct server based on the domain part of an email address.</li></ul><h3>5. TXT Record (Text Record)</h3><ul><li>Purpose: Allows the domain administrator to insert arbitrary text into the DNS record.</li><li>Use Case: Commonly used for verifying domain ownership, implementing email security measures like SPF (Sender Policy Framework), and DKIM (DomainKeys Identified Mail).</li></ul><h3>6. NS Record (Name Server Record)</h3><ul><li>Purpose: Indicates the authoritative DNS servers for a domain, guiding where DNS queries should be directed for further information.</li><li>Use Case: Essential for delegating a domain or subdomain to use a specific set of name servers, usually at the beginning of domain registration or when changing DNS providers.</li></ul><h3>7. PTR Record (Pointer Record)</h3><ul><li>Purpose: Maps an IP address (IPv4 or IPv6) back to a domain name, essentially the opposite of an A or AAAA record.</li><li>Use Case: Primarily used for reverse DNS lookups, which are important for network troubleshooting and email spam filtering, as it verifies IP addresses against domain names.</li></ul><h3>8. SRV Record (Service Record)</h3><ul><li>Purpose: Specifies the location of services, including the hostname and port number for servers offering specific services.</li><li>Use Case: Important for protocols requiring service discovery, such as SIP (Session Initiation Protocol) for VoIP (Voice over IP) services, and LDAP (Lightweight Directory Access Protocol) for directory services.</li></ul><h3>9. SOA Record (Start of Authority Record)</h3><ul><li>Purpose: Contains administrative information about a zone, including the primary name server, email of the domain administrator, domain serial number, and timers relating to refreshing the zone.</li><li>Use Case: Essential for managing DNS zone transfers, helping maintain consistency across distributed DNS environments.</li></ul><h3>10. CAA Record (Certification Authority Authorization Record)</h3><ul><li>Purpose: Specifies which certificate authorities (CAs) are allowed to issue certificates for a domain.</li><li>Use Case: Enhances security by preventing unauthorized issuance of certificates, thus protecting against certain types of SSL/TLS attacks.</li></ul><h3>11. NAPTR Record (Naming Authority Pointer Record)</h3><ul><li>Purpose: Used in dynamic and complex DNS environments to provide rules for rewriting and redirecting queries, often in conjunction with SIP and ENUM (E.164 Number Mapping) protocols.</li><li>Use Case: Useful in applications requiring the routing of communications based on policies, such as in VoIP and unified communications systems.</li></ul><h3>12. DNAME Record (Delegation Name Record)</h3><ul><li>Purpose: Redirects all queries for a domain to another domain, effectively mirroring one part of the DNS namespace in another.</li><li>Use Case: Unlike CNAME, which works at the individual record level, DNAME operates on an entire subtree of the domain, making it suitable for wholesale domain redirection.</li></ul><p>Understanding and effectively managing these DNS records are essential for ensuring that internet services are correctly routed, domain names are resolved efficiently, and the overall internet infrastructure remains robust and secure.</p><h3>Example Entries for Records</h3><h3>1. A Record (Address Record)</h3><ul><li>Example: example.com. IN A 93.184.216.34</li><li>Explanation: This entry maps example.com to the IPv4 address 93.184.216.34.</li></ul><h3>2. AAAA Record (Quad A Record)</h3><ul><li>Example: example.com. IN AAAA 2606:2800:220:1:248:1893:25c8:1946</li><li>Explanation: This maps example.com to the IPv6 address 2606:2800:220:1:248:1893:25c8:1946.</li></ul><h3>3. CNAME Record (Canonical Name Record)</h3><ul><li>Example: www.example.com. IN CNAME example.com.</li><li>Explanation: This makes www.example.com an alias of example.com, meaning it will resolve to the same IP address as example.com.</li></ul><h3>4. MX Record (Mail Exchange Record)</h3><ul><li>Example: example.com. IN MX 10 mail.example.com.</li><li>Explanation: Directs emails for example.com to the mail server at mail.example.com. The number 10 is the priority, with lower numbers having higher priority.</li></ul><h3>5. TXT Record (Text Record)</h3><ul><li>Example: example.com. IN TXT &quot;v=spf1 include:_spf.google.com ~all&quot;</li><li>Explanation: Defines an SPF record for example.com that includes Google&#39;s SPF records, helping to prevent email spoofing.</li></ul><h3>6. NS Record (Name Server Record)</h3><ul><li>Example: example.com. IN NS ns1.exampledns.com.</li><li>Explanation: Specifies that ns1.exampledns.com is an authoritative name server for example.com.</li></ul><h3>7. PTR Record (Pointer Record)</h3><ul><li>Example: 34.216.184.93.in-addr.arpa. IN PTR example.com.</li><li>Explanation: Used in reverse DNS lookups, this entry maps the IP address 93.184.216.34 back to example.com.</li></ul><h3>8. SRV Record (Service Record)</h3><ul><li>Example: _sip._tcp.example.com. IN SRV 10 50 5060 sipserver.example.com.</li><li>Explanation: Defines a SIP service for example.com at sipserver.example.com on port 5060, with a priority of 10 and a weight of 50.</li></ul><h3>9. SOA Record (Start of Authority Record)</h3><ul><li>Example: example.com. IN SOA ns1.exampledns.com. admin.example.com. (2023041501 7200 3600 1209600 86400)</li><li>Explanation: Indicates ns1.exampledns.com as the primary name server with admin@example.com as the contact. The numbers represent the serial, refresh, retry, expire, and minimum TTL values, respectively.</li></ul><h3>10. CAA Record (Certification Authority Authorization Record)</h3><ul><li>Example: example.com. IN CAA 0 issue &quot;letsencrypt.org&quot;</li><li>Explanation: Specifies that only Let’s Encrypt is authorized to issue certificates for example.com.</li></ul><h3>11. NAPTR Record (Naming Authority Pointer Record)</h3><ul><li>Example: 2.0.3.6.1.2.4.e164.arpa. IN NAPTR 100 10 &quot;u&quot; &quot;E2U+sip&quot; &quot;!^.*$!sip:info@example.com!&quot; .</li><li>Explanation: For ENUM queries, this record specifies a rewrite rule that translates a telephone number into a SIP URI for example.com.</li></ul><h3>12. DNAME Record (Delegation Name Record)</h3><ul><li>Example: sub.example.com. IN DNAME target.example.com.</li><li>Explanation: Redirects all records under sub.example.com to target.example.com, effectively remapping a section of the DNS namespace.</li></ul><p>These examples illustrate the syntax and basic purpose of each DNS record type. In practice, network administrators and domain owners use these records to configure and manage domain-related services, optimizing both functionality and security.</p><p>Understanding the vast landscape of DNS records is a cornerstone for network administrators, webmasters, and IT professionals alike. These records serve as the backbone of the Internet’s navigational system, directing traffic and ensuring that digital communications flow seamlessly. Each type of DNS record carries out a specific role, from mapping domain names to IP addresses, to specifying email servers, and beyond. This guide aims to demystify the variety of DNS record types, presenting their purposes, use cases, and example configurations. Whether you’re setting up a new domain, configuring email services, or securing your domain against threats, a solid grasp of DNS records will empower you to manage and optimize your online presence effectively.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5cb15fa16593" width="1" height="1" alt=""><hr><p><a href="https://medium.com/it-security-in-plain-english/dns-records-explained-a-beginners-guide-to-internet-routing-5cb15fa16593">DNS Records Explained: A Beginner’s Guide to Internet Routing</a> was originally published in <a href="https://medium.com/it-security-in-plain-english">IT Security In Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>