Microservices
Category: Web
Description
I just learnt about microservices. That means my internal server is safe now right?
I'm still making my website but you can have a free preview
- Junhua
Alternative links:
Attachments: dist.zip
Write-up
- Upon examining the codebase, we have identified three services:
admin_page
,homepage
, andgateway
. - To obtain the flag, we need the
admin
(logic in/
endpoint ofadmin_page
) to access the/
endpoint of thehomepage
. - We can leverage the
gateway
to forward our request to theadmin_page
, which will redirect theadmin
to thehomepage
and ultimately render theflag.html
. - To achieve this, we need to make a request to the
gateway
with theservice
parameter set toadmin_page
, indicating that we want to forward the request to theadmin_page
. - At the
admin_page
, we need to satisfy the conditionsservice != None and service != admin_page
andrequested_url != None
. - For the first condition, the
gateway
already forwardsservice=admin_page
since we want to forward our request to theadmin_page
. To meet theservice != admin_page
condition, we can employ parameter pollution by "overwriting" the previous value of service. This can be accomplished by definingservice=1
(or any value) after the previousservice
. The logic for retrieving query parameters differs between thegateway
and theadmin_page
, which is why fulfilling the first condition is possible. - To fulfill the second requirement, we can simply specify the
url
ashttp://home_page
, prompting theadmin
to navigate to that URL, which will trigger the rendering of the flag template. - This is the final URL required to retrieve the flag:
Text Only
Flag: grey{d0ubl3_ch3ck_y0ur_3ndp0ints_in_m1cr0s3rv1c3s}