In recent weeks, there has been an increase in phishing attacks, conducted through messaging platforms like Telegram. Telegram is a widely used app that allows users to send messages, photos, videos, and other files online. It also provides APIs for developers to create custom bots and applications. Unfortunately, these APIs can also attract threat actors who use them for illicit purposes, such as stealing credentials.
Figure 1 presents one example of a phishing email that shows a URL i.e hxxps[://]www[.]astunet[.]com/wp-plug/imu0nni5/3rhenqt2/<base64 encoded email address>, while hovering a cursor over View Document button.
r2.dev is a Cloudflare cloud storage service with a long history of hosting phishing pages. Here we observed a phishing landing page i.e hxxps[://]pub-31a116fb226d4dfaa2004eef764a6bff[.]r2[.]dev/ayo[.]html#<victim_email_address> with TLD r2.dev. Figure 2 shows the following phishing landing page.
By investigating HTML page, we found a client-side script written in JavaScript, with some jQuery, which performs several actions, including handling form submissions and sending data to a Telegram bot. Figure 3 shows code snippet responsible for the POST request exfiltrating target credentials and other information.
Figure 4 shows a code snippet that defines a function responsible for logging visitor information to a Telegram chat. It constructs a detailed message using visitor data and other information, then sends it to a specified Telegram chat via an API request.
Other parts of code snippets are not included for sake of brevity. However, the code above and rest of the code snippets appear to be malicious and designed for phishing purposes. Here is a breakdown of its functionality.
The script starts by initializing once the document is fully loaded. It initializes a count variable to 0. To handle the phishing landing page described above, a hash part of the URL is extracted, decoded into Base64, and stored it in the ai variable. If ai variable is not empty, it will attempt to fetch and display a logo for the domains extracted from the email address.
Interestingly, amongst key variables, FILE variable is not seen being used in the code. It contains base64 encoded strings. It is decoded to a URL i.e hxxps[://]goldviseinvesmenu[.]com/levels/ll[.]php. Although the purpose is unclear, yet it is highly likely that the visitor info will be sent to this desired destination.
The script attempts to collect user credentials (email, password) and send them to a Telegram bot asynchronously via AJAX request. It validates the input fields and ensures they meet certain criteria. The visitor's IP and other information are collected and sent along with the credential’s IP address and browser information can be used for tracking purposes. The script includes functionality to fetch and display domain logos based on the provided email address. “event.preventDefault()” is a crucial in this code for intercepting the default form of submission behaviour and enabling the custom handling of form data without a page reload.
Subject |
s***@[redacted] has shared Fin...Statement_[redacted]1325303630.pdf" with you today <day & date> |
Compromised Domain |
www[.]astunet[.]com |
Phishing landing page |
hxxps[://]pub-31a116fb226d4dfaa2004eef764a6bff[.]r2[.]dev/ayo[.]html#<victim_email_address> |
C2 domain (likely) |
goldviseinvesmenu[.]com |
Legit PDF file (just for placeholder) after successful login |
hxxps[://]www[.]docspro[.]nl/wp-content/uploads/2021/12/Docspro-License-Agreement[.]pdf |
Telegram Bot |
hxxps[://]api[.]telegram[.]org/bot7256693481:AAHVAkPmxExV-EPf1cOIk-cCH0L0SR9aq7o/sendMessage?chat_id=5616766790 |
Syed Hassan Faizan as a Security Researcher for Forcepoint X-Labs Research Team. He devotes his time in researching cyber-attacks that targets the web and email, particularly focusing on URL analysis, email security and malware campaign investigation. He is passionate about...
Forcepoint is the leading user and data protection cybersecurity company, entrusted to safeguard organizations while driving digital transformation and growth. Our solutions adapt in real-time to how people interact with data, providing secure access while enabling employees to create value.