<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Chr-Bypass on 4mN3s14 | CTF Player &amp; Student</title><link>https://john-jkar.github.io/myblog/tags/chr-bypass/</link><description>Recent content in Chr-Bypass on 4mN3s14 | CTF Player &amp; Student</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 28 Jan 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://john-jkar.github.io/myblog/tags/chr-bypass/index.xml" rel="self" type="application/rss+xml"/><item><title>sigpwny CTF: Pyjail 2 Writeup — Bypassing Python Restrictions</title><link>https://john-jkar.github.io/myblog/posts/pwnyctf-pyjail2/</link><pubDate>Wed, 28 Jan 2026 00:00:00 +0000</pubDate><guid>https://john-jkar.github.io/myblog/posts/pwnyctf-pyjail2/</guid><description>&lt;h1 id="sigpwny-ctf-pyjail-2-writeup--bypassing-python-restrictions"&gt;sigpwny CTF: Pyjail 2 Writeup — Bypassing Python Restrictions&lt;/h1&gt;
&lt;h2 id="challenge-overview"&gt;Challenge Overview&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;URL&lt;/strong&gt;: &lt;a href="https://ctf.sigpwny.com/challenges#Meetings/Pyjail%202-633"&gt;https://ctf.sigpwny.com/challenges#Meetings/Pyjail%202-633&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A Python jail challenge restricting the &lt;code&gt;exec&lt;/code&gt; function with multiple filters:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;No quotes (&lt;code&gt;'&lt;/code&gt;, &lt;code&gt;&amp;quot;&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;No &lt;code&gt;x&lt;/code&gt; character (blocks &lt;code&gt;exec&lt;/code&gt;, &lt;code&gt;eval&lt;/code&gt;, hex strings)&lt;/li&gt;
&lt;li&gt;Limited character set for code execution&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="exploitation-strategy"&gt;Exploitation Strategy&lt;/h2&gt;
&lt;h3 id="bypassing-restrictions"&gt;Bypassing Restrictions&lt;/h3&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Restriction&lt;/th&gt;
 &lt;th&gt;Bypass Technique&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;No quotes&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Build strings using &lt;code&gt;chr()&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;No &lt;code&gt;x&lt;/code&gt; character&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Use &lt;code&gt;chr(88).lower()&lt;/code&gt; → &lt;code&gt;'X'.lower()&lt;/code&gt; → &lt;code&gt;'x'&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Blocked functions&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Use &lt;code&gt;__import__()&lt;/code&gt; instead of &lt;code&gt;import&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="payload-construction"&gt;Payload Construction&lt;/h3&gt;
&lt;p&gt;Build &lt;code&gt;/flag.txt&lt;/code&gt; path without quotes or literal &lt;code&gt;x&lt;/code&gt;:&lt;/p&gt;</description></item></channel></rss>