<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>L3m0nCTF Writeups on quixel200</title><link>http://mycatpets.me/writeups/l3m0nctf/</link><description>Recent content in L3m0nCTF Writeups on quixel200</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 02 Jan 2026 10:39:59 +0530</lastBuildDate><atom:link href="http://mycatpets.me/writeups/l3m0nctf/index.xml" rel="self" type="application/rss+xml"/><item><title>A Slice Of Lemon Pie</title><link>http://mycatpets.me/writeups/l3m0nctf/a_slice_of_lemon_pie/</link><pubDate>Fri, 02 Jan 2026 10:39:59 +0530</pubDate><guid>http://mycatpets.me/writeups/l3m0nctf/a_slice_of_lemon_pie/</guid><description>&lt;p>Let&amp;rsquo;s run &lt;code>checksec&lt;/code> on the binary and see what protections it has.&lt;/p>
&lt;pre tabindex="0">&lt;code>quix@quixel:~$ checksec --file=format_pie
RELRO STACK CANARY NX PIE RPATH RUNPATH Symbols FORTIFY Fortified Fortifiable FILE
Partial RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH 48 Symbols No 0 2 format_pie
&lt;/code>&lt;/pre>&lt;ul>
&lt;li>PIE,NX and canary are all enabled.&lt;/li>
&lt;li>Partial RELRO means that we can overwrite a GOT entry.&lt;/li>
&lt;/ul>
&lt;p>We can also see that the binary contains a win function that spawns a shell for us:&lt;/p></description></item><item><title>Jailer</title><link>http://mycatpets.me/writeups/l3m0nctf/jailer/</link><pubDate>Fri, 02 Jan 2026 10:25:08 +0530</pubDate><guid>http://mycatpets.me/writeups/l3m0nctf/jailer/</guid><description>&lt;p>Let&amp;rsquo;s decompile the binary and see what it does&lt;/p>
&lt;pre tabindex="0">&lt;code> sub_1280(a1, a2, a3);
 if ( !(unsigned int)sub_13A0() )
 return system(a2[1]);
&lt;/code>&lt;/pre>&lt;p>It seems to expect a command line argument, if provided it calls &lt;code>sub_13A0()&lt;/code> to &amp;lsquo;check&amp;rsquo; the input and calls &lt;code>system&lt;/code> on our input.&lt;/p>
&lt;p>Now you can just run &lt;code>cat flag.txt&lt;/code> and it will print the flag locally. But let&amp;rsquo;s dig a bit deeper.&lt;/p>
&lt;pre tabindex="0">&lt;code>__int64 sub_13A0()
{
 int v0; // ebp
 int v1; // ebx
 v0 = sub_12E0();
 v1 = open(&amp;#34;flag.txt&amp;#34;, 0);
 if ( v1 &amp;lt; 0 )
 {
 v1 = open(&amp;#34;/flag.txt&amp;#34;, 0);
 if ( v1 &amp;lt; 0 )
 return 0xFFFFFFFFLL;
 }
 dup2(v1, v0);
 close(v1);
 return 0;
}
&lt;/code>&lt;/pre>&lt;p>This seems to open the flag, &lt;code>v0&lt;/code> is calculated in &lt;code>sub_12E0&lt;/code>. The file descriptor for the flag is in &lt;code>v1&lt;/code> which then gets closed after a &lt;code>dup2&lt;/code> call. dup2 is used to duplicate the file descriptor.&lt;/p></description></item><item><title>Virtual girlfriend</title><link>http://mycatpets.me/writeups/l3m0nctf/virtual_girlfriend/</link><pubDate>Fri, 02 Jan 2026 10:09:21 +0530</pubDate><guid>http://mycatpets.me/writeups/l3m0nctf/virtual_girlfriend/</guid><description>&lt;p>We have been given a &lt;code>main.s&lt;/code> file, written in AT&amp;amp;T syntax&amp;hellip; (or as I like to call it, the wrong syntax). Our goal is to find out the return value of the program.&lt;/p>
&lt;p>The main concept of this challenge is that it has some infinite loops and dead code that prevents you from executing it normally.&lt;/p>
&lt;pre tabindex="0">&lt;code> label1:
 push rbp
 mov rbp, rsp
 call label2
 call label3
 jmp label4
 pop rbp
 ret
...
 label4:
 jmp label4 
&lt;/code>&lt;/pre>&lt;ul>
&lt;li>After calling label2 and label3, there is a jmp label4&lt;/li>
&lt;li>label4 calls &lt;code>jmp label4&lt;/code>, creating an infinite loop.&lt;/li>
&lt;li>The solution is to remove lavel4 completely.&lt;/li>
&lt;/ul>
&lt;p>Inside label3,&lt;/p></description></item><item><title>Phantom Resolver</title><link>http://mycatpets.me/writeups/l3m0nctf/phantom_resolver/</link><pubDate>Fri, 02 Jan 2026 09:20:02 +0530</pubDate><guid>http://mycatpets.me/writeups/l3m0nctf/phantom_resolver/</guid><description>&lt;p>The challenge provides us with 2 binary files:&lt;/p>
&lt;ul>
&lt;li>server_daemon&lt;/li>
&lt;li>libmonitor.so&lt;/li>
&lt;/ul>
&lt;p>Looking at the server daemon decompilation:&lt;/p>
&lt;pre tabindex="0">&lt;code>int __fastcall main(int argc, const char **argv, const char **envp)
{
 const char **v3; // rbx

 print_banner(argc, argv, envp);
 printf(&amp;#34;\n[*] Starting daemon in &amp;#34;);
 if ( argc &amp;lt;= 1 )
 {
LABEL_7:
 puts(&amp;#34;INTERACTIVE mode&amp;#34;);
 puts(&amp;#34;[!] Warning: daemon mode not enabled&amp;#34;);
 puts(&amp;#34;[!] Use --daemon flag for production deployment&amp;#34;);
 }
 else
 {
 v3 = argv + 1;
 while ( strcmp(*v3, &amp;#34;--daemon&amp;#34;) )
 {
 if ( ++v3 == &amp;amp;argv[(unsigned int)(argc - 2) + 2] )
 goto LABEL_7;
 }
 puts(&amp;#34;DAEMON mode&amp;#34;);
 }
 putchar(10);
 initialize_subsystems();
 puts(&amp;#34;\n[*] Running system integrity check...&amp;#34;);
 system_check();
 puts(&amp;#34;\n[*] Daemon initialization complete&amp;#34;);
 return 0;
}
&lt;/code>&lt;/pre>&lt;p>We can see that it prints some lines and then calls &lt;code>system_check()&lt;/code>, looking at system check:&lt;/p></description></item></channel></rss>