Monday, March 21, 2022

TryHackMe - h4cked - walkthrough

H4cked is one of easy room on the TryHackMe.com In task 1 we are faced by pcap file of the attack on the VM. Most of the answers in Task 1 are found from pcap file which you open with wireshark. Task 2 in this task you try to regain access to the VM same way as hacker did in task 1.
  1. Step

  2. We use hydra to crack new password with following command

    hydra -l jenny -P /usr/share/wordlists/rockyou.txt ftp://target_IP

  3. Step

  4. We log to the ftp and download the shell.php (get shell.php - is the command) and change IP and port to our attack box and upload it back (put shell.php)
  5. Step
  6. Before move to the starting the php script we need to start nc listener on attacking box with

    nc -lvnp port_number

  7. Step
  8. Now we are ready to start php script shell.php from browser:

    IP_target_machine/shell.php

  9. Step
  10. We get spawned reverse shell in terminal, with whoami command we check which user we have, then we can use

    su jenny

    and log in with pass we cracked before with hydra
  11. Step
  12. After that we can use

    sudo su

    and we have root access with this we can read root flag.
I hope someone stucked in any step of solving this room finds this walkthrough useful.

How to Install PostgreSQL on Debian 12: A Step-by-Step Guide

PostgreSQL, commonly known as Postgres, is a powerful, open-source relational database management system renowned for its advanced features ...