Hacker101 Encrypted Pastebin | PRO ◉ |
The goal? Find a way to read other people’s encrypted pastes without knowing their password. Classic crypto-CTF territory.
The goal is to exploit the way the server handles encrypted data to recover sensitive information (the flag) or manipulate the application's logic. 1. Identify the Vulnerability
Symmetric encryption without authentication protects confidentiality but . In CBC mode, changing a byte in ciphertext block C0cap C sub 0 completely scrambles plaintext block P0cap P sub 0 . However, it modifies plaintext block P1cap P sub 1 in a predictable, bit-for-bit manner.
: You iterate through possible byte values (0-255) until the server stops reporting a padding error. This confirms that the last byte of the decrypted block matches the expected padding value (e.g., 0x01 ).
This means the server never sees your plaintext. It only stores gibberish. The URL fragment (the # part) contains the decryption key, which never touches the server's network logs. hacker101 encrypted pastebin
) to deduce the original plaintext byte without knowing the secret key.
Let me know which part of the challenge you'd like to explore further. Share public link
Hacker101 is a popular online platform that provides a comprehensive curriculum for learning about security and hacking. As part of its training program, Hacker101 encourages students to share sensitive information, such as vulnerability details and exploit code, in a secure manner. Encrypted Pastebin is an ideal solution for this purpose, as it allows students to share encrypted content that can only be accessed by authorized parties.
def b64e(data): return base64.b64encode(data).decode().replace('=', '~').replace('/', '!').replace('+', '-') The goal
As you progress through the CTF, earning 26 points makes you eligible for invitations to private bug bounty programs on HackerOne, providing a direct path from learning to earning.
If the padding of a decrypted block is incorrect, the server often throws a specific error (e.g., "Padding Error" or a generic 500 status).
padbuster http://35.x.x.x/pastebin/view/ [ENCRYPTED_TOKEN] 16 -encoding 3 -plaintext "id=1' OR 1=1--" Use code with caution.
: A popular tool for automating padding oracle attacks. You can find usage guides on the official PadBuster GitHub . The goal is to exploit the way the
In cryptography, padding oracle attacks exploit systems that reveal whether or not the padding of an encrypted message is valid. When a block cipher like AES-CBC is used, plaintext messages must be padded to a multiple of the block size (16 bytes for AES-128). If the server decrypts a ciphertext and detects invalid padding, it returns an error—and that single bit of information can be used to decrypt the entire message.
But in the encrypted pastebin, the simpler path is:
Flag 3 represents the culmination of the challenge, combining cryptographic exploitation with classic web vulnerabilities. The application includes a tracking.gif image loaded on every page, suggesting that each page access generates a database entry that tracks pastebin history.
: Without a Message Authentication Code (MAC) like HMAC, an attacker can modify ciphertext to change the resulting plaintext (Bit-flipping attacks).