<?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: Faruk</title>
    <description>The latest articles on DEV Community by Faruk (@cyberwebpen).</description>
    <link>https://dev.to/cyberwebpen</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3097311%2F2cee2a99-de2b-4f11-8a3e-58293230c9a4.png</url>
      <title>DEV Community: Faruk</title>
      <link>https://dev.to/cyberwebpen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cyberwebpen"/>
    <language>en</language>
    <item>
      <title>Linux Security Habit #14: I Snapshot Network State Before I Even Look at Logs</title>
      <dc:creator>Faruk</dc:creator>
      <pubDate>Sun, 04 Jan 2026 00:19:41 +0000</pubDate>
      <link>https://dev.to/cyberwebpen/linux-security-habit-14-i-snapshot-network-state-before-i-even-look-at-logs-3nce</link>
      <guid>https://dev.to/cyberwebpen/linux-security-habit-14-i-snapshot-network-state-before-i-even-look-at-logs-3nce</guid>
      <description>&lt;p&gt;Linux Security Habit #14: I Snapshot Network State Before I Even Look at Logs&lt;/p&gt;

&lt;p&gt;When something feels off on a Linux serv&lt;br&gt;
er, most people jump straight into logs.&lt;/p&gt;

&lt;p&gt;I don’t.&lt;/p&gt;

&lt;p&gt;Logs are history.&lt;br&gt;
The network is now.&lt;/p&gt;

&lt;p&gt;Before I read a single log line, I capture the current network state. That snapshot often tells me more in 30 seconds than logs do in 30 minutes.&lt;/p&gt;

&lt;p&gt;Why logs should not be first&lt;/p&gt;

&lt;p&gt;Logs can be:&lt;/p&gt;

&lt;p&gt;Rotated&lt;br&gt;
Truncated&lt;br&gt;
Delayed&lt;br&gt;
Or intentionally cleaned&lt;br&gt;
Attackers know this. They plan for it.&lt;/p&gt;

&lt;p&gt;If a system is compromised, it almost always needs live network activity&lt;br&gt;
Outbound connections to command and control&lt;br&gt;
DNS lookups to unfamiliar domains&lt;br&gt;
Listening services that should not exist&lt;br&gt;
Processes talking over ports they have no business using&lt;br&gt;
Once those connections drop, the evidence is gone.&lt;/p&gt;

&lt;p&gt;That’s why I snapshot first.&lt;br&gt;
What I capture immediately&lt;br&gt;
Before touching logs or restarting anything, I capture:&lt;br&gt;
Active connections and listening ports&lt;br&gt;
Established outbound connections&lt;/p&gt;

&lt;p&gt;DNS behavior&lt;br&gt;
Routing and interfaces&lt;br&gt;
Process-to-connection mappings&lt;/p&gt;

&lt;p&gt;This freezes the moment in time. Even if the attacker disconnects seconds later, I now have proof.&lt;/p&gt;

&lt;p&gt;The pattern logs often miss&lt;br&gt;
I have seen many incidents where:&lt;br&gt;
Auth logs looked clean&lt;br&gt;
No brute-force attempts appeared&lt;br&gt;
No obvious errors showed up&lt;br&gt;
Yet the network snapshot revealed:&lt;br&gt;
Persistent outbound TLS connections&lt;br&gt;
Traffic to IPs unrelated to the server’s role&lt;br&gt;
Legit-looking processes doing illegitimate things&lt;br&gt;
Logs stayed quiet because the attack worked.&lt;/p&gt;

&lt;p&gt;Why this habit matters&lt;/p&gt;

&lt;p&gt;Taking the network snapshot first:&lt;br&gt;
Preserves evidence&lt;br&gt;
Prevents accidental destruction of context&lt;br&gt;
Shortens investigation time&lt;br&gt;
Leads to faster containment decisions&lt;/p&gt;

&lt;p&gt;It also prevents the worst mistake in incident response:&lt;br&gt;
changing system state before understanding it.&lt;/p&gt;

&lt;p&gt;If you want this automated&lt;/p&gt;

&lt;p&gt;I built a small tool that automates this exact habit.&lt;/p&gt;

&lt;p&gt;🔐 Incident Snapshot &amp;amp; Evidence Generator (Linux)&lt;br&gt;
Captures network state, processes, auth activity, and persistence signals in one quick run.&lt;br&gt;
👉 &lt;a href="https://ko-fi.com/s/22ab38ab12" rel="noopener noreferrer"&gt;https://ko-fi.com/s/22ab38ab12&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It runs fast, does not modify system state, and gives you a clean evidence bundle to analyze calmly.&lt;/p&gt;

&lt;p&gt;Strengthen SSH before incidents happen&lt;/p&gt;

