Skip to content
Crypto Write-up Intermediate

Insecure cipher used in forum software

The forum software uses a weak obfuscation cipher to hide user email addresses, but the key can be recovered via a known-plaintext attack. An attacker can then decrypt all email addresses and also abuse the formmail endpoint to send emails to arbitrary addresses.

0g.vc

Published on 0g.vc

This vulnerability was found on the popular forum platform gnuboard5. A vignette cipher is used to obfuscate user’s email addresses when these are sent to the front-end.

The author, on 0g.vc

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The cipher is a simple additive cipher with a key derived from server details, and the key can be recovered from a single known plaintext-ciphertext pair.

Impact

An attacker could disclose all user email addresses and send emails to arbitrary addresses via the forum's SMTP, though the maintainer could not reproduce on a non-default installation.

What the attacker needed

Access to the forum; known email address of a user

The fix

The report does not state a fix, but the conclusion implies that proper cryptography should be used instead of a custom obfuscation scheme.

How it was found

  1. Collect the ciphertext of your own email address from the current_connect.php endpoint.
  2. Use the provided Python code to calculate the key from the known plaintext and ciphertext.
  3. Use the key to decrypt other email addresses from the current_connect.php or profile.php pages.
  4. Optionally, encode any email address and send email via the formmail_send.php endpoint.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

The forum hides email addresses by scrambling them with a simple substitution, but the scrambling key can be worked out if you know one email address. Once the key is known, all scrambled emails can be unscrambled. This also lets an attacker send emails through the forum's mail system.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.