In this post, we’ll walk through the solutions for all Tools and APIs solutions.

Captain’s Log

1 - Description

00 - Description

2 - Obtaining Flag

The first question was the easiest. Logging was left enabled, so when I opened the activity, I could see the flag directly in Logcat.

01 - Logs

02 - Lesson Learned

Time Travel

1 - Description

00 - Description

2 - Obtaining Flag

The Time Travel challenge requires us to change the device’s date and time. By reversing the APK using JADX, we can find the expected timestamp. Once we set the correct date and time, the flag is revealed.

01 - Function

02 - root shell and update date

3- lesson learned

Export Duty

1 - Description

00 - Description

2 - Obtaining Flag

The Export Duty challenge was straightforward, we just needed to call the exported target activity to retrieve the flag.

01 - Exported

02 - Code

03 - Lesson Learned

Content Providers

1 - Description

00 - Description

To query the content provider, we first needed to add the appropriate element to the AndroidManifest.xml. Once that was done, we could query the provider and retrieve the flag.

01 - add Query

2 - Obtaining 1st Flag

The first flag in the Content Providers challenge was easy to obtain—simply querying the provider was enough to retrieve it.

02 - Provider

06 - FLAG without PATH

07 - Lesson Learned

3 - Obtaining 2nd Flag

The second flag was protected by path permissions, so I slightly modified the code to bypass the restriction and successfully retrieved the flag.

03 - FLAG uses permission

04 - get The Flag

05 - Lesson Learned

4 - Obtaining 3rd Flag

The third flag involved hijacking a content provider. I wrote a script to mimic the provider, and when the target attempted to insert the flag, my script successfully captured it.

08 - External Provider

08 - Tries to reach provider

09 - Code

10 - GG

11 - Lesson Learned

Juicy Broadcasts

1 - Description

00 - Description

00 - manifest

2 - Obtaining 1st Flag

The first Broadcast Receivers challenge was straightforward: set the correct action and data, send the broadcast, and receive the flag.

01 - code part

02 - First Flag

03 - Lesson Learned

3 - Obtaining 2nd Flag

The second challenge was a bit trickier. It required sending an sendOrderedBroadcast with resultExtras that included a Boolean value.

04 - code part

05 - Second Flag

06 - Lesson Learned

4 - Obtaining 3rd Flag

The third flag was obtained by creating a fake receiver with the intended action, which allowed me to capture the flag.

07 - code part

08 - Flag

09 - Lesson Learned

At Your Service

1 - Description

00 - Description

00 - Manifest

2 - Obtaining 1st Flag

The first Service challenge was tough. I created a message handler and sent a message with the specific what value to get the flag.

00 - Code Parts

02 - Flag

03 - Lesson learned

3 - Obtaining 2nd Flag

The second challenge was even harder. I set the replyTo value to receive a response from the target’s message handler and extracted the flag from the extra data.

04 - Flag

05 - Lesson Learned

Sign Here

1 - Description

00 - Description

2 - Obtaining Flag

The Sign Here challenge was very difficult. When I tried to access the content provider, I got an error saying I needed to sign the app with the correct key. After checking the hints, I discovered the APK was signed with a test key commonly found on AOSP. I then exported the APK, re-signed it using apksigner with the test keys, and was finally able to access the provider and retrieve the flag.

01 - Sign

02 - APK Signer

03 - Lessons Learned

Data Exfiltration

1 - Description

00 - Description

2 - Obtaining Flag

The final challenge, Data Exfiltration, was the hardest. The app had a “Share File” feature that launched a file picker, listing applications like the Gallery. To exploit this, I needed to fake a file picker and trick the app into reading a sensitive file. I defined a custom activity in my manifest to act as a file picker:

01 - Faking a File Picker Activity

Then, in PickerActivity, I crafted a fake URI pointing to the target file:

02 - Fake a file selection

When I selected my app from the file picker list, it returned the malicious URI. The vulnerable app then attempted to read the file at that location—revealing the flag.

03 - Share a file

04 - fake

05 - result

06 - Lessons Learned


<
Previous Post
Juicy Bar CTF - Static Code Analysis
>
Next Post
Juicy Bar CTF - Dynamic Code Analysis