Skip to content
Business logic Write-up Intermediate

Bypassing Mimecast URL and File Inspection

Mimecast's URL Protection and File Inspection could be bypassed because inspection results were cached by filename and the end user downloaded files directly from the remote server. An attacker could rename a malicious file to match a previously inspected safe filename, causing Mimecast to classify it as safe and allow the user to download malware.

Patrick Sayler Follow

Published on netspi.com

Technical / Social Engineering

Patrick Sayler, on netspi.com

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

Likely the inspection results were cached and keyed only by filename, and the user downloaded the file directly from the remote server rather than through Mimecast, so the cached 'safe' verdict was reused for different content.

Impact

An attacker could bypass Mimecast's file inspection and deliver a malicious file to the end user, though the attack is time-sensitive because the cached result lasts only about four hours.

What the attacker needed

Mimecast URL Protection enabled; Attacker controls a web server; Victim clicks a link in an email

The fix

Mimecast should act as an intermediary and serve inspected files from its own storage rather than letting users download directly from the remote host; the text says Mimecast has committed to implementing a fix and addressed some issues via risk-based caching.

How it was found

  1. Send an email containing a link to a safe file (happy.xls) to a Mimecast-protected inbox.
  2. Click the link; Mimecast inspects the file and classifies it as safe.
  3. On the remote web server, rename the malicious file (sad.xls) to match the safe filename (happy.xls).
  4. Return to the email and click the link again; Mimecast does not re-inspect because the filename was already categorised as safe.
  5. The user downloads the file, which now contains the malicious macro.

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.

Mimecast is an email security tool that checks links and files in emails. It remembered that a file with a certain name was safe, so when a different file with the same name was later downloaded, it was not checked again. This let an attacker deliver a harmful file by giving it a safe file's name.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.