<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shubham Chaudhary</title>
    <description>The latest articles on DEV Community by Shubham Chaudhary (@xpert4cyber).</description>
    <link>https://dev.to/xpert4cyber</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3949974%2Feaab38f0-db73-45a8-aec6-4f08adb516df.png</url>
      <title>DEV Community: Shubham Chaudhary</title>
      <link>https://dev.to/xpert4cyber</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/xpert4cyber"/>
    <language>en</language>
    <item>
      <title>Linux chown Cheat Sheet: Fix Permission Denied Without Breaking Servers</title>
      <dc:creator>Shubham Chaudhary</dc:creator>
      <pubDate>Tue, 29 Sep 2026 19:04:00 +0000</pubDate>
      <link>https://dev.to/xpert4cyber/linux-chown-cheat-sheet-fix-permission-denied-without-breaking-servers-5hj9</link>
      <guid>https://dev.to/xpert4cyber/linux-chown-cheat-sheet-fix-permission-denied-without-breaking-servers-5hj9</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqdzbe2rcqy2ppvzzpiji.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqdzbe2rcqy2ppvzzpiji.jpg" alt=" " width="800" height="800"&gt;&lt;/a&gt;Your container starts, but the app can't write to the mounted volume. The log says &lt;code&gt;permission denied&lt;/code&gt;, and a forum answer says to run a recursive chown as root.&lt;/p&gt;

&lt;p&gt;Before you paste it, here is what to know.&lt;/p&gt;

&lt;h2&gt;
  
  
  The commands you'll use most
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chown &lt;/span&gt;user file.txt          &lt;span class="c"&gt;# change owner&lt;/span&gt;
&lt;span class="nb"&gt;chown &lt;/span&gt;user:group file.txt    &lt;span class="c"&gt;# change owner and group&lt;/span&gt;
&lt;span class="nb"&gt;chown&lt;/span&gt; :group file.txt        &lt;span class="c"&gt;# change group only&lt;/span&gt;
&lt;span class="nb"&gt;chown&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; user:group folder/  &lt;span class="c"&gt;# recursive change&lt;/span&gt;
&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-ln&lt;/span&gt; file.txt              &lt;span class="c"&gt;# verify numeric UID/GID&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why containers make this tricky
&lt;/h2&gt;

&lt;p&gt;A user name on your host may map to a different number inside a container or on a restored backup. When volumes misbehave, check the numeric IDs with &lt;code&gt;ls -ln&lt;/code&gt; and use &lt;code&gt;chown 1000:1000 file.txt&lt;/code&gt; when the numbers matter more than the names.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it goes wrong
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;chown -R&lt;/code&gt; with sudo on the wrong path can break SSH logins, cron jobs, and services.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;chown user: file.txt&lt;/code&gt; does not keep the existing group. It switches to that user's login group.&lt;/li&gt;
&lt;li&gt;Owning an entire web app tree with the web server user lets a compromise rewrite the app's own code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A safer habit: preview with &lt;code&gt;find&lt;/code&gt;, change narrowly, use &lt;code&gt;-c&lt;/code&gt; or &lt;code&gt;-v&lt;/code&gt; for a record, and verify afterward.&lt;/p&gt;

&lt;h2&gt;
  
  
  The security angle
&lt;/h2&gt;

&lt;p&gt;Ownership is an access control. Files that root runs or trusts shouldn't belong to low-privileged accounts, and Linux auditd can log ownership changes so a SOC team can review them.&lt;/p&gt;

&lt;p&gt;The full guide covers 40+ examples, find-based bulk changes, symlink pitfalls, and auditd rules:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.xpert4cyber.com/2026/09/linux-chown-command-cheat-sheet.html" rel="noopener noreferrer"&gt;https://www.xpert4cyber.com/2026/09/linux-chown-command-cheat-sheet.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What is the trickiest permissions bug you have debugged? Share it below.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>cybersecurity</category>
      <category>devops</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Linux File Permissions Explained: chmod 644, 755, 600 and Safer Fixes</title>
      <dc:creator>Shubham Chaudhary</dc:creator>
      <pubDate>Mon, 28 Sep 2026 19:52:41 +0000</pubDate>
      <link>https://dev.to/xpert4cyber/linux-file-permissions-explained-chmod-644-755-600-and-safer-fixes-5a4m</link>
      <guid>https://dev.to/xpert4cyber/linux-file-permissions-explained-chmod-644-755-600-and-safer-fixes-5a4m</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9axay4gbncq67qxp1cj7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9axay4gbncq67qxp1cj7.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;Your deploy script fails with "permission denied." You run chmod 777, the error disappears, and you move on. 🚀&lt;/p&gt;

