Nishith K Profile picture
25 Oct, 13 tweets, 3 min read
Android Webview Hacking šŸ§µšŸ‘‡

#pentest #MobileSecurity #frida #bugbounty #bugbountytips #smali
Android Webview:
Android WebView is a system component powered by Chrome that allows Android apps to display web content.
There are many apps out there that are simply wrappers around web pages, or web content stored in the app.
Android Webview debugging:
In Android WebViews have a debugging feature, that allows you to use the ADB remote debugging extension for chrome to debug the contents of the WebView.
2 ways to enable WebView
1. Smali modification
2. Frida
Let's start with smali modification
Identify the application path and extract the apk from device.
$ adb shell pm list packages
$ adb shell pm path com.example.app
$ adb pull /data/app/com.example.app/base.apk
Decompile apk using apktool
$ apktool d base.apk
Figure out where to put the magic lines of code. Identify activity that will always run when the app starts.
Add Magic smali code:
const/4 v2, 0x1
invoke-static {v2}, Landroid/webkit/WebView;->setWebContentsDebuggingEnabled(Z)V
First line sets a variable to true
Second line passes that variable to the static method "setWebContentsDebuggingEnabled" in the WebView class.
Recompile the application
$ apktool b ./base
Sign and install the application
Now Open chrome://inspect/devices and voila we can see the package name with inspect option. Click on inspect and you can see all the resources loaded including js.

ā€¢ ā€¢ ā€¢

Missing some Tweet in this thread? You can try to force a refresh
怀

Keep Current with Nishith K

Nishith K Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @busk3r

25 Aug
[T 0052]
Latest in Security šŸ§µšŸ‘‡

#infosec #bugbounty #security
Hacker Tools: ReNgine ā€“ Automatic recon by @ojhayogesh11 @intigriti
blog.intigriti.com/2021/08/24/hacā€¦
Hakluke's huge list of resources for beginner hackers by @hakluke
labs.detectify.com/2021/08/24/hakā€¦
Read 10 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(