<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: R00tJ0k3r</title>
    <description>The latest articles on Forem by R00tJ0k3r (@r00tj0k3r).</description>
    <link>https://forem.com/r00tj0k3r</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3781223%2F0445412b-999b-4237-aed7-ceb52c234252.jpeg</url>
      <title>Forem: R00tJ0k3r</title>
      <link>https://forem.com/r00tj0k3r</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/r00tj0k3r"/>
    <language>en</language>
    <item>
      <title>SeeTheSharpFlag — Hack The Box Mobile Challenge Write-up</title>
      <dc:creator>R00tJ0k3r</dc:creator>
      <pubDate>Thu, 19 Feb 2026 15:40:20 +0000</pubDate>
      <link>https://forem.com/r00tj0k3r/seethesharpflag-hack-the-box-mobile-challenge-write-up-3lfh</link>
      <guid>https://forem.com/r00tj0k3r/seethesharpflag-hack-the-box-mobile-challenge-write-up-3lfh</guid>
      <description>&lt;p&gt;&lt;strong&gt;🧭 Overview&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The goal of this challenge was to analyze an Android application and retrieve the secret flag by reversing its internal logic.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;🔎 Static Analysis&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After downloading the APK, I installed and launched the application.&lt;br&gt;
The UI was very simple and contained:&lt;/p&gt;

&lt;p&gt;An input field prompting: “Enter the secret”&lt;br&gt;
A button to validate the input&lt;br&gt;
Testing with random values resulted in the message:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Sorry, not correct password&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Firugi63bkr6xqt63udkh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Firugi63bkr6xqt63udkh.png" alt=" " width="553" height="970"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;📦 Decompilation &amp;amp; Framework Identification&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I loaded the APK into JADX for static analysis.&lt;br&gt;
However, there was no meaningful validation logic in the source code.&lt;/p&gt;

&lt;p&gt;While inspecting the structure, I noticed that the app was built using the Xamarin framework.&lt;br&gt;
In Xamarin apps, most of the business logic resides inside managed .dll assemblies rather than the Java layer.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;🗂 Extracting Assemblies&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To access the assemblies:&lt;/p&gt;

&lt;p&gt;1-Renamed the .apk file to .zip &lt;br&gt;
&lt;code&gt;mv com.companyname.seethesharpflag-x86.apk com.companyname.seethesharpflag-x86.zip&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;2- Extracted its contents&lt;br&gt;
3- Located multiple DLL files inside the packag&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsd4qhzgf6qgz610rqmcg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsd4qhzgf6qgz610rqmcg.png" alt=" " width="800" height="535"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Two interesting assemblies were identified:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;- SeeTheSharpFlag.dll&lt;br&gt;
&lt;/code&gt;&lt;code&gt;- SeeTheSharpFlag.Android.dll&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Based on naming conventions, &lt;strong&gt;SeeTheSharpFlag.dll&lt;/strong&gt; was the most likely candidate to contain the core application logic, while &lt;strong&gt;SeeTheSharpFlag.Android.dll&lt;/strong&gt; seemed to represent the Android-specific implementation layer.&lt;/p&gt;

&lt;p&gt;(The remaining DLL files appeared to be framework libraries with no application-specific logic.)&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;🧩 Handling Xamarin Compression&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Xamarin often compresses assemblies using algorithms such as XALZ.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbbavjhkin3oawi3ew41q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbbavjhkin3oawi3ew41q.png" alt=" " width="800" height="169"&gt;&lt;/a&gt;&lt;br&gt;
Because of that, the DLL could not be analyzed directly.&lt;/p&gt;

&lt;p&gt;To resolve this, I used the Xamarin decompression tool:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/NickstaDB/xamarin-decompress" rel="noopener noreferrer"&gt;https://github.com/NickstaDB/xamarin-decompress&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After decompression, the assembly became suitable for reverse engineering.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F91osm845tfqsnks9z30n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F91osm845tfqsnks9z30n.png" alt=" " width="800" height="66"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;🔬 Reverse Engineering the Assembly&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The decompressed DLL was analyzed using dotPeek.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.jetbrains.com/decompiler/download/?section=web-installer" rel="noopener noreferrer"&gt;https://www.jetbrains.com/decompiler/download/?section=web-installer&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s see what I found:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxc30cds4bj3ugnex37h3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxc30cds4bj3ugnex37h3.png" alt=" " width="800" height="303"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A ciphertext stored as a Base64 string&lt;/li&gt;
&lt;li&gt;An AES key encoded in Base64&lt;/li&gt;
&lt;li&gt;An IV encoded in Base64&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This confirmed that the application validates the input by decrypting a hardcoded AES ciphertext.&lt;/p&gt;

&lt;p&gt;Using CyberChef you simply decrypt it and solve the challenge.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F58idr4d8hfrueur227zd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F58idr4d8hfrueur227zd.png" alt=" " width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I entered the recovered flag into the application.&lt;br&gt;
The app responded with:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Congratz! You found the secret message&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3a37g4mi7w0bpuby0bma.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3a37g4mi7w0bpuby0bma.png" alt=" " width="544" height="547"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why so serious? The flag was just the punchline&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5y7hb5bl4ia3y55o39cl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5y7hb5bl4ia3y55o39cl.png" alt=" " width="545" height="220"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>cybersecurity</category>
      <category>mobile</category>
      <category>security</category>
    </item>
  </channel>
</rss>
