Day 5: SOC-mas XX-what-ee?
Task 1 - What is the flag discovered after navigating through the wishes?
- Visit the provided ip address in browser. There is a website hosted with the name of "WishVille".
- Open burp suite and capturing the web requests.
- On the hompage of the website there are three products. Click on View button of any product.
- On the next page there is an option for add that item into wishlist. Click on " Add to wishlist " button to add that item into wishlist.
- Now go the Cart by clicking on cart from top menu. Now you can see that item which you had added into wishlist. Click on " Proceed to checkout " button.
- Oh gosh!! It redirects into another checkout completion page. Fill some details and click on " Complete checkout " button.
- My wish is saved successful. I hope I would get my dream wish.
- Now open burp suite and check for the request /wishlist.php in http history. You can see that it is a post request containig some xml data in its header.
- Add fillowing code in starting of xml
<!--?xml version="1.0" ?--> <!DOCTYPE foo [<!ENTITY data SYSTEM "/etc/hosts"> ]>
and&data;
into product. It would read the file from /etc/hosts as data entity. And you can use &data to get its value. - Now we have to read the wishes, and we can read every wishes by using external entity. To read the wishes , read the files located at "/var/www/html/wishes/wish_1.txt"
- Send the request into intruder using Ctrl+i or Right click + Send to intruder.
- Goto intruder tab
- Select the number which is into the location of xml code.
- Click on add ยง
- Change the payload type to Number
- Set From = 1
- Set to = 20
- Click on start attack
- Check the length of responses. There is a different response lenght on payload 15. Check the actual response and get the flag out.
Answer ๐ THM{Brut3f0rc1n6_mY_w4y}
Task 2 - What is the flag seen on the possible proof of sabotage?
There is a CHANGELOG file that contains the logs of changes ot the website. Access the changelog to get the flag out.
Answer ๐ THM{m4y0r_m4lw4r3_b4ckd00rs}
Task 3 - If you want to learn more about the XXE injection attack, check out the XXE room!
No Answer Needed
Task 4 - Following McSkidy's advice, Software recently hardened the server. It used to have many unneeded open ports, but not anymore. Not that this matters in any way.
No Answer Needed