&lt;p&gt;If SSH exposure is part of your threat model, this helps catch attacks in real time.&lt;/p&gt;

&lt;p&gt;🔐 SSH-IDS — Real-Time SSH Intrusion Detection for Linux&lt;br&gt;
Email alerts, optional auto-blocking, lightweight and simple.&lt;br&gt;
👉 &lt;a href="https://ko-fi.com/s/9b510f7393" rel="noopener noreferrer"&gt;https://ko-fi.com/s/9b510f7393&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Free checklist (no spam)&lt;/p&gt;

&lt;p&gt;If you want to harden SSH the right way before things go wrong:&lt;/p&gt;

&lt;p&gt;📄 Free SSH Hardening Checklist (PDF)&lt;br&gt;
👉 &lt;a href="https://preview.mailerlite.io/preview/1998020/sites/174539599429764363/6lso1l?fresh=1" rel="noopener noreferrer"&gt;https://preview.mailerlite.io/preview/1998020/sites/174539599429764363/6lso1l?fresh=1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Final thought&lt;/p&gt;

&lt;p&gt;Logs tell you what survived.&lt;br&gt;
The network tells you what is happening.&lt;br&gt;
Snapshot first. Analyze second.&lt;/p&gt;

&lt;p&gt;Follow me on social media:&lt;br&gt;
🔗 LinkedIn: &lt;a href="https://www.linkedin.com/in/bornaly/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/bornaly/&lt;/a&gt;&lt;br&gt;
✍️ Medium: &lt;a href="https://medium.com/@bornaly/subscribe" rel="noopener noreferrer"&gt;https://medium.com/@bornaly/subscribe&lt;/a&gt;&lt;br&gt;
💬 Discord: &lt;a href="https://discord.gg/FkjR2WFs" rel="noopener noreferrer"&gt;https://discord.gg/FkjR2WFs&lt;/a&gt;&lt;br&gt;
🐦 X (Twitter): &lt;a href="https://x.com/cyberwebpen" rel="noopener noreferrer"&gt;https://x.com/cyberwebpen&lt;/a&gt;&lt;br&gt;
📘 Facebook: &lt;a href="https://www.facebook.com/nextgenthreat" rel="noopener noreferrer"&gt;https://www.facebook.com/nextgenthreat&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linuxsecurity</category>
      <category>linuxadmin</category>
      <category>infosec</category>
    </item>
    <item>
      <title>I Got Tired of Guessing About Linux Security — So I Built a One-Command Snapshot</title>
      <dc:creator>Faruk</dc:creator>
      <pubDate>Thu, 01 Jan 2026 14:19:09 +0000</pubDate>
      <link>https://dev.to/cyberwebpen/i-got-tired-of-guessing-about-linux-security-so-i-built-a-one-command-snapshot-1p90</link>
      <guid>https://dev.to/cyberwebpen/i-got-tired-of-guessing-about-linux-security-so-i-built-a-one-command-snapshot-1p90</guid>
      <description>&lt;p&gt;Most Linux servers don’t fail loudly when something goes wrong.&lt;br&gt;
They drift.&lt;/p&gt;

&lt;p&gt;A new cron job.&lt;br&gt;
A modified binary.&lt;br&gt;
A quiet outbound connection.&lt;/p&gt;

&lt;p&gt;Nothing obvious — until it matters.&lt;/p&gt;

&lt;p&gt;I noticed that when I wanted to “check a server,” I kept running the same commands manually, hoping I didn’t forget anything. That doesn’t scale, and it’s easy to miss context.&lt;/p&gt;

&lt;p&gt;So I built a small, read-only tool for myself:&lt;/p&gt;

&lt;p&gt;Linux Blindspot Report&lt;br&gt;
It runs once and generates:&lt;br&gt;
A risk score + severity summary&lt;br&gt;
A clean HTML report&lt;br&gt;
A TXT report for SSH-only systems&lt;/p&gt;

&lt;p&gt;A local evidence pack you can review or escalate&lt;/p&gt;

&lt;p&gt;No agents.&lt;br&gt;
No installs.&lt;br&gt;
Nothing sent off the box.&lt;/p&gt;

&lt;p&gt;It doesn’t replace full forensics — it gives you fast clarity.&lt;/p&gt;

