<?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[Stories by Mangal_dev on Medium]]></title>
        <description><![CDATA[Stories by Mangal_dev on Medium]]></description>
        <link>https://medium.com/@learnwithworkshop?source=rss-c05e7c423530------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cggdEDQrdKorvn3OM9U8uw.jpeg</url>
            <title>Stories by Mangal_dev on Medium</title>
            <link>https://medium.com/@learnwithworkshop?source=rss-c05e7c423530------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 08:03:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@learnwithworkshop/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The 6-Minute Breach: 5 Survival Lessons from the 2026 Cyber Landscape]]></title>
            <link>https://learnwithworkshop.medium.com/the-6-minute-breach-5-survival-lessons-from-the-2026-cyber-landscape-eae8f6806b91?source=rss-c05e7c423530------2</link>
            <guid isPermaLink="false">https://medium.com/p/eae8f6806b91</guid>
            <category><![CDATA[cyber-security-2026]]></category>
            <category><![CDATA[zero-trust-model-2026]]></category>
            <category><![CDATA[cicd-pipeline-security]]></category>
            <category><![CDATA[ai-vs-ai-security]]></category>
            <category><![CDATA[teampcp-mini-shai-hulud]]></category>
            <dc:creator><![CDATA[Mangal_dev]]></dc:creator>
            <pubDate>Thu, 11 Jun 2026 03:17:39 GMT</pubDate>
            <atom:updated>2026-06-11T03:17:39.288Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3BXi5J16ennsPK5LIDc71w.png" /></figure><h3>1. The Hook: Why the Old Rules No Longer Apply</h3><p>The traditional “firewall” mentality is not just failing; it is officially obsolete. In the 2026 threat landscape, the perimeter is a ghost of a defense, bypassed by attackers who move faster than traditional security teams can even register an alert. Despite record-shattering investment in cybersecurity, breaches are becoming more intimate, automated, and devastatingly rapid.</p><p>The benchmark for survival has changed. We are no longer defending against slow, manual probes. Based on the most recent 2026 threat reports, security is now a race against a <strong>6-minute window</strong>. If your mean time to detect (MTTD) is measured in hours or days, you haven’t just been breached — you’ve been liquidated. This article distills the most alarming shifts in the 2026 landscape into five survival lessons for the modern CISO.</p><h3>2. Takeaway 1: The 6-Minute Supply Chain Execution</h3><p>The “Supply Chain War” has graduated from a theoretical risk to the primary theater of operations for sophisticated actors. The defining event of the year was the <strong>“Mini Shai-Hulud”</strong> campaign, executed by the group known as <a href="https://socradar.io/blog/dark-web-profile-teampcp/"><strong>TeamPCP</strong></a>.</p><p>On May 11, 2026, between 19:20 and 19:26 UTC, the attackers published 84 malicious versions of 42 @tanstack packages. The entire operation took exactly six minutes.</p><p><strong>The Technical Shift:</strong> This was not a simple theft of npm tokens. Attackers extracted GitHub Actions OIDC tokens directly from runtime memory to gain elevated permissions. The impact was global: OpenAI was forced to revoke its entire macOS certificate stack on June 12 after developer devices were compromised.</p><p>The nightmare deepened when the Shai-Hulud source code was released publicly on May 12, sparking a wave of copycat attacks that have rendered attribution nearly impossible. By June 1, a second front opened as RedHat Cloud Services saw 32 packages compromised with a “Miasma” payload. This “democratization” of supply chain worms means that automated, high-speed destruction is no longer the exclusive tool of state actors.</p><p>“The biggest story of the year: A Supply Chain War is underway, specifically targeting developer pipelines.”</p><h3>3. Takeaway 2: AI Malware is No Longer Science Fiction</h3><p>Artificial Intelligence is no longer just a buzzword for defenders; it is the engine driving the <a href="https://research.splunk.com/stories/promptflux/"><strong>PROMPTFLUX</strong> </a>and <strong>PROMPTSTEAL</strong> malware families. These threats query Large Language Models (LLMs) mid-execution to adapt their code and evade specific security signatures. We are also seeing the rise of “distillation attacks,” where attackers extract proprietary logic and training data directly from an organization’s machine learning models.</p><p><strong>The Irony of the Entry Point:</strong> While these threats are high-tech, they are entering through the same old door. Despite the sophistication of AI-evasive malware, <strong>63% to 67% of all confirmed incidents still involve the email channel</strong>.</p><p><strong>The Readiness Gap:</strong> Half of all global organizations have experienced an AI-related security incident this year. Yet, only one-third are prepared to investigate these breaches. Organizations are deploying AI tools without the forensic maturity to understand what happens when those tools are turned against them.</p><h3>4. Takeaway 3: Attackers Aren’t Breaking In — They’re Logging In</h3><p>The most significant paradigm shift for 2026 is that <strong>Identity is the New Perimeter</strong>. Attackers have abandoned the “break-in” for the “log-in,” abusing legitimate credentials, session tokens, and federated access.</p><p><strong>The Survival Lesson: Extortion Without Encryption.</strong> A growing number of groups are skipping the encryption phase of ransomware entirely. This is a strategic shift: by focusing solely on data theft (exfiltration), attackers render traditional “backup and restore” recovery strategies useless. You cannot “restore” your way out of a public data leak.</p><p>With the “patch-to-exploit” window now effectively zero, attackers are using AI-generated deepfakes and IT helpdesk impersonation to hijack identities before a patch can even be downloaded.</p><p>“Attackers now log in; they don’t break in.”</p><h3>5. Takeaway 4: The Massive Education and Insurance Heists</h3><p>The scale of data harvesting in 2026 is unprecedented, targeting sectors where high-value personal data meets legacy infrastructure.</p><ul><li><a href="https://www.reddit.com/r/cybersecurity/comments/1t888b2/shinyhunters_claims_275m_records_from_canvas_lms/"><strong>ShinyHunters / Canvas LMS</strong></a><strong>:</strong> A breach of the operator Instructure resulted in the theft of 275 million student and staff records across 8,809 school districts.</li><li><strong>Aflac:</strong> The insurance giant saw 22.7 million customer and agent records stolen.</li><li><strong>Targeted Aggression:</strong> While mass heists grab headlines, groups like <strong>“The Gentlemen”</strong> are conducting surgical strikes. This RaaS group has identified India as one of its top five targets, focusing specifically on the Consumer Goods, Manufacturing, and IT sectors.</li></ul><p>This highlights a clear divide: while opportunistic groups harvest the education sector for sheer volume, professional syndicates are targeting the supply chains and manufacturing heartlands of emerging economies for maximum leverage.</p><h3>6. Takeaway 5: Geopolitics and the Pre-Positioned Strike</h3><p>Cyber warfare has become the “soft launch” for kinetic conflict. This is nowhere more evident than in the Indian 2026 landscape, where the surge in aggression has been described as “unprecedented.”</p><ul><li><strong>Average Weekly Incidents (India):</strong> 3,195</li><li><strong>Education Sector Attacks:</strong> 7,684 per organization, per week.</li><li><strong>Government Attacks:</strong> 4,912 per organization, per week.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*mFR63gk_vCIPOnMwwVi1cw.png" /></figure><p>Following <strong>Operation Sindoor</strong>, investigators discovered that seven different Advanced Persistent Threat (APT) groups were active concurrently within Indian critical infrastructure. The most alarming takeaway for any strategist is the timeline: these groups had <strong>pre-positioned their access weeks before</strong> any visible or kinetic action occurred. They were not looking for a quick score; they were establishing long-term, state-sponsored presence for espionage and strategic disruption.</p><p>“Post-Operation Sindoor, the geopolitical exposure of modern infrastructure has been laid bare, with seven APT groups targeting critical networks simultaneously.”</p><h3>Conclusion: Beyond Passwords and Perimeters</h3><p>The 2026 landscape is defined by a brutal reality: the supply chain is the new primary attack surface, AI has automated evasion, and geopolitics has made everyone a target.</p><p>If your defense strategy is still centered on password complexity and virtual perimeters, you are defending a line that attackers have already bypassed. The only path forward is a total shift toward <strong>identity-centric security</strong> and <strong>behavior-based detection</strong>.</p><p>In an era where a developer’s pipeline can be compromised and wiped in 360 seconds, your defense must be as automated as the attack. You are in a race against a 6-minute clock. If you aren’t monitoring who is “in” and how they are behaving in real-time, you have already lost.</p><p><strong>Power Takeaway:</strong> Security in 2026 is not about keeping people out; it is about the speed of response. <strong>Detection time is the only metric that matters when the breach happens in minutes.</strong></p><h3>References:</h3><ul><li><strong>Akamai Security Research:</strong> <a href="https://www.akamai.com/blog/security-research/mini-shai-hulud-worm-returns-goes-public">Mini Shai-Hulud: The Worm Returns and Goes Public</a></li><li><strong>Tenable Research:</strong> <a href="https://www.tenable.com/blog/mini-shai-hulud-frequently-asked-questions">Mini Shai-Hulud Supply Chain Attack CVE-2026–45321 FAQ</a></li><li><strong>SentinelOne (2026 Statistics):</strong> <a href="https://www.google.com/search?q=https://www.sentinelone.com/cybersecurity-101/cyber-security-statistics/">Key Cyber Security Statistics for 2026</a></li><li><strong>Quick Heal (Seqrite):</strong> <a href="https://www.quickheal.co.in/knowledge-centre/operation-sindoor-anatomy-of-a-digital-siege/">Operation Sindoor — Anatomy of a Digital Siege</a></li><li><strong>Shieldworkz (OT/ICS India Advisory):</strong> <a href="https://shieldworkz.com/reports/cyber-threat-advisory-india">Cyber Threat Advisory India 2026</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eae8f6806b91" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is JWT? How is a Token Created Internally — Built Manually with Python.]]></title>
            <link>https://learnwithworkshop.medium.com/what-is-jwt-how-is-a-token-created-internally-built-manually-with-python-fc05e6401069?source=rss-c05e7c423530------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc05e6401069</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[backend-development]]></category>
            <dc:creator><![CDATA[Mangal_dev]]></dc:creator>
            <pubDate>Sat, 28 Mar 2026 15:42:42 GMT</pubDate>
            <atom:updated>2026-03-28T15:42:42.695Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I1AG5JhpPxnGCiZKITJgwQ.png" /></figure><h4>Internal flow!</h4><p><strong>Step 1 —</strong> Two dicts are created: The header only contains the algorithm name. The payload contains your actual data — sub, exp, role etc..</p><p><strong>Step 2 —</strong> Base64url encode both separately: This is not encryption — it is only encoding. Meaning anyone can decode it. That’s why never put a password in the payload!</p><p><strong>Step 3 —</strong> Join with a dot: header_encoded + &quot;.&quot; + payload_encoded — this became one string.</p><p><strong>Step 4 —</strong> HMAC-SHA256 magic: Put this string + your secret key into a cryptographic function. The output is — a unique hash. Base64url encode this again — this is the signature.</p><p><strong>Step 5 —</strong> Join all three parts with a dot: header.payload.signature — this is the final JWT token.</p><h4>Key insight — What does the Signature protect:</h4><p>If someone changes role: &quot;user&quot; to role: &quot;admin&quot; in the payload, the signature will not match — because the signature was created from the value at that time. The server recalculates HMAC during verification and compares it. Mismatch = rejected! 🔒</p><p>Now we will understand this internal flow practically through code — in one file, clearly divided into sections:</p><p><strong>step — 1:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*LCbEw2Vnlx-l-GydaZJN-g.png" /></figure><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*uzFHG1WthSue_Sdp9Iwvxg.png" /></figure><p>step — 2: Encode Base64url</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LRSgAEMyhug6utk27mBNvQ.png" /></figure><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*_4Eyhi6EBL_XARD1fjGeIw.png" /></figure><p><strong>🐛 </strong>First Error Came — datetime is not JSON serializable</p><p>When I tried to create a JWT manually for the first time, I got this error:</p><pre>TypeError: Object of type datetime is not JSON serializable</pre><p>Why did this happen?</p><p>I had set exp in payload like this:</p><pre>&quot;exp&quot;: datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta(minutes=2)</pre><p>This is a datetime object — and json.dumps() cannot directly convert a datetime object to JSON. It only knows basic types — str, int, float, list, dict.</p><p>What is the fix?</p><p>Convert the datetime object to a Unix timestamp using .timestamp() — which is a simple int:</p><pre>&quot;exp&quot;: int(<br>    (datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta(minutes=5))<br>    .timestamp()<br>)</pre><p><strong>Interesting insight:</strong></p><p>One important thing was understood here — PyJWT internally does this conversion automatically. That’s why this error never comes up in jwt.encode(). Only when doing it manually does one find out what is actually happening inside. That&#39;s the whole benefit of doing it manually! 😄</p><p>Fix line no : 24,25</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ycP1Hqt4Z586zbhoGlpgBQ.png" /></figure><p><strong>Output:</strong> After fixing it, the code ran successfully. This was the output:</p><pre><br>Press enter to continue<br>======STEP 1 : Iput ===========<br>Header :  {&#39;alg&#39;: &#39;HS256&#39;, &#39;typ&#39;: &#39;JWT&#39;}<br>Payload :  {&#39;sub&#39;: &#39;Mangal&#39;, &#39;role&#39;: &#39;admin&#39;, &#39;exp&#39;: 1774594915}<br><br><br><br>=== STEP 2: Base64url Encode ===<br>Header  encoded : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9<br>Payload encoded : eyJzdWIiOiJNYW5nYWwiLCJyb2xlIjoiYWRtaW4iLCJleHAiOjE3NzQ1OTQ5MTV9<br><br><br>Press enter to continue</pre><p>What happened here?</p><p>In Step 1, two simple Python dicts were created — header and payload. The number 1774594915 in exp — this is not a random number. It is a Unix timestamp — meaning the seconds elapsed since 1 January 1970. Convert it to datetime and you will get the exact date and time when the token will expire.</p><p>In Step 2, both dicts were converted to a string using Base64url encoding.</p><p>One important thing here —</p><blockquote>This is not encryption — it is only encoding. Meaning anyone can decode eyJzdWIiOiJNYW5nYWwi... using any online tool and see the original data. That&#39;s why never put a password or sensitive info in the payload!</blockquote><p>Try it yourself — go to jwt.io and paste the encoded payload — the original dict will appear right back.👀</p><p>🔍Proof — Anyone Can Decode the Payload I pasted my generated token on jwt.io — and look what happened:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*hDK5hm9WP1_YbCpBUHYZhg.png" /></figure><p>Without any password, without any secret key — the site decoded it directly:</p><pre>{<br>  &quot;sub&quot;: &quot;Mangal&quot;,<br>  &quot;role&quot;: &quot;admin&quot;,<br>  &quot;exp&quot;: 1774594915<br>}</pre><p>This is the point that beginners miss —</p><blockquote>JWT does not mean secure storage. JWT only means verifying that the token is genuine and has not been tampered with. Anyone can see the data inside — they just cannot change it without the secret key.</blockquote><p>That’s why never put in a JWT:</p><ul><li>❌ Password</li><li>❌ Credit card number</li><li>❌ Any sensitive personal info</li></ul><p>Only put this:</p><ul><li>✅ User ID</li><li>✅ Role</li><li>✅ Expiry time</li></ul><h4>step — 3&amp;4 :</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N8wCmeLOPrOmSXZt6ktccw.png" /></figure><p>Here is the complete code output step by step:</p><pre>Press enter to continue<br>======STEP 1 : Iput ===========<br>Header :  {&#39;alg&#39;: &#39;HS256&#39;, &#39;typ&#39;: &#39;JWT&#39;}<br>Payload :  {&#39;sub&#39;: &#39;Mangal&#39;, &#39;role&#39;: &#39;admin&#39;, &#39;exp&#39;: 1774596726}<br><br><br><br>=== STEP 2: Base64url Encode ===<br>Header  encoded : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9<br>Payload encoded : eyJzdWIiOiJNYW5nYWwiLCJyb2xlIjoiYWRtaW4iLCJleHAiOjE3NzQ1OTY3MjZ9<br><br><br><br>=== STEP 3: Dot se join ===<br>Signing input : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJNYW5nYWwiLCJ ...<br><br>=== STEP 4: HMAC-SHA256 Signature ===<br>Signature : zI4OQQ1bkEKJddONodzH679L98V36Nv85B36wQTT05c<br><br><br>Press enter to continue</pre><p>✅ Step 3 &amp; 4 — Joining and HMAC Signature</p><p>What happened in Step 3?</p><p>Header encoded and Payload encoded — both were joined with a simple dot .. This string now became the &quot;signing input&quot; — meaning the signature will be applied on this string.</p><pre>signing_input = header_encoded + &quot;.&quot; + payload_encoded<br>```<br><br>**What happened in Step 4?**<br><br>This is where the real magic happens — HMAC-SHA256.**।<br><br>`signing_input and the SECRET key were fed together into a cryptographic function — the output was a unique hash string:<br>```<br>zI4OQQ1bkEKJddONodzH679L98V36Nv85B36wQTT05c</pre><p>Why is this signature so powerful?</p><blockquote>If even a single character in the payload is changed — the signature will be completely different. The server performs this same calculation again during verification — if it doesn’t match, the token is rejected! This is JWT’s security.</blockquote><p>step — 5 :</p><pre># ============================================================<br># STEP 5 — Final token: header.payload.signature<br># ============================================================<br><br>manual_token = signing_input + &quot;.&quot; + signature<br><br>print(&quot;\n=== STEP 5: Final Manual Token ===&quot;)<br>print(manual_token)</pre><p>output:</p><pre>=== STEP 3: Dot se join ===<br>Signing input : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJNYW5nYWwiLCJ ...<br>=== STEP 4: HMAC-SHA256 Signature ===<br>Signature : AXtdIn9bt24KvUiX8IVjaElKr5PJx4h_NAA4MH5P4fY<br>=== STEP 5: Final Manual Token ===<br>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJNYW5nYWwiLCJyb2xlIjoiYWRtaW4iLCJleHAiOjE3NzQ1OTcyMjF9.AXtdIn9bt24KvUiX8IVjaElKr5PJx4h_NAA4MH5P4fY<br>Press enter to continue</pre><p>✅ What happened in Step 5?</p><p>All three parts were joined with a dot — and our complete JWT token was ready:</p><pre>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9        ← 🔴 Header<br>.<br>eyJzdWIiOiJNYW5nYWwiLCJyb2xlIjoiYWRtaW4...  ← 🟡 Payload  <br>.<br>AXtdIn9bt24KvUiX8IVjaElKr5PJx4h_NAA4MH5P4fY ← 🟢 Signature</pre><p>This is the same token that in a real app the server generates and sends to the client — and the client sends it along with every request.</p><p>One interesting observation:</p><p>I noticed that every time the code runs the signature is different — because the exp timestamp is new every time, so the payload is different, so the signature is also different. But the header encoded always stays the same —</p><p><strong>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9</strong></p><p>Because the header only contains alg and typ — those never change!</p><h3>Compare to pyJWT token v/s Manually create token.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_0ggwIYG-G9qv8lE0SiWaA.png" /></figure><p>Look what happened — the manual token and the PyJWT token are exactly the same! Not a single character’s difference!</p><pre>======STEP 1 : Iput ===========<br>Header :  {&#39;alg&#39;: &#39;HS256&#39;, &#39;typ&#39;: &#39;JWT&#39;}<br>Payload :  {&#39;sub&#39;: &#39;Mangal&#39;, &#39;role&#39;: &#39;admin&#39;, &#39;exp&#39;: 1774666946}<br>=== STEP 2: Base64url Encode ===<br>Header  encoded : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9<br>Payload encoded : eyJzdWIiOiJNYW5nYWwiLCJyb2xlIjoiYWRtaW4iLCJleHAiOjE3NzQ2NjY5NDZ9<br>=== STEP 3: Dot se join ===<br>Signing input : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJNYW5nYWwiLCJ ...<br>=== STEP 4: HMAC-SHA256 Signature ===<br>Signature : BIhnyuBx160zAbKNN1y0hWtLT8cT5WgEXIMeoHkpl2c<br>=== STEP 5: Final Manual Token ===<br>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJNYW5nYWwiLCJyb2xlIjoiYWRtaW4iLCJleHAiOjE3NzQ2NjY5NDZ9.BIhnyuBx160zAbKNN1y0hWtLT8cT5WgEXIMeoHkpl2c<br>=== PyJWT Token ===<br>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJNYW5nYWwiLCJyb2xlIjoiYWRtaW4iLCJleHAiOjE3NzQ2NjY5NDZ9.BIhnyuBx160zAbKNN1y0hWtLT8cT5WgEXIMeoHkpl2c<br>=== Do they match? ===<br>Header part same?    True<br>Press enter to continue</pre><p>🎯 The Big Reveal — Manual vs PyJWT Comparison</p><pre>=== STEP 5: Final Manual Token ===<br>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJNYW5nYWwiLCJyb2xlIjoiYWRtaW4iLCJleHAiOjE3NzQ2NjY5NDZ9.BIhnyuBx160zAbKNN1y0hWtLT8cT5WgEXIMeoHkpl2c<br><br>=== PyJWT Token ===<br>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJNYW5nYWwiLCJyb2xlIjoiYWRtaW4iLCJleHAiOjE3NzQ2NjY5NDZ9.BIhnyuBx160zAbKNN1y0hWtLT8cT5WgEXIMeoHkpl2c<br><br>=== Do they match? ===<br>Header part same? True</pre><p>Both are exactly the same — not a single character’s difference!</p><p>This is the conclusion of the entire experiment —</p><blockquote>jwt.encode() does nothing different or special. It performs the same 5 steps we wrote manually — just hidden inside a single function call. The library&#39;s only job is so you don&#39;t have to write all this again and again.</blockquote><p>Whenever you call jwt.encode() from now on — this picture will stay clear in your mind:</p><pre>jwt.encode()<br>    ├── Step 1: Header + Payload dicts<br>    ├── Step 2: Base64url encode both<br>    ├── Step 3: oin with a dot<br>    ├── Step 4: Create HMAC-SHA256 signature<br>    └── Step 5: Final token — header.payload.signature</pre><p>And I also noticed —</p><p>Header encoded is always the same:</p><pre>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9</pre><p>Because the header only contains alg and typ — those never change. Only the payload changes — that&#39;s why the signature is different every time!</p><p>🔑 Secret Key Best Practices — One Important Thing</p><p>Now one more thing I learned in this process — how important the secret key is. In HMAC-SHA256, the secret key is what makes the signature unique. If the secret key is weak — like “secret” or “password123” — a hacker can guess it and create fake tokens.</p><p>The right way:</p><pre>import secrets<br><br># Generate a cryptographically secure random key<br>secret_key = secrets.token_hex(32)<br>print(secret_key)<br># a3f8c2d1e9b7a6f4c8d2e1b9a7f6c4d8...</pre><p><strong>Why secrets module — why not random?</strong></p><p>The random module is predictable — same seed gives the same output. The secrets module uses OS-level randomness — truly unpredictable. And never hardcode the key in your code.</p><pre># Keep it in a .env file<br>JWT_SECRET_KEY=a3f8c2d1e9b7a6f4c8d2e1b9a7f6c4d8...</pre><pre># Load it from env in code<br>import os<br>from dotenv import load_dotenv<br><br>load_dotenv()<br>SECRET = os.getenv(&quot;JWT_SECRET_KEY&quot;)</pre><pre># Add it to .gitignore — never let it go to GitHub!<br>echo &quot;.env&quot; &gt;&gt; .gitignore</pre><p>🎓 Conclusion — What We Learned Today</p><pre>Thing                                        Understood<br>----------------------------------------------------------------------------<br>3 parts of JWT                               Header, Payload, Signature<br>----------------------------------------------------------------------------<br>How a token is created                       5 steps — done manually<br>----------------------------------------------------------------------------<br>Payload is not encrypted                     Proved on jwt.io<br>----------------------------------------------------------------------------<br>What PyJWT does internally                   The same 5 steps — hidden<br>----------------------------------------------------------------------------<br>How to create a proper secret key            secrets.token_hex(32)<br>----------------------------------------------------------------------------</pre><p>Next time someone asks “What is JWT?” — you won’t just give a definition. You can explain it from the inside. 😎</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc05e6401069" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker Setup for devuser (Kali 64-bit RPi4)]]></title>
            <link>https://learnwithworkshop.medium.com/docker-setup-for-devuser-kali-64-bit-rpi4-83fd23f53e68?source=rss-c05e7c423530------2</link>
            <guid isPermaLink="false">https://medium.com/p/83fd23f53e68</guid>
            <category><![CDATA[kali-linux]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <dc:creator><![CDATA[Mangal_dev]]></dc:creator>
            <pubDate>Fri, 27 Mar 2026 04:10:09 GMT</pubDate>
            <atom:updated>2026-03-27T04:10:09.509Z</atom:updated>
            <cc:license>http://creativecommons.org/publicdomain/zero/1.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DTkdN7Czdk_Z2aM6D38lkA.png" /></figure><ol><li>Install Docker:</li></ol><pre>sudo apt install docker.io docker-compose -y</pre><p>2. Add devuser to the docker group:</p><pre>sudo usermod -aG docker devuser  </pre><p><strong>Why?</strong> Without this, every Docker command requires sudo — which gets tedious during development.</p><p>3. Enable the service:</p><pre>sudo systemctl enable docker --now<br>sudo systemctl status docker</pre><p>You should see `Active: active (running)`.</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ sudo systemctl status docker<br>[sudo] password for devuser:                                                                                                <br>● docker.service - Docker Application Container Engine                                                                      <br>     Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; preset: enabled)                                      <br>     Active: active (running) since Thu 2026-03-19 09:03:33 IST; 43min ago                                                  <br> Invocation: 5fd8c7ef98f2491ea9c96a82f5b8fd24                                                                               <br>TriggeredBy: ● docker.socket                                                                                                <br>       Docs: https://docs.docker.com                                                                                        <br>   Main PID: 33345 (dockerd)                                                                                                <br>      Tasks: 13                                                                                                             <br>        CPU: 3.172s                                                                                                         <br>     CGroup: /system.slice/docker.service                                                                                   <br>             └─33345 /usr/sbin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock     </pre><p>4. Apply group changes — logout and login:</p><pre>exit   # logout from devuser<br>su - devuser   # login again</pre><p>5. Verify the installation:</p><pre>docker --version<br>docker-compose --version<br>docker run hello-world</pre><p>The `hello-world` container will be pulled and executed. If everything is working correctly, you should see `Hello from Docker!`: ```</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ docker --version<br>docker-compose --version<br>docker run hello-world<br>Docker version 27.5.1+dfsg4, build cab968b3<br>Docker Compose version 2.32.4-3<br><br>Hello from Docker!<br>This message shows that your installation appears to be working correctly.<br><br>To generate this message, Docker took the following steps:<br> 1. The Docker client contacted the Docker daemon.<br> 2. The Docker daemon pulled the &quot;hello-world&quot; image from the Docker Hub.<br>    (arm64v8)<br> 3. The Docker daemon created a new container from that image which runs the<br>    executable that produces the output you are currently reading.<br> 4. The Docker daemon streamed that output to the Docker client, which sent it<br>    to your terminal.<br><br>To try something more ambitious, you can run an Ubuntu container with:<br> $ docker run -it ubuntu bash<br><br>Share images, automate workflows, and more with a free Docker ID:<br> https://hub.docker.com/<br><br>For more examples and ideas, visit:<br> https://docs.docker.com/get-started/</pre><p><strong>Docker setup for devuser is now complete!</strong> 🎉</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83fd23f53e68" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Complete System Hardening (RPi 4 for DevOps)]]></title>
            <link>https://learnwithworkshop.medium.com/pura-system-hardening-rpi-4-for-devops-ab8efbf863d1?source=rss-c05e7c423530------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab8efbf863d1</guid>
            <category><![CDATA[kali-linux]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[ssh]]></category>
            <category><![CDATA[system-hardening]]></category>
            <dc:creator><![CDATA[Mangal_dev]]></dc:creator>
            <pubDate>Wed, 25 Mar 2026 15:54:17 GMT</pubDate>
            <atom:updated>2026-03-26T07:56:09.922Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*jFJs__5jxihnnJFUccKHyg.jpeg" /></figure><p><strong>Note:</strong> devuser/secuser are my custom users in Kali Linux.</p><h4>Hardening:</h4><p>1️⃣ SSH Hardening → only devuser/secuser will be allowed<br>2️⃣ Firewall Setup → configure ufw<br>3️⃣ fail2ban → brute force protection</p><p>👤 User setup = Who can log in<br>🖥️ SSH/UFW/fail2ban = System protects itself</p><p><strong>Simple Analogy:</strong></p><p>🏠 House analogy:</p><p>👤 User setup = Who gets the keys to the rooms inside the house<br>🚪 SSH Hardening = Front door — who can enter<br>🧱 Firewall (UFW) = Boundary wall of the house<br>🐕 fail2ban = Guard dog — try wrong credentials too many times and you get blocked</p><pre>Meaning:<br>Step           What It Does                           Applies To<br>.............................................................................<br>SSH            HardeningRemote login control          Entire System<br>-----------------------------------------------------------------------------<br>UFW            FirewallNetwork traffic control        Entire System<br>-----------------------------------------------------------------------------<br>fail2ban       Protects against brute force           Entire System<br>-----------------------------------------------------------------------------</pre><p>But there is an indirect connection: In SSH Hardening we explicitly define:</p><p>✅ devuser → SSH login ALLOWED<br>✅ secuser → SSH login ALLOWED<br>❌ kali → SSH login BLOCKED<br>❌ root → SSH login BLOCKED</p><p>So this is system-wide security — it protects both devuser and secuser at the same time! 🔐</p><p>Shall we start with SSH Hardening? 🚀</p><p>First, let’s check the current SSH config — what’s running right now:</p><pre>sudo cat /etc/ssh/sshd_config | grep -v &quot;^#&quot; | grep -v &quot;^$&quot;</pre><p>Yeh sirf <strong>active lines</strong> dikhayega — commented lines skip karega!</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ sudo cat /etc/ssh/sshd_config | grep -v &quot;^#&quot; | grep -v &quot;^$&quot;<br>Include /etc/ssh/sshd_config.d/*.conf<br>PermitRootLogin no<br>KbdInteractiveAuthentication no<br>UsePAM yes<br>X11Forwarding yes<br>PrintMotd no<br>AcceptEnv LANG LC_* COLORTERM NO_COLOR<br>Subsystem       sftp    /usr/lib/openssh/sftp-server</pre><p>What is Already Correct: ✅</p><pre>Setting                              Status<br>...........................................................................<br>PermitRootLogin  no                  ✅Root SSH already blocked<br>---------------------------------------------------------------------------<br>KbdInteractiveAuthentication no      ✅<br>---------------------------------------------------------------------------</pre><p>What is Missing/Needs to be Fixed: ❌</p><pre>Setting                        Problem<br>..........................................................................................<br>AllowUsers                     ❌ No restriction — kali can also try SSH<br>------------------------------------------------------------------------------------------<br>X11Forwarding yes              ❌ Security risk — should be disabled<br>------------------------------------------------------------------------------------------<br>PasswordAuthentication         ❌ Not set — ON by default<br>------------------------------------------------------------------------------------------</pre><p>Apply the Fix — Edit the Config:</p><pre>sudo vim /etc/ssh/sshd_config<br>```<br><br>Add these lines at the end of the file:<br>```<br>AllowUsers devuser secuser<br>X11Forwarding no<br>PasswordAuthentication yes</pre><p>save : Esc , Shift+:wq — Enter</p><p>Then Restart SSH:</p><pre>sudo systemctl restart ssh</pre><p>Verify :</p><pre>sudo cat /etc/ssh/sshd_config | grep -v &quot;^#&quot; | grep -v &quot;^$&quot;</pre><pre>──(devuser㉿kali-raspberrypi)-[~]<br>└─$ sudo cat /etc/ssh/sshd_config | grep -v &quot;^#&quot; | grep -v &quot;^$&quot;              <br>Include /etc/ssh/sshd_config.d/*.conf<br>PermitRootLogin no<br>KbdInteractiveAuthentication no<br>UsePAM yes<br>PrintMotd no<br>AcceptEnv LANG LC_* COLORTERM NO_COLOR<br>Subsystem       sftp    /usr/lib/openssh/sftp-server<br>AllowUsers devuser secuser<br>X11Forwarding no<br>PasswordAuthentication yes</pre><p>Final SSH Config — Verified:</p><pre>Setting                          Value                Status<br>................................................................................<br>PermitRootLogin                  no                   ✅ Root blocked<br>-------------------------------------------------------------------------------<br>X11Forwarding                    no                   ✅ Disabled<br>---------------------------------------------------------------------------------<br>AllowUsers                       devuser secuser      ✅ Just do this:<br>-------------------------------------------------------------------------------<br>PasswordAuthentication           yes                  ✅<br>-------------------------------------------------------------------------------<br>KbdInteractiveAuthentication     no                   ✅<br>-------------------------------------------------------------------------------</pre><p>Then verify if SSH is running:</p><pre>sudo systemctl status ssh</pre><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ sudo systemctl status ssh<br>[sudo] password for devuser: <br>● ssh.service - OpenBSD Secure Shell server<br>     Loaded: loaded (/usr/lib/systemd/system/ssh.service; enabled; preset: d&gt;<br>     Active: active (running) since Fri 2026-03-20 10:44:18 IST; 2h 53min ago<br> Invocation: b47f235c2b964c4ea258ed88b4962e1e<br>       Docs: man:sshd(8)<br>             man:sshd_config(5)<br>    Process: 945 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCE&gt;<br>   Main PID: 955 (sshd)<br>      Tasks: 1 (limit: 3905)<br>        CPU: 198ms<br>     CGroup: /system.slice/ssh.service<br>             └─955 &quot;sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups&quot;</pre><pre>## SSH Hardening Complete! 🎉<br>```<br>✅ devuser  → Dev setup ready<br>✅ secuser  → Cybersecurity lab ready<br>✅ kali     → Disabled/Locked<br>✅ SSH      → Hardened<br>```<br><br>---<br><br>## Next:<br>```<br>2️⃣ Firewall Setup (UFW)<br>3️⃣ fail2ban</pre><p>First let’s check if UFW is already installed:</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ sudo ufw status<br>sudo: ufw: command not found</pre><p>UFW is not installed — let’s install it:</p><pre>sudo apt install ufw -y</pre><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ sudo apt install ufw -y<br>The following packages were automatically installed and are no longer required:<br>  libann0  libcdt5  libcgraph6  liblab-gamut1  libsimdutf27<br>Use &#39;sudo apt autoremove&#39; to remove them.<br>Installing:<br>  ufw<br>Summary:<br>  Upgrading: 0, Installing: 1, Removing: 0, Not Upgrading: 0<br>  Download size: 169 kB<br>  Space needed: 880 kB / 38.5 GB available<br>Get:1 http://kali.download/kali kali-rolling/main arm64 ufw all 0.36.2-9 [169 kB]<br>Fetched 169 kB in 1s (113 kB/s)<br>Preconfiguring packages ...<br>Selecting previously unselected package ufw.<br>(Reading database… 453424 files and directories currently installed.)<br>Preparing to unpack …/archives/ufw_0.36.2-9_all.deb…<br>Unpacking ufw (0.36.2-9)…<br>Setting up ufw (0.36.2-9)…<br>Creating config file /etc/ufw/before.rules with new version<br>Creating config file /etc/ufw/before6.rules with new version<br>Creating config file /etc/ufw/after.rules with new version<br>Creating config file /etc/ufw/after6.rules with new version<br>update-rc.d: We have no instructions for the ufw init script.<br>update-rc.d: It looks like a non-network service, we enable it.<br>Created symlink &#39;/etc/systemd/system/multi-user.target.wants/ufw.service&#39; → &#39;/usr/lib/systemd/system/ufw.service&#39;.<br>Processing triggers for kali-menu (2026.1.5)…<br>Processing triggers for rsyslog (8.2512.0-3)…<br>Processing triggers for man-db (2.13.1-1+b1)…<br>Scanning processes...                                                        <br>Scanning processor microcode...                                              <br>Scanning linux images...                                                     <br>Running kernel seems to be up-to-date.<br>Failed to check for processor microcode upgrades.<br>No services need to be restarted.<br>No containers need to be restarted.<br>No user sessions are running outdated binaries.<br>No VM guests are running outdated hypervisor (qemu) binaries on this host</pre><p>UFW successfully installed! ✅</p><p>Now let’s configure it — first set the rules: Step 1 — Set Default Policy:</p><pre>sudo ufw default deny incoming<br>sudo ufw default allow outgoing<br>```<br><br>Meaning:<br>```<br>❌ No one from outside can come in by default<br>✅ Outgoing traffic from inside is allowed</pre><p>Step 2 — Allow SSH:</p><pre>sudo ufw allow ssh</pre><p>⚠️ Do this first — otherwise SSH will get locked out!</p><p>Step 3 — Enable UFW:</p><pre>sudo ufw enable</pre><p>Step 4 — Let’s check the status:</p><pre>sudo ufw status verbose</pre><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ sudo ufw status verbose<br>Status: active<br>Logging: on (low)<br>Default: deny (incoming), allow (outgoing), deny (routed)<br>New profiles: skip<br>To                         Action      From<br>--                         ------      ----<br>22/tcp                     ALLOW IN    Anywhere                  <br>22/tcp (v6)                ALLOW IN    Anywhere (v6)</pre><p>Perfect! ✅ UFW Successfully Configured!</p><p>Meaning:</p><p>🧱 Boundary wall is up — no one from outside can directly come in</p><p>🚪 Only the SSH door is open — for devuser and secuser (these are my custom users in Kali Linux)</p><h4>Last Step:</h4><p>3️⃣ fail2ban → Brute force protection</p><h3>Let’s install fail2ban:</h3><pre>sudo apt install fail2ban -y</pre><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ sudo apt install fail2ban -y<br>The following packages were automatically installed and are no longer required:<br>  libann0  libcdt5  libcgraph6  liblab-gamut1  libsimdutf27<br>Use &#39;sudo apt autoremove&#39; to remove them.<br>Installing:<br>  fail2ban<br>Installing dependencies:<br>  python3-systemd<br>Suggested packages:<br>  mailx  monit<br>Summary:<br>  Upgrading: 0, Installing: 2, Removing: 0, Not Upgrading: 0<br>  Download size: 508 kB<br>  Space needed: 3,010 kB / 38.5 GB available<br>Get:1 http://http.kali.org/kali kali-rolling/main arm64 python3-systemd arm64 235-1+b8 [41.8 kB]<br>Get:2 http://kali.download/kali kali-rolling/main arm64 fail2ban all 1.1.0-9 [467 kB]<br>Fetched 508 kB in 3s (157 kB/s)<br>Selecting previously unselected package python3-systemd.<br>(Reading database… 453536 files and directories currently installed.)<br>Preparing to unpack …/python3-systemd_235-1+b8_arm64.deb…<br>Unpacking python3-systemd (235-1+b8)…<br>Selecting previously unselected package fail2ban.<br>Preparing to unpack …/fail2ban_1.1.0-9_all.deb…<br>Unpacking fail2ban (1.1.0-9)…<br>Setting up python3-systemd (235-1+b8)…<br>Setting up fail2ban (1.1.0-9)…<br>update-rc.d: We have no instructions for the fail2ban init script.<br>update-rc.d: It looks like a network service, we disable it.<br>fail2ban.service is a disabled or a static unit, not starting it.<br>Processing triggers for kali-menu (2026.1.5)…<br>Processing triggers for man-db (2.13.1-1+b1)…<br>Scanning processes...                                                        <br>Scanning processor microcode...                                              <br>Scanning linux images...                                                     <br>Running kernel seems to be up-to-date.<br>Failed to check for processor microcode upgrades.<br>No services need to be restarted.<br>No containers need to be restarted.<br>No user sessions are running outdated binaries.<br>No VM guests are running outdated hypervisor (qemu) binaries on this host.</pre><p>fail2ban installed! ✅ Now let’s configure it:</p><h3>Step 1 — Create the Config File: fail2ban’s rule is — do not directly edit the default config, create your own local copy:</h3><pre>sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local</pre><p>Step 2 — Configure the SSH Jail:</p><pre>sudo vim /etc/fail2ban/jail.local<br>```<br><br>File mein `[sshd]` section dhundho aur aisa karo:<br>```<br>#ssh server<br>#<br>[sshd]<br>enabled = true<br>port    = ssh   (ye check karna hai kyunki ye default ssh hi rehta hai agar dono jagha likhte ho to conflict hoga)<br>maxretry = 3<br>bantime  = 1h<br>findtime = 10m<br>```<br><br>Matlab:<br>```<br>maxretry = 3    → 3 baar galat password = BAN<br>bantime  = 1h   → 1 ghante ke liye block<br>findtime = 10m  → 10 minute ke andar 3 baar try kiya toh</pre><p>Step 3 — Start aur Enable :</p><pre>sudo systemctl enable fail2ban<br>sudo systemctl start fail2ban</pre><p>Step 4 — Let’s check the status:</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ sudo systemctl status fail2ban<br>[sudo] password for devuser: <br>● fail2ban.service - Fail2Ban Service<br>     Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; enabled; pres&gt;<br>     Active: active (running) since Fri 2026-03-20 10:44:17 IST; 3h 12min ago<br> Invocation: 9a49dee1f47e4a18bda9cc0feaa73d3f<br>       Docs: man:fail2ban(1)<br>   Main PID: 943 (fail2ban-server)<br>      Tasks: 5 (limit: 3905)<br>        CPU: 15.981s<br>     CGroup: /system.slice/fail2ban.service<br>             └─943 /usr/bin/python3 /usr/bin/fail2ban-server -xf start<br><br>Mar 20 10:44:17 kali-raspberrypi systemd[1]: Started fail2ban.service - Fail&gt;<br>Mar 20 10:44:22 kali-raspberrypi fail2ban-server[943]: Server ready</pre><p>It is showing active running now!</p><p>🎉 <strong>System Hardening Complete!</strong></p><p>RPi 4 is Now Fully Hardened! 🎉</p><p>🧱 UFW Firewall → Active<br>🚪 SSH Hardened → Only devuser/secuser<br>🐕 fail2ban → Watching (0 attacks)<br>👤 kali user → Locked<br>💻 devuser → Ready for dev work<br>🔐 secuser → Cybersecurity lab ready</p><p>Complete hardening foundation done! 💪</p><h4>Note :</h4><h4>System Hardening is a big deal!</h4><h4>✅ What we have done:</h4><ol><li>User management → devuser/secuser/kali<br>2. SSH hardening → AllowUsers, X11, etc.<br>3. UFW Firewall → Incoming block<br>4. fail2ban → Brute force protection</li></ol><p>🔄 Baaki Hai (Planned):</p><p>5. SSH Key-based auth → Removed Password <br>6. Auto security updates → Unattended upgrades<br>7. Lynis audit → Full system scan</p><p>📋 There’s More to Hardening:</p><p>8. AppArmor/SELinux → Process level security<br>9. Kernel hardening → sysctl.conf tweaks<br>10. Rootkit scanner → rkhunter/chkrootkit<br>11. File integrity monitor → AIDE tool<br>12. Log monitoring → Logwatch/journald<br>13. Cron job audit → Suspicious tasks check<br>14. Open ports audit → Unnecessary services band<br>15. Password policy → PAM configuration</p><h3>Simply put:</h3><blockquote>System hardening is a process, not a one-time job — the deeper you go, the more there is to do!</blockquote><p>We are doing it to an appropriate level for an RPi 4 home lab — no need for production server level hardening right now! 😄</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab8efbf863d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Really Happens When You Run apt upgrade]]></title>
            <link>https://learnwithworkshop.medium.com/what-really-happens-when-you-run-apt-upgrade-c263eee2b2b7?source=rss-c05e7c423530------2</link>
            <guid isPermaLink="false">https://medium.com/p/c263eee2b2b7</guid>
            <category><![CDATA[kali-linux]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[debian]]></category>
            <dc:creator><![CDATA[Mangal_dev]]></dc:creator>
            <pubDate>Wed, 25 Mar 2026 15:43:19 GMT</pubDate>
            <atom:updated>2026-03-25T15:43:19.555Z</atom:updated>
            <content:encoded><![CDATA[<p>One alias. Seven internal phases. A SAT solver, three mirrors, dpkg scripts, and a needrestart scan — all invisible to you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*b1aGoxcyB_lQDLBomj_NDw.png" /></figure><p>Maine apne Raspberry Pi 4 (Kali Linux) pe ek simple alias set kiya hai — uf. Ek short word type karta hun, aur system update ho jaata hai. Done.</p><p>Lekin ek din socha — actually <em>kya</em> ho raha hai? Yeh ek command nahi hai. Yeh ek 7-phase pipeline hai jisme:</p><blockquote>dependency math, cryptographic verification, database rebuilds, aur process introspection sab chal raha hota hai — silently, teri terminal ke peeche.</blockquote><p>Is article mein main woh sab dikhaunga jo mere output mein actually hua, ek-ek step.</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ uf<br>The following packages were automatically installed and are no longer required:<br>  libann0  libcdt5  libcgraph6  liblab-gamut1  libsimdutf27<br>Use &#39;sudo apt autoremove&#39; to remove them.<br><br>Upgrading:<br>  dracut-install       libmariadb3              mariadb-plugin-provider-bzip2   pipewire<br>  easy-rsa             libnfsidmap1             mariadb-plugin-provider-lz4     pipewire-bin<br>  greenbone-feed-sync  libpgm-5.3-0t64          mariadb-plugin-provider-lzma    pipewire-pulse<br>  gvmd                 libpipewire-0.3-0t64     mariadb-plugin-provider-lzo     postgresql-18-pg-gvm<br>  gvmd-common          libpipewire-0.3-common   mariadb-plugin-provider-snappy  python3-bcrypt<br>  libbpf1              libpipewire-0.3-modules  mariadb-server                  python3-gvm<br>  libegl-mesa0         libspa-0.2-bluetooth     mariadb-server-compat           python3-pydantic-core<br>  libgbm1              libspa-0.2-modules       mariadb-server-core             python3-speechd<br>  libgl1-mesa-dri      libspeechd-module0       mesa-libgallium                 python3-tldextract<br>  libglx-mesa0         libspeechd2              mesa-vulkan-drivers             speech-dispatcher<br>  libgvm22t64          llvm-spirv-18            nfs-common                      speech-dispatcher-audio-plugins<br>  libksba8             mariadb-client           opensc                          speech-dispatcher-espeak-ng<br>  liblerc4             mariadb-client-core      opensc-pkcs11                   sqlmap<br>  libllvmspirvlib18.1  mariadb-common           openvas-scanner<br><br>Installing dependencies:<br>  libdnnl3.6  libonnx1l  libonnxruntime-providers  libonnxruntime1.23  libprotobuf-lite32t64  libxnnpack0.20241108<br><br>Summary:<br>  Upgrading: 55, Installing: 6, Removing: 0, Not Upgrading: 0<br>  Download size: 76.9 MB<br>  Space needed: 64.4 MB / 37.4 GB available<br><br>Continue? [Y/n] y<br>Get:1 http://mirrors.esto.network/kali kali-rolling/main arm64 mariadb-common all 1:11.8.6-3 [21.6 kB]<br>Get:4 http://mirrors.esto.network/kali kali-rolling/main arm64 mariadb-server-core arm64 1:11.8.6-3 [7,543 kB]<br>Get:2 http://kali.download/kali kali-rolling/main arm64 mariadb-server arm64 1:11.8.6-3 [3,867 kB]<br>Get:3 http://kali.download/kali kali-rolling/main arm64 mariadb-server-compat all 1:11.8.6-3 [20.4 kB]      <br>Get:6 http://kali.download/kali kali-rolling/main arm64 mariadb-client arm64 1:11.8.6-3 [3,123 kB]               <br>Get:7 http://kali.download/kali kali-rolling/main arm64 mariadb-plugin-provider-snappy arm64 1:11.8.6-3 [22.0 kB]<br>Get:8 http://kali.download/kali kali-rolling/main arm64 mariadb-plugin-provider-lzo arm64 1:11.8.6-3 [21.9 kB]             <br>Get:9 http://kali.download/kali kali-rolling/main arm64 mariadb-plugin-provider-lzma arm64 1:11.8.6-3 [22.0 kB]          <br>Get:11 http://kali.download/kali kali-rolling/main arm64 mariadb-plugin-provider-bzip2 arm64 1:11.8.6-3 [22.1 kB]         <br>Get:12 http://kali.download/kali kali-rolling/main arm64 libmariadb3 arm64 1:11.8.6-3 [171 kB]                             <br>Get:14 http://kali.download/kali kali-rolling/main arm64 easy-rsa all 3.2.6-1 [82.0 kB]             <br>Get:16 http://kali.download/kali kali-rolling/main arm64 gvmd arm64 26.19.0-1 [648 kB]                <br>Get:17 http://kali.download/kali kali-rolling/main arm64 gvmd-common all 26.19.0-1 [116 kB]      <br>Get:18 http://kali.download/kali kali-rolling/main arm64 libgvm22t64 arm64 22.38.0-1 [146 kB]<br>Get:19 http://kali.download/kali kali-rolling/main arm64 postgresql-18-pg-gvm arm64 22.6.15-1 [20.0 kB]<br>Get:20 http://kali.download/kali kali-rolling/main arm64 libbpf1 arm64 1:1.6.3-1 [159 kB]     <br>Get:21 http://http.kali.org/kali kali-rolling/main arm64 libdnnl3.6 arm64 3.9.1+ds-2 [3,733 kB]<br>Get:23 http://kali.download/kali kali-rolling/main arm64 libglx-mesa0 arm64 26.0.2-1 [109 kB]<br>Get:24 http://kali.download/kali kali-rolling/main arm64 libegl-mesa0 arm64 26.0.2-1 [116 kB]                              <br>Get:25 http://kali.download/kali kali-rolling/main arm64 libgbm1 arm64 26.0.2-1 [46.2 kB]                                  <br>Get:26 http://kali.download/kali kali-rolling/main arm64 mesa-libgallium arm64 26.0.2-1 [10.5 MB]                          <br>Get:27 http://kali.download/kali kali-rolling/main arm64 libksba8 arm64 1.6.8-2 [124 kB]                                   <br>Get:28 http://http.kali.org/kali kali-rolling/main arm64 liblerc4 arm64 4.1.0+ds-1~exp2 [148 kB]                           <br>Get:29 http://kali.download/kali kali-rolling/main arm64 llvm-spirv-18 arm64 18.1.21-1 [471 kB]                            <br>Get:31 http://kali.download/kali kali-rolling/main arm64 nfs-common arm64 1:2.8.7-1 [252 kB]                               <br>Get:32 http://kali.download/kali kali-rolling/main arm64 libnfsidmap1 arm64 1:2.8.7-1 [52.7 kB]                            <br>Get:35 http://http.kali.org/kali kali-rolling/main arm64 libonnxruntime-providers arm64 1.23.2+dfsg-6+b2 [265 kB]          <br>Get:36 http://http.kali.org/kali kali-rolling/main arm64 libxnnpack0.20241108 arm64 0.0~git20241108.4ea82e5-2+b1 [349 kB]  <br>Get:38 http://http.kali.org/kali kali-rolling/main arm64 libpgm-5.3-0t64 arm64 5.3.128~dfsg-3 [150 kB]                     <br>Get:39 http://kali.download/kali kali-rolling/main arm64 pipewire-pulse arm64 1.6.2-1 [15.1 kB]                            <br>Get:41 http://kali.download/kali kali-rolling/main arm64 libpipewire-0.3-0t64 arm64 1.6.2-1 [271 kB]                       <br>Get:43 http://kali.download/kali kali-rolling/main arm64 libspa-0.2-modules arm64 1.6.2-1 [942 kB]                         <br>Get:45 http://kali.download/kali kali-rolling/main arm64 pipewire-bin arm64 1.6.2-1 [557 kB]                               <br>Get:46 http://kali.download/kali kali-rolling/main arm64 libpipewire-0.3-common all 1.6.2-1 [78.9 kB]                      <br>Get:47 http://kali.download/kali kali-rolling/main arm64 libspeechd-module0 arm64 0.12.1-4 [12.9 kB]                       <br>Get:48 http://kali.download/kali kali-rolling/main arm64 speech-dispatcher-espeak-ng arm64 0.12.1-4 [25.2 kB]              <br>Get:50 http://kali.download/kali kali-rolling/main arm64 speech-dispatcher-audio-plugins arm64 0.12.1-4 [32.2 kB]          <br>Get:52 http://kali.download/kali kali-rolling/main arm64 mesa-vulkan-drivers arm64 26.0.2-1 [19.1 MB]                      <br>Get:56 http://kali.download/kali kali-rolling/main arm64 python3-bcrypt arm64 5.0.0-4 [209 kB]                             <br>Get:58 http://kali.download/kali kali-rolling/main arm64 python3-pydantic-core arm64 2.41.5-3 [1,752 kB]                   <br>Get:59 http://kali.download/kali kali-rolling/main arm64 python3-speechd all 0.12.1-4 [42.8 kB]                            <br>Get:61 http://kali.download/kali kali-rolling/main arm64 sqlmap all 1.10.3-1 [6,905 kB]                                    <br>Get:5 http://mirrors.esto.network/kali kali-rolling/main arm64 mariadb-client-core arm64 1:11.8.6-3 [900 kB]               <br>Get:10 http://mirrors.esto.network/kali kali-rolling/main arm64 mariadb-plugin-provider-lz4 arm64 1:11.8.6-3 [22.0 kB]     <br>Get:13 http://mirrors.esto.network/kali kali-rolling/main arm64 dracut-install arm64 110-5 [44.6 kB]                       <br>Get:15 http://mirrors.esto.network/kali kali-rolling/main arm64 greenbone-feed-sync all 25.2.0-1 [17.5 kB]                 <br>Get:22 http://mirrors.esto.network/kali kali-rolling/main arm64 libgl1-mesa-dri arm64 26.0.2-1 [42.5 kB]                   <br>Get:30 http://mirrors.esto.network/kali kali-rolling/main arm64 libllvmspirvlib18.1 arm64 18.1.21-1 [782 kB]               <br>Get:33 http://mirrors.esto.network/kali kali-rolling/main arm64 libprotobuf-lite32t64 arm64 3.21.12-15 [253 kB]            <br>Get:34 http://mirrors.esto.network/kali kali-rolling/main arm64 libonnx1l arm64 1.20.0-4 [1,202 kB]                        <br>Get:37 http://http.kali.org/kali kali-rolling/main arm64 libonnxruntime1.23 arm64 1.23.2+dfsg-6+b2 [4,478 kB]              <br>Get:40 http://mirrors.esto.network/kali kali-rolling/main arm64 libpipewire-0.3-modules arm64 1.6.2-1 [747 kB]             <br>Get:42 http://mirrors.esto.network/kali kali-rolling/main arm64 libspa-0.2-bluetooth arm64 1.6.2-1 [391 kB]                <br>Get:44 http://mirrors.esto.network/kali kali-rolling/main arm64 pipewire arm64 1.6.2-1 [114 kB]                            <br>Get:49 http://mirrors.esto.network/kali kali-rolling/main arm64 speech-dispatcher arm64 0.12.1-4 [3,990 kB]                <br>Get:51 http://mirrors.esto.network/kali kali-rolling/main arm64 libspeechd2 arm64 0.12.1-4 [20.2 kB]                       <br>Get:53 http://http.kali.org/kali kali-rolling/main arm64 opensc arm64 0.27.0~rc2-1 [410 kB]                                <br>Get:54 http://http.kali.org/kali kali-rolling/main arm64 opensc-pkcs11 arm64 0.27.0~rc2-1 [800 kB]                         <br>Get:55 http://mirrors.esto.network/kali kali-rolling/main arm64 openvas-scanner arm64 23.41.6-1 [297 kB]                   <br>Get:57 http://mirrors.esto.network/kali kali-rolling/main arm64 python3-gvm all 26.11.0-1 [69.6 kB]                        <br>Get:60 http://mirrors.esto.network/kali kali-rolling/main arm64 python3-tldextract all 5.3.1-1 [24.5 kB]                   <br>Fetched 76.9 MB in 2min 46s (464 kB/s)                                                                                     <br>Extracting templates from packages: 100%<br>Preconfiguring packages ...<br>(Reading database… 454543 files and directories currently installed.)<br>Preparing to unpack …/mariadb-common_1%3a11.8.6-3_all.deb…<br>Unpacking mariadb-common (1:11.8.6-3) over (1:11.8.6-2)…<br>Setting up mariadb-common (1:11.8.6-3)…<br>(Reading database… 454543 files and directories currently installed.)<br>Preparing to unpack …/00-mariadb-server_1%3a11.8.6-3_arm64.deb…<br>/var/lib/mysql: found previous version 11.8<br>Unpacking mariadb-server (1:11.8.6-3) over (1:11.8.6-2)…<br>Preparing to unpack …/01-mariadb-server-compat_1%3a11.8.6-3_all.deb…<br>Unpacking mariadb-server-compat (1:11.8.6-3) over (1:11.8.6-2)…<br>Preparing to unpack …/02-mariadb-server-core_1%3a11.8.6-3_arm64.deb…<br>Unpacking mariadb-server-core (1:11.8.6-3) over (1:11.8.6-2)…<br>Preparing to unpack …/03-mariadb-client-core_1%3a11.8.6-3_arm64.deb…<br>Unpacking mariadb-client-core (1:11.8.6-3) over (1:11.8.6-2)…<br>Preparing to unpack …/04-mariadb-client_1%3a11.8.6-3_arm64.deb…<br>Unpacking mariadb-client (1:11.8.6-3) over (1:11.8.6-2)…<br>Preparing to unpack …/05-mariadb-plugin-provider-snappy_1%3a11.8.6-3_arm64.deb…<br>Unpacking mariadb-plugin-provider-snappy (1:11.8.6-3) over (1:11.8.6-2)…<br>Preparing to unpack …/06-mariadb-plugin-provider-lzo_1%3a11.8.6-3_arm64.deb…<br>Unpacking mariadb-plugin-provider-lzo (1:11.8.6-3) over (1:11.8.6-2)…<br>Preparing to unpack …/07-mariadb-plugin-provider-lzma_1%3a11.8.6-3_arm64.deb…<br>Unpacking mariadb-plugin-provider-lzma (1:11.8.6-3) over (1:11.8.6-2)…<br>Preparing to unpack …/08-mariadb-plugin-provider-lz4_1%3a11.8.6-3_arm64.deb…<br>Unpacking mariadb-plugin-provider-lz4 (1:11.8.6-3) over (1:11.8.6-2)…<br>Preparing to unpack …/09-mariadb-plugin-provider-bzip2_1%3a11.8.6-3_arm64.deb…<br>Unpacking mariadb-plugin-provider-bzip2 (1:11.8.6-3) over (1:11.8.6-2)…<br>Preparing to unpack …/10-libmariadb3_1%3a11.8.6-3_arm64.deb…<br>Unpacking libmariadb3:arm64 (1:11.8.6-3) over (1:11.8.6-2)…<br>Preparing to unpack …/11-dracut-install_110-5_arm64.deb…<br>Unpacking dracut-install (110-5) over (110-4)…<br>Preparing to unpack …/12-easy-rsa_3.2.6-1_all.deb…<br>Unpacking easy-rsa (3.2.6-1) over (3.2.5-1)…<br>Preparing to unpack …/13-greenbone-feed-sync_25.2.0-1_all.deb…<br>Unpacking greenbone-feed-sync (25.2.0-1) over (25.1.7-1)…<br>Preparing to unpack …/14-gvmd_26.19.0-1_arm64.deb…<br>Unpacking gvmd (26.19.0-1) over (26.15.0-1)…<br>Preparing to unpack …/15-gvmd-common_26.19.0-1_all.deb…<br>Unpacking gvmd-common (26.19.0-1) over (26.15.0-1)…<br>Preparing to unpack …/16-libgvm22t64_22.38.0-1_arm64.deb…<br>Unpacking libgvm22t64:arm64 (22.38.0-1) over (22.35.4-1)…<br>Preparing to unpack …/17-postgresql-18-pg-gvm_22.6.15-1_arm64.deb…<br>Unpacking postgresql-18-pg-gvm (22.6.15-1) over (22.6.12-1)…<br>Preparing to unpack …/18-libbpf1_1%3a1.6.3-1_arm64.deb…<br>Unpacking libbpf1:arm64 (1:1.6.3-1) over (1:1.6.2-1+b1)…<br>Selecting previously unselected package libdnnl3.6:arm64.<br>Preparing to unpack …/19-libdnnl3.6_3.9.1+ds-2_arm64.deb…<br>Unpacking libdnnl3.6:arm64 (3.9.1+ds-2)…<br>Preparing to unpack …/20-libgl1-mesa-dri_26.0.2-1_arm64.deb…<br>Unpacking libgl1-mesa-dri:arm64 (26.0.2-1) over (26.0.0-1)…<br>Preparing to unpack …/21-libglx-mesa0_26.0.2-1_arm64.deb…<br>Unpacking libglx-mesa0:arm64 (26.0.2-1) over (26.0.0-1)…<br>Preparing to unpack …/22-libegl-mesa0_26.0.2-1_arm64.deb…<br>Unpacking libegl-mesa0:arm64 (26.0.2-1) over (26.0.0-1)…<br>Preparing to unpack …/23-libgbm1_26.0.2-1_arm64.deb…<br>Unpacking libgbm1:arm64 (26.0.2-1) over (26.0.0-1)…<br>Preparing to unpack …/24-mesa-libgallium_26.0.2-1_arm64.deb…<br>Unpacking mesa-libgallium:arm64 (26.0.2-1) over (26.0.0-1)…<br>Preparing to unpack …/25-libksba8_1.6.8-2_arm64.deb…<br>Unpacking libksba8:arm64 (1.6.8-2) over (1.6.7-2+b2)…<br>Preparing to unpack …/26-liblerc4_4.1.0+ds-1~exp2_arm64.deb…<br>Unpacking liblerc4:arm64 (4.1.0+ds-1~exp2) over (4.0.0+ds-5+b1)…<br>Preparing to unpack …/27-llvm-spirv-18_18.1.21-1_arm64.deb…<br>Unpacking llvm-spirv-18 (18.1.21-1) over (18.1.20-1)…<br>Preparing to unpack …/28-libllvmspirvlib18.1_18.1.21-1_arm64.deb…<br>Unpacking libllvmspirvlib18.1:arm64 (18.1.21-1) over (18.1.20-1)…<br>Preparing to unpack …/29-nfs-common_1%3a2.8.7-1_arm64.deb…<br>Unpacking nfs-common (1:2.8.7-1) over (1:2.8.5-1)…<br>Preparing to unpack …/30-libnfsidmap1_1%3a2.8.7-1_arm64.deb…<br>Unpacking libnfsidmap1:arm64 (1:2.8.7-1) over (1:2.8.5-1)…<br>Selecting previously unselected package libprotobuf-lite32t64:arm64.<br>Preparing to unpack …/31-libprotobuf-lite32t64_3.21.12-15_arm64.deb…<br>Unpacking libprotobuf-lite32t64:arm64 (3.21.12-15)…<br>Selecting previously unselected package libonnx1l:arm64.<br>Preparing to unpack …/32-libonnx1l_1.20.0-4_arm64.deb…<br>Unpacking libonnx1l:arm64 (1.20.0-4)…<br>Selecting previously unselected package libonnxruntime-providers:arm64.<br>Preparing to unpack …/33-libonnxruntime-providers_1.23.2+dfsg-6+b2_arm64.deb…<br>Unpacking libonnxruntime-providers:arm64 (1.23.2+dfsg-6+b2)…<br>Selecting previously unselected package libxnnpack0.20241108:arm64.<br>Preparing to unpack …/34-libxnnpack0.20241108_0.0~git20241108.4ea82e5-2+b1_arm64.deb…<br>Unpacking libxnnpack0.20241108:arm64 (0.0~git20241108.4ea82e5-2+b1)…<br>Selecting previously unselected package libonnxruntime1.23:arm64.<br>Preparing to unpack …/35-libonnxruntime1.23_1.23.2+dfsg-6+b2_arm64.deb…<br>Unpacking libonnxruntime1.23:arm64 (1.23.2+dfsg-6+b2)…<br>Preparing to unpack …/36-libpgm-5.3-0t64_5.3.128~dfsg-3_arm64.deb…<br>Unpacking libpgm-5.3-0t64:arm64 (5.3.128~dfsg-3) over (5.3.128~dfsg-2.1+b2)…<br>Preparing to unpack …/37-pipewire-pulse_1.6.2-1_arm64.deb…<br>Unpacking pipewire-pulse (1.6.2-1) over (1.4.10-1+b1)…<br>Preparing to unpack …/38-libpipewire-0.3-modules_1.6.2-1_arm64.deb…<br>Unpacking libpipewire-0.3-modules:arm64 (1.6.2-1) over (1.4.10-1+b1)…<br>Preparing to unpack …/39-libpipewire-0.3-0t64_1.6.2-1_arm64.deb…<br>Unpacking libpipewire-0.3-0t64:arm64 (1.6.2-1) over (1.4.10-1+b1)…<br>Preparing to unpack …/40-libspa-0.2-bluetooth_1.6.2-1_arm64.deb…<br>Unpacking libspa-0.2-bluetooth:arm64 (1.6.2-1) over (1.4.10-1+b1)…<br>Preparing to unpack …/41-libspa-0.2-modules_1.6.2-1_arm64.deb…<br>Unpacking libspa-0.2-modules:arm64 (1.6.2-1) over (1.4.10-1+b1)…<br>Preparing to unpack …/42-pipewire_1.6.2-1_arm64.deb…<br>Unpacking pipewire:arm64 (1.6.2-1) over (1.4.10-1+b1)…<br>Preparing to unpack …/43-pipewire-bin_1.6.2-1_arm64.deb…<br>Unpacking pipewire-bin (1.6.2-1) over (1.4.10-1+b1)…<br>Preparing to unpack …/44-libpipewire-0.3-common_1.6.2-1_all.deb…<br>Unpacking libpipewire-0.3-common (1.6.2-1) over (1.4.10-1)…<br>Preparing to unpack …/45-libspeechd-module0_0.12.1-4_arm64.deb…<br>Unpacking libspeechd-module0:arm64 (0.12.1-4) over (0.12.1-3)…<br>Preparing to unpack …/46-speech-dispatcher-espeak-ng_0.12.1-4_arm64.deb…<br>Unpacking speech-dispatcher-espeak-ng (0.12.1-4) over (0.12.1-3)…<br>Preparing to unpack …/47-speech-dispatcher_0.12.1-4_arm64.deb…<br>Unpacking speech-dispatcher (0.12.1-4) over (0.12.1-3)…<br>Preparing to unpack …/48-speech-dispatcher-audio-plugins_0.12.1-4_arm64.deb…<br>Unpacking speech-dispatcher-audio-plugins:arm64 (0.12.1-4) over (0.12.1-3)…<br>Preparing to unpack …/49-libspeechd2_0.12.1-4_arm64.deb…<br>Unpacking libspeechd2:arm64 (0.12.1-4) over (0.12.1-3)…<br>Preparing to unpack …/50-mesa-vulkan-drivers_26.0.2-1_arm64.deb…<br>Unpacking mesa-vulkan-drivers:arm64 (26.0.2-1) over (26.0.0-1)…<br>Preparing to unpack …/51-opensc_0.27.0~rc2-1_arm64.deb…<br>Unpacking opensc (0.27.0~rc2-1) over (0.27.0~rc1-1)…<br>Preparing to unpack …/52-opensc-pkcs11_0.27.0~rc2-1_arm64.deb…<br>Unpacking opensc-pkcs11:arm64 (0.27.0~rc2-1) over (0.27.0~rc1-1)…<br>Preparing to unpack …/53-openvas-scanner_23.41.6-1_arm64.deb…<br>Unpacking openvas-scanner (23.41.6-1) over (23.38.1-1)…<br>Preparing to unpack …/54-python3-bcrypt_5.0.0-4_arm64.deb…<br>Unpacking python3-bcrypt (5.0.0-4) over (5.0.0-3)…<br>Preparing to unpack …/55-python3-gvm_26.11.0-1_all.deb…<br>Unpacking python3-gvm (26.11.0-1) over (26.9.1-1)…<br>Preparing to unpack …/56-python3-pydantic-core_2.41.5-3_arm64.deb…<br>Unpacking python3-pydantic-core (2.41.5-3) over (2.41.5-2+b1)…<br>Preparing to unpack …/57-python3-speechd_0.12.1-4_all.deb…<br>Unpacking python3-speechd (0.12.1-4) over (0.12.1-3)…<br>Preparing to unpack …/58-python3-tldextract_5.3.1-1_all.deb…<br>Unpacking python3-tldextract (5.3.1-1) over (5.1.2-2)…<br>Preparing to unpack …/59-sqlmap_1.10.3-1_all.deb…<br>Unpacking sqlmap (1.10.3-1) over (1.10.2-1)…<br>Setting up libprotobuf-lite32t64:arm64 (3.21.12-15)…<br>Setting up libksba8:arm64 (1.6.8-2)…<br>Setting up libpipewire-0.3-common (1.6.2-1)…<br>Setting up mesa-vulkan-drivers:arm64 (26.0.2-1)…<br>Setting up mesa-libgallium:arm64 (26.0.2-1)…<br>Setting up libnfsidmap1:arm64 (1:2.8.7-1)…<br>Setting up gvmd-common (26.19.0-1)…<br>Setting up python3-pydantic-core (2.41.5-3)…<br>Setting up liblerc4:arm64 (4.1.0+ds-1~exp2)…<br>Setting up libdnnl3.6:arm64 (3.9.1+ds-2)…<br>Setting up libgbm1:arm64 (26.0.2-1)…<br>Setting up python3-speechd (0.12.1-4)…<br>Setting up python3-bcrypt (5.0.0-4)…<br>Setting up sqlmap (1.10.3-1)…<br>Installing new version of config file /etc/sqlmap/sqlmap.conf…<br>Setting up libgl1-mesa-dri:arm64 (26.0.2-1)…<br>Setting up libgvm22t64:arm64 (22.38.0-1)…<br>Setting up nfs-common (1:2.8.7-1)…<br>Replacing config file /etc/nfs.conf with new version<br>auth-rpcgss-module.service is a disabled or a static unit not running, not starting it.<br>nfs-idmapd.service is a disabled or a static unit not running, not starting it.<br>nfs-utils.service is a disabled or a static unit not running, not starting it.<br>proc-fs-nfsd.mount is a disabled or a static unit not running, not starting it.<br>rpc-gssd.service is a disabled or a static unit not running, not starting it.<br>rpc-statd.service is a disabled or a static unit not running, not starting it.<br>rpc-svcgssd.service is a disabled or a static unit not running, not starting it.<br>Setting up opensc-pkcs11:arm64 (0.27.0~rc2-1)…<br>Setting up libspeechd2:arm64 (0.12.1-4)…<br>Setting up libpgm-5.3-0t64:arm64 (5.3.128~dfsg-3)…<br>Setting up libegl-mesa0:arm64 (26.0.2-1)…<br>Setting up postgresql-18-pg-gvm (22.6.15-1)…<br>Setting up greenbone-feed-sync (25.2.0-1)…<br>Setting up libmariadb3:arm64 (1:11.8.6-3)…<br>Setting up libxnnpack0.20241108:arm64 (0.0~git20241108.4ea82e5-2+b1)…<br>Setting up dracut-install (110-5)…<br>Setting up libonnxruntime-providers:arm64 (1.23.2+dfsg-6+b2)…<br>Setting up gvmd (26.19.0-1)…<br>Installing new version of config file /etc/gvm/gvmd.conf…<br>Setting up libllvmspirvlib18.1:arm64 (18.1.21-1)…<br>Setting up mariadb-server-core (1:11.8.6-3)…<br>Setting up easy-rsa (3.2.6-1)…<br>Setting up libbpf1:arm64 (1:1.6.3-1)…<br>Setting up libspeechd-module0:arm64 (0.12.1-4)…<br>Setting up python3-tldextract (5.3.1-1)…<br>Setting up libonnx1l:arm64 (1.20.0-4)…<br>Setting up libglx-mesa0:arm64 (26.0.2-1)…<br>Setting up mariadb-plugin-provider-lz4 (1:11.8.6-3)…<br>Setting up python3-gvm (26.11.0-1)…<br>Setting up mariadb-plugin-provider-snappy (1:11.8.6-3)…<br>Setting up opensc (0.27.0~rc2-1)…<br>Setting up openvas-scanner (23.41.6-1)…<br>Setting up mariadb-client-core (1:11.8.6-3)…<br>Setting up mariadb-plugin-provider-bzip2 (1:11.8.6-3)…<br>Setting up mariadb-plugin-provider-lzma (1:11.8.6-3)…<br>Setting up libonnxruntime1.23:arm64 (1.23.2+dfsg-6+b2)…<br>Setting up libspa-0.2-modules:arm64 (1.6.2-1)…<br>Setting up llvm-spirv-18 (18.1.21-1)…<br>Setting up libspa-0.2-bluetooth:arm64 (1.6.2-1)…<br>Setting up mariadb-plugin-provider-lzo (1:11.8.6-3)…<br>Setting up libpipewire-0.3-0t64:arm64 (1.6.2-1)…<br>Setting up speech-dispatcher-audio-plugins:arm64 (0.12.1-4)…<br>Setting up mariadb-client (1:11.8.6-3)…<br>Setting up speech-dispatcher (0.12.1-4)…<br>Setting up libpipewire-0.3-modules:arm64 (1.6.2-1)…<br>Setting up speech-dispatcher-espeak-ng (0.12.1-4)…<br>Setting up pipewire-bin (1.6.2-1)…<br>Setting up pipewire:arm64 (1.6.2-1)…<br>Setting up pipewire-pulse (1.6.2-1)…<br>Processing triggers for libglib2.0-0t64:arm64 (2.87.2-3)…<br>Processing triggers for postgresql-common (286)…<br>Building PostgreSQL dictionaries from installed myspell/hunspell packages...<br>  en_us<br>Removing obsolete dictionary files:<br>Processing triggers for menu (2.1.51)…<br>Processing triggers for wordlists (2026.1.2)…<br>Processing triggers for kali-menu (2026.1.5)…<br>Processing triggers for desktop-file-utils (0.28-1+b1)…<br>Processing triggers for libc-bin (2.42-13)…<br>Processing triggers for man-db (2.13.1-1+b1)…<br>Setting up mariadb-server (1:11.8.6-3)…<br>Installing new version of config file /etc/apparmor.d/mariadbd…<br>mariadb.service is a disabled or a static unit not running, not starting it.<br>Setting up mariadb-server-compat (1:11.8.6-3)…<br>Scanning processes...                                                                                                       <br>Scanning candidates...                                                                                                      <br>Scanning processor microcode...                                                                                             <br>Scanning linux images...                                                                                                    <br><br>Running kernel seems to be up-to-date.<br><br>Failed to check for processor microcode upgrades.<br><br>Restarting services...<br> /etc/needrestart/restart.d/systemd-manager<br> /etc/needrestart/restart.d/systemd-user<br> systemctl restart systemd-networkd.service<br>Service restarts being deferred:<br> systemctl restart lightdm.service<br><br>No containers need to be restarted.<br><br>User sessions running outdated binaries:<br> devuser @ session #4: xfce4-session[1634]<br> devuser @ user service: filter-chain.service[1606], pipewire-pulse.service[1607], pipewire.service[1601],<br>  wireplumber.service[1605], xdg-desktop-portal.service[2733]<br><br>No VM guests are running outdated hypervisor (qemu) binaries on this host.<br><br>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$</pre><h3>Step 0: The Alias — uf</h3><p>Pehle base samjho. Yeh alias ~/.bashrc ya ~/.zshrc mein define hota hai:</p><pre># ~/.bashrc ya ~/.zshrc mein<br>alias uf=&#39;sudo apt update &amp;&amp; sudo apt full-upgrade -y &amp;&amp; sudo apt autoremove -y&#39;</pre><p>Jab meinuf type karta hun, shell ise expand karta hai <em>teen alag commands</em> mein, aur &amp;&amp; ensure karta hai ki chain sirf tab aage bade jab pehla command succeed ho.</p><pre>Command                   Kya karta hai                                        | Fail hone pe<br>-------------------------------------------------------------------------------|------------------------------<br>sudo apt update            Package lists refresh karta hai (koi install nahi)  | Chain rok deta hai<br>--------------------------------------------------------------------------------------------------------------<br>sudo apt full-upgrade -y   Packages upgrade karta hai,                         |<br>                           new deps install kar sakta hai                      |autoremove nahi chalega<br>------------------------------------------------------------------------------------------------------------<br>sudo apt autoremove -y     Orphan (unused) packages hata deta hai</pre><blockquote>Note</blockquote><blockquote>sudo kyun? APT ko /var/lib/dpkg/, /var/cache/apt/, aur system directories modify karne ke liye root privileges chahiye. Mere devuser account normal user hai — isliye sudo zaroori hai.</blockquote><h3>Phase 1: apt update — Metadata Fetch</h3><p>Yeh phase koi package install <em>nahi</em> karta. Yeh sirf ek <strong>database refresh</strong> hai — internet se download karta hai: kaun sa package available hai, konsa version, aur kahan se milega.</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ uf<br><br># APT simultaneously fetch karta hai teen mirrors se:<br>Get:1 http://mirrors.esto.network/kali kali-rolling/main arm64 ...<br>Get:2 http://kali.download/kali kali-rolling/main arm64 ...<br>Get:3 http://http.kali.org/kali kali-rolling/main arm64 ... </pre><p>Mere machine /etc/apt/sources.list.d/kali.list padhti hai aur /var/lib/apt/lists/ mein package index files save karti hai.</p><blockquote>Kali-Specific</blockquote><blockquote>Kali Linux use karta hai <strong>kali-rolling</strong> branch — Debian unstable ke based, jahan packages continuously release hote hain. Iska matlab: frequent updates, aur kabhi-kabhi unexpected package additions bhi (jaise mere output mein nayi libonnxruntime libraries aai).</blockquote><h3>Phase 2: The SAT Solver — Dependency Math</h3><blockquote><em>“Upgrading: 55, Installing: 6, Removing: 0, Not Upgrading: 0”</em></blockquote><p>Yeh line meine manually calculate nahi ki. APT ke andar ek <strong>SAT (Boolean Satisfiability) solver</strong> hai jo yeh kaam karta hai.</p><p>Har package ke saath hota hai: dependencies (jo chahiye), conflicts (jo nahi ho sakta saath), aur version constraints (&gt;=, =). Jab 55 packages upgrade karne hain, toh yeh ek bada constraint network ban jaata hai. SAT solver yeh sab ek saath solve karta hai — mathematically optimal solution nikaalti hai.</p><h4><strong>NEW</strong> Installing: 6 — Kyun nayi packages aai?</h4><p>Mere output mein <strong>6 new packages install</strong> hue: libdnnl3.6, libonnx1l, libonnxruntime-providers, libonnxruntime1.23, libprotobuf-lite32t64, libxnnpack0.20241108.</p><p>Yeh sab ML inference libraries hain — OpenVAS / gvmd ne apna naya version release kiya jisme machine learning features add kiye gaye. Tera package manager automatically inhe pull kar laya, tujhse poochhe bina.</p><p>Mere output mein <strong>6 new packages install</strong> hue: libdnnl3.6, libonnx1l, libonnxruntime-providers, libonnxruntime1.23, libprotobuf-lite32t64, libxnnpack0.20241108.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*q_cpVpyX3cGGFAmFopmUCg.png" /></figure><p>Yeh sab ML inference libraries hain — OpenVAS / gvmd ne apna naya version release kiya jisme machine learning features add kiye gaye. Mera package manager automatically inhe pull kar laya, mujhse poochhe bina.</p><blockquote>full-upgrade vs upgrade</blockquote><blockquote>apt upgrade sirf <em>safe</em> upgrades karta hai — koi naya package install nahi, koi purana remove nahi. apt full-upgrade naye dependencies install aur conflicting old packages remove bhi kar sakta hai. Alias mein full-upgrade use karna better hai Kali jaise rolling distro ke liye.</blockquote><h3>Phase 3: Parallel Download — 76.9 MB</h3><pre>Fetched 76.9 MB in 2min 46s (464 kB/s)<br># 61 .deb packages, teen mirrors se parallel mein</pre><p>APT ek saath multiple connections open karta hai alag-alag mirrors se. Mere output mein kali.download aur mirrors.esto.network simultaneously use ho rahe the.</p><p>Har .deb file download ke baad uska <strong>SHA256 hash verify</strong> hota hai repository ke InRelease file ke against. Agar hash match nahi kiya — package reject. Yeh tampered ya corrupted packages ko automatically block karta hai.</p><p>Interesting packages jo is baar upgrade hue:</p><pre>Package             Version                        Kya hai<br>-------------------------------------------------------------------------------------------<br>mariadb-server      11.8.6-3                       Database engine (OpenVAS use karta hai)<br>............................................................................................<br>mesa 26.0.2         libglx, libgbm, vulkan         GPU / Vulkan drivers (ARM Mali ke liye)<br>...............................................................................................<br>pipewire 1.6.2      pipewire, pipewire-pulse       Modern Linux audio subsystem<br>............................................................................................<br>openvas-scanner     23.41.6                        Kali ka vulnerability scanner<br>...........................................................................................<br>sqlmap 1.10.3       —                              SQL injection testing tool<br>-------------------------------------------------------------------------------------------</pre><h3>Phase 4 &amp; 5: dpkg — Unpack aur Configure</h3><p>APT ek <em>high-level</em> tool hai. Actual package installation <strong>dpkg</strong> karta hai (Debian Package Manager). Do sub-phases hain:</p><p>4a Unpacking — Files extract karna:</p><pre>Preparing to unpack .../00-mariadb-server_1:11.8.6-3_arm64.deb...<br>/var/lib/mysql: found previous version 11.8<br>Unpacking mariadb-server (1:11.8.6-3) over (1:11.8.6-2)...</pre><p><strong>Numbered order (00-, 01-, 02-…)</strong> — dpkg dependency order mein packages install karta hai. Base libraries pehle, phir unhe use karne wale packages. Yeh order APT ne SAT solver se calculate kiya tha.</p><p>/var/lib/mysql: found previous version 11.8 — MariaDB ka data directory detect hua. Database migration scripts automatically handle hoti hain backward compatibility — mera data safe hai.</p><h4>4b Setting Up — Post-install scripts</h4><p>Unpack ke baad har package ke <strong>postinst script</strong> chalte hain. Yeh shell scripts jo package ke saath aate hain — services register karte hain, config generate karte hain, databases initialize karte hain.</p><pre>Setting up mariadb-server (1:11.8.6-3)...<br>Installing new version of config file /etc/apparmor.d/mariadbd<br>mariadb.service is a disabled or a static unit not running, not starting it.</pre><p><strong>Yeh “disabled… not starting” — achi baat hai!</strong> Agar service pehle se disabled thi, upgrade use forcefully start nahi karta. Mere RPi4 ka behavior change nahi hoga.</p><h3>Phase 6: Processing Triggers</h3><p>Multiple packages install hone ke baad kuch system-level operations ek baar run hoti hain. Har package se alag-alag nahi — ek baar, efficiently.</p><pre>Trigger                            Kya rebuild/update hota hai<br>-----------------------------------------------------------------------------------------------------------------------------<br>libc-bin (ldconfig)                 Shared library cache /etc/ld.so.cache — critical! Nayi libraries ko system find kar sake<br>------------------------------------------------------------------------------------------------------------------------------<br>man-db Manual pages database — ab man mariadb naya doc dikhayega<br>------------------------------------------------------------------------------------------------------------------------------<br>postgresql-common PostgreSQL dictionaries rebuild (gvmd ke liye)<br>------------------------------------------------------------------------------------------------------------------------------<br>kali-menu Application menu update (XFCE mein nayi entries)<br>------------------------------------------------------------------------------------------------------------------------------<br>desktop-file-utils File type associations refresh<br>------------------------------------------------------------------------------------------------------------------------------</pre><blockquote>Why triggers exist</blockquote><blockquote>Agar ldconfig har library install pe alag-alag chale, 50 packages install pe 50 baar rebuild hoga. Trigger system batches yeh operation — sirf ek baar, sab kuch install hone ke baad. Faster aur consistent.</blockquote><h3>Phase 7: needrestart — Process Introspection</h3><p>Last phase. <strong>needrestart</strong> ek post-upgrade tool hai jo scan karta hai — koi running process purani libraries use kar raha hai kya?</p><pre> Running kernel seems to be up-to-date.<br>Failed to check for processor microcode upgrades.<br><br>Restarting services...<br>  systemctl restart systemd-networkd.service<br><br>Service restarts being deferred:<br>  systemctl restart lightdm.service<br><br>User sessions running outdated binaries:<br>  devuser @ session #4: xfce4-session[1634]<br>  devuser @ user service: pipewire.service[1601], pipewire-pulse.service[1607] </pre><p>Har line ka matlab:</p><p><strong>“Kernel seems up-to-date”</strong> — Reboot nahi karna. In-memory kernel version aur installed version match kar raha hai. Agar kernel upgrade hota, yeh line warning deti.</p><p><strong>“Failed to check processor microcode”</strong> — ARM processors (RPi4) ke liye x86-style microcode updates exist nahi karte. Yeh error nahi, expected behavior hai.</p><p><strong>“lightdm deferred”</strong> — Display manager restart defer kiya gaya kyunki active session chal rahi hai. Forced restart se mere session kill ho jaati — isliye smart deferral.</p><p><strong>“pipewire outdated binaries”</strong> — PipeWire upgrade hua, lekin running audio server abhi purani binary use kar raha hai.</p><p>Fix: logout/login ya sudo reboot. maine reoot kiya.</p><h3>The Full Picture</h3><p>Mere terminal mein sirf uf dikhta hai. Background mein yeh sab chala:</p><pre><br>uf → 7 Phases<br>0 - Shell ne uf alias expand kiya — 3 commands &amp;&amp; chain mein.<br>1 - apt update — 3 Kali mirrors se package metadata fetch, /var/lib/apt/lists/ mein save.<br>2 - SAT solver ne dependency graph solve ki — 55 upgrades + 6 new packages calculate kiye.<br>3 - 76.9 MB parallel download, 3 mirrors se, har package SHA256 verified.<br>4 - dpkg ne ordered unpack kiya — base libraries pehle, dependent packages baad mein.<br>5 - postinst scripts chale — services configured, config files updated, AppArmor profiles updated.<br>6 - System triggers — ldconfig cache rebuilt, man pages updated, menus refreshed.<br>7 - needrestart — processes scanned, deferred restarts noted, kernel confirmed up-to-date.</pre><blockquote>Ek short alias ke peeche ek complete package management pipeline chal rahi hai — network, cryptography, constraint solving, filesystem ops, aur process introspection.</blockquote><p>Yeh samajhna important hai kyunki jab kuch break hota hai — aur Linux mein kabhi-kabhi hota hai — tab tujhe exactly pata hoga konsa phase fail hua aur kyun.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c263eee2b2b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting Up Micro Editor on Raspberry Pi 4 (Kali Linux 64-bit) — A Developer’s Real-World Guide]]></title>
            <link>https://learnwithworkshop.medium.com/setting-up-micro-editor-on-raspberry-pi-4-kali-linux-64-bit-a-developers-real-world-guide-e8eb3d7bb33f?source=rss-c05e7c423530------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8eb3d7bb33f</guid>
            <category><![CDATA[kali-linux]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Mangal_dev]]></dc:creator>
            <pubDate>Sun, 22 Mar 2026 03:58:42 GMT</pubDate>
            <atom:updated>2026-03-22T03:58:42.310Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cIu7nXskOzfogJpmhsaTew.png" /></figure><p>RPi4 pe Kali Linux 64-bit ke saath Micro Editor setup karne ka step-by-step guide — real errors aur unke fixes ke saath.</p><p>## Yeh Article Mein Kya Milega?</p><ul><li>Micro editor kya hai aur Nano/Vim se better kyun hai<br>- RPi4 Kali Linux 64-bit (arm64) pe compatibility kaise check karein<br>- 3 tarike se installation — script, manual aur apt<br>- Developer ke liye perfect configuration setup<br>- Real errors jo mujhe aayi — aur maine kaise fix ki</li></ul><h4>📌 Section 1 — “Pehle System Check Karenge”</h4><p>Command 1 — Architecture check:</p><pre>uname -m</pre><p>Koi bhi software install karne se pehle, apna system architecture <br>verify karna zaroori hai — kyunki 32-bit aur 64-bit ke liye <br>alag binaries hoti hain.</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ uname -m<br>aarch64</pre><p>✅ aarch64 matlab mera system 64-bit ARM hai — <br>bilkul sahi! Micro ka linux-arm64 binary use karenge.</p><p>Command 2 — OS verify karo:</p><pre>cat /etc/os-release | grep PRETTY_NAME</pre><p>Output:</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ cat /etc/os-release | grep PRETTY_NAME<br>PRETTY_NAME=&quot;Kali GNU/Linux Rolling&quot;<br><br></pre><p>✅ Kali GNU/Linux Rolling — confirmed!</p><p>$ cat /etc/os-release | grep PRETTY_NAME<br>PRETTY_NAME=”Kali GNU/Linux Rolling”</p><p>✅ Kali Linux Rolling Edition — <br>yeh continuously update hoti hai, <br>isliye latest packages milte hain.</p><h4>📌 Section 2 — “Install Karenge”</h4><p><strong>Command 3 — Official install script:</strong></p><pre>curl https://getmic.ro | bash</pre><p>Output:</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ curl https://getmic.ro | bash<br>  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current<br>                                 Dload  Upload  Total   Spent   Left   Speed<br>100   9728 100   9728   0      0  12865      0                              0<br>Detected platform: linux-arm64<br>Latest Version: 2.0.15<br>Downloading https://github.com/micro-editor/micro/releases/download/v2.0.15/micro-2.0.15-linux-arm64.tar.gz<br>  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current<br>                                 Dload  Upload  Total   Spent   Left   Speed<br>  0      0   0      0   0      0      0      0                              0<br>100  4.46M 100  4.46M   0      0 245.1k      0   00:18   00:18         216.6k<br>micro-2.0.15/micro<br>/=====================================\\<br>|   update-alternatives is supported   |<br>\\=====================================/<br><br>getmicro can use update-alternatives to register micro as a system text editor.<br>For example, this will allow `crontab -e` open the cron file with micro.<br><br>To enable this feature, define the GETMICRO_REGISTER variable or use the URL<br>`https://getmic.ro/r`.<br><br>Note that you must install micro to a directory accessible to all users when doing<br>this, typically /usr/bin. cd to that directory before running this script.<br><br>E.g.:<br><br>  $ cd /usr/bin<br>  $ curl https://getmic.ro/r | sudo sh<br><br>or<br><br>  $ su - root -c &quot;cd /usr/bin; wget -O- https://getmic.ro | GETMICRO_REGISTER=y sh&quot;<br><br><br><br> __  __ _                  ___           _        _ _          _ _<br>|  \/  (_) ___ _ __ ___   |_ _|_ __  ___| |_ __  | | | ___  __| | |<br>| |\/| | |/ __| &#39;__/ _ \   | || &#39;_ \/ __| __/ _\ | | |/ _ \/ _  | |<br>| |  | | | (__| | | (_) |  | || | | \__ \ || (_| | | |  __/ (_| |_|<br>|_|  |_|_|\___|_|  \___/  |___|_| |_|___/\__\__,_|_|_|\___|\__,_(_)<br><br>Micro has been downloaded to the current directory.<br>You can run it with:<br><br>./micro<br><br></pre><p>$ curl <a href="https://getmic.ro/">https://getmic.ro</a> | bash</p><p>Detected platform: linux-arm64<br>Latest Version: 2.0.15</p><p>✅ Script ne automatically detect kiya ki humara <br>system linux-arm64 hai aur correct binary download <br>kar li — koi manual selection nahi karni padi!</p><p>⚠️ Note: Abhi micro sirf current directory (~) mein <br>hai. System-wide use ke liye move karna hoga.</p><p><strong>Command 4 — Binary system-wide move karenge:</strong></p><pre>sudo mv micro /usr/local/bin/</pre><p>Output:</p><pre><br>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ sudo mv micro /usr/local/bin/<br>[sudo] password for devuser: <br><br>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ <br><br></pre><p>$ sudo mv micro /usr/local/bin/</p><p>✅ Koi error nahi aaya — micro ab system-wide <br>accessible hai. Ab kisi bhi directory se <br>sirf “micro” type karke open kar sakte ho.</p><p><strong>Command 5 — Verify karte hain ki micro kaam kar raha hai ya nahi?:</strong></p><pre>micro --version</pre><p>Output:</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ micro --version<br>Version: 2.0.15<br>Commit hash: 6a62575b<br>Compiled on December 31, 2025<br><br>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$</pre><p>$ micro — version<br>Version: 2.0.15<br>Commit hash: 6a62575b<br>Compiled on December 31, 2025</p><p>✅ Installation successful! Micro v2.0.15 — <br>latest stable version — RPi4 Kali Linux <br>64-bit pe perfectly kaam kar raha hai.</p><h4>📌 Section 3 — <strong>“Clipboard Support Setup”</strong> karte hain.</h4><pre>## Clipboard Support Setup<br><br>### Pehle Samjho — Clipboard Kya Hota Hai?<br><br>Socho jab tum kisi bhi text ko Ctrl+C se copy karte <br>ho aur Ctrl+V se paste karte ho — yeh text ek <br>temporary memory mein store hota hai jise <br>&quot;Clipboard&quot; kehte hain.<br><br>Normal desktop apps (VS Code, Notepad) mein yeh <br>automatically kaam karta hai. Lekin terminal-based <br>editors jaise Micro mein, clipboard ko bahar ke <br>apps se connect karne ke liye ek extra tool <br>chahiye hota hai.<br><br>Isliye hum xclip aur xsel install karenge —<br>yeh do lightweight tools hain jo Micro ko <br>system clipboard se connect karte hain.<br><br>Matlab:<br>- Micro mein copy kiya → browser mein paste kar sako<br>- Kisi webpage se copy kiya → Micro mein paste kar sako<br><br>Ab install karte hain:</pre><p><strong>Command 6 — Clipboard packages install karte hain:</strong></p><pre>sudo apt install xclip xsel -y</pre><p>Output:</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ sudo apt install xclip xsel -y<br>xclip is already the newest version (0.13-4+b3).<br>xclip set to manually installed.<br>The following packages were automatically installed and are no longer required:<br>  libann0  libcdt5  libcgraph6  liblab-gamut1  libsimdutf27<br>Use &#39;sudo apt autoremove&#39; to remove them.<br><br>Installing:<br>  xsel<br><br>Summary:<br>  Upgrading: 0, Installing: 1, Removing: 0, Not Upgrading: 0<br>  Download size: 19.3 kB<br>  Space needed: 86.0 kB / 37.8 GB available<br><br>Get:1 http://http.kali.org/kali kali-rolling/main arm64 xsel arm64 1.2.1-1+b2 [19.3 kB]<br>Fetched 19.3 kB in 1s (20.8 kB/s)<br>Selecting previously unselected package xsel.<br>(Reading database… 454535 files and directories currently installed.)<br>Preparing to unpack …/xsel_1.2.1-1+b2_arm64.deb…<br>Unpacking xsel (1.2.1-1+b2)…<br>Setting up xsel (1.2.1-1+b2)…<br>Processing triggers for man-db (2.13.1-1+b1)…<br>Processing triggers for kali-menu (2026.1.5)…<br>Scanning processes...                                                        <br>Scanning processor microcode...                                              <br>Scanning linux images...                                                     <br><br>Running kernel seems to be up-to-date.<br><br>Failed to check for processor microcode upgrades.<br><br>No services need to be restarted.<br><br>No containers need to be restarted.<br><br>No user sessions are running outdated binaries.<br><br>No VM guests are running outdated hypervisor (qemu) binaries on this host.<br><br>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$                             </pre><p>$ sudo apt install xclip xsel -y</p><p>✅ xclip — pehle se installed tha (Kali mein <br> default aata hai)<br>✅ xsel 1.2.1 — fresh install hua, arm64 <br> package mila</p><p>⚠️ “Failed to check for processor microcode <br>upgrades” — yeh RPi4 pe common message hai, <br>ignore karo. RPi4 ka microcode x86 processors <br>ki tarah update nahi hota, isliye yeh warning <br>aati hai. Koi problem nahi hai.</p><p>🎉 Section 3 — “Clipboard Support” Complete!</p><h4>📌 Section 4— <strong>“Apne Hisaab Se Setup Karo” (Configuration)</strong> karte hain.</h4><p><strong>Command 7 — Config file open karenge micro mein:</strong></p><pre>micro ~/.config/micro/settings.json</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*RMTPpNfhG2s1Q6_Z-DzJRg.png" /></figure><p>Blank hoga — pehli baar open kiya hai toh micro ne fresh file create ki hai.</p><p>Ab yeh content type/paste karo micro mein:</p><pre>{<br>    &quot;colorscheme&quot;: &quot;monokai&quot;,<br>    &quot;tabsize&quot;: 4,<br>    &quot;tabstospaces&quot;: true,<br>    &quot;autoindent&quot;: true,<br>    &quot;ruler&quot;: true,<br>    &quot;mouse&quot;: true,<br>    &quot;hlsearch&quot;: true,<br>    &quot;syntax&quot;: true<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*SU9gH51vfj7ciZn6JomEyA.png" /></figure><p>Paste karne ke baad <strong>Ctrl+S</strong> se save karo, phir <strong>Ctrl+Q</strong> se quit karo.</p><p>✅ Configuration saved! Verify karte hain.</p><p><strong>Command 8 — Config verify karte hain:</strong></p><pre>cat ~/.config/micro/settings.json</pre><p>Output:</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ cat ~/.config/micro/settings.json<br>{<br>    &quot;colorscheme&quot;: &quot;monokai&quot;,<br>    &quot;tabsize&quot;: 4,<br>    &quot;tabstospaces&quot;: true,<br>    &quot;autoindent&quot;: true,<br>    &quot;ruler&quot;: true,<br>    &quot;mouse&quot;: true,<br>    &quot;hlsearch&quot;: true,<br>    &quot;syntax&quot;: true<br>}<br><br>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$</pre><p>✅ Perfect! Configuration exactly wahi hai jo humne set ki thi!</p><p>$ cat ~/.config/micro/settings.json<br>{<br> “colorscheme”: “monokai”, ← syntax colors<br> “tabsize”: 4, ← 4 spaces per tab<br> “tabstospaces”: true, ← tab key = spaces<br> “autoindent”: true, ← auto indentation<br> “ruler”: true, ← line numbers<br> “mouse”: true, ← mouse support<br> “hlsearch”: true, ← search highlight<br> “syntax”: true ← syntax highlighting<br>}</p><p>✅ Config verified! Har setting ka ek kaam hai — <br>developer ke liye yeh ek clean, productive <br>setup hai.</p><p>🎉 Section 4 — “Configuration” Complete!</p><h4>📌 Section 5— <strong>“Plugins Install Karo”</strong> karte hain”.</h4><p><strong>Command 9 — Micro mein plugin install karenge:</strong></p><pre>micro -plugin install filemanager</pre><p>Output:</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ micro -plugin install filemanager<br>Downloading &quot;filemanager&quot; (3.5.1) from &quot;https://github.com/micro-editor/updated-plugins/releases/download/v1.0.0/filemanager-3.5.1.zip&quot;<br>One or more plugins installed.<br><br>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$</pre><p>✅ filemanager v3.5.1 — successfully installed!</p><p>$ micro -plugin install filemanager</p><p>Downloading “filemanager” (3.5.1)<br>One or more plugins installed.</p><p>✅ Filemanager plugin install ho gaya! <br>Ab micro ke andar Ctrl+E dabao aur <br>“tree” type karo — left side mein <br>file tree open ho jayega.</p><p><strong>Terminal me “micro” karo ,editor open hoga.Ab Ctrl+E dabao , dabate hi niche “&gt;” aise dikhega isme type karo “tree” left side mein <br>file tree open ho jayega.</strong></p><p>kuch aise:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*0-i2uQBXqaCvoe0guufYxA.png" /></figure><p><strong>Command 10 — Linter plugin install karte hain:</strong></p><p><strong>Linter kya karta hai?</strong> Code likhte waqt agar koi syntax error ho — jaise Python mein colon bhool gaye, ya indentation galat ki — toh linter <strong>turant underline karke highlight</strong> kar deta hai, file save karne ka wait nahi karna padta. Bilkul VS Code jaisa feel! 🔥</p><pre>micro -plugin install linter</pre><p>Output:</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ micro -plugin install linter<br>Unknown plugin &quot;linter&quot;<br><br>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$</pre><p>“⚠️ Error #1: Linter Plugin Unknown”:</p><p>$ micro -plugin install linter<br>Unknown plugin “linter”</p><p>🔍 Kya hua?<br>Linter actually micro mein BUILT-IN hai — <br>alag se install karne ki zaroorat hi nahi!</p><p>Micro v2+ ke saath yeh plugins already andar hain:<br>- linter ✅ built-in<br>- autoclose ✅ built-in <br>- comment ✅ built-in<br>- diff ✅ built-in<br>- status ✅ built-in</p><p>Isliye “Unknown plugin” aaya — plugin registry <br>mein hai hi nahi kyunki wo already installed hai!</p><p>✅ Fix: Kuch karne ki zaroorat nahi — linter <br>pehle se kaam kar raha hai!</p><p><strong>Verify karte hain — built-in plugins list dekhenge:</strong></p><pre>micro -plugin list</pre><p>Output:</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ micro -plugin list<br>The following plugins are currently installed:<br>filemanager (3.5.1)<br>autoclose (built-in)<br>comment (built-in)<br>diff (built-in)<br>ftoptions (built-in)<br>linter (built-in)<br>literate (built-in)<br>status (built-in)<br><br>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ <br><br></pre><p>✅ Confirmed! Linter built-in hai — error actually humein ek important cheez sikha gayi!</p><p>$ micro -plugin list</p><p>The following plugins are currently installed:<br>filemanager (3.5.1) ← humne install kiya<br>autoclose (built-in) ← auto bracket close<br>comment (built-in) ← Ctrl+/ se comment<br>diff (built-in) ← git diff highlight<br>ftoptions (built-in) ← filetype options<br>linter (built-in) ← syntax error check<br>literate (built-in) ← literate programming<br>status (built-in) ← bottom status bar</p><p>✅ Kul 8 plugins active hain — 1 humara <br>install kiya hua, baaki 7 micro ke saath <br>by default aate hain!</p><p>🎉 Section 5 — “Plugins” Complete!</p><h4>📌 Section 6— <strong>“F5 Se Code Run Karo”</strong> karte hain”.</h4><p>Yeh tumhara favourite feature hai — Python/Rust file directly micro se run karna! 😄</p><p><strong>Command 11:</strong></p><pre>micro ~/.config/micro/bindings.json</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*1xXvQ4TjL0YEhNXzoCEPFA.png" /></figure><p>✅ Perfect! {} matlab micro ne file already create kar rakhi hai — sirf content add karna hai.</p><p><strong>Yeh content </strong><strong>{} replace karke paste karo:</strong></p><pre>{<br>    &quot;F5&quot;: &quot;lua:initlua.runCode&quot;<br>}</pre><p><strong>Ctrl+S</strong> save karo, <strong>Ctrl+Q</strong> quit karo.</p><p>✅ Verify karte hain!</p><p>Command 12:</p><pre>cat ~/.config/micro/bindings.json</pre><p>Output:</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ cat ~/.config/micro/bindings.json<br>{<br>    &quot;F5&quot;: &quot;lua:initlua.runCode&quot;<br>}<br><br>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$</pre><p>✅ Bindings.json confirmed! Ab F5 ke liye Lua script banana hai.</p><p><strong>Command 13 — init.lua file create karte hain:</strong></p><pre>micro ~/.config/micro/init.lua</pre><p>Output:</p><pre><br>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ micro ~/.config/micro/init.lua<br>Lua Error: initlua.runCode does not exist<br><br>Press enter to continue<br><br><br><br></pre><p>⚠️ Error aayi — but ghabrao mat! Yeh expected hai!</p><p><strong>Kya hua?</strong> Micro start hote hi bindings.json check karta hai — usme F5 ke liye initlua.runCode set hai, but init.lua abhi empty hai, toh function mila nahi.</p><p><strong>Enter dabao</strong> — micro file editor mein khul jayega!</p><p><strong>Ab andar hoke yeh content paste karo:</strong></p><pre>local micro = import(&quot;micro&quot;)<br>local shell = import(&quot;micro/shell&quot;)<br><br>function runCode()<br>    local buf = micro.CurPane().Buf<br>    local filename = buf.Path<br>    local ext = filename:match(&quot;^.+%.(.+)$&quot;)<br><br>    if ext == &quot;py&quot; then<br>        shell.RunInteractiveShell(&quot;python3 &quot; .. filename, true, false)<br>    elseif ext == &quot;rs&quot; then<br>        shell.RunInteractiveShell(&quot;rustc &quot; .. filename .. &quot; -o /tmp/rs_out &amp;&amp; /tmp/rs_out&quot;, true, false)<br>    else<br>        micro.InfoBar():Error(&quot;F5: Sirf .py aur .rs files support hain!&quot;)<br>    end<br>end</pre><p><strong>Ctrl+S</strong> save karo, <strong>Ctrl+Q</strong> quit karo.</p><p>Yeh kaam hogaya, Ab test karte hain — asli maza yahan hai! 🔥</p><p><strong>Command 14 — Test ke liye ek Python file banayenge:</strong></p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ micro ~/test.py<br><br></pre><p>Andar yeh likho:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*AvOjyBt_kUZ_TAPl9Hy03Q.png" /></figure><p><strong>Ctrl+S</strong> save karo — phir <strong>F5</strong> dabao!</p><p>Output :</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ micro ~/test.py<br>Micro editor RPi4 pe kaam kar raha hai! 🎉<br>Press enter to continue</pre><p>🎉 <strong>PERFECT! F5 kaam kar raha hai!</strong> Python code directly micro se run ho gaya!</p><p>Test ke liye ek simple Python file banai:</p><p>$ micro ~/test.py</p><p># Andar likha:<br>print(“Micro editor RPi4 pe kaam kar raha hai! 🎉”)</p><p># F5 dabaya aur…<br>Micro editor RPi4 pe kaam kar raha hai! 🎉<br>Press enter to continue</p><p>✅ F5 ne seedha Python code run kar diya — <br>terminal alag open karne ki zaroorat nahi!<br>Bilkul VS Code jaisa feel, lekin terminal mein. 🔥</p><p>🎉 Section 6 — “F5 Se Code Run Karo” Complete!</p><h4>📌 Section — 7 “Key Bindings Cheatsheet”.</h4><p><strong>Kaam Ki Shortcuts — Cheatsheet:</strong></p><pre>## Kaam Ki Shortcuts — Cheatsheet<br><br>Micro ka sabse bada fayda yeh hai ki shortcuts <br>bilkul normal editors jaisi hain — koi nayi <br>language seekhne ki zaroorat nahi!<br><br>### Basic Shortcuts<br><br>|-------------------|---------|<br>| Kaam              | Shortcut |<br>|-------------------|----------|<br>| File save karo    | Ctrl+S   |<br>|-------------------|----------|<br>| Micro band karo   | Ctrl+Q   |<br>|-------------------|----------|<br>| Undo              | Ctrl+Z   |<br>|-------------------|----------|<br>| Redo              | Ctrl+Y   |<br>|-------------------|----------|<br>| Copy              | Ctrl+C   |<br>|-------------------|----------|<br>| Paste             | Ctrl+V   |<br>|-------------------|----------|<br>| Cut (poori line)  | Ctrl+K   |<br>|-------------------|----------|<br>| Find              | Ctrl+F   |<br>|-------------------|----------|<br>| Find &amp; Replace    | Ctrl+H   |<br>|______________________________|<br><br>### Developer Shortcuts<br><br>| Kaam                 | Shortcut             |<br>|----------------------|----------------------|<br>| Command mode         | Ctrl+E               |<br>|----------------------|----------------------|<br>| File manager         | Ctrl+E → filemanager |<br>|----------------------|----------------------|<br>| Multiple cursors     | Ctrl+Click           |<br>|----------------------|----------------------|<br>| Line comment toggle  | Ctrl+/               |<br>|----------------------|----------------------|<br>| Python/Rust run karo | F5                   |<br>|_____________________________________________|<br><br>### Plugin Commands (Ctrl+E ke baad type karo)<br><br>| Command           | Kaam                     |<br>|-------------------|--------------------------|<br>| filemanager       | Left mein file tree open |<br>|-------------------|--------------------------|<br>| plugin list       | Installed plugins dekho  |<br>|-------------------|--------------------------|<br>| plugin install X  | Naya plugin install karo |<br>|-------------------|--------------------------|<br>| set colorscheme X | Theme change karo        |<br>|-------------------|--------------------------|<br>| help              | Built-in help            |<br>|______________________________________________|<br><br>💡 Tip: Ctrl+E se jo command mode <br>khulta hai, woh micro ka superpower <br>hai — isse tum kuch bhi control <br>kar sakte ho bina mouse touch kiye!</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8eb3d7bb33f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kali Linux ko Raspberry Pi 4 pe Harden karte waqt Kaunsa User Use Karna Chahiye?]]></title>
            <link>https://learnwithworkshop.medium.com/kali-linux-ko-raspberry-pi-4-pe-harden-karte-waqt-kaunsa-user-use-karna-chahiye-5f91d3975ead?source=rss-c05e7c423530------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f91d3975ead</guid>
            <category><![CDATA[system-hardening]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[raspberry-pi-4]]></category>
            <category><![CDATA[linux-security]]></category>
            <category><![CDATA[kali-linux-tools]]></category>
            <dc:creator><![CDATA[Mangal_dev]]></dc:creator>
            <pubDate>Fri, 20 Mar 2026 13:31:00 GMT</pubDate>
            <atom:updated>2026-03-20T13:31:00.517Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*H2IBDRhGOP3STxoaxev_cw.jpeg" /></figure><h3>Ek common galti jo tumhara Pi day one se hi vulnerable bana deti hai.</h3><p>Agar tumne Raspberry Pi 4 pe Kali Linux 64-bit install kiya hai, toh tumne notice kiya hoga ki system ek default user ke saath aata hai — kali. Seedha kaam karta hai, sudo privileges hain, aur use karna convenient lagta hai.</p><p>Lekin jis moment tum system hardening karne baithte ho — yahi convenience sabse badi problem ban jaati hai.</p><h3>Problem Kya Hai Default kali User Se?</h3><p>kali username publicly known hai. Official Kali Linux documentation mein documented hai, hazaron forum threads mein discuss hua hai, aur <strong>kisi bhi attacker ka pehla guess yahi hoga</strong> brute-force ya credential-stuffing attack mein.</p><p>Isko apna primary account rakhna — hardening ke dauran ya baad mein — poori hardening ki mehnat ko waste kar deta hai.</p><h3>Mera Setup</h3><ul><li><strong>Hardware:</strong> Raspberry Pi 4</li><li><strong>OS:</strong> Kali Linux 64-bit (arm64)</li><li><strong>Users:</strong> kali (default) + 2 custom user accounts</li></ul><p>Maine hardening shuru karne se pehle do extra user accounts banaye. Aur phir sawaal aaya — <em>actually use karunga kisko?</em></p><p>2 custom user role:</p><pre>👤 kali     → ❌ Disable (default, dangerous)<br>👤 devuser  → 💻 Software Development<br>👤 secuser  → 🔐 Cybersecurity Lab</pre><p>Har User Ko Kya Chahiye:</p><p>💻 devuser — Dev Work ke liye:</p><pre>sudo usermod -G sudo,adm,netdev,gpio,spi,i2c,docker devuser</pre><pre>     Group         |                  Kyun<br>..............................................................<br>| sudo             |     System level kaam ke liye           |<br>| adm              |     Logs dekhne ke liye debugging mein  |<br>| netdev           |     Network config                      |<br>| gpio/spi/i2cRPi  |     Hardware access                     |<br>| docker           |     Containers run karne ke liye        |<br>..............................................................</pre><p>🔐 secuser — Cyber Lab ke liye:</p><pre>sudo usermod -G sudo,wireshark,netdev,bluetooth secuser</pre><pre>        Group               |              Kyun<br>---------------------------------------------------------------<br>| sudo                      |    Tools install karne ke liye  |<br>| wireshark                 |    Packet capture               |<br>| netdev                    |    Network interface control    |<br>| bluetooth                 |    BT attacks practice          |<br>---------------------------------------------------------------</pre><h4>❌ kali — Disable karo:</h4><pre>sudo passwd -l kali<br>sudo usermod --shell /usr/sbin/nologin kali<br>```<br><br>---<br><br>## Important Rule — Dono Users Ko Mix Mat Karo:<br>```<br>devuser  → sirf development tools<br>secuser  → sirf security tools<br><br>Software dev  = devuser se<br>CTF/Labs      = secuser se</pre><p>Yeh <strong>isolation</strong> hai — agar secuser ki practice se kuch gadbad ho, to devuser ka kaam safe rahega। 🛡️</p><h3>Sahi Approach Kya Hai?</h3><h3>1. Custom User Ko Admin Banao</h3><p>Apne ek custom user ko primary admin account banao aur confirm karo ki uske paas sudo access hai:</p><pre>sudo usermod -aG sudo your_custom_user<br>groups your_custom_user  # verify karo</pre><p>Ab ye step importent hai ,kyun? kyunki agar galat order pe admin banali to problem hoga kai chezein sahi se kaam nahi karega , to sahi order importen hai:</p><p>Sahi order ye hai: (mere case me)</p><pre>1️⃣ Pehle devuser aur secuser ko sahi setup kiya<br>2️⃣ Verify kiya ki dono kaam kar rahe hain<br>3️⃣ TABHI kali ko disable kiya</pre><h3>Kyun Yeh Order Follow Karna Zaroori Hai?</h3><p>Soch agar ulta kiya —</p><pre>❌ Galat Order:<br><br>- pehle kali disable kiya <br>→ devuser setup karte waqt kuch error aaya<br>→ Ab na kali kaam kar raha, na devuser<br>→ System LOCK HO GAYA 😱</pre><pre>✅ Sahi Order:<br>devuser/secuser setup kiya <br>→ verify kiya → sab theek hai<br>→ Ab safely kali disable kiya<br>→ Koi risk nahi ✅</pre><h3>Simple Rule:</h3><blockquote><strong><em>“Purana darwaza tab band karo jab naya darwaza khul jaye aur usski chabi kaam kare!”</em></strong><em> 🚪🔑</em></blockquote><h3>devuser setup se:</h3><p>Step 1 — Pehle Check Karenge devuser Ke Current Groups:</p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ groups devuser<br>devuser : devuser sudo docker</pre><p>Bahut kam groups hain — development ke liye aur chahiye!</p><p><strong>Kya Missing Hai Dev Work Ke Liye:</strong></p><pre>  Group                Kyun Chahiye                   Abhi Hai?<br>...........................................................................<br>sudo                  System control                    ✅<br>---------------------------------------------------------------------------<br>docker                Containers                        ✅<br>---------------------------------------------------------------------------<br>adm                   Logs dekhna/debugging             ❌<br>---------------------------------------------------------------------------<br>netdev                Network config                    ❌<br>---------------------------------------------------------------------------<br>gpioRPi               Hardware pins                     ❌<br>---------------------------------------------------------------------------<br>spiRPi                sensors/modules                   ❌<br>---------------------------------------------------------------------------<br>i2cRPi                hardware bus                      ❌<br>---------------------------------------------------------------------------</pre><p>Step 2 — Groups Add Karna:</p><pre>sudo usermod -aG adm,netdev,gpio,spi,i2c devuser<br>```<br><br>⚠️ **`-aG` important hai** — sirf `-G` likha toh existing groups (`sudo`, `docker`) **remove ho jayenge!**<br>```<br>-a = append (jodna)<br>-G = groups</pre><p><strong>Verify Karte Hain:</strong></p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ groups devuser<br>devuser : devuser adm sudo netdev i2c gpio spi docker</pre><p>Sab sahi hai : <strong>devuser = Done!</strong> 🎉</p><h4><strong>Ab Next Step — </strong><strong>secuser Check Karte hain:</strong></h4><pre>groups secuser</pre><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ groups secuser<br>secuser : secuser sudo</pre><p>Abhi secuser ke paas sirf yeh hai:</p><p><strong>secuser : secuser sudo</strong></p><p><strong>Cybersecurity lab ke liye aur chahiye!</strong></p><h3>Kya Missing Hai Security Work Ke Liye:</h3><pre>Group                    Kyun Chahiye                   Abhi Hai?<br>..............................................................................<br>sudo                    Tools install karna                  ✅<br>------------------------------------------------------------------------------<br>wireshark               Packet capture/analysis              ❌<br>------------------------------------------------------------------------------<br>netdev                  Network interfaces control           ❌<br>------------------------------------------------------------------------------<br>bluetooth               BT attacks practice                  ❌<br>------------------------------------------------------------------------------</pre><p><strong>Ab Groups Add Karna:</strong></p><pre>sudo usermod -aG wireshark,netdev,bluetooth secuser</pre><p><strong>Verify karte hain:</strong></p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ groups secuser<br>secuser : secuser sudo netdev bluetooth wireshark</pre><p><strong>✅ </strong><strong>secuser ka setup complete!</strong></p><p>Ab dono Users Ready Hain:</p><pre>User             Groups                                           Status<br>.............................................................................<br>devuser          sudo, docker, adm, netdev, gpio, spi, i2c        ✅ Ready<br>-----------------------------------------------------------------------------<br>secuser          sudo, netdev, bluetooth, wireshark               ✅ Ready<br>-----------------------------------------------------------------------------</pre><p><strong>Ab Final Step — </strong><strong>kali Disable Karna!</strong></p><h3>2. Default kali Account Disable Karna</h3><p>Jab custom admin user sahi se kaam karne lage, kali account lock kar do:</p><pre>sudo passwd -l kali<br>sudo usermod --shell /usr/sbin/nologin kali<br>```<br><br>Yeh user delete nahi karta — bas usse login ke liye unusable bana deta hai.<br><br>### 3. Dono Custom Users Ko Alag Role Diya<br><br>Do custom users hain humare paas — **principle of least privilege** follow <br>karna:<br><br>| User          | Role                          | sudo?   |<br>|---------------|-------------------------------|---------|<br>| Custom User 1 | System admin, hardening tasks | ✅ Haan |<br>| Custom User 2 | Daily use, limited access     | ❌ Nahi |<br>-----------------------------------------------------------<br><br>Iska matlab — agar daily-use account bhi compromise ho jaye, attacker phir bhi <br>privilege escalate nahi kar payega easily.<br></pre><p><strong>Verify karo — disabled hua ya nahi:</strong></p><pre>┌──(devuser㉿kali-raspberrypi)-[~]<br>└─$ sudo passwd -S kali<br>kali L 2025-11-17 0 99999 7 -1</pre><p>✅ <strong>kali user successfully disabled!</strong></p><pre>Output Ka Matlab:<br><br>kali L 2025-11-17 0 99999 7 -1<br>#    ^<br>#    └── &quot;L&quot; = LOCKED ✅</pre><pre>Part                Matlab<br>.............................................................<br>kali                Username<br>-------------------------------------------------------------<br>L                   Locked — login impossible<br>-------------------------------------------------------------<br>2025-11-17          Jis date pe lock hua<br>-------------------------------------------------------------<br>baaki numbers       Password expiry settings<br>-------------------------------------------------------------</pre><h3>Complete! 🎉</h3><pre>✅ devuser  → Dev setup ready<br>✅ secuser  → Cybersecurity lab ready  <br>✅ kali     → Disabled/Locked</pre><h3>Raspberry Pi Pe Yeh Zyada Kyun Matter Karta Hai?</h3><p>Pi aksar home server, VPN node, ya always-on dev machine ke roop mein use hota hai — matlab network pe exposed rehta hai. Aisi machine pe kali jaisa predictable username rakhna — ek open invitation hai attackers ke liye.</p><p>User change karne mein 5 minute lagte hain. Unauthorized access ke baad recovery mein kahin zyada.</p><h3>Key Takeaways</h3><blockquote><em>✅ Hardening hamesha </em><strong><em>custom, non-default user account</em></strong><em> se karo</em></blockquote><blockquote><em>✅ Default </em><em>kali user ko setup ke baad disable karo</em></blockquote><blockquote><em>✅ Admin aur daily-use accounts alag rakho — least privilege follow karo</em></blockquote><blockquote><em>✅ Root SSH band karo, sirf apne trusted user ko allow karo</em></blockquote><p><em>Pi 4 pe Kali homelab ya dev project ke liye run kar rahe ho? Yeh steps sabse pehle karo — agar user level pehle se misconfigured hai, toh baaki saari hardening ek aisi door lock karne jaisi hai jiske around koi wall hi nahi hai।</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f91d3975ead" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Kali Linux mein kali ek default pre-configured user hota hai — toh kya iska matlab yeh hai ki uske…]]></title>
            <link>https://learnwithworkshop.medium.com/kali-linux-mein-kali-ek-default-pre-configured-user-hota-hai-toh-kya-iska-matlab-yeh-hai-ki-uske-39ff8aa30d10?source=rss-c05e7c423530------2</link>
            <guid isPermaLink="false">https://medium.com/p/39ff8aa30d10</guid>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[linux-group]]></category>
            <dc:creator><![CDATA[Mangal_dev]]></dc:creator>
            <pubDate>Fri, 20 Mar 2026 12:31:00 GMT</pubDate>
            <atom:updated>2026-03-20T12:31:00.798Z</atom:updated>
            <content:encoded><![CDATA[<h3>“Kali Linux mein kali ek default pre-configured user hota hai — toh kya iska matlab yeh hai ki uske groups bhi system ne automatically assign kiye hain?&quot;</h3><figure><img alt="linux khud automatically ek user banata hai aur groups assign karta hai" src="https://cdn-images-1.medium.com/max/784/1*0H2QfiX6O3eANqCu5f_uMg.jpeg" /></figure><p>Aur iska answer hai — <strong>Haan!</strong></p><pre>Tune kali install kiya<br>        ↓<br>System ne automatically &quot;kali&quot; user banaya<br>        ↓<br>Aur usse by default 17 groups assign kar diye<br>        ↓<br>Taaki sab kuch out-of-the-box kaam kare<br>(GPIO, Bluetooth, Audio, Network — sab)</pre><p>Yahi reason hai ki kali user itna <strong>over-privileged</strong> hota hai —</p><blockquote><em>System ne socha — </em>“yeh user sab kuch use kar sakta hai, convenient ho”</blockquote><p>Lekin security ne socha — <em>“yeh bahut zyada access hai ek single user ke liye”</em> 🔐</p><p>Isliye hardening mein hum <strong>custom user banate hain</strong> aur sirf zaroori groups dete hain — default user ki tarah sab kuch nahi! 😄</p><h4><strong>System default user kyun banata hai ?</strong></h4><p>Analogy — se samjhte hai:</p><p>Naya Phone 📱</p><p>jab hum naya phone khareedte hai :</p><pre>📦 Box khola<br>      ↓<br>Phone already ON hota hai<br>      ↓<br>Ek default &quot;demo&quot; ya &quot;user&quot; account hota hai<br>      ↓<br>Taaki tu seedha use kar sake — bina kuch setup kiye</pre><p>Exactly yahi Linux karta hai —</p><h3>Linux Ka Logic:</h3><pre>OS install hua<br>      ↓<br>System ko koi na koi user chahiye<br>      ↓<br>Warna koi login hi nahi kar payega<br>      ↓<br>Toh ek ready-made user bana do</pre><h3>3 Reasons Kyun Default User Banata Hai System:</h3><h3>1. 🚪 Entry Point</h3><blockquote><em>Bina user ke system mein ghus hi nahi sakte — koi na koi door toh chahiye</em></blockquote><h3>2. ⚡ Out-of-the-box Experience</h3><blockquote><em>Install karo aur seedha kaam shuru karo — kuch configure na karna pade</em></blockquote><h3>3. 🔧 Sab kuch working ho</h3><blockquote><em>Isliye default user ko </em><strong><em>maximum groups</em></strong><em> dete hain — GPIO, Bluetooth, Audio sab — taaki koi bhi feature broken na lage</em></blockquote><h3>Kali Linux Specifically:</h3><p>Kali ek <strong>pentesting OS</strong> hai — uska target audience hai security researchers jo —</p><ul><li>Network capture karna chahte hain → wireshark group</li><li>Hardware access chahiye → gpio, spi, i2c</li><li>System control chahiye → sudo</li></ul><p>Toh Kali ne socha —</p><blockquote>“Humara user toh security professional hai — usse sab kuch do by default”<em> 🔓</em></blockquote><h4>Problem Tab Aati Hai Jab —</h4><pre>Default user    →   Sabko pata hai naam (kali)<br>                →   Sabko pata hai password (kali)<br>                →   Sabko pata hai groups (17 groups)<br><br>= Perfect target for attackers 🎯</pre><p>Isliye hum <strong>custom user</strong> banate hain — unknown naam, limited groups, apna password! 🔐</p><h3>Linux Groups Kya Hote Hain?</h3><p>Soch ek <strong>building</strong> hai —</p><pre>🏢 LINUX SYSTEM = Ek badi building</pre><p>Is building mein alag-alag <strong>rooms</strong> hain — har room kuch specific cheez store karta hai:</p><pre>🚪 GPIO room      → Raspberry Pi ke physical pins<br>🚪 Sudo room      → System ke master controls<br>🚪 Wireshark room → Network traffic<br>🚪 Bluetooth room → Bluetooth devices<br>🚪 Audio room     → Sound system<br>... aur baaki bhi</pre><p>Ab <strong>Groups = Building ke keychains</strong> hain —</p><pre>🔑 Agar tera paas &quot;gpio&quot; keychain hai   → GPIO room khul jayega<br>🔑 Agar tera paas &quot;sudo&quot; keychain hai   → Master control room khul jayega<br>🔑 Agar tera paas &quot;audio&quot; keychain hai  → Sound room khul jayega</pre><p>kali user ke paas <strong>17 keychains</strong> hain — matlab building ke <strong>17 rooms</strong> access kar sakta hai.</p><pre>👤 kali user<br>    │<br>    ├── 🔑 sudo      → poora system<br>    ├── 🔑 gpio      → hardware pins<br>    ├── 🔑 wireshark → network<br>    ├── 🔑 bluetooth → BT devices<br>    └── ... 13 aur</pre><h3>Security Problem Yahan Hai —</h3><blockquote><em>Jitni zyada keychains ek insaan ke paas hoon — agar woh insaan galat haath mein chala jaye — utne zyada rooms expose ho jaate hain 🔓</em></blockquote><p>Isliye hardening mein yahi karte hain — <strong>sirf zaroori keychains do, baaki wapas lo।</strong> 🔐</p><h4><strong>17 rooms —</strong></h4><pre>kali : kali adm dialout cdrom sudo audio dip video plugdev users netdev i2c bluetooth scanner gpio spi wireshark<br>```<br><br>**Colon (`:`) ke baad jo bhi words hain — woh sab groups hain।**<br><br>Ginn ke dekh:<br>```<br>1.  kali<br>2.  adm<br>3.  dialout<br>4.  cdrom<br>5.  sudo<br>6.  audio<br>7.  dip<br>8.  video<br>9.  plugdev<br>10. users<br>11. netdev<br>12. i2c<br>13. bluetooth<br>14. scanner<br>15. gpio<br>16. spi<br>17. wireshark</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39ff8aa30d10" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kali64-bit(RPI4) Install ke baad kya kya karna chahiye?]]></title>
            <link>https://learnwithworkshop.medium.com/kali64-bit-rpi4-install-ke-baad-kya-kya-karna-chahiye-9e2be7c1355e?source=rss-c05e7c423530------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e2be7c1355e</guid>
            <category><![CDATA[kalisetup]]></category>
            <category><![CDATA[rpi4]]></category>
            <category><![CDATA[developer-setup]]></category>
            <category><![CDATA[kali-linux]]></category>
            <dc:creator><![CDATA[Mangal_dev]]></dc:creator>
            <pubDate>Wed, 18 Mar 2026 15:43:14 GMT</pubDate>
            <atom:updated>2026-03-18T15:43:14.823Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*UO_NDob0PzR5XgmoAxwvOA.jpeg" /></figure><p>6 Phases hai :</p><pre>Phase 1 - System Stabilization<br>        Update,power fix,ssh,expend filesystem,system time set</pre><pre>Phase 2 - Dev environment setup<br>        Python,Rust,Node,Git,vs code/micro</pre><pre>Phase 3 - Cyber Security Tooling<br>        Nmap,Burp suite,metasploit,whireshark,hashcat</pre><pre>Phase 4 - Harding &amp; Privacy<br>        Firewall,Fail2ban,VPN,MAC randomization</pre><pre>Phase 5 - Lab &amp; Prectice setup<br>        Docker,Virtual targets,CTF platforms,wordlists</pre><pre>Phase 6 - Power fix(critical for RPI4)<br>        Official PSU,direct HDMI,config.txt,tweaks</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e2be7c1355e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kisi bhi Python library ko sahi tareeke se samajhne ke liye hume kaun-kaun se steps ya strategy…]]></title>
            <link>https://learnwithworkshop.medium.com/kisi-bhi-python-library-ko-sahi-tareeke-se-samajhne-ke-liye-hume-kaun-kaun-se-steps-ya-strategy-78456c3c067d?source=rss-c05e7c423530------2</link>
            <guid isPermaLink="false">https://medium.com/p/78456c3c067d</guid>
            <category><![CDATA[python-libraries]]></category>
            <category><![CDATA[pythonliabrery]]></category>
            <category><![CDATA[python-web-developer]]></category>
            <dc:creator><![CDATA[Mangal_dev]]></dc:creator>
            <pubDate>Wed, 04 Mar 2026 14:31:01 GMT</pubDate>
            <atom:updated>2026-03-04T14:31:01.291Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Kisi bhi Python library ko sahi tareeke se samajhne ke liye hume kaun-kaun se steps ya strategy follow karni chahiye?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4OitEsvKr99K2hm8ElqLDg.jpeg" /></figure><p><strong>🔎 Python Library Ko Samajhne Ka Structured Flow:</strong></p><h3>1️⃣ Problem-First Approach (WHY Phase)</h3><p><strong>2️⃣ Mental Model Build Karo (Architecture View)</strong></p><p><strong>3️⃣ 20% Surface Scan (Bird’s Eye View)</strong></p><p><strong>4️⃣ Minimum Working Project Banao</strong></p><p><strong>5️⃣ Source Code Peek (Intermediate Level Trick)</strong></p><p><strong>6️⃣ Debug Mode Learning (Deep Understanding)</strong></p><p><strong>7️⃣ Edge Case Experimentation</strong></p><p><strong>8️⃣ Compare With Alternative Library</strong></p><p><strong>9️⃣ Use in Real Project</strong></p><h3>1️⃣ Problem-First Approach (WHY Phase)</h3><p>Sabse pehle yeh clear karo:</p><ul><li>Yeh library <strong>kaunsi problem solve karti hai?</strong></li><li>Iska domain kya hai? (Web, Networking, ML, CLI, Security etc.)</li><li>Agar yeh library na hoti to log kya karte?</li></ul><p>Example:</p><ul><li>requests → HTTP calls easy banana</li><li>scapy → Network packet craft &amp; sniff karna</li><li>fastapi → High-performance API banana</li></ul><p>⚠ Agar problem clear nahi hai to library kabhi deeply samajh nahi aayegi.</p><h3>2️⃣ Mental Model Build Karo (Architecture View)</h3><p>Har serious library me 3 cheeze hoti hain:</p><ul><li>Core Objects (main classes)</li><li>Utilities / Helpers</li><li>Configuration system</li></ul><p>Docs me search karo:</p><ul><li>“Core Concepts”</li><li>“How it works”</li><li>“Architecture”</li><li>“Under the hood”</li></ul><p>Example:</p><ul><li>FastAPI → App → Router → Dependency → Request/Response cycle</li><li>Scapy → Packet → Layers → Fields → Send/Sniff</li></ul><p>Tumhara goal:</p><p>“Ye library internally kis pattern pe chal rahi hai?”</p><h3>3️⃣ 20% Surface Scan (Bird’s Eye View)</h3><p>Poora docs mat padho.</p><p>Bas dekho:</p><ul><li>Installation</li><li>Basic example</li><li>3–5 important classes/functions</li><li>Typical workflow</li></ul><p>Is stage me tumhe:</p><p>“Is library ka usage pattern kaisa dikhta hai?”</p><p>samajhna hai.</p><h3>4️⃣ Minimum Working Project Banao</h3><p>Yeh sabse critical step hai.</p><p>Sirf 10–20 line ka chhota project banao.</p><p>Example:</p><ul><li>FastAPI → 1 route API</li><li>Scapy → 1 packet sniff</li><li>SQLAlchemy → 1 table create + insert</li><li>PyJWT → 1 token generate + verify</li></ul><p>⚠ Sirf tutorial follow mat karo.<br> Khud likho.</p><h3>5️⃣ Source Code Peek (Intermediate Level Trick)</h3><p>Tum already serious learner ho, isliye yeh important hai.</p><p>GitHub pe jao:</p><ul><li>__init__.py</li><li>Main core class</li><li>Entry point</li></ul><p>Dekho:</p><ul><li>Functions ka flow</li><li>Kaun kaun se modules import ho rahe hain</li><li>Configuration kaise handle ho raha hai</li></ul><p>Isse tumhe pata chalega:</p><ul><li>OOP pattern?</li><li>Functional style?</li><li>Dependency Injection?</li><li>Decorator heavy?</li><li>Metaclass use?</li></ul><h3>6️⃣ Debug Mode Learning (Deep Understanding)</h3><p>Code likhte waqt:</p><p>print(type(obj))</p><p>print(dir(obj))</p><p>help(obj)</p><p>Ya VS Code me:</p><ul><li>Go to definition</li><li>Hover documentation</li><li>Breakpoint laga ke inspect karo</li></ul><p>Library ko black box treat mat karo.<br> Usko inspect karo.</p><h3>7️⃣ Edge Case Experimentation</h3><p>Yeh tumhe advanced banayega.</p><p>Test karo:</p><ul><li>Wrong input</li><li>Empty input</li><li>Huge data</li><li>Invalid format</li></ul><p>Dekho:</p><ul><li>Error handling kaise ho raha hai?</li><li>Custom exceptions use ho rahe?</li><li>Logging hai?</li></ul><h3>8️⃣ Compare With Alternative Library</h3><p>Example:</p><ul><li>FastAPI vs Flask</li><li>Scapy vs socket</li><li>Requests vs httpx</li><li>SQLAlchemy vs raw SQL</li></ul><p>Comparison se tumhe:</p><ul><li>Design philosophy</li><li>Performance difference</li><li>Abstraction level</li></ul><p>clear hoga.</p><h3>9️⃣ Use in Real Project</h3><p>Learning complete tab hoti hai jab:</p><p>Tum use apne project me integrate karte ho.</p><p>Example:<br> Tum cybersecurity automation bana rahe ho.</p><p>To:</p><ul><li>Scapy → sniffing module</li><li>FastAPI → dashboard API</li><li>PyJWT → auth system</li><li>SQLAlchemy → logging DB</li></ul><p>Integration = real understanding</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78456c3c067d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>