<?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 0xm3ro on Medium]]></title>
        <description><![CDATA[Stories by 0xm3ro on Medium]]></description>
        <link>https://medium.com/@amrelharery?source=rss-b9ec58025fb6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*uhiPAW4ngeCzJ8RzhZJmqg.jpeg</url>
            <title>Stories by 0xm3ro on Medium</title>
            <link>https://medium.com/@amrelharery?source=rss-b9ec58025fb6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 22:09:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amrelharery/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[Remote code execution via polyglot web shell upload — PortSwigger Walkthrough]]></title>
            <link>https://medium.com/@amrelharery/remote-code-execution-via-polyglot-web-shell-upload-portswigger-walkthrough-c29c5d60557f?source=rss-b9ec58025fb6------2</link>
            <guid isPermaLink="false">https://medium.com/p/c29c5d60557f</guid>
            <category><![CDATA[file-upload]]></category>
            <category><![CDATA[rce]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <dc:creator><![CDATA[0xm3ro]]></dc:creator>
            <pubDate>Tue, 05 Aug 2025 21:05:54 GMT</pubDate>
            <atom:updated>2025-08-05T21:05:54.261Z</atom:updated>
            <content:encoded><![CDATA[<h3>Remote code execution via polyglot web shell upload — PortSwigger Walkthrough</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*hetMoC4IW75kWEc31xVycQ.jpeg" /><figcaption>Cover page</figcaption></figure><h4>Introduction</h4><p>We can edit image metadata to inject malicious code that runs on server, after upload this image and access it, you gained Remote Code Execution (RCE) on this server.</p><h4>Lab URL: <a href="https://portswigger.net/web-security/file-upload/lab-file-upload-remote-code-execution-via-polyglot-web-shell-upload">Remote code execution via polyglot web shell upload</a></h4><p>I used tool like <strong>ExifTool </strong>to add EXIF comment into normal jpg image contains code to get <strong>Carlos Secret</strong></p><p>command:</p><p>exiftool -Comment=”&lt;?php echo ‘=== ‘ . file_get_contents(‘/home/carlos/secret’) . ‘ ===’; ?&gt;” image.jpg -o lab6-portswigger.php</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tIayAtc31Q1DPvxFrDOY7g.png" /><figcaption>Command</figcaption></figure><p>After that I uploaded the infected image, let us try access it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LPahE61PZ0vz1cCPfcGwbA.png" /><figcaption>Flag</figcaption></figure><p>And this is Carlos Secret :D</p><p>Submit it, the lab is solved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jxunwQPN6nstA4yq1286ug.png" /><figcaption>Solved Lab</figcaption></figure><p>Thanks for reading I hope this is helpful one :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c29c5d60557f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SSRF with filter bypass via open redirection vulnerability — PortSwigger Walkthroug]]></title>
            <link>https://medium.com/@amrelharery/ssrf-with-filter-bypass-via-open-redirection-vulnerability-portswigger-walkthroug-a5e5c86344fd?source=rss-b9ec58025fb6------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5e5c86344fd</guid>
            <category><![CDATA[ssrf]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[open-redirect]]></category>
            <dc:creator><![CDATA[0xm3ro]]></dc:creator>
            <pubDate>Mon, 04 Aug 2025 08:11:22 GMT</pubDate>
            <atom:updated>2025-08-04T08:13:01.489Z</atom:updated>
            <content:encoded><![CDATA[<h3>SSRF with filter bypass via open redirection vulnerability — PortSwigger Walkthrough</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xBuLfC1qyvuDbe0_wUic1w.jpeg" /><figcaption>Cover Page</figcaption></figure><h4>Introduction</h4><p>What is SSRF?</p><p>Server-side request forgery is a web security vulnerability that allows an attacker to make the server to make requests to an unintended location.</p><p>In a typical SSRF attack, the attacker might make the server to make a connection to internal-only services within the organization’s infrastructure like admin-panel. In other cases, they may be able to force the server to connect to arbitrary external systems. This could leak sensitive data, such as authorization credentials.</p><h4>Lab URL: <a href="https://portswigger.net/web-security/ssrf/lab-ssrf-filter-bypass-via-open-redirection">SSRF with filter bypass via open redirection vulnerability</a></h4><p>Let us try to click next Product button in product page, It redirect based on path parameter contains the URL</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iA1VFvKT6rHbSJBqLie6bQ.png" /><figcaption>Next Product Redirect Request</figcaption></figure><p>StockAPI calls internal paths only, let us pass to it nextProducts path which redirect us to the internal admin system</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*NotfzZUQokyebjmkTV0qoQ.png" /><figcaption>Call Admin From Check Stock API</figcaption></figure><p>Let us try delete Carlos as well</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*kxcSIeV7uiGNfMo6ftYTgA.png" /><figcaption>Delete Carlos Request</figcaption></figure><p>And follow the redirection, The lab is solved!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jZDjx7vER0qWXdreAFjBxg.png" /><figcaption>Solved Lab</figcaption></figure><p>Thanks for reading I hope this is helpful one :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5e5c86344fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CoCSRF with broken Referer validation — PortSwigger Walkthrough]]></title>
            <link>https://medium.com/@amrelharery/cocsrf-with-broken-referer-validation-portswigger-walkthrough-8d896b716be8?source=rss-b9ec58025fb6------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d896b716be8</guid>
            <category><![CDATA[sessions]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[csrf]]></category>
            <category><![CDATA[cookies]]></category>
            <category><![CDATA[pentesting]]></category>
            <dc:creator><![CDATA[0xm3ro]]></dc:creator>
            <pubDate>Mon, 04 Aug 2025 07:11:37 GMT</pubDate>
            <atom:updated>2025-08-04T07:11:37.759Z</atom:updated>
            <content:encoded><![CDATA[<h3>CSRF with broken Referer validation — PortSwigger Walkthrough</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fe3U46S-ucxz4VCtfoohug.jpeg" /><figcaption>Cover page</figcaption></figure><h4>Introduction</h4><p>Some web applications check to match part of referer header it usually the domain part, and don&#39;t matter about the full referer, we can bypass it by putting the part which the app checks after our server referer</p><h4>Lab URL: <a href="https://portswigger.net/web-security/csrf/bypassing-referer-based-defenses/lab-referer-validation-broken">CSRF with broken Referer validation</a></h4><p>Let us go exploit server and add form to exploit CSRF,</p><p>After change the referer, detected that the app matches the app domain everywhere in referer header, so we can add it after our exploit server referer to bypass it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3OORCSAPdDpDR36w_lYnsw.png" /><figcaption>Change Email Request</figcaption></figure><p>After that deliver to victim to solve the lab</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1kAcuFava7FtKDj-w8f3Pg.png" /><figcaption>Solved lab</figcaption></figure><p>Thanks for reading I hope this is helpful one :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d896b716be8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CSRF where Referer validation depends on header being present @ PortSwigger Walkthrough]]></title>
            <link>https://medium.com/@amrelharery/csrf-where-referer-validation-depends-on-header-being-present-portswigger-walkthrough-5997b4e4e493?source=rss-b9ec58025fb6------2</link>
            <guid isPermaLink="false">https://medium.com/p/5997b4e4e493</guid>
            <category><![CDATA[csrf]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[http-headers]]></category>
            <category><![CDATA[cookies]]></category>
            <dc:creator><![CDATA[0xm3ro]]></dc:creator>
            <pubDate>Sun, 03 Aug 2025 06:42:55 GMT</pubDate>
            <atom:updated>2025-08-03T06:42:55.239Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*m2LZQQsV2ssK1PLKgFkOMw.png" /><figcaption>Cover page</figcaption></figure><h4>Introduction</h4><p>I talked before about CSRF, but what is referer header?</p><p>The Referrer header in HTTP requests indicates the address of the webpage from which the current request originated</p><h4>Lab URL: <a href="https://portswigger.net/web-security/csrf/bypassing-referer-based-defenses/lab-referer-validation-depends-on-header-being-present">CSRF where Referer validation depends on header being present</a></h4><p>Let us try change email and <strong>remove referer header,</strong></p><p>It works and changed the email</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H7fSbXPKplcRGBDl_xXINA.png" /><figcaption>Change Email Request</figcaption></figure><p>Let us go exploit server and add basic form to exploit CSRF, and add no-referrer meta tag to prevent send the referer header with change email request</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fnM0JrHOhsoobMeJMNVcSA.png" /><figcaption>Exploit server</figcaption></figure><p>After that deliver to victim, and the lab is solved !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RqKn3t_ZKo2KqBR-Vo518w.png" /><figcaption>Solved lab</figcaption></figure><p>Thanks for reading I hope this is helpful one :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5997b4e4e493" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SameSite Lax bypass via method override @ PortSwigger Walkthrough]]></title>
            <link>https://medium.com/@amrelharery/samesite-lax-bypass-via-method-override-portswigger-walkthrough-14d0b3911e19?source=rss-b9ec58025fb6------2</link>
            <guid isPermaLink="false">https://medium.com/p/14d0b3911e19</guid>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[csrf]]></category>
            <category><![CDATA[sessions]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cookies]]></category>
            <dc:creator><![CDATA[0xm3ro]]></dc:creator>
            <pubDate>Sat, 02 Aug 2025 16:34:34 GMT</pubDate>
            <atom:updated>2025-08-02T16:34:34.330Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AlOH2mi9u9-KGtfUZRB_wg.png" /><figcaption>Cover</figcaption></figure><h4>Introduction</h4><p>I talked before what is CSRF, but what is method override?</p><p>It is mean override the request method in client side by including a special parameter in the request — usually in a hidden form field or query parameter.</p><p>For example: The form actually sends a GET request, but if I used method override and add special parameter “_method=POST”, the method which the server received is POST.</p><h4>Lab URL: <a href="https://portswigger.net/web-security/csrf/bypassing-samesite-restrictions/lab-samesite-lax-bypass-via-method-override">SameSite Lax bypass via method override</a></h4><p>After accessing the lab, let us go exploit server and add basic form to exploit CSRF, it will not work because the server checks the referrer and redirect to login</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KohdtX3xDuBDrPtBxHLPew.png" /><figcaption>Change Request</figcaption></figure><p>But this app using SameSite=Lax parameter that is mean the server allows GET requests, let us edit the basic form to make method = GET and add parameter in the body tells the server treat it as POST request</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1tImR_pOtgOq6M2Lf-wi9g.png" /><figcaption>Exploit form</figcaption></figure><p>After Deliver it to victim, the lab is solved successfully!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pAh5aGG74qt_MNX9f8Iesw.png" /><figcaption>Solved lab</figcaption></figure><p>Thanks for reading I hope this is helpful one :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14d0b3911e19" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CSRF where token is duplicated in cookie — PortSwigger Walkthrough]]></title>
            <link>https://medium.com/@amrelharery/csrf-where-token-is-duplicated-in-cookie-portswigger-walkthrough-99850cf273e2?source=rss-b9ec58025fb6------2</link>
            <guid isPermaLink="false">https://medium.com/p/99850cf273e2</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[token]]></category>
            <category><![CDATA[csrf]]></category>
            <category><![CDATA[sessions]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <dc:creator><![CDATA[0xm3ro]]></dc:creator>
            <pubDate>Sat, 02 Aug 2025 16:02:15 GMT</pubDate>
            <atom:updated>2025-08-02T16:02:15.432Z</atom:updated>
            <content:encoded><![CDATA[<h3>CSRF where token is duplicated in cookie — PortSwigger Walkthrough</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kqwv9glbeERHy-bT-eu3iw.png" /><figcaption>Cover page</figcaption></figure><h4>Introduction</h4><p>What is CSRF?</p><p>CSRF or Cross-Site Request Forgery, is web vulnerability that tricks a user’s browser into making unwanted requests to a untrusted website. Essentially, an attacker creates a malicious link or form that when clicked or submitted by an authenticated user, causes the user’s browser to send a request to a target website, as if the user themselves initiated it (have cookies). This can lead to unauthorized actions on the user’s behalf, like transferring funds, changing passwords, or posting malicious content.</p><h4>Lab URL: <a href="https://portswigger.net/web-security/csrf/bypassing-token-validation/lab-token-duplicated-in-cookie">CSRF where token is duplicated in cookie</a></h4><p>After accessing the lab this is home page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u868JbOsi0o1FNTEyyvoFg.png" /><figcaption>Home page</figcaption></figure><p>Let us login with given credentials: wiener:peter and try change email, It is clear the CSRF-Token the same CSRF-Cookie</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*4V6lgcQr-t5_4mve6IiHWQ.png" /><figcaption>Change Email Request</figcaption></figure><p>Let is try search about “TEST”, It is reflect in response header, then we can use CRLF to inject cookies like CSRF-Cookie</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VH44ynweizxLG2aMnXk4Tg.png" /><figcaption>Search Request</figcaption></figure><p>Let is go to exploit server and add the same form of change email, and do not forget to inject the same CSRF-Token in CSRF-Cookie via search method using img tag, it is by default GET request to get the image, and when onerror event fired the form will be submitted</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GzWY6eC8vEyI7wtv6NuBGw.png" /><figcaption>Exploit server</figcaption></figure><p>And the lab is Solved :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4l97x7UBmZ-XXbbqvyJvBg.png" /><figcaption>Solved lab</figcaption></figure><p>Thanks for reading I hope this is helpful one :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99850cf273e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Local File Inclusion Double encoding @ Root-me Walkthrough]]></title>
            <link>https://medium.com/@amrelharery/local-file-inclusion-double-encoding-root-me-walkthrough-61da1808e723?source=rss-b9ec58025fb6------2</link>
            <guid isPermaLink="false">https://medium.com/p/61da1808e723</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[rce]]></category>
            <category><![CDATA[local-file-inclusion]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <dc:creator><![CDATA[0xm3ro]]></dc:creator>
            <pubDate>Fri, 01 Aug 2025 22:14:03 GMT</pubDate>
            <atom:updated>2025-08-01T22:14:03.885Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CHdHdGnPRuooF3ilbQdt4A.png" /><figcaption>Cover page</figcaption></figure><h4>Introduction</h4><p>What is Local File Inclusion (LFI)?</p><p>Vulnerability that allows an attacker to make the web application include files and execute it from the <strong>local </strong>server’s file system.</p><p>How does it work?</p><p>LFI commonly occurs when a web application includes files based on user input without validation or sanitization. For example, in PHP, using vulnerable functions such as include, require with unsanitized parameters can be exploited.</p><h4>Challenge URL: <a href="https://www.root-me.org/en/Challenges/Web-Server/Local-File-Inclusion-Double-encoding">Local File Inclusion — Double encoding</a></h4><p>When you access the challenge, you got this home page, notice that the page called via parameter ‘page’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*hOGOnwotProOq0ULzdpVcw.png" /><figcaption>Home page</figcaption></figure><p>Let us try most commonly known files like conf, config, etc.</p><p>As you see the conf page is called and executed but it might not have output to render, but can have env variables or our <strong>flag</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*7NNVfgOklvIWLqWsO9abBw.png" /><figcaption>conf page</figcaption></figure><p>Let us try access the page content encoded to prevent execution,</p><p>will use Filter PHP stream wrapper:</p><p>php://filter/convert.base64-encode/resource=conf</p><p>Due to filtered characters the app detects it, will encode the payload double URL-encoding</p><p>php%253A%252F%252Ffilter%252Fconvert%252ebase64-encode%252Fresource%253Dconf</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FKHCEt2-J2s8sjxmQqZ5IA.png" /><figcaption>conf page encoded</figcaption></figure><p>Let us take this output to decode it via any tool, I will use linux base64 command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0j7ZBNZnfiurkz3zbPZBzQ.png" /><figcaption>Decoded content</figcaption></figure><p>And Boooooom, There is the flag :D</p><h4>How to mitigate it?</h4><p>1- Avoid dynamic file inclusion</p><p>2- If necessary use a whitelist of allowed files</p><p>3- Decode, sanitize and validate user input</p><p>4- Disable URL include features in PHP</p><p>Thanks for reading I hope this is helpful one :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61da1808e723" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Command Injection Filter Bypass @ Root-me Walkthrough]]></title>
            <link>https://medium.com/@amrelharery/command-injection-filter-bypass-root-me-walkthrough-bb71e8e3f9f0?source=rss-b9ec58025fb6------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb71e8e3f9f0</guid>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[rce]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[command-injection]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <dc:creator><![CDATA[0xm3ro]]></dc:creator>
            <pubDate>Thu, 31 Jul 2025 20:38:51 GMT</pubDate>
            <atom:updated>2025-07-31T21:09:58.002Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EbA3_dfi537pRZfkv6FgBQ.png" /></figure><h4>Introduction</h4><p>What is command injection?</p><p>It is attack allows attacker to execute arbitrary commands on host operating system through vulnerable web application.</p><p>How does it works?</p><p>The attacker send malicious input, which the application passes as an argument to system function (shell), If the input is not properly validated or sanitized, the attacker’s commands will be executed by the server.</p><h4>Challenge URL: <a href="https://www.root-me.org/en/Challenges/Web-Server/Command-injection-Filter-bypass">Command injection Filter bypass</a></h4><p>When you access the challenge you got this page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*to_93Ng3Z7u_hdEgLVOCzQ.png" /><figcaption>Challenge page</figcaption></figure><p>It is a ping service takes IP from input and send it with POST request.</p><p>We should bypass the filter to inject our commands.</p><p>Due to all special characters are filtered, let us try bypass with new line URL-encoded with “whoami” command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NyCJZkopiy_ITpNP6-Z2ZQ.png" /><figcaption>HTTTP Request</figcaption></figure><p>We bypassed the filter successfully, but no output in response it seems a <strong>blind</strong></p><p>After using Burp Collaborator to get data through the server, let us send POST request with ‘index.php’ as a binary file to get content</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*K7-QZ60bgYbeJX2xW31wBA.png" /><figcaption>Get index.php Request</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*vuzEAc7QOvuFcY3VV9uyKA.png" /><figcaption>index.php Response</figcaption></figure><p>I saw the index.php content, notice this line called another file ‘.passwd’,</p><p>Let us get it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*34fbdGTftCEe7UnGtKRZ6g.png" /><figcaption>Get .passwd Request</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*HDKqIbxvPSP1qcx3oZ8hqw.png" /><figcaption>.passwd Response</figcaption></figure><p>There is the flag :D</p><h4>How to mitigate it?</h4><p>To prevent command injection</p><ol><li>Avoid passing user input directly to system commands</li></ol><p>2. Validate and sanitize all user inputs and Reject suspicious or unexpected inputs.</p><p>3. Decode and inspect all inputs before processing.</p><p>Thanks for reading I hope this is helpful one :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb71e8e3f9f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gzip vs Bzip2 vs XZ]]></title>
            <link>https://medium.com/@amrelharery/gzip-vs-bzip2-vs-xz-d6e2600f5137?source=rss-b9ec58025fb6------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6e2600f5137</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[compression]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[system-administration]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[0xm3ro]]></dc:creator>
            <pubDate>Thu, 29 May 2025 20:39:43 GMT</pubDate>
            <atom:updated>2025-05-29T20:39:43.792Z</atom:updated>
            <content:encoded><![CDATA[<p>Ever wondered what the real difference is between compression methods in Linux?</p><p>Let’s break it down with real data and clear explanations</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bFqU3_7e5Ke1393fT9UBkQ.png" /><figcaption>Different compressed files</figcaption></figure><h3>First let’s explain the difference between Archive and Compression:</h3><p>Did you know that you might have been using compression incorrectly all along?</p><p><strong>Archiving</strong> means collecting single/multiple files and put them in one archived file without compressing them, So their size still the <strong>same</strong>.</p><p>While <strong>compression </strong>uses algorithm to compress files and reduces their size based on the algorithm used.</p><h3>Different compression methods</h3><p>We have gzip, bzip2 and xz, each of them has usage based on his attributes like speed, size and compression ratio</p><h4>1. Speed:</h4><p>This screenshot shows the result compression time of the/etc directory using three different compression methods with the tar command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*-2eQF1ftW_IDutUsWQb5lw.png" /><figcaption>Different compression methods speed</figcaption></figure><p>Gzip is the fastest, then comes Bzip2, and XZ is the slowest.</p><h4>2. Size:</h4><p>This screenshot shows the file sizes after compressing the /etc directory using three different compression methods:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/309/1*0Ed08mSvFcW6R-qc0Bn4Pw.png" /><figcaption>Different compression methods size</figcaption></figure><p>Gzip is the largest size, then comes Bzip2, and XZ is the smallest size.</p><h4>3. Compression ratio</h4><p>XZ has the best (highest) compression ratio, followed by Bzip2, while Gzip has the lowest compression ratio.</p><h4>Conclusion</h4><p>From the above we conclude that:</p><p>Gzip is the fastest but <strong>less efficient</strong> in compression.<br> Bzip2 <strong>balances </strong>between<strong> </strong>speed and size.<br> XZ compresses best but is the slowest.</p><h3>When to use?</h3><h4>Gzip<strong>:</strong></h4><ul><li>You need <strong>speed</strong> over space (fastest to compress/decompress).\</li><li>You’re working with <strong>scripts, CI/CD pipelines</strong>, or transferring files frequently.</li><li>Compression ratio isn’t critical.</li></ul><h4>Bzip2<strong>:</strong></h4><ul><li>You want a <strong>balance</strong> between size and speed.</li><li>You’re archiving data but still caring about performance.</li><li>Good for <strong>backups</strong> that don’t need to be ultra-small or super fast.</li></ul><h4>XZ<strong>:</strong></h4><ul><li>You need <strong>maximum compression</strong> (smallest file size).</li><li>You’re storing files <strong>long-term</strong>.</li><li>Speed is <strong>not a priority</strong> (xz is much slower).</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6e2600f5137" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>