<?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 Mohamed on Medium]]></title>
        <description><![CDATA[Stories by Mohamed on Medium]]></description>
        <link>https://medium.com/@aboelnasr?source=rss-ab41b722d30c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*0QftIYW1ih4qKTSrPE-a-Q.png</url>
            <title>Stories by Mohamed on Medium</title>
            <link>https://medium.com/@aboelnasr?source=rss-ab41b722d30c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 07:11:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aboelnasr/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[How To Call an Intent Within Intent]]></title>
            <link>https://medium.com/@aboelnasr/how-to-call-an-intent-within-intent-4300c2dd946d?source=rss-ab41b722d30c------2</link>
            <guid isPermaLink="false">https://medium.com/p/4300c2dd946d</guid>
            <category><![CDATA[penteration-testing]]></category>
            <category><![CDATA[mobile-pentesting]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Mohamed]]></dc:creator>
            <pubDate>Sat, 28 Sep 2024 21:29:33 GMT</pubDate>
            <atom:updated>2024-09-28T21:29:33.629Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FkMM3vtBEgSsLu%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FkMM3vtBEgSsLu%2Fgiphy.gif%3Fcid%3D790b76113m6e3yiw4xcu7vtoqha5rtp8gf0at1moo3xsx9wl%26ep%3Dv1_gifs_search%26rid%3Dgiphy.gif%26ct%3Dg&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExam1jMHJrY3hoZndoa3E1MGN1dHNrYnRmZDUxcDJtbnE2ODI0eHRlbyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FkMM3vtBEgSsLu%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="235" frameborder="0" scrolling="no"><a href="https://medium.com/media/071b94ff9821664c7f3e79e0afb00554/href">https://medium.com/media/071b94ff9821664c7f3e79e0afb00554/href</a></iframe><p>hello there, this me Aboelnasr or 0xMem. So you are searching for how you could start an intent within an intent i got you bro.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3ohc1dOL0VSXiWxfry%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExYWptYzNremRha3ZkbjUyN212ZWprbXh0b3BmdmNvYzdsYWFjN2praCZlcD12MV9naWZzX3NlYXJjaCZjdD1n%2F3ohc1dOL0VSXiWxfry%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExNzBtMHEzMDZycG11dG8yODFndzhncWpremU3MDE2MGhjZXdjN3ZodyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2F3ohc1dOL0VSXiWxfry%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/fb1f8b5fb87a42ce1bf006fd4103c074/href">https://medium.com/media/fb1f8b5fb87a42ce1bf006fd4103c074/href</a></iframe><p>let’s start, we have an application that contains a 2 nested intent and we need to call them, so how could we do that, first let’s examine those two intent first.</p><pre>Intent intent = getIntent();   <br>Intent intent2 = (Intent) intent.getParcelableExtra(&quot;android.intent.extra.INTENT&quot;);<br>        if (intent2 == null || intent2.getIntExtra(&quot;return&quot;, -1) != 42) {<br>            return;<br>        }<br>        this.f.addTag(42);<br>        Intent intent3 = (Intent) intent2.getParcelableExtra(&quot;nextIntent&quot;);<br>        this.nextIntent = intent3;<br>        if (intent3 == null || intent3.getStringExtra(&quot;reason&quot;) == null) {<br>            return;<br>        }<br>        this.f.addTag(&quot;nextIntent&quot;);<br>        if (this.nextIntent.getStringExtra(&quot;reason&quot;).equals(&quot;back&quot;)) {<br>            this.f.addTag(this.nextIntent.getStringExtra(&quot;reason&quot;));<br>            success(this);<br>        } else if (this.nextIntent.getStringExtra(&quot;reason&quot;).equals(&quot;next&quot;)) {<br>            intent.replaceExtras(new Bundle());<br>            startActivity(this.nextIntent);<br>        }<br></pre><p>as we see Intent2 which is our first nested intent is getting it’s reference from the main intent by using <em>getParcelableExtra </em>let’s search for this function and see what is it’s definition , i found that it’s used for ‘Retrieve extended data from the intent.’ this is what i got from Microsoft and by little chatting with GPT i found that this function is basically like getStringExtra but it works with objects and complex data like Intents.</p><p>and the second nested intent is getting it’s reference from the first nested intent, So our gool now is it trigger these two intent along with their extras.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FRMhbmeqWeOBQIiQkS4%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FRMhbmeqWeOBQIiQkS4%2Fgiphy.gif%3Fcid%3D790b7611kfyu5x4spjaybo3u2sge1reey90pcmuhxpehvnry%26ep%3Dv1_gifs_search%26rid%3Dgiphy.gif%26ct%3Dg&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExcGptNDE2djdlZm92anAwNG9tdnE4am5teDNuc3p2M2JtOTl5bWp2diZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FRMhbmeqWeOBQIiQkS4%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/cbfdfe6386ab338dd2955a9ca66f240e/href">https://medium.com/media/cbfdfe6386ab338dd2955a9ca66f240e/href</a></iframe><p>Time for some coding, So we have to create an application on android studio, i think if you are here searching for how to start an intent within an intent you have an idea of what is android studio and how to create an application.</p><ol><li>create a new android application</li><li>just put one button</li><li>make the following function</li></ol><pre>public void clickme(View view) {<br><br>        //intent3<br>        Intent nextIntent = new Intent();<br>        nextIntent.putExtra(&quot;reason&quot;, &quot;back&quot;);<br>        //intent2<br>        Intent innerIntent = new Intent();<br>        innerIntent.putExtra(&quot;return&quot;, 42);<br>        innerIntent.putExtra(&quot;nextIntent&quot;, nextIntent);<br>        // Main Intent<br>        Intent outerIntent = new Intent();<br>        outerIntent.setComponent(new ComponentName(&quot;io.hextree.attacksurface&quot;,&quot;io.hextree.attacksurface.activities.Flag5Activity&quot;));// Make sure this matches the manifest<br>        outerIntent.putExtra(&quot;android.intent.extra.INTENT&quot;, innerIntent);<br><br>        startActivity(outerIntent);<br>    }</pre><p>4. assign the function inside in the manifest file for the button tag using this attribute.</p><pre>android:onClick=&quot;clickme&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*QjBf_WAcU04sgUJDi-S19w.png" /></figure><p>5. now you are good to go to start the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/258/1*6-mBjX57fedCxu3RKbOLiQ.png" /></figure><p>Thanks for reading see ya ❤.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4300c2dd946d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bizness Walkthrough | HTB]]></title>
            <link>https://medium.com/@aboelnasr/bizness-walkthrough-htb-949833cd069b?source=rss-ab41b722d30c------2</link>
            <guid isPermaLink="false">https://medium.com/p/949833cd069b</guid>
            <category><![CDATA[ctf-walkthrough]]></category>
            <category><![CDATA[network-security]]></category>
            <dc:creator><![CDATA[Mohamed]]></dc:creator>
            <pubDate>Fri, 23 Feb 2024 18:13:42 GMT</pubDate>
            <atom:updated>2024-02-23T18:13:42.145Z</atom:updated>
            <content:encoded><![CDATA[<h3>INTRODUCTION</h3><p>here we are with a new machine released on HTB, The Level for this machine is easy and it doesn’t have a description so we are on our own brothers, we always are :)</p><h4><strong>Scanning</strong></h4><p>here we are given an ip address which hosts a web application on it with the name ‘<em>bizness.htb</em>’ on port ‘80’ Which redirect us to the same website but in different port which is ‘443’, i added these two into my ‘etc/hosts’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*sGJ0qK5M06FLCeJKAXFNow.png" /><figcaption>editing /etc/hosts</figcaption></figure><p>let’s explore the web application and see what we can find, also run nmap to scan open ports while searching.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YEnl8wiuGvBC-EfKi7gYyw.png" /><figcaption>BizNess Web-Apllication</figcaption></figure><p>And we got this three open ports open</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*eVXHZoMmaqxmtsPdNhfo8g.png" /></figure><p>okey now after mapping the website let’s enumerate for sub-directories using ‘dirsearch’ with the default word-list</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*UoIIOlnKcVAamvUL_uKamg.png" /></figure><p>as we can see we found some end-points on the web application, i opened the ‘accounting’ endpoint and i found that it redirects me to ‘/accounting/control/main’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R-veytX2-yWfboHpmehUIQ.png" /></figure><p>i tried to used default credentials like ‘username=admin&amp;password=admin’ but nothing worked, i tried to use the forget password function but it didn’t do anything useful.</p><p>but something i notice in the login page that the web application is using ‘ApacheOFBIZ web framework’ and i after some searching i found a cve which allows to excite commands on the system the basically it’s Remote Code Execution vulnerability, after some searching for exploiting this vulnerability i found this repo on github</p><p><a href="https://github.com/jakabakos/Apache-OFBiz-Authentication-Bypass">GitHub - jakabakos/Apache-OFBiz-Authentication-Bypass: This repo is a PoC with to exploit CVE-2023-51467 and CVE-2023-49070 preauth RCE vulnerabilities found in Apache OFBiz.</a></p><h3>Exploitation</h3><p>after downloading the script which is very simple to use, it takes the web application url and the command we want to excute</p><pre>python3 exploit.py --url https://bizness.htb/ --cmd &#39;command&#39;</pre><p>Yes exactly now you are thinking to start a nc listener right?!</p><p>exactly that what we are going to do, i started a listener using nc and made the application to connect back to us</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*vuAYrKtK1HG6dXcj9eanaA.png" /></figure><p>after that i used the script to send the command that will make the application connect back to nc</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*_Rqrl4vCTwTzTcPOLKxtMQ.png" /></figure><p>and here we go, we have a shell on the machine</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*r1zCrcxI3s0BMNTJub_wwQ.png" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FtsX3YMWYzDPjAARfeg%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Ftiktok-bear-tsX3YMWYzDPjAARfeg&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExNWNyM2p3eDZzcGRsaWFqZHE5YXhicGVjMnZkMWZwNjR4Y3l1cnRseCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FtsX3YMWYzDPjAARfeg%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="555" frameborder="0" scrolling="no"><a href="https://medium.com/media/08c654848340bd972f6dd371b3a46130/href">https://medium.com/media/08c654848340bd972f6dd371b3a46130/href</a></iframe><p>after some researching i found the first flag which is the user flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*clbppES7asRkCcHYdzfoGw.png" /></figure><p>now it’s time for root flag, we have to escalate our privileges first so we can read the file, I started to search for any process that use root privilege so i can exploit it to get root access but couldn’t find anything then i started searching for any files with useful information about root or admin then i found this file “AdminUserLoginData.xml”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xaP41Fn4idIrV2Gh31evfw.png" /></figure><p>we got this hashed password, but it’s salted and we don’t know what is the salted value so :”(</p><p>i started to search again and i found a file called ‘<strong>c54d0.dat</strong>’. This file is located in ‘<strong><em>/opt/ofbiz/runtime/data/derby/ofbiz/seg0</em></strong>’, When I viewed the contents of the file, a hash for the current password was found, which is</p><pre>$SHA$d$uP0_QaVBpDWFeo8-dRzDqRwXQ2I</pre><p>after some searching i find a way to crack the hashed password using this tool</p><p><a href="https://github.com/IamLucif3r/Go-Hash-Matcher?source=post_page-----68713a41f98b--------------------------------">GitHub - IamLucif3r/Go-Hash-Matcher: A simple password cracker written in Go, designed to search for a specific hashed password in a wordlist.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*ajy7BlRlr5KvttQiIfN4tw.png" /></figure><p>now we have the password for the admin user, let’s try to switch to our beloved root user</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*XVulR-EP_re-uC_XW1cXAA.png" /></figure><p>and Bingooo, now we are the root user</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F5xaOcLGvzHxDKjufnLW%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F5xaOcLGvzHxDKjufnLW%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExeHYwbDNmZzJ0OWUwbXozMzJqNmpiOHNsbnk0cHJxZWp4NGJwZHZjMyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2F5xaOcLGvzHxDKjufnLW%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="298" frameborder="0" scrolling="no"><a href="https://medium.com/media/25c266506f609b10da553fb64572b5a1/href">https://medium.com/media/25c266506f609b10da553fb64572b5a1/href</a></iframe><p>time to open the flag now :”)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*8qCv6iRVQ5rmg9poZSWnTQ.png" /></figure><p>Thanks for reading ❤</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=949833cd069b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>