📓
Pentesting
  • Writeups
  • HackTheBox
    • Easy Machines
      • Beep Writeup
      • Shocker Writeup
      • Lame Writeup
      • Jerry Writeup
      • Legacy Writeup
      • Blue Writeup
  • TryHackMe
    • Walkthroughs: Easy
      • CC: Steganography
      • Cryptography for Dummies
      • Cross-site Scripting
      • SQL Injection Lab
      • SQL Injection
      • ZTH: Web 2
      • SSRF
      • XXE
      • Authenticate
      • Injection
      • Blaster
      • The Cod Caper
      • Hardening Basics Part 1
      • What the Shell?
      • Game Zone
      • Upload Vulnerabilities
      • Bolt
      • Erit Securus 1
      • CC: Pentesting
      • JavaScript Basics
      • OverPass 2 - Hacked
      • Linux: Local Enumeration
      • Ice
      • Linux Backdoors
      • Avengers Blog
      • DNS in Detail
      • Putting it all together
      • Kenobi
      • Common Linux Privesc
      • Network Services 2
      • Network Services
      • The Hacker Methodology
      • The Find command
      • HTTP in Detail
      • Web Fundamentals
      • How Websites Work
      • Introductory Networking
    • Challenges (CTF): Easy
      • VulNet: Roasted
      • VulNet: Internal
      • Git Happens
      • Kiba
      • VulNet: Node
      • Memory Forensics
      • Smag Grotto
      • Investigating Windows
      • Cat Pictures
      • Juicy Details
      • Anthem
      • Tony The Tiger
      • Jack-of-All-Trades
      • JPGChat
      • Blueprint
      • All in One
      • Gotta Catch'em All
      • Mustacchio
      • Break Out The Cage
      • HeartBleed
      • Poster
      • Madness
      • Source
      • Thompson
      • Library
      • Magician
      • Anonforce
      • Dav
      • GLITCH
      • Fowsniff CTF
      • Team
      • H4cked
      • Easy Peasy
      • ColddBox: Easy
      • Archangel
      • Cyborg
      • Chocolate Factory
      • Brute It
      • Year of the Rabbit
      • ChillHack
      • Gaming Server
      • Brooklyn Nine Nine
      • Wgel CTF
      • Tomghost
      • ToolsRus
      • Skynet
      • Startup
      • Agent Sudo
      • Lian-Yu
      • OhSINT
      • Overpass
      • Crack The Hash
      • Ignite
      • Inclusion
      • Bounty Hunter
      • LazyAdmin
      • RootMe
      • Pickle Rick
      • Basic Pentesting
      • Simple CTF
  • Crackmes.one
    • 1 Difficulty Rating
      • easyAF
      • Easy Keyg3nme
Powered by GitBook
On this page
  • Scanning
  • Enumeration
  • Privilege Escalation

Was this helpful?

  1. TryHackMe
  2. Challenges (CTF): Easy

All in One

PreviousBlueprintNextGotta Catch'em All

Last updated 3 years ago

Was this helpful?

Scanning

Initial nmap scan to find open ports , using the flag "treat all hosts as alive" (-Pn)

nmap -Pn 10.10.117.119

Detailed Nmap Scan :

nmap -sV -sC -p 21,22,80 -oN nmap 10.10.117.119

Enumeration

Lets look at FTP as anonymous login is allowed

And there is nothing in the FTP server, lets look at the webserver

Its an Apache2 default page, lets run gobuster to look for hidden directories.

Lets check these directories out, first /wordpress

Its a wordpress site, we can explore this but first lets look at the other directory we found

There is nothing interesting, lets look at the source code, scrolling down we see something interesting

It looks like a cipher, lets crack it

Looks like a password, but we do not have a username to login through ssh.

Lets go back to the wordpress site. We have username elyana, but the password is not the right one.

Lets run wpscan to find information about this site.

Looking through the output, we see 2 vulnerabilities

We have a LFI vulnerability and a Arbitrary File Upload vulnerability. Lets first login with the credentials we found.

Once logged in, we can go to Appearance > Theme Editor and replace the 404.php file with a reverse shell and click update

Once we do that, we have to start a netcat listener.

Now we visit this URL to get the reverse shell.

Lets stabilize the shell.

Lets look at the files

So the password for the user Elyana is hidden on the system.

Lets find all the files that belong to the user elyana

This is an interesting file, lets read it.

We have the username and password, lets login through ssh

We can now read the user flag.

Looks like it is encoded, lets decode it.

Privilege Escalation

Lets run sudo -l

We are root. We can read the root flag

Lets decode this

Looks like we can run socat as sudo, lets go to and the get the command to privilege escalate to root.

GTFOBins