This is something that I challenged my self to do, I had a TECNO Camon X CA7 Model, which is a smart phone and basically in all TECNO smart phone models, there is a feature that allows the user to hide images. I had to hide in some of the images and then I set a pin that I shall use to unlock the vault for hiding my images. A question flew into my mind "What If I dont know the pin??" Then I dared my self to take this challenge to research on this petty feature!
As seen, it asks for a pin, so as we can preview what's in the hidden album.
We can either bruteforce manually to get the pin since it's a 4 digits pin which will obviously be time consuming, but worth it eventually. Or we can decide to know where the image is then saved to after being sent to the hidden album.
Connecting the smartphone to my laptop, and enabling the transfer of files, will allow me to view all folders in the system.
while enumerating through the folders, I was able to get a folder in /Android/data/com.android.gallery3d which looked interesting:
This is getting even more interesting :) Opening up .privatealbum, there is another folder named .encryptfiles and it contains the images that we had imported earlier to the hidden vault.
The images aren't really images, in this case, I pull the file to my local machine for even further analysis thinking that there might be some sort of encryption working behind all this. Unfortunately my Kali was off so I had to use cyberchef for some quick analysis over this file:
Now this was even easyyyy! The file type is "image/jpeg"
Ezpizi, The easiest way to get the image back viewable is to just adding an image extension to the file, and we are able to view the image;
With all that clear, I decided to write an exploit script to automate all the processes, and retrieve any hidden image that is available in the smartphone! The link to the exploit is : Gallery3D Tecno Exploit, Apart from just the exploit, there is also an android APK file that extracts the hidden images.
Below is the functions.py:
Below is run.py:
Unfortunately didn't get any bounty on this since the device model is out of scope :( But PewPew!