Skip to main content

Command Palette

Search for a command to run...

Upload Vulnerabilities -TryHackMe Write-up

Updated
2 min read
Upload Vulnerabilities -TryHackMe Write-up

Info

  • Name: Upload Vulnerabilities
  • Description: Tutorial room exploring some basic file-upload vulnerabilities in websites
  • Difficulty: Easy
  • Room link: https://tryhackme.com/room/uploadvulns

Write-up

Overview

The purpose of this room is to explore some of the vulnerabilities resulting from improper (or inadequate) handling of file uploads. Specifically, we will be looking at:

  • Overwriting existing files on a server
  • Uploading and Executing Shells on a server
  • Bypassing Client-Side filtering
  • Bypassing various kinds of Server-Side filtering
  • Fooling content type validation checks

Task 4

Q: What is the name of the image file which can be overwritten?

A: mountains.jpg

t4_1.png

Q: Overwrite the image. What is the flag you receive?

A: t4_2.png

Task 5

Q: Run a Gobuster scan on the website using the syntax from the screenshot above. What directory looks like it might be used for uploads?

A: /resources

t5_1.png

Q: Get either a web shell or a reverse shell on the machine.
What's the flag in the /var/www/ directory of the server?

A: t5_2.png

Task 6

Q: What is the traditionally predominant server-side scripting language? A: php

Q: When validating by file extension, what would you call a list of accepted extensions (whereby the server rejects any extension not in the list)?

A: whitelist

Q: [Research] What MIME type would you expect to see when uploading a CSV file?

A: text/csv

Task 7

Q: What is the flag in /var/www/?

A: t7_1.png

t7_2.png

Task 8

Q: What is the flag in /var/www/?

A: t8_1.png

t8_2.png

Task 9

Q: Grab the flag from /var/www/

A: t9_1.png

t9_2.png

Task 11

Q: Hack the machine and grab the flag from /var/www/

A: Due to an error I was having in the machine, I was no able to get to the end of the task. So after you upload the image, you have to go to http://jewel.uploadvulns.thm/admin and write ../content/PHR.jpg (just change the 3 letters for the ones given to your image)

t11_1.png

t11_3.png

More from this blog

Untitled Publication

21 posts