<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Android-Security on Shivasurya</title><link>http://shivasurya.me/categories/android-security/</link><description>Recent content in Android-Security on Shivasurya</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 24 Jan 2024 00:00:00 +0000</lastBuildDate><atom:link href="http://shivasurya.me/categories/android-security/feed.xml" rel="self" type="application/rss+xml"/><item><title>Deep dive on Android Java / Kotlin Deserialization Code Execution with Semgrep Detection</title><link>http://shivasurya.me/2024/01/24/java-deserialization-rce-android-application-layer/</link><pubDate>Wed, 24 Jan 2024 00:00:00 +0000</pubDate><guid>http://shivasurya.me/2024/01/24/java-deserialization-rce-android-application-layer/</guid><description>&lt;h3 id="overview">Overview&lt;/h3>
&lt;p>In this post, we will explore code execution using Java &amp;amp; Kotlin Deserialization in Android Application. Additionally, We will discuss the Gadget Chain, Detection and Exploitation technique specific to Android. Achieving code execution in server side application via Java deserialization has higher chance of success than in client side android application. This is due to limitation of variety of loaded classes in android application. For instance &lt;code>com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl&lt;/code> is available in openJDK but not in Android JDK (but with modification). These limitation can be a blocker for loading arbitrary classes and executing payload (mostly compiled bytecode) in Android application. Well there are lot of deserialization vulnerabilities is published out there such as&lt;/p></description></item><item><title>Detecting Android WebView Vulnerable Configurations with Semgrep Rules - Part 1</title><link>http://shivasurya.me/2023/02/10/android-webview-vulnerabilities-semgrep-rules-detection/</link><pubDate>Fri, 10 Feb 2023 00:00:00 +0000</pubDate><guid>http://shivasurya.me/2023/02/10/android-webview-vulnerabilities-semgrep-rules-detection/</guid><description>&lt;p>Android WebView widget provides APIs that help developers seamlessly integrate webpage contents within Android application. Advancement in Webview &amp;amp; Chrome Custom Tabs lead to &lt;a href="https://tomtunguz.com/mobile-only-saas/">exponential growth in webview based mobile development&lt;/a> platforms such as &lt;code>Ionic framework&lt;/code>, &lt;code>JQuery Mobile&lt;/code>, &lt;code>Adobe Phonegap&lt;/code> later open-sourced as &lt;code>Cordova Project&lt;/code>, &lt;code>React Native&lt;/code>. However the race to capture the mobile development market, immature WebView APIs and lack of security guidance lead to multiple vulnerabilities and exploits. In today&amp;rsquo;s blog post, we&amp;rsquo;ll deep dive into multiple WebView vulnerability configurations and leverage semgrep to detect those configuration real time.&lt;/p></description></item><item><title>Detecting Android Content Provider APIs with Semgrep Rules</title><link>http://shivasurya.me/2022/11/28/android-content-provider-semgrep-detection/</link><pubDate>Mon, 28 Nov 2022 00:00:00 +0000</pubDate><guid>http://shivasurya.me/2022/11/28/android-content-provider-semgrep-detection/</guid><description>&lt;p>Content Provider is one of the powerful APIs which helps Android developers programmatically expose resource content within Android ecosystem via Intents. One could easily write those queries easily by extending the &lt;code>ContentProvider&lt;/code> class and implementing those methods and accessing via URI (example: &lt;code>android://com.zoho.example/database/:_data&lt;/code>). Though these Content Provider is a cupcake for developers, Unfortunately there are lot of vulnerabilities hidden within those APIs and with implementation part.&lt;/p>
&lt;p>The main intent for writing this blog post were Semgrep and the recent blog post from &lt;code>project zero&lt;/code> regarding &lt;a href="https://googleprojectzero.blogspot.com/2022/11/a-very-powerful-clipboard-samsung-in-the-wild-exploit-chain.html">Analysis of a Samsung in-the-wild exploit chain&lt;/a>. I&amp;rsquo;ve been using semgrep for a while to tweak my findings instead of naive grep, CodeQL and the Samsung exploit chain may look trivial but how a simple permission bypass can affect system level apps in the Android phone. Later this year, I have added semgrep to my mobile pentesting suite which helps me to run these scripts over large Android projects, decompiled projects in automated way which pings me on Slack 🤖.&lt;/p></description></item></channel></rss>