{"id":166073,"date":"2024-07-23T17:28:22","date_gmt":"2024-07-23T17:28:22","guid":{"rendered":"https:\/\/securityaffairs.com\/?p=166073"},"modified":"2024-07-23T17:28:24","modified_gmt":"2024-07-23T17:28:24","slug":"threat-actors-abused-swap-files-e-skimming","status":"publish","type":"post","link":"https:\/\/securityaffairs.com\/166073\/malware\/threat-actors-abused-swap-files-e-skimming.html","title":{"rendered":"Hackers abused swap files in e-skimming attacks on Magento sites"},"content":{"rendered":"
<\/div>\n

Threat actors abused swap files in compromised Magento websites to hide credit card skimmer and harvest payment information.<\/h2>\n\n\n\n

Security researchers from Sucuri observed threat actors using swap files in compromised Magento websites to conceal a persistent software skimmer<\/a> and harvest payment information.<\/p>\n\n\n\n

The attackers used this tactic to maintain persistence and allowing the malware to survive multiple cleanup attempts.<\/p>\n\n\n\n

The researchers discovered a suspicious script in the compromised website\u2019s checkout page that had all the usual indicators of malware. The script included base64 encoded variables and hex encoded strings. The experts decoded the script and determined that it was used to capture credit card details.<\/p>\n\n\n

\n
\"software<\/a><\/figure><\/div>\n\n\n

When the checkout button is clicked, a script captures credit card data using the querySelectorAll function. This script also harvest sensitive information like name, address, and card number. The stolen details are sent to the domain amazon-analytic[.]com, registered in February 2024, which has been used in other credit card theft cases. Attackers often use well-known brand names in domain names in an attempt to evade detection.<\/p>\n\n\n\n

Upon analyzing the malicious script, the experts noticed an interesting “swapme” file reference. Although initially invisible, using the vi<\/code> command revealed a swap file containing the same malware as the infected bootstrap.php<\/code>. Attackers used this swap file to keep malware on the server and evade detection. After removing the swap file and clearing caches, the checkout page was clean.<\/p>\n\n\n\n

“The\u00a0swapme<\/strong>\u00a0part of the file name clued us in that there might be some swap lingering around. When files are edited directly via ssh the server will create a temporary \u2018swap\u2019 version in case the editor crashes, which prevents the entire contents from being lost.” reads the report<\/strong><\/a> published by Sucuri.<\/p>\n\n\n\n

“While we could not see any\u00a0~swapme<\/strong>\u00a0file with the\u00a0ls<\/strong>\u00a0command, running a vi command on\u00a0bootstrap.php-swapme<\/strong>\u00a0to directly edit the swap file revealed that the file was indeed there, and it contained the exact same contents as the infected version of\u00a0bootstrap.php<\/strong>. It became evident that the attackers were leveraging a swap file to keep the malware present on the server and evade normal methods of detection.”<\/p>\n\n\n\n

The abuse of the swap file system by attackers underscores the necessity of deeper security measures beyond basic scans. The presence of a swap file suggests that the attackers initially accessed to the compromised wesites via SSH or a terminal session. To prevent such persistent malware infections, restrict sFTP, SSH, FTP, and CPanel access to trusted IPs, configure FTP and SSH restrictions on the hosting server, and use website firewalls for additional protection. Experts also recommends of regularly updating your CMS and plugins to avoid vulnerabilities exploited by automated attack tools.<\/p>\n\n\n\n

Follow me on Twitter: @securityaffairs<\/strong><\/a> and Facebook<\/strong><\/a> and Mastodon<\/strong><\/a><\/p>\n\n\n\n

Pierluigi Paganini<\/strong><\/a><\/p>\n\n\n\n

(<\/strong>SecurityAffairs<\/strong><\/a>\u00a0\u2013<\/strong>\u00a0hacking, swap files)<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"

Threat actors abused swap files in compromised Magento websites to hide credit card skimmer and harvest payment information. Security researchers from Sucuri observed threat actors using swap files in compromised Magento websites to conceal a persistent software skimmer and harvest payment information. The attackers used this tactic to maintain persistence and allowing the malware to […]<\/p>\n","protected":false},"author":1,"featured_media":166078,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3323,3,5,7],"tags":[88,10453,4112,9508,9506,10918,3653,30,687,841,1533,15237],"class_list":["post-166073","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-breaking-news","category-cyber-crime","category-hacking","category-malware","tag-cybercrime","tag-e-skimmer","tag-hacking","tag-hacking-news","tag-information-security-news","tag-it-information-security","tag-magento","tag-malware-2","tag-pierluigi-paganini","tag-security-affairs","tag-security-news","tag-swap-files"],"yoast_head":"\n杭州江阴科强工业胶带有限公司