Secure notes
Hello everyone , In this blog post , I will try to explain my solution steps for Secure notes challenge from Mobile Hacking Lab Platform . i hope it will be useful for you
Last updated
Hello everyone , In this blog post , I will try to explain my solution steps for Secure notes challenge from Mobile Hacking Lab Platform . i hope it will be useful for you
Last updated
Let’s Examine the AndroidMainfest.xml
After That i found 2 Providers ( com.mobilehackinglab.securenotes.secretprovider
- androidx.startup.InitializationProvider
) and 1 exported Activity (MainActivity
)
The MainActivity
interact with a content provider, to validate a PIN and retrieve a secret value associated with that PIN.
there is a listener set on a submitPinButton
,
when click the code call onCreate$lambda$0 ()
function ,,
then it , which retrieves the text from pinEditText
then use querySecretProvider
to validate the entered pin
Let’s analysis the com.mobilehackinglab.securenotes.SecretDataProvider
:
first of all the correct Pin use a key to decrypt the data stored in config.properties
file
then let’s keep going in our code
it take a query string
check for if it null , return null
if there is a value then remove the prefix and then extract the int number from it
in the end it invoke the decryptSecret()
if the Cursor return valid , the code look for secret column
to query the pin
If a valid cursor is returned and data is available, the code looks for a column named "Secret"
, expecting this to hold the result of the query.
Let’s back to the config.properties
file and try to decrypt it manual
Let’s try to brute force the pinget the decrypted Text