TwoMillion

Enumeration

Zenmap:

Open website:
Tôi tìm thấy:
Kiểm tra burp, tôi thấy file inviteapi.min.js:
Sử dụng browser dev tools:
Decode data vừa nhận được với: cyberchef
Tôi đã có api có thể tạo lời mời, Thực hiện tạo lời mời:
Decode base64 sau đó gửi mã lời mời.
Sau đó chương trình chuyển hướng tới:
Sau khi đăng ký thành công tôi login vào website:
Đây giống như hệ website HTB đời đầu. Truy cập Access và click Connection Pack.

Gaining access www-data

Kiểm tra với burpsuite:
Kiểm tra api/v1:
Tôi thấy /api/v1/admin/settings/update được mô tả là Update user settings:
Update thành công user của tôi thành admin.
Với api: /api/v1/admin/vpn/generate
Nếu api generate vpn này gọi một trương trình bên ngoài để tạo vpn. Tôi có thể trèn mã như sau:
Tôi biết mình đã trèn được thành công code. Thực hiện trèn revershell và tôi nhận được shell ban đầu:
Tôi nhận được một revershell:

Gaining access admin

Đọc file .env:
Sử dụng thông tin trên login với ssh:
PS D:\thehackbox\Machines\TwoMillion> ssh admin@2million.htb
admin@2million.htb's password:
admin@2million:~$ id
uid=1000(admin) gid=1000(admin) groups=1000(admin)
admin@2million:~$ ls
user.txt

Privilege escalation

Tìm kiếm lỗ hổng liên quan, tôi tìm thấy: CVE-2023-0386
Upload và thực hiện khai thác:
Trên terminal thứ 2:
Bên cạnh đó tôi thấy một file thank_you.json:
Decode nó:
Dear HackTheBox Community,

We are thrilled to announce a momentous milestone in our journey together. With immense joy and gratitude, we celebrate the achievement of reaching 2 million remarkable users! This incredible feat would not have been possible without each and every one of you.

From the very beginning, HackTheBox has been built upon the belief that knowledge sharing, collaboration, and hands-on experience are fundamental to personal and professional growth. Together, we have fostered an environment where innovation thrives and skills are honed. Each challenge completed, each machine conquered, and every skill learned has contributed to the collective intelligence that fuels this vibrant community.

To each and every member of the HackTheBox community, thank you for being a part of this incredible journey. Your contributions have shaped the very fabric of our platform and inspired us to continually innovate and evolve. We are immensely proud of what we have accomplished together, and we eagerly anticipate the countless milestones yet to come.

Here's to the next chapter, where we will continue to push the boundaries of cybersecurity, inspire the next generation of ethical hackers, and create a world where knowledge is accessible to all.

With deepest gratitude,

The HackTheBox Team



Dryu8

Dryu8 is just a newbie in pentesting and loves to drink beer. I will be happy if you can donate me with a beer.

Post a Comment

Previous Post Next Post