&lt;p&gt;That shortcut leaves the file writable by every local user. If a cron job, CI runner, or service executes it with higher privileges, you have created a possible privilege escalation path. ⚠️&lt;/p&gt;

&lt;p&gt;The model behind chmod is small enough to memorize:&lt;/p&gt;

&lt;p&gt;🔹 Read = 4, Write = 2, Execute = 1&lt;br&gt;
🔹 Add them per class: owner, group, others&lt;br&gt;
🔹 So 644 = rw-r--r--&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Safer defaults&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;644&lt;/code&gt; for regular files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;755&lt;/code&gt; for scripts and directories&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;600&lt;/code&gt; for SSH private keys and secrets 🔑&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;640&lt;/code&gt; for configs a service group must read&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;700&lt;/code&gt; for private directories like &lt;code&gt;~/.ssh&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Avoid blanket recursive chmod&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;chmod -R 755&lt;/code&gt; makes every file executable. Set directories and files separately instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find project/ &lt;span class="nt"&gt;-type&lt;/span&gt; d &lt;span class="nt"&gt;-exec&lt;/span&gt; &lt;span class="nb"&gt;chmod &lt;/span&gt;755 &lt;span class="o"&gt;{}&lt;/span&gt; +
find project/ &lt;span class="nt"&gt;-type&lt;/span&gt; f &lt;span class="nt"&gt;-exec&lt;/span&gt; &lt;span class="nb"&gt;chmod &lt;/span&gt;644 &lt;span class="o"&gt;{}&lt;/span&gt; +
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Audit for risky permissions (read-only)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find / &lt;span class="nt"&gt;-xdev&lt;/span&gt; &lt;span class="nt"&gt;-type&lt;/span&gt; f &lt;span class="nt"&gt;-perm&lt;/span&gt; &lt;span class="nt"&gt;-0002&lt;/span&gt; 2&amp;gt;/dev/null
find / &lt;span class="nt"&gt;-xdev&lt;/span&gt; &lt;span class="nt"&gt;-type&lt;/span&gt; f &lt;span class="nt"&gt;-perm&lt;/span&gt; &lt;span class="nt"&gt;-4000&lt;/span&gt; 2&amp;gt;/dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first lists world-writable files. The second lists setuid files, which should only be familiar system binaries. 🛡️&lt;/p&gt;

&lt;p&gt;The full guide also covers SSH key rules, setgid, the sticky bit, and auditd logging of permission changes.&lt;/p&gt;

&lt;p&gt;👉 Full Linux chmod cheat sheet: &lt;a href="https://www.xpert4cyber.com/2026/09/linux-chmod-cheat-sheet-file-permissions.html" rel="noopener noreferrer"&gt;https://www.xpert4cyber.com/2026/09/linux-chmod-cheat-sheet-file-permissions.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What is the worst permission mistake you have found in a repo or server? Share it below. 💬&lt;/p&gt;

</description>
      <category>linux</category>
      <category>security</category>
      <category>devops</category>
      <category>beginners</category>
    </item>
    <item>
      <title>OnePlus 15 Root Exploit: When Zero Permissions Still Means Full Root</title>
      <dc:creator>Shubham Chaudhary</dc:creator>
      <pubDate>Sun, 27 Sep 2026 19:23:09 +0000</pubDate>
      <link>https://dev.to/xpert4cyber/oneplus-15-root-exploit-when-zero-permissions-still-means-full-root-222h</link>
      <guid>https://dev.to/xpert4cyber/oneplus-15-root-exploit-when-zero-permissions-still-means-full-root-222h</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkzfzoz0zgfq1m1mahw8f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkzfzoz0zgfq1m1mahw8f.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;Most mobile risk models assume: no permissions requested = low risk. A newly disclosed OxygenOS vulnerability breaks that assumption completely.&lt;/p&gt;

&lt;p&gt;Security researcher Rasmus Moorats found two chained flaws in OnePlus 15 devices that let a &lt;strong&gt;completely permissionless&lt;/strong&gt; Android app execute code with full root privileges — no camera, storage, or SMS access needed. He reproduced it on a fully stock, unmodified device on the first attempt.&lt;/p&gt;

&lt;h2&gt;
  
  
  The exploit chain
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;AtlasService&lt;/strong&gt; — a OnePlus debugging service that runs as root but never verifies the calling app's identity. A crafted request gets passed unsanitized into a system command.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;olc2&lt;/strong&gt; — a hardware interface whose only guard is checking that the caller already has root, which stage one just handed over via &lt;code&gt;doShell&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Chained together, these two "debugging oversights" become a full sandbox escape with no Android permissions ever requested.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters for security tooling
&lt;/h2&gt;

