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
gatewayto forward our request to theadmin_page, which will redirect theadminto thehomepageand ultimately render theflag.html. - To achieve this, we need to make a request to the
gatewaywith theserviceparameter 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_pageandrequested_url != None. - For the first condition, the
gatewayalready forwardsservice=admin_pagesince we want to forward our request to theadmin_page. To meet theservice != admin_pagecondition, 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 thegatewayand theadmin_page, which is why fulfilling the first condition is possible. - To fulfill the second requirement, we can simply specify the
urlashttp://home_page, prompting theadminto 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}