module

BMP Polyglot

Disclosed
N/A
Created
May 30, 2018

Description

Encodes a payload in such a way that the resulting binary blob is both
valid x86 shellcode and a valid bitmap image file (.bmp). The selected
bitmap file to inject into must use the BM (Windows 3.1x/95/NT) header
and the 40-byte Windows 3.1x/NT BITMAPINFOHEADER. Additionally the file
must use either 24 or 32 bits per pixel as the color depth and no
compression. This encoder makes absolutely no effort to remove any
invalid characters.

Author

Spencer McIntyre

Platform

All

Architectures

x86

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':


msf > use encoder/x86/bmp_polyglot
msf encoder(bmp_polyglot) > show actions
...actions...
msf encoder(bmp_polyglot) > set ACTION < action-name >
msf encoder(bmp_polyglot) > show options
...show and set options...
msf encoder(bmp_polyglot) > run

Title
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.