&lt;p&gt;If you’re interested, details are here:&lt;br&gt;
👉 [&lt;a href="https://ko-fi.com/s/288adc543e" rel="noopener noreferrer"&gt;https://ko-fi.com/s/288adc543e&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;I also share a free SSH hardening checklist (no email):&lt;br&gt;
👉 [&lt;a href="https://preview.mailerlite.io/preview/1998020/sites/174539599429764363/6lso1l?fresh=1" rel="noopener noreferrer"&gt;https://preview.mailerlite.io/preview/1998020/sites/174539599429764363/6lso1l?fresh=1&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;Happy to hear feedback from other Linux admins.&lt;/p&gt;

</description>
      <category>blueteam</category>
      <category>sysad</category>
      <category>opensource</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>Why I Use Cold Backups Instead of Relying Only on Snapshots | by Faruk Ahmed | Sep, 2025</title>
      <dc:creator>Faruk</dc:creator>
      <pubDate>Thu, 25 Sep 2025 22:42:49 +0000</pubDate>
      <link>https://dev.to/cyberwebpen/why-i-use-cold-backups-instead-of-relying-only-on-snapshots-by-faruk-ahmed-sep-2025-3fb</link>
      <guid>https://dev.to/cyberwebpen/why-i-use-cold-backups-instead-of-relying-only-on-snapshots-by-faruk-ahmed-sep-2025-3fb</guid>
      <description>&lt;p&gt;Member-only story&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Use Cold Backups Instead of Relying Only on Snapshots
&lt;/h2&gt;

&lt;p&gt;--&lt;/p&gt;

&lt;p&gt;1&lt;/p&gt;

&lt;p&gt;Share&lt;/p&gt;

&lt;p&gt;Most teams rely on snapshots or live backups to protect their Linux servers. They’re fast, convenient, and easy to schedule. But I’ve learned the hard way: snapshots alone aren’t enough.&lt;/p&gt;

&lt;p&gt;That’s why I always keep cold backups — offline, disconnected copies that malware or attackers can’t touch.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚨 The Problem With Snapshots Alone
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Ransomware Ready → If your hypervisor or cloud account is compromised, snapshots can be encrypted right along with production.&lt;/li&gt;
&lt;li&gt;Silent Corruption → Snapshots faithfully preserve corruption too . If the system is already compromised, your snapshot is a compromised clone.&lt;/li&gt;
&lt;li&gt;Same Trust Boundary → Snapshots live in the same environment as the system itself — if an attacker gets root or cloud admin, they own your backups too.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🛡️ Why Cold Backups Are Different
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Air-Gapped → Disconnected from the network after creation.&lt;/li&gt;
&lt;li&gt;Immutable → Copies can’t be altered without deliberate action.&lt;/li&gt;
&lt;li&gt;Recoverable → Even if production is destroyed, you can rebuild from the offline backup.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🛠 How I Do It
&lt;/h2&gt;




&lt;h3&gt;
  
  
  👉 &lt;a href="https://medium.com/@bornaly/why-i-use-cold-backups-instead-of-relying-only-on-snapshots-a4c22c6c4a50" rel="noopener noreferrer"&gt;Read Full Blog on Medium Here&lt;/a&gt;
&lt;/h3&gt;

</description>
      <category>snapshots</category>
      <category>backups</category>
      <category>why</category>
      <category>cold</category>
    </item>
    <item>
      <title>Why I Don’t Trust Default Firewall Rules on Linux Servers | by Faruk Ahmed | Sep, 2025</title>
      <dc:creator>Faruk</dc:creator>
      <pubDate>Wed, 24 Sep 2025 22:37:10 +0000</pubDate>
      <link>https://dev.to/cyberwebpen/why-i-dont-trust-default-firewall-rules-on-linux-servers-by-faruk-ahmed-sep-2025-4f4j</link>
      <guid>https://dev.to/cyberwebpen/why-i-dont-trust-default-firewall-rules-on-linux-servers-by-faruk-ahmed-sep-2025-4f4j</guid>
      <description>&lt;p&gt;Member-only story&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Don’t Trust Default Firewall Rules on Linux Servers
&lt;/h2&gt;

&lt;p&gt;--&lt;/p&gt;

&lt;p&gt;3&lt;/p&gt;

&lt;p&gt;Share&lt;/p&gt;

&lt;p&gt;Every Linux distro ships with its own firewall defaults — whether that’s ufw , firewalld , or plain iptables . But in my experience, default firewall rules are never enough.&lt;br&gt;
&lt;code&gt;ufw&lt;/code&gt; &lt;code&gt;firewalld&lt;/code&gt; &lt;code&gt;iptables&lt;/code&gt; &lt;br&gt;
Here’s why I never rely on them, and how I build firewall policies that actually protect my servers.&lt;/p&gt;
&lt;h2&gt;
  
  
  🚨 The Problem With Default Rules
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Too Permissive Some distros allow all outbound traffic by default — including to malicious IPs.&lt;/li&gt;
&lt;li&gt;Assumes “One Size Fits All” A web server and a database server shouldn’t have the same rules, but defaults often treat them the same.&lt;/li&gt;
&lt;li&gt;Silent Gaps Some ports stay open unintentionally (like 111 for RPC or 631 for CUPS) because they’re bundled in “trusted services.”&lt;/li&gt;
&lt;li&gt;No Egress Control Attackers love defaults because they almost always allow outbound C2 (command-and-control) traffic.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  🔐 My Firewall Hardening Steps
&lt;/h2&gt;
&lt;h2&gt;
  
  
  1. Deny by Default
&lt;/h2&gt;

&lt;p&gt;Set all inbound traffic to deny unless explicitly allowed.&lt;/p&gt;

&lt;p&gt;With UFW:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ufw default deny incoming ufw default allow outgoing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  👉 &lt;a href="https://medium.com/@bornaly/why-i-dont-trust-default-firewall-rules-on-linux-servers-307be2417f9c" rel="noopener noreferrer"&gt;Read Full Blog on Medium Here&lt;/a&gt;
&lt;/h3&gt;

</description>
      <category>default</category>
      <category>firewall</category>
      <category>rules</category>
      <category>ufw</category>
    </item>
    <item>
      <title>The Linux Log Hackers Hope You Never Check | by Faruk Ahmed | Sep, 2025</title>
      <dc:creator>Faruk</dc:creator>
      <pubDate>Wed, 24 Sep 2025 22:31:39 +0000</pubDate>
      <link>https://dev.to/cyberwebpen/the-linux-log-hackers-hope-you-never-check-by-faruk-ahmed-sep-2025-1l7f</link>
      <guid>https://dev.to/cyberwebpen/the-linux-log-hackers-hope-you-never-check-by-faruk-ahmed-sep-2025-1l7f</guid>
      <description>&lt;p&gt;Member-only story&lt;/p&gt;

&lt;h2&gt;
  
  
  The Linux Log Hackers Hope You Never Check
&lt;/h2&gt;

&lt;p&gt;--&lt;/p&gt;

&lt;p&gt;Share&lt;/p&gt;

&lt;p&gt;When attackers brute-force SSH or slip in with stolen credentials, they usually leave their first footprints in one place: /var/log/auth.log (or /var/log/secure on RHEL).&lt;br&gt;
&lt;code&gt;/var/log/auth.log&lt;/code&gt; &lt;code&gt;/var/log/secure&lt;/code&gt; &lt;br&gt;
Most admins overlook it. Hackers count on that. I don’t — and it’s saved me more than once.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚨 Why This Log Is So Critical
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Shows every SSH login attempt (success or failure)&lt;/li&gt;
&lt;li&gt;Records sudo privilege escalations
&lt;code&gt;sudo&lt;/code&gt; - Logs session activity for cron, systemd, and more&lt;/li&gt;
&lt;li&gt;Reveals unusual IPs, odd login times, and brute-force patterns&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you ignore it, you’re flying blind.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧪 Real Breach Clues I’ve Caught
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Brute Force Bots Hundreds of Failed password for root from 45.xxx… attempts in minutes. → Blocked with fail2ban.
&lt;code&gt;Failed password for root from 45.xxx…&lt;/code&gt; - Suspicious User Access A developer logging in at 3 AM from overseas. → Traced to a compromised laptop.&lt;/li&gt;
&lt;li&gt;Misconfigurations PAM errors from a broken cron job spamming auth.log. → Fixed before it spiraled into outages.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🛠 How I Monitor It
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Live View
&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;tail&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; /var/log/auth.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  👉 &lt;a href="https://medium.com/@bornaly/the-linux-log-hackers-hope-you-never-check-74f854610a53" rel="noopener noreferrer"&gt;Read Full Blog on Medium Here&lt;/a&gt;
&lt;/h3&gt;

</description>
      <category>log</category>
      <category>var</category>
      <category>hackers</category>
      <category>auth</category>
    </item>
    <item>
      <title>I Asked My Linux Server to Predict My Death. The Result Froze Me | by Faruk Ahmed | Sep, 2025</title>
      <dc:creator>Faruk</dc:creator>
      <pubDate>Wed, 24 Sep 2025 22:31:36 +0000</pubDate>
      <link>https://dev.to/cyberwebpen/i-asked-my-linux-server-to-predict-my-death-the-result-froze-me-by-faruk-ahmed-sep-2025-52l7</link>
      <guid>https://dev.to/cyberwebpen/i-asked-my-linux-server-to-predict-my-death-the-result-froze-me-by-faruk-ahmed-sep-2025-52l7</guid>
      <description>&lt;p&gt;Member-only story&lt;/p&gt;

&lt;h2&gt;
  
  
  I Asked My Linux Server to Predict My Death. The Result Froze Me
&lt;/h2&gt;

&lt;p&gt;--&lt;/p&gt;

&lt;p&gt;Share&lt;/p&gt;

&lt;p&gt;I thought it was just a script for fun. Until it gave me a date I can’t unsee — and started acting like it knew something I didn’t.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Joke That Went Too Far
&lt;/h2&gt;

&lt;p&gt;I was bored one night, tinkering on my Linux machine like always.&lt;/p&gt;

&lt;p&gt;I thought: What if I could make my server predict my death date?&lt;/p&gt;

&lt;p&gt;Not seriously — just a random future date from a script I’d call DeathPredictor.sh . I wrote it in 15 minutes.&lt;br&gt;
&lt;code&gt;DeathPredictor.sh&lt;/code&gt;&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;#!/bin/bash year=$(( $(date +%Y) + (RANDOM % 50 + 1) )) month=$(( RANDOM % 12 + 1 )) day=$(( RANDOM % 28 + 1 )) date -d "$year-$month-$day" +"%d %B %Y"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simple. Creepy. Harmless.&lt;/p&gt;

&lt;p&gt;But when I ran it…&lt;/p&gt;

&lt;h2&gt;
  
  
  It Gave Me a Real Date
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;user@server:~&lt;span class="nv"&gt;$ &lt;/span&gt;./DeathPredictor.sh 16 April 2043 user@server:~&lt;span class="err"&gt;$&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then the server froze. No logs. No CPU spike. Just silence — for 43 seconds.&lt;/p&gt;

&lt;p&gt;Then it came back online.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Date Meant Something
&lt;/h2&gt;

&lt;p&gt;At first, I laughed it off. But 16 April 2043 felt… familiar. I searched my notes, my calendar, even old family records.&lt;/p&gt;




&lt;h3&gt;
  
  
  👉 &lt;a href="https://medium.com/@bornaly/i-asked-my-linux-server-to-predict-my-death-the-result-froze-me-582fd72ee980" rel="noopener noreferrer"&gt;Read Full Blog on Medium Here&lt;/a&gt;
&lt;/h3&gt;

</description>
      <category>server</category>
      <category>date</category>
      <category>linux</category>
      <category>predict</category>
    </item>
    <item>
      <title>The Hidden Danger of Old Users: Why I Regularly Audit /etc/passwd on My Linux Servers | by Faruk Ahmed | nextgenthreat</title>
      <dc:creator>Faruk</dc:creator>
      <pubDate>Wed, 24 Sep 2025 18:33:21 +0000</pubDate>
      <link>https://dev.to/cyberwebpen/the-hidden-danger-of-old-users-why-i-regularly-audit-etcpasswd-on-my-linux-servers-by-faruk-3gah</link>
      <guid>https://dev.to/cyberwebpen/the-hidden-danger-of-old-users-why-i-regularly-audit-etcpasswd-on-my-linux-servers-by-faruk-3gah</guid>
      <description>&lt;p&gt;Member-only story&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hidden Danger of Old Users: Why I Regularly Audit /etc/passwd on My Linux Servers
&lt;/h2&gt;

&lt;p&gt;--&lt;/p&gt;

&lt;p&gt;1&lt;/p&gt;

&lt;p&gt;Share&lt;/p&gt;

&lt;p&gt;Intro: Think your server is secure because it has no root logins and a strong firewall? You might be forgetting something silent but dangerous: stale user accounts . Over time, forgotten system users, leftover developers, or unrevoked test accounts pile up — and they’re a goldmine for attackers. Here’s why I audit /etc/passwd regularly, and how you can do it too.&lt;br&gt;
&lt;code&gt;/etc/passwd&lt;/code&gt; &lt;/p&gt;
&lt;h2&gt;
  
  
  1. Why Old User Accounts Are a Real Risk
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Unused accounts are often ignored in patching or permission reviews.&lt;/li&gt;
&lt;li&gt;Some may still have sudo access or weak passwords.&lt;/li&gt;
&lt;li&gt;If one is compromised, it could provide lateral movement inside your environment.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  2. My Quick Script to List Human Users
&lt;/h2&gt;

&lt;p&gt;System accounts are usually below UID 1000. I use this to find real users:&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="nt"&gt;-F&lt;/span&gt;: &lt;span class="s1"&gt;'$3 &amp;gt;= 1000 &amp;amp;&amp;amp; $1 != "nobody" { print $1 }'&lt;/span&gt; /etc/passwd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Want more detail?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;getent passwd | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="nt"&gt;-F&lt;/span&gt;: &lt;span class="s1"&gt;'$3 &amp;gt;= 1000 &amp;amp;&amp;amp; $7 != "/usr/sbin/nologin" &amp;amp;&amp;amp; $7 != "/bin/false"'&lt;/span&gt; | &lt;span class="nb"&gt;cut&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt;: &lt;span class="nt"&gt;-f1&lt;/span&gt;,6,7
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This lists:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Username&lt;/li&gt;
&lt;li&gt;Home directory&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  👉 &lt;a href="https://medium.com/nextgenthreat/the-hidden-danger-of-old-users-why-i-regularly-audit-etc-passwd-on-my-linux-servers-53a2addb47dc" rel="noopener noreferrer"&gt;Read Full Blog on Medium Here&lt;/a&gt;
&lt;/h3&gt;

</description>
      <category>passwd</category>
      <category>users</category>
      <category>etc</category>
      <category>why</category>
    </item>
    <item>
      <title>Why I Always Use chattr to Protect Critical Linux Files | by Faruk Ahmed | Sep, 2025</title>
      <dc:creator>Faruk</dc:creator>
      <pubDate>Wed, 24 Sep 2025 18:32:31 +0000</pubDate>
      <link>https://dev.to/cyberwebpen/why-i-always-use-chattr-to-protect-critical-linux-files-by-faruk-ahmed-sep-2025-5go3</link>
      <guid>https://dev.to/cyberwebpen/why-i-always-use-chattr-to-protect-critical-linux-files-by-faruk-ahmed-sep-2025-5go3</guid>
      <description>&lt;p&gt;Member-only story&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Always Use chattr to Protect Critical Linux Files
&lt;/h2&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;chattr&lt;/code&gt; 
&lt;/h2&gt;

&lt;p&gt;3&lt;/p&gt;

&lt;p&gt;Share&lt;/p&gt;

&lt;p&gt;Permissions in Linux are powerful, but sometimes they’re not enough. If an attacker gets root, they can still modify or delete sensitive files. That’s why I use the chattr (change attribute) command as an extra layer of defense.&lt;br&gt;
&lt;code&gt;chattr&lt;/code&gt; &lt;br&gt;
It’s a small step that can block both mistakes and attacks.&lt;/p&gt;
&lt;h2&gt;
  
  
  🚨 Why Permissions Alone Aren’t Enough
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Root override → Even if files are chmod 600 , root can still edit them.
&lt;code&gt;chmod 600&lt;/code&gt; - Accidental edits → Admins (myself included) can mistype commands and break critical configs.&lt;/li&gt;
&lt;li&gt;Malware persistence → Many backdoors work by silently modifying files like /etc/passwd or /etc/ssh/sshd_config .
&lt;code&gt;/etc/passwd&lt;/code&gt; &lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt; 
## 🔐 How chattr Helps
&lt;code&gt;chattr&lt;/code&gt; 
The chattr command lets you add special attributes to files on ext filesystems. Most useful:
&lt;code&gt;chattr&lt;/code&gt; - +i → Immutable : file cannot be modified, renamed, or deleted (even by root).
&lt;code&gt;+i&lt;/code&gt; - +a → Append-only : file can only be written to (not erased).
&lt;code&gt;+a&lt;/code&gt; 
## 🛠️ Step 1: Protect Sensitive Configs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example: Protect SSH config.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;chattr +i /etc/ssh/sshd_config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  👉 &lt;a href="https://medium.com/@bornaly/why-i-always-use-chattr-to-protect-critical-linux-files-550524b94d7b" rel="noopener noreferrer"&gt;Read Full Blog on Medium Here&lt;/a&gt;
&lt;/h3&gt;

</description>
      <category>chattr</category>
      <category>files</category>
      <category>why</category>
      <category>protect</category>
    </item>
    <item>
      <title>Why I Always Restrict Cron Jobs on Linux Servers | by Faruk Ahmed | Sep, 2025</title>
      <dc:creator>Faruk</dc:creator>
      <pubDate>Wed, 24 Sep 2025 18:27:28 +0000</pubDate>
      <link>https://dev.to/cyberwebpen/why-i-always-restrict-cron-jobs-on-linux-servers-by-faruk-ahmed-sep-2025-136f</link>
      <guid>https://dev.to/cyberwebpen/why-i-always-restrict-cron-jobs-on-linux-servers-by-faruk-ahmed-sep-2025-136f</guid>
      <description>&lt;p&gt;Member-only story&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Always Restrict Cron Jobs on Linux Servers
&lt;/h2&gt;

&lt;p&gt;--&lt;/p&gt;

&lt;p&gt;Share&lt;/p&gt;

&lt;p&gt;Cron is one of the most powerful features in Linux — it automates tasks, rotates logs, and runs maintenance scripts. But in my experience, cron is also one of the easiest places for attackers to hide persistence .&lt;/p&gt;

&lt;p&gt;That’s why I always restrict, monitor, and audit cron jobs as part of my hardening process.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚨 Why Cron Jobs Can Be Dangerous
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Persistence Backdoor Attackers drop malicious scripts in /etc/cron.d/ or user crontabs to execute silently.
&lt;code&gt;/etc/cron.d/&lt;/code&gt; - Privilege Abuse If cron runs as root, even a simple script ( wget a payload, start a reverse shell) can compromise the system.
&lt;code&gt;wget&lt;/code&gt; - Silent Failures A cron job can fail quietly without alerting you, while malicious jobs keep running unnoticed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🔍 Step 1: List All Cron Jobs
&lt;/h2&gt;

&lt;p&gt;System-wide:&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;ls&lt;/span&gt; &lt;span class="nt"&gt;-la&lt;/span&gt; /etc/cron&lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;cat&lt;/span&gt; /etc/crontab
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Per user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;crontab &lt;span class="nt"&gt;-l&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt; username
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Systemd timers (often overlooked):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl list-timers &lt;span class="nt"&gt;--all&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🛠 Step 2: Restrict Cron Access
&lt;/h2&gt;

&lt;p&gt;Edit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vi /etc/cron.allow vi /etc/cron.deny
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  👉 &lt;a href="https://medium.com/@bornaly/why-i-always-restrict-cron-jobs-on-linux-servers-08662de6d71f" rel="noopener noreferrer"&gt;Read Full Blog on Medium Here&lt;/a&gt;
&lt;/h3&gt;

</description>
      <category>cron</category>
      <category>jobs</category>
      <category>etc</category>
      <category>why</category>
    </item>
    <item>
      <title>Why I Always Disable Unused Services on Linux Servers | by Faruk Ahmed | Sep, 2025</title>
      <dc:creator>Faruk</dc:creator>
      <pubDate>Wed, 24 Sep 2025 18:27:00 +0000</pubDate>
      <link>https://dev.to/cyberwebpen/why-i-always-disable-unused-services-on-linux-servers-by-faruk-ahmed-sep-2025-3cg0</link>
      <guid>https://dev.to/cyberwebpen/why-i-always-disable-unused-services-on-linux-servers-by-faruk-ahmed-sep-2025-3cg0</guid>
      <description>&lt;p&gt;Member-only story&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Always Disable Unused Services on Linux Servers
&lt;/h2&gt;

&lt;p&gt;--&lt;/p&gt;

&lt;p&gt;Share&lt;/p&gt;

&lt;p&gt;When I take over a new Linux server, one of the first things I do is check which services are running . Why? Because every service left running is another potential door for attackers .&lt;/p&gt;

&lt;p&gt;Here’s why disabling unused services is one of the fastest wins in hardening — and how I do it step by step.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚨 The Risks of Leaving Services Running
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Increased Attack Surface An open port means someone can knock on it. Even if the service isn’t vulnerable today, it could be tomorrow.&lt;/li&gt;
&lt;li&gt;Privilege Escalation Paths Services running as root can become a direct route to full system compromise.
&lt;code&gt;root&lt;/code&gt; - Resource Drain Unused daemons eat CPU, memory, and bandwidth for no reason.&lt;/li&gt;
&lt;li&gt;Compliance Failures CIS Benchmarks, PCI-DSS, and HIPAA all require minimizing unnecessary services.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🔍 Step 1: Identify What’s Running
&lt;/h2&gt;

&lt;p&gt;Check active services:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl list-unit-files &lt;span class="nt"&gt;--type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;service &lt;span class="nt"&gt;--state&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;enabled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check open ports:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ss &lt;span class="nt"&gt;-tulnp&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;➡️ Any service listening externally that you don’t need is a candidate for shutdown.&lt;/p&gt;




&lt;h3&gt;
  
  
  👉 &lt;a href="https://medium.com/@bornaly/why-i-always-disable-unused-services-on-linux-servers-be91f0ff0901" rel="noopener noreferrer"&gt;Read Full Blog on Medium Here&lt;/a&gt;
&lt;/h3&gt;

</description>
      <category>services</category>
      <category>why</category>
      <category>unused</category>
      <category>running</category>
    </item>
    <item>
      <title>Why I Always Set a Login Banner on Linux Servers (and What I Put in It) | by Faruk Ahmed | Sep, 2025</title>
      <dc:creator>Faruk</dc:creator>
      <pubDate>Wed, 24 Sep 2025 17:50:55 +0000</pubDate>
      <link>https://dev.to/cyberwebpen/why-i-always-set-a-login-banner-on-linux-servers-and-what-i-put-in-it-by-faruk-ahmed-sep-2025-3f60</link>
      <guid>https://dev.to/cyberwebpen/why-i-always-set-a-login-banner-on-linux-servers-and-what-i-put-in-it-by-faruk-ahmed-sep-2025-3f60</guid>
      <description>&lt;p&gt;Member-only story&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Always Set a Login Banner on Linux Servers (and What I Put in It)
&lt;/h2&gt;

&lt;p&gt;--&lt;/p&gt;

&lt;p&gt;3&lt;/p&gt;

&lt;p&gt;Share&lt;/p&gt;

&lt;p&gt;Most admins skip the login banner. It feels cosmetic — just text before the login prompt. But in reality, it’s one of the most underestimated security controls I use on my Linux servers.&lt;/p&gt;

&lt;p&gt;Here’s why I always enable it, what I include in it, and how it helps both security and compliance.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚨 Why a Login Banner Matters
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Legal Warning A banner makes it crystal clear: “Unauthorized access is prohibited.” This helps protect you legally if your system is breached.&lt;/li&gt;
&lt;li&gt;Deters Casual Attackers Automated bots won’t care — but opportunistic attackers often move on when they see a monitored system.&lt;/li&gt;
&lt;li&gt;Compliance Requirement CIS Benchmarks, PCI-DSS, HIPAA, and government systems all require banners.&lt;/li&gt;
&lt;li&gt;User Accountability Even legit users are reminded that activity is logged and monitored.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🛠 Step 1: Set the Message
&lt;/h2&gt;

&lt;p&gt;Edit /etc/issue for pre-login banners:&lt;br&gt;
&lt;code&gt;/etc/issue&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vi /etc/issue
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;WARNING: This system is &lt;span class="k"&gt;for &lt;/span&gt;authorized use only. All activities are monitored and logged. Unauthorized access will be prosecuted.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  👉 &lt;a href="https://medium.com/@bornaly/why-i-always-set-a-login-banner-on-linux-servers-and-what-i-put-in-it-60eec3336f3b" rel="noopener noreferrer"&gt;Read Full Blog on Medium Here&lt;/a&gt;
&lt;/h3&gt;

</description>
      <category>login</category>
      <category>banner</category>
      <category>why</category>
      <category>always</category>
    </item>
    <item>
      <title>Why I Always Disable Unused Linux Services After Installation | by Faruk Ahmed | Sep, 2025</title>
      <dc:creator>Faruk</dc:creator>
      <pubDate>Wed, 24 Sep 2025 17:49:59 +0000</pubDate>
      <link>https://dev.to/cyberwebpen/why-i-always-disable-unused-linux-services-after-installation-by-faruk-ahmed-sep-2025-1h9p</link>
      <guid>https://dev.to/cyberwebpen/why-i-always-disable-unused-linux-services-after-installation-by-faruk-ahmed-sep-2025-1h9p</guid>
      <description>&lt;p&gt;Member-only story&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Always Disable Unused Linux Services After Installation
&lt;/h2&gt;

&lt;p&gt;--&lt;/p&gt;

&lt;p&gt;Share&lt;/p&gt;

&lt;p&gt;A fresh Linux install might feel clean — but behind the scenes, it often starts up services you don’t actually need. Each one is another open door, another potential exploit, and another log entry you have to monitor.&lt;/p&gt;

&lt;p&gt;That’s why one of my first hardening steps is simple: disable everything I’m not using.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚨 The Risk of Unnecessary Services
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Attack Surface : Every listening service is a potential entry point.&lt;/li&gt;
&lt;li&gt;Resource Drain : Idle daemons still consume CPU and memory.&lt;/li&gt;
&lt;li&gt;Noise in Logs : More services = more clutter, harder to spot real issues.&lt;/li&gt;
&lt;li&gt;Zero-Day Risk : Even unused software can be hit by future vulnerabilities.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🔍 Step 1: Check Active Services
&lt;/h2&gt;

&lt;p&gt;I start with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl list-unit-files &lt;span class="nt"&gt;--type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;service &lt;span class="nt"&gt;--state&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;enabled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or to see running services:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl &lt;span class="nt"&gt;--type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;service &lt;span class="nt"&gt;--state&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;running
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I cross-check against what the server is actually supposed to do.&lt;/p&gt;

&lt;h2&gt;
  
  
  🛠 Step 2: Disable What’s Not Needed
&lt;/h2&gt;




&lt;h3&gt;
  
  
  👉 &lt;a href="https://medium.com/@bornaly/why-i-always-disable-unused-linux-services-after-installation-d99b931a866f" rel="noopener noreferrer"&gt;Read Full Blog on Medium Here&lt;/a&gt;
&lt;/h3&gt;

</description>
      <category>services</category>
      <category>disable</category>
      <category>why</category>
      <category>unused</category>
    </item>
  </channel>
</rss>
