TryHackMe(THM):Web Fundamentals-Writeup

yu1ch1
Sep 23, 2020

--

Hi! Today I’m going to write a Writeup for Try Hack Me.

I’m on the Learning Paths of a COMPLETE BEGINNER.
The targeted room is Web Fundamentals.

Skip where you don’t need an answer.
I will not write a direct answer, just a command.

Mini CTF

Tasks

There’s a web server running on http://MACHINE_IP:8081. Connect to it and get the flags!

- GET request. Make a GET request to the web server with path /ctf/get
- POST request. Make a POST request with the body “flag_please” to /ctf/post
- Get a cookie. Make a GET request to /ctf/getcookie and check the cookie the server gives you
- Set a cookie. Set a cookie with name “flagpls” and value “flagpls” in your devtools and make a GET request to /ctf/sendcookie

In short, it’s a matter of curl commands and options. You can solve it immediately by referring to ‘-help.’

#1 What’s the GET flag?

curl http://MACHINE_IP:8081/ctf/get

#2 What’s the POST flag?

curl -XPOST http://MACHINE_IP:8081/ctf/post —-data “flag_please”

#3 What’s the “Get a cookie” flag?

curl -c output http://MACHINE_IP:8081/ctf/getcookie
cat output

#4 What’s the “Set a cookie” flag?

curl -b 'flagpls=flagpls' http://MACHINE_IP:8081/ctf/sendcookie

Thank you for reading.

--

--

yu1ch1
yu1ch1

Written by yu1ch1

I’m a Japanese high school student.I’m interested in hacking. I will be a super hacker like “Spooky”, who I respect the most. I have to study hacking for that.

No responses yet