&lt;p&gt;Permission-based heuristics are the backbone of most mobile threat defense (MTD) and MDM policies. This proof-of-concept app would sail past every one of them, because static analysis flags &lt;em&gt;requested&lt;/em&gt; permissions — not privileged system services with broken caller verification.&lt;/p&gt;

&lt;h2&gt;
  
  
  Current status
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✅ Fix confirmed: OxygenOS &lt;code&gt;16.0.10.500(EX01)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;⚠️ OnePlus confirms broader OPPO device ecosystem affected&lt;/li&gt;
&lt;li&gt;❌ No CVE assigned yet&lt;/li&gt;
&lt;li&gt;❌ No full affected-device list published&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Full breakdown — exploit mechanics, disclosure timeline, SOC detection strategies, and ADB commands for fleet-wide patch verification — in the original post 👇&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://www.xpert4cyber.com/2026/09/oneplus-15-root-exploit-zero-permission-apps.html" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fblogger.googleusercontent.com%2Fimg%2Fb%2FR29vZ2xl%2FAVvXsEgVRC6d_59VpUvwtGObso4alOKlH53xBKH8oTS_R5Zu3HUsdRhXKbAuehlTzgXk8kwtK4nWcEUthoiLg_C3mW7ESzirehI-ciSlvBUeDycASXRW4QPpdvSTSueiceucDFwC9RkD5tmLlNxE_8oQ9cIH8wcmWLpc9KlcXmVoMhQ0MSArZhNfiwayffe-60sI%2Fw640-h438%2Foneplus-15-root-exploit-oxygenos-vulnerability.webp" height="438" class="m-0" width="640"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://www.xpert4cyber.com/2026/09/oneplus-15-root-exploit-zero-permission-apps.html" rel="noopener noreferrer" class="c-link"&gt;
            OnePlus 15 Root Exploit: Zero-Permission Apps Can Take Full Control
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            OnePlus 15 root exploit lets zero-permission apps gain full control via OxygenOS flaws. Update now — here's what's affected and how to stay safe.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.xpert4cyber.com%2Ffavicon.ico" width="48" height="48"&gt;
          xpert4cyber.com
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>security</category>
      <category>android</category>
      <category>cybersecurity</category>
      <category>mobile</category>
    </item>
    <item>
      <title>One Misconfigured chmod Command Gave Attackers Root Access</title>
      <dc:creator>Shubham Chaudhary</dc:creator>
      <pubDate>Sun, 27 Sep 2026 17:35:25 +0000</pubDate>
      <link>https://dev.to/xpert4cyber/one-misconfigured-chmod-command-gave-attackers-root-access-4mn9</link>
      <guid>https://dev.to/xpert4cyber/one-misconfigured-chmod-command-gave-attackers-root-access-4mn9</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffnlghecjwsyki01zhcfu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffnlghecjwsyki01zhcfu.jpg" alt=" " width="800" height="800"&gt;&lt;/a&gt;TITLE: One Misconfigured chmod Command Gave Attackers Root Access&lt;/p&gt;

&lt;p&gt;TL;DR: chmod 777 as a "fix" for permission errors still causes real 2026 CVEs. Here's the mechanics, and the commands to audit this properly.&lt;/p&gt;

&lt;p&gt;If you've hit "Permission denied" and reflexively run chmod 777 — you're not alone, and it's how CVE-2026-29126 happened in March 2026. A root-owned script on embedded hardware got left world-writable. No exploit dev, no memory corruption. Any local user could edit it, and it ran as root on the next automated trigger. CVSS 8.5. A near-identical bug (CVE-2026-24063) hit a different vendor's macOS uninstaller weeks later.&lt;/p&gt;

&lt;p&gt;Both are textbook CWE-276 / CWE-732: incorrect permission assignment, entirely preventable with commands we all learned in week one and stopped thinking about.&lt;/p&gt;

&lt;p&gt;ls -l file            # current permissions&lt;br&gt;
stat file              # exact octal mode + timestamps&lt;br&gt;
chmod 750 file         # correct, not 777&lt;br&gt;
chown user:group file  # fix ownership&lt;br&gt;
umask 027              # safe defaults&lt;/p&gt;

&lt;p&gt;Also in the full writeup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The permission model (owner/group/other, octal vs symbolic), used the way an audit uses it&lt;/li&gt;
&lt;li&gt;How both 2026 CVEs worked, step by step&lt;/li&gt;
&lt;li&gt;Detection via MITRE's DET0351 strategy — auditd + SIEM correlation&lt;/li&gt;
&lt;li&gt;Hardening beyond "don't use 777": ACLs, systemd umask, checking installer output&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Full post: &lt;a href="https://www.xpert4cyber.com/2026/09/linux-file-permissions-chmod-chown-root-access.html" rel="noopener noreferrer"&gt;https://www.xpert4cyber.com/2026/09/linux-file-permissions-chmod-chown-root-access.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>security</category>
      <category>devops</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>sed for SOC Analysts: The Log Triage Skill Most Tutorials Skip</title>
      <dc:creator>Shubham Chaudhary</dc:creator>
      <pubDate>Sat, 26 Sep 2026 16:39:43 +0000</pubDate>
      <link>https://dev.to/xpert4cyber/sed-for-soc-analysts-the-log-triage-skill-most-tutorials-skip-1efj</link>
      <guid>https://dev.to/xpert4cyber/sed-for-soc-analysts-the-log-triage-skill-most-tutorials-skip-1efj</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftju2nunf4rum84mv9fut.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftju2nunf4rum84mv9fut.jpg" alt=" " width="800" height="800"&gt;&lt;/a&gt;Most write-ups on sed stop at 's/find/replace/g' and call it a day. That barely scratches what it's actually useful for in production and security work.&lt;/p&gt;

&lt;p&gt;I write a lot of Linux tutorials for a SOC-analyst audience, and sed keeps coming up as one of those commands people half-know — enough to fumble through a quick find-replace, but not enough to use it as an actual triage tool during an incident.&lt;/p&gt;

&lt;p&gt;A few practical uses that go beyond the basics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Filtering log streams in real time by piping tail -f through sed&lt;/li&gt;
&lt;li&gt;Pattern-matching for SQL injection attempts or brute-force login noise in access/auth logs&lt;/li&gt;
&lt;li&gt;Redacting IPs and sensitive fields with regex before logs get shared or archived&lt;/li&gt;
&lt;li&gt;Normalizing timestamp formats across inconsistent log sources before ingest&lt;/li&gt;
&lt;li&gt;The GNU vs BSD sed difference that breaks scripts the moment you move from Linux to macOS&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Full syntax reference plus a walkthrough built around a real brute-force + SQL injection triage scenario: &lt;a href="https://www.xpert4cyber.com/2026/09/sed-command-soc-analysts-log-triage.html" rel="noopener noreferrer"&gt;https://www.xpert4cyber.com/2026/09/sed-command-soc-analysts-log-triage.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're scripting log automation or building incident response tooling, this is one of those unglamorous skills that pays off constantly.&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>linux</category>
      <category>devops</category>
      <category>incidentresponse</category>
    </item>
    <item>
      <title>Stop Debugging Ghost Bugs in Your Log Files — Use tr</title>
      <dc:creator>Shubham Chaudhary</dc:creator>
      <pubDate>Fri, 25 Sep 2026 17:55:29 +0000</pubDate>
      <link>https://dev.to/xpert4cyber/stop-debugging-ghost-bugs-in-your-log-files-use-tr-5c02</link>
      <guid>https://dev.to/xpert4cyber/stop-debugging-ghost-bugs-in-your-log-files-use-tr-5c02</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg8ijgm21istxmrew40wp.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg8ijgm21istxmrew40wp.jpg" alt=" " width="800" height="800"&gt;&lt;/a&gt;Stop Debugging Ghost Bugs in Your Log Files — Use &lt;code&gt;tr&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You &lt;code&gt;cat&lt;/code&gt; a log file. Looks fine. You &lt;code&gt;grep&lt;/code&gt; for an IP. Nothing matches. You're not losing your mind — the file's &lt;em&gt;shape&lt;/em&gt; is broken, not its content.&lt;/p&gt;

&lt;p&gt;Common culprits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hidden &lt;code&gt;\r&lt;/code&gt; from a Windows export&lt;/li&gt;
&lt;li&gt;Inconsistent case (&lt;code&gt;Example.com&lt;/code&gt; vs &lt;code&gt;example.com&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Double/triple spaces wrecking &lt;code&gt;awk&lt;/code&gt; field splits&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;tr&lt;/code&gt; (translate) is the most underrated tool in the grep/awk/sed trio — pure character-level ops, zero regex overhead, near-zero learning curve.&lt;/p&gt;

&lt;p&gt;Quick wins:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Fix Windows -&amp;gt; Unix line endings (do this first, always)&lt;/span&gt;
&lt;span class="nb"&gt;tr&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'\r'&lt;/span&gt; &amp;lt; windows.txt &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; linux.txt

&lt;span class="c"&gt;# Normalize case before dedup&lt;/span&gt;
&lt;span class="nb"&gt;tr&lt;/span&gt; &lt;span class="s1"&gt;'A-Z'&lt;/span&gt; &lt;span class="s1"&gt;'a-z'&lt;/span&gt; &amp;lt; hosts.txt

&lt;span class="c"&gt;# Collapse messy whitespace so awk actually works&lt;/span&gt;
&lt;span class="nb"&gt;tr&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="s1"&gt;' '&lt;/span&gt; &amp;lt; export.txt

&lt;span class="c"&gt;# Whitelist-only digits (great for extracting ports/IDs)&lt;/span&gt;
&lt;span class="nb"&gt;tr&lt;/span&gt; &lt;span class="nt"&gt;-cd&lt;/span&gt; &lt;span class="s1"&gt;'0-9\n'&lt;/span&gt; &amp;lt; file.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rule of thumb: never redirect &lt;code&gt;tr&lt;/code&gt; output back onto the same file you're reading — it truncates before reading. Always write to a new file, especially when working from log/evidence copies.&lt;/p&gt;

&lt;p&gt;Full breakdown with POSIX character classes, &lt;code&gt;-cd&lt;/code&gt; whitelisting, and where this fits in a SOC/log-pipeline workflow:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://www.xpert4cyber.com/2026/09/linux-tr-command-tutorial-soc-log-cleanup.html" rel="noopener noreferrer"&gt;https://www.xpert4cyber.com/2026/09/linux-tr-command-tutorial-soc-log-cleanup.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>cybersecurity</category>
      <category>devops</category>
      <category>bash</category>
    </item>
    <item>
      <title>The Linux Command That's Quietly Saving (or Costing) SOC Teams Their Evidence</title>
      <dc:creator>Shubham Chaudhary</dc:creator>
      <pubDate>Thu, 24 Sep 2026 16:30:44 +0000</pubDate>
      <link>https://dev.to/xpert4cyber/the-linux-command-thats-quietly-saving-or-costing-soc-teams-their-evidence-2a5j</link>
      <guid>https://dev.to/xpert4cyber/the-linux-command-thats-quietly-saving-or-costing-soc-teams-their-evidence-2a5j</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv7h66iw3pgj3n38ir8fk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv7h66iw3pgj3n38ir8fk.jpg" alt=" " width="800" height="800"&gt;&lt;/a&gt;Three hours into a lateral-movement investigation, the process list on a compromised jump host shows something that shouldn't be there — and it's about to scroll off screen. There's no time to re-run the command later and hope the host still looks the same. If that output isn't captured right now, exactly as it appears, it's gone.&lt;/p&gt;

&lt;p&gt;This is a gap a lot of incident response workflows quietly have: analysts see critical output live, react to it, and never actually preserve it. By the time someone writes the report, the "evidence" is a half-remembered terminal session.&lt;/p&gt;

&lt;p&gt;There's a decades-old Unix command built for exactly this problem, and most people only use half its power.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;tee&lt;/code&gt; reads from stdin and writes that same stream to stdout and to a file simultaneously — not sequentially, not as a fallback, both at once. That's a meaningfully different tool than &lt;code&gt;command &amp;gt; file&lt;/code&gt;, which hides output from the screen entirely. During active triage, you need both: live visibility to make fast decisions, and a durable, unaltered copy to back up why you made them.&lt;/p&gt;

&lt;p&gt;In the full writeup, I cover:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The core mechanics of &lt;code&gt;tee&lt;/code&gt; and why it beats plain redirection for evidence capture&lt;/li&gt;
&lt;li&gt;A real SOC scenario building a running incident case log with &lt;code&gt;tee -a&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The full command reference — multi-file writes, sudo writes to protected paths, filtering with grep/wc/sort without losing raw output, capturing stderr&lt;/li&gt;
&lt;li&gt;The adversarial side: what unusual &lt;code&gt;tee&lt;/code&gt; invocations look like in EDR telemetry&lt;/li&gt;
&lt;li&gt;Practical tips on hashing captured logs so they hold up as real evidence&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your IR process still relies on analysts manually copy-pasting terminal output after the fact, this closes a real gap.&lt;/p&gt;

&lt;p&gt;Full guide: &lt;a href="https://www.xpert4cyber.com/2026/09/linux-tee-command-soc-incident-response.html" rel="noopener noreferrer"&gt;https://www.xpert4cyber.com/2026/09/linux-tee-command-soc-incident-response.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>cybersecurity</category>
      <category>devops</category>
      <category>security</category>
    </item>
    <item>
      <title>The Linux wc Command Every Dev Should Actually Know (Beyond Counting Lines)</title>
      <dc:creator>Shubham Chaudhary</dc:creator>
      <pubDate>Wed, 23 Sep 2026 18:53:58 +0000</pubDate>
      <link>https://dev.to/xpert4cyber/the-linux-wc-command-every-dev-should-actually-know-beyond-counting-lines-5f58</link>
      <guid>https://dev.to/xpert4cyber/the-linux-wc-command-every-dev-should-actually-know-beyond-counting-lines-5f58</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi6n169usvfgcg9ckrg9j.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi6n169usvfgcg9ckrg9j.jpg" alt=" " width="800" height="800"&gt;&lt;/a&gt;Title: The Linux wc Command Every Dev Should Actually Know (Beyond Counting Lines)&lt;br&gt;
Tags: linux, cybersecurity, commandline, devops&lt;br&gt;
Filename: linux-wc-command-tutorial-soc-log-analysis-devto.jpg&lt;/p&gt;

&lt;p&gt;Most developers meet &lt;code&gt;wc&lt;/code&gt; once — usually counting lines in a file — and never touch it again. That's a missed opportunity, especially if you ever debug logs or work near security operations.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;wc&lt;/code&gt; (word count) reports lines, words, bytes, and characters for any input, file or piped. On its own that sounds trivial. Piped after &lt;code&gt;grep&lt;/code&gt;, it becomes a fast way to quantify anything in a log:&lt;/p&gt;

&lt;p&gt;grep "Failed password" /var/log/auth.log | wc -l&lt;/p&gt;

&lt;p&gt;That one line turns a pattern match into a hard number — useful for spotting a brute-force login spike, counting error entries, or sanity-checking log volume before reaching for heavier tooling.&lt;/p&gt;

&lt;p&gt;Practical patterns worth memorizing:&lt;/p&gt;

&lt;p&gt;wc -l file.txt              # line count&lt;br&gt;
wc -w file.txt              # word count&lt;br&gt;
wc -c file.txt              # byte count&lt;br&gt;
wc -m file.txt              # character count&lt;br&gt;
wc -l /var/log/*.log        # count across rotated logs&lt;br&gt;
find . -type f | wc -l      # count files in a directory&lt;br&gt;
wc -l &amp;lt; file.txt            # number only, no filename&lt;/p&gt;

&lt;p&gt;One gotcha: &lt;code&gt;echo&lt;/code&gt; appends a trailing newline, which &lt;code&gt;wc -c&lt;/code&gt; counts as an extra byte. Use &lt;code&gt;echo -n&lt;/code&gt; when byte-accuracy actually matters.&lt;/p&gt;

&lt;p&gt;Full breakdown covering every flag, multi-file usage, piping patterns, and a real SOC brute-force detection scenario using &lt;code&gt;wc -l&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.xpert4cyber.com/2026/09/linux-wc-command-tutorial-soc-log-analysis.html" rel="noopener noreferrer"&gt;https://www.xpert4cyber.com/2026/09/linux-wc-command-tutorial-soc-log-analysis.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>cybersecurity</category>
      <category>cli</category>
      <category>devops</category>
    </item>
    <item>
      <title>cmp vs diff on Linux: The Byte-Level Comparison Tool Devs Overlook</title>
      <dc:creator>Shubham Chaudhary</dc:creator>
      <pubDate>Tue, 22 Sep 2026 18:56:37 +0000</pubDate>
      <link>https://dev.to/xpert4cyber/cmp-vs-diff-on-linux-the-byte-level-comparison-tool-devs-overlook-4a1e</link>
      <guid>https://dev.to/xpert4cyber/cmp-vs-diff-on-linux-the-byte-level-comparison-tool-devs-overlook-4a1e</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fya5kvjibdu25o49tpdo8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fya5kvjibdu25o49tpdo8.jpg" alt=" " width="800" height="800"&gt;&lt;/a&gt;Most developers know diff. Fewer know its quieter sibling: cmp — and that gap shows up the moment you need to compare something diff wasn't built for.&lt;/p&gt;

&lt;p&gt;diff is a text-diffing tool. Feed it a compiled binary, a disk image, or a compressed archive, and you either get garbage output or a flat "binary files differ" with zero useful detail. cmp doesn't have that problem — it treats every file as a raw byte stream and tells you the exact byte (and line, for text) where two files first diverge. That makes it the right tool for validating builds, checking backups, verifying downloads, and catching unexpected changes in config files or executables.&lt;/p&gt;

&lt;p&gt;I wrote up a full breakdown of cmp aimed at engineers and SOC-adjacent devs who want a fast, dependency-free integrity check without reaching for a full monitoring stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cmp vs diff — the actual technical distinction and when each applies&lt;/li&gt;
&lt;li&gt;A real-world scenario: catching a tampered config file with a single command&lt;/li&gt;
&lt;li&gt;Every practical flag explained (-s for scripting, -n for byte-range limits, -i for offset skipping) with concrete use cases&lt;/li&gt;
&lt;li&gt;How to wire cmp -s into shell scripts, cron jobs, and CI pipelines using exit-status logic&lt;/li&gt;
&lt;li&gt;Where cmp fits (and where it doesn't) next to enterprise file integrity monitoring and compliance frameworks like PCI DSS and HIPAA&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you've ever needed to confirm two binaries, ISOs, or config files are byte-for-byte identical without pulling in extra tooling, this one's worth a read.&lt;/p&gt;

&lt;p&gt;Full guide: &lt;a href="https://www.xpert4cyber.com/2026/09/linux-cmp-command-guide.html" rel="noopener noreferrer"&gt;https://www.xpert4cyber.com/2026/09/linux-cmp-command-guide.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>cybersecurity</category>
      <category>devops</category>
      <category>cli</category>
    </item>
    <item>
      <title>Linux diff Isn't Just for Code: Catch Config Drift Before It Bites</title>
      <dc:creator>Shubham Chaudhary</dc:creator>
      <pubDate>Mon, 21 Sep 2026 19:27:36 +0000</pubDate>
      <link>https://dev.to/xpert4cyber/linux-diff-isnt-just-for-code-catch-config-drift-before-it-bites-5e7</link>
      <guid>https://dev.to/xpert4cyber/linux-diff-isnt-just-for-code-catch-config-drift-before-it-bites-5e7</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgq2ktdetviyo2jorp0ea.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgq2ktdetviyo2jorp0ea.jpg" alt=" " width="800" height="800"&gt;&lt;/a&gt;You already use git diff every day. Point the same idea at a config file and it becomes a security tool.&lt;/p&gt;

&lt;p&gt;Config drift is one of the quietest problems on Linux servers. Changing PermitRootLogin from no to yes in sshd_config breaks no build and fails no review. It just sits there.&lt;/p&gt;

&lt;p&gt;Plain diff, checked against a protected baseline, catches it in seconds. My full guide covers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;diff -u for readable unified output (Git uses the same style)&lt;/li&gt;
&lt;li&gt;diff -rq dir1 dir2 to list changed files across a whole tree&lt;/li&gt;
&lt;li&gt;Exit codes 0, 1, and 2 for reliable script checks&lt;/li&gt;
&lt;li&gt;Ignore flags (-i, -w, -B) for triage, and why to re-run without them&lt;/li&gt;
&lt;li&gt;A read-only Bash check that logs drift to syslog for your SIEM&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bonus: process substitution compares command output with no temp files:&lt;/p&gt;

&lt;p&gt;diff baseline.txt &amp;lt;(cut -d: -f1 /etc/passwd | sort)&lt;/p&gt;

&lt;p&gt;Educational, defensive-security content for SOC analysts, sysadmins, and developers.&lt;/p&gt;

&lt;p&gt;Full tutorial: &lt;a href="https://www.xpert4cyber.com/2026/09/linux-diff-command-tutorial.html" rel="noopener noreferrer"&gt;https://www.xpert4cyber.com/2026/09/linux-diff-command-tutorial.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How do you track config drift today: diff, hashes, Git, or an FIM tool?&lt;/p&gt;

</description>
      <category>linux</category>
      <category>cybersecurity</category>
      <category>bash</category>
      <category>devops</category>
    </item>
    <item>
      <title>Linux uniq Command: Why Duplicates Survive (and the Fix)</title>
      <dc:creator>Shubham Chaudhary</dc:creator>
      <pubDate>Sun, 20 Sep 2026 19:01:24 +0000</pubDate>
      <link>https://dev.to/xpert4cyber/linux-uniq-command-why-duplicates-survive-and-the-fix-1l18</link>
      <guid>https://dev.to/xpert4cyber/linux-uniq-command-why-duplicates-survive-and-the-fix-1l18</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbmpye0dlqopf049ttqr4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbmpye0dlqopf049ttqr4.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;The bug: you run &lt;code&gt;uniq&lt;/code&gt; on a file and the duplicates are still there.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'alice\nalice\nbob\nalice\n'&lt;/span&gt; | &lt;span class="nb"&gt;uniq&lt;/span&gt;
&lt;span class="c"&gt;# alice&lt;/span&gt;
&lt;span class="c"&gt;# bob&lt;/span&gt;
&lt;span class="c"&gt;# alice&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;uniq&lt;/code&gt; only compares each line with the one directly before it, so scattered duplicates slip through. Sort first and the picture changes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'alice\nalice\nbob\nalice\n'&lt;/span&gt; | &lt;span class="nb"&gt;sort&lt;/span&gt; | &lt;span class="nb"&gt;uniq&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; | &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-nr&lt;/span&gt;
&lt;span class="c"&gt;#       3 alice&lt;/span&gt;
&lt;span class="c"&gt;#       1 bob&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That pattern is a fast triage tool for logs. On a web server access log, it ranks client IPs (the first field in common Apache/Nginx formats):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'{print $1}'&lt;/span&gt; access.log | &lt;span class="nb"&gt;sort&lt;/span&gt; | &lt;span class="nb"&gt;uniq&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; | &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-nr&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One address dominating the list is worth a closer look, but CDNs and corporate proxies can also produce high counts, so treat it as a lead, not proof.&lt;/p&gt;

&lt;p&gt;The full guide covers &lt;code&gt;-d&lt;/code&gt;, &lt;code&gt;-u&lt;/code&gt;, &lt;code&gt;-i&lt;/code&gt;, &lt;code&gt;-f&lt;/code&gt;, &lt;code&gt;-s&lt;/code&gt;, and &lt;code&gt;-w&lt;/code&gt;, plus SSH brute-force ranking, an /etc/passwd UID 0 audit, rare-event hunting, and how to save output without overwriting your source file:&lt;br&gt;
&lt;a href="https://www.xpert4cyber.com/2026/09/linux-uniq-command-log-analysis.html" rel="noopener noreferrer"&gt;https://www.xpert4cyber.com/2026/09/linux-uniq-command-log-analysis.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What's your go-to one-liner for log triage?&lt;/p&gt;

</description>
      <category>linux</category>
      <category>cybersecurity</category>
      <category>devops</category>
      <category>bash</category>
    </item>
    <item>
      <title>Brevo Supply Chain Attack: A Stolen Cloudflare API Key Exposed 100,000+ Sites</title>
      <dc:creator>Shubham Chaudhary</dc:creator>
      <pubDate>Sat, 19 Sep 2026 20:31:50 +0000</pubDate>
      <link>https://dev.to/xpert4cyber/brevo-supply-chain-attack-a-stolen-cloudflare-api-key-exposed-100000-sites-16n1</link>
      <guid>https://dev.to/xpert4cyber/brevo-supply-chain-attack-a-stolen-cloudflare-api-key-exposed-100000-sites-16n1</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftw0b0rwepl6lgthakouy.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftw0b0rwepl6lgthakouy.jpg" alt=" " width="800" height="800"&gt;&lt;/a&gt;🚨 Brevo Supply Chain Attack: A Stolen Cloudflare API Key Exposed 100,000+ Sites&lt;/p&gt;

&lt;p&gt;TL;DR: On Sept 14, 2026, a hardcoded Cloudflare API key let attackers deploy a malicious Worker on Brevo's infrastructure — injecting ClickFix malware and a hidden WordPress backdoor into 100,000+ sites, without ever touching origin files.&lt;/p&gt;

&lt;p&gt;🔍 How it worked:&lt;/p&gt;

&lt;p&gt;A long-lived Cloudflare API key with full account permissions was stored in Brevo's application source code. Once stolen, it let attackers create Workers, routes, and DNS records without triggering alerts.&lt;/p&gt;

&lt;p&gt;The Worker sat between visitors and Brevo's origin server, rewriting responses in transit. Origin files stayed untouched — which is exactly why standard file-integrity checks saw nothing wrong.&lt;/p&gt;

&lt;p&gt;⚔️ Two attack paths:&lt;/p&gt;

&lt;p&gt;1️⃣ ClickFix malware — regular visitors saw a fake Cloudflare "Verify You're Human" page instructing them to press Win+R → Ctrl+V → Enter. The clipboard already held a malicious command.&lt;/p&gt;

&lt;p&gt;2️⃣ WordPress backdoor — logged-in admins had a disguised plugin ("Web Media Optimizer") silently installed via their own session. It hides from the plugin list, drops into mu-plugins, and contains a hardcoded key for passwordless admin access. MFA at login wouldn't have stopped this — it rides an already-authenticated session.&lt;/p&gt;

&lt;p&gt;🛡️ Quick defensive win for WordPress devs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nb"&gt;define&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'DISALLOW_FILE_MODS'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This single wp-config.php setting disables dashboard plugin/theme installs — blocking the exact silent-install path used here.&lt;/p&gt;

&lt;p&gt;📋 What I cover in the full writeup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Confirmed timeline (per Brevo's post-mortem)&lt;/li&gt;
&lt;li&gt;Real IOCs for log hunting&lt;/li&gt;
&lt;li&gt;Nginx/WP-CLI/PowerShell detection commands&lt;/li&gt;
&lt;li&gt;Microsoft Defender KQL hunting query&lt;/li&gt;
&lt;li&gt;Full WordPress prevention checklist&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you maintain any WordPress site embedding Brevo widgets, this is a 10-minute read worth your time 👇&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://www.xpert4cyber.com/2026/09/brevo-clickfix-malware-wordpress-backdoor-attack.html" rel="noopener noreferrer"&gt;https://www.xpert4cyber.com/2026/09/brevo-clickfix-malware-wordpress-backdoor-attack.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>wordpress</category>
      <category>webdev</category>
      <category>security</category>
    </item>
  </channel>
</rss>
