A method and system for providing protection from exploits to devices connected
to a network. The system and method include a component for determining whether
an encapsulation has been applied to an attachment associated with a message and
unencapsulating such encapsulated attachment, and a component that performs at
least one decompression of the attachment when the attachment is compressed. If
it is determined that the message, including the attachment, is to be scanned,
a component is included that determines whether a header, body, and/or attachment
of the message includes exploits. A device that receives messages that are directed
to the network employs the components above to provide exploit protection for at
least one of the messages.