LevelBlue Completes Acquisition of Cybereason. Learn more
Get access to immediate incident response assistance.
Get access to immediate incident response assistance.
LevelBlue Completes Acquisition of Cybereason. Learn more
This blog investigates an interesting phishing campaign we encountered recently. In this campaign, the email subject pertains to a price revision followed by numbers. There is no email body but there is an attachment about an ”investment”. The convoluted filename of the attachment contains characters that are not allowed in the naming convention of a file, noticeably the vertical. Although, as you can see below, while "xlsx" is in the filename, double-clicking the attachment will prompt to open the attachment with the default web browser. Thus, the file indeed appears to be an HTML document.
Figure 1. Attachment of the email has two extensions, an Excel? No, it’s HTML.
Before diving into more details about the HTML file attachment, below is an overview diagram of how the phishing routine was carried out.
Figure 2. How phishing was executed
We first checked out the HTML file attachment with a text editor to view the contents. It is noticeable that a chunk of text is URL Encoded. We turned to a favorite tool, CyberChef, and used its URL Decode function. It revealed more encoded text, some HTML Entity code.
Pulling out the HTML Entity code and decoding using CyberChef’s HTML Entity function reveals two URLs pointing at the website, yourjavascript.com, which is interesting as we had already seen this being used before in phishing, and now it is being utilized once again in this campaign. This time around, the site hosts not one, but two JavaScript files.
Figure 3. From URL Encoded yields HTML Entity Encoded, finally reveals two JavaScript files hosted at a remote website
With a web browser, we visited the first hosted JavaScript file, 343454545.js in yourjavascript.com and saved a copy of the script file in case it was taken down during analysis. This hosted JavaScript file consists of two blocks of URL encoded text.
CyberChef’s URL Decode function reveals the hidden HTML code. The first block of URL encoded text is Part 1 of the HTML Code, where the beginning HTML tag is located. The second block of URL encoded text is Part 2 of the HTML Code which contains an HTML JavaScript code that validates email and password input of the victim.
Figure 4. JS Script containing URL Encoded texts unveils Part 1 and Part 2 of the HTML code
With a web browser again, we visited the second hosted JavaScript file, 8898989-8787.js at yourjavascript.com and again saved it. This time, the hosted JavaScript consists of two blocks of Base64 encoded text.
Again, CyberChef’s Base64 Decode function reveals the hidden HTML code. The first block of Base64 Encoded text is Part 3 of the HTML code, this is the body part of the html code. Notably, it has the form URL where the submit function is located via the
LevelBlue is a globally recognized cybersecurity leader that reduces cyber risk and fortifies organizations against disruptive and damaging cyber threats. Our comprehensive offensive and defensive cybersecurity portfolio detects what others cannot, responds with greater speed and effectiveness, optimizes client investment, and improves security resilience. Learn more about us.