Threat Level: green Handler on Duty: Xavier Mertens

SANS ISC: InfoSec Handlers Diary Blog - Payload delivery via SMB InfoSec Handlers Diary Blog

Sign Up for Free!   Forgot Password?
Log In or Sign Up for Free!

Payload delivery via SMB

Published: 2018-03-12
Last Updated: 2018-03-12 07:10:06 UTC
by Xavier Mertens (Version: 1)
1 comment(s)

This weekend, while reviewing the collected data for the last days, I found an interesting way to drop a payload to the victim. This is not brand new and the attack surface is (in my humble opinion) very restricted but it may be catastrophic. Let's see why.

It started with a new classic wave of phishing emails:

From: [redacted]
To: [redacted]
Subject: Invoice No 91162346
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="0c696630-7e60-f171-a1d6-06ba0d4d75eb"
Date: Mon, 05 Mar 2018 19:46:39 +0530
Envelope-To: [redacted]

This is a multi-part message in MIME format
Content-Type: text/plain; charset=iso-8859-1

Thanks for using online billing system.

Please find your Invoice attached


Clinton Norrie

Content-Type: application/zip; name="Invoice"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Invoice"

I received a few hundreds of similar emails in my spam trap. Let’s have a look at the attachment:

$ unzip
  inflating: I57677294166.url
$ cat I57677294166.url

The score of the .url file is not 32 on VT[1] but when the campaign was launched (the 5th of March), the score was null:

A .url file[2] is an Internet shortcut that contains a target URL that will be visited when the file is opened. A nice feature is the choice of the icon. Indeed, you can customize the icon that will be associated with the file. This is great to entice the victim to open it. In the case above, a standard icon is used from the library available in shell32.dll (the 3rd one). It’s the classic shared folder icon that is used (remember that the phishing email mentioned an “online billing system”:

The URL will not try to access the JavaScript payload via HTTP but via SMB (file://). When I tested, the remote host was already offline, too bad! This is an interesting way to download the payload but the attackers could also receive the victim’s credentials as described in the well-known attack that leaks credentials when visiting an SMB share[3]. 

This proves again that the SMB protocol should never use allowed on the Internet. Do NOT permit SMB traffic outside your perimeter!


Xavier Mertens (@xme)
ISC Handler - Freelance Security Consultant

1 comment(s)
Diary Archives