
Password Security Like a Pirate: How to Cover Yer Booty

March 19, 2024 by Paul Byrne
One morning, a client sent us a frantic Slack message asking a developer and their project manager to attend a call because, “the Secret Service is here and they want to talk about how our site is siphoning off credit card information.”
This is definitely not the way you want your day to start. We certainly did not. It was a first for us and for our client. We would soon find out the issue at hand was much bigger than just one client and just one agency.
As an ecommerce development agency, one of our testing responsibilities is to ensure the web store processes credit card transactions properly before pushing code to production. For this purpose, we have a test credit card that we use solely for test transactions on client websites. It should go without saying, but we immediately submit every transaction for a refund so it never carries a balance.
We reset passwords, had Wells Fargo refund the purchases, and requested a new card. There were no more purchases made despite using the new card on the same sites.
Strange.
Little did we know, hackers had gained access to the admin panels of multiple clients. The hacks both involved the creation of new admin users that had the identical email addresses across multiple sites. In all cases, the same malware was deployed via Magento’s content management system.
How did they gain access? We started narrowing down the possibilities:
We also noted that the fake admin users were both registered with the same email address which bore a third-party vendors’ domain name. We concluded this was probably the attack vector. The access was probably gained by compromising the 3rd party account manager’s email. Since this account manager routinely requested access to the client’s Magento/Adobe Commerce admin panel, it is likely they were sent via email.
Of all those possibilities, the Secret Service identified malware inserted into a content block in Magento’s content management system. The level of sophistication of the code was quite astonishing and would have required top-notch developers. The FBI tends to get involved in far-reaching attacks. We suspect this to be part of a much larger hack, with an even bigger agenda, across many sites that have no association with Razoyo.
First of all, the code was highly obfuscated: it avoided using a script tag (which makes code easy to scan for) by leveraging a vulnerability that allows a developer to insert JavaScript from a remote source when an image fails to load. From a UI perspective, it makes sense to have this capability so that if an image is missing or offline it can be replaced with some other type of code to keep the page from jumping around or breaking the HTML dom structure, among other things.
Secondly, the executable part of the code was entirely encrypted and required us to reverse-engineer it to determine what it was doing. A visual inspection would have not indicated this was malicious code at all.
Honestly, it is a little scary to think about the potential capabilities of this hack, especially given the involvement of two government agencies. It was likely a wide-spread hack involving many websites – the code could be inserted into WordPress, WooCommerce, and even Shopify for that matter. Given the government’s interest it may have involved state actors, organized crime, or both. We aren’t even entirely sure the criminals are US-based.
In the end, we were unable to determine conclusively how they gained access to the admin panel and how they were able to set up the same suspicious admin user on either site. It is possible the FBI or Secret Service know.
However, we were able to implement several measures to make that even harder moving forward:
One merchant was already transitioning from Magento to Shopify, which eliminated some of the security risks they were facing. This seemed to appease the Secret Service despite the fact that this hack would have likely worked on that platform as well.
The consequences of being hacked can be very serious for merchants, including losing the ability to process credit cards, loss of trust, and even legal action. We work quickly with merchants to address the concerns of authorities, banks, and customers. None of our clients have ever lost the ability to transact due to a breach or hack.
Besides the feeling of violation that comes with a hack, you will probably have to spend time and money with a lawyer to help with your communication plan. You will have to send an embarrassing email to your customers if their data may have been compromised.
You will also probably have to deal with banks or credit card brands and put together a plan that convinces them your business not only takes security seriously but is now secure. In this case, the clients had some very uncomfortable conversations with federal agents.
Finally, if it is not your company, you may end up having a rough conversation with your employer. I’ve never seen anyone who takes a hack seriously fired, even if they were at fault, but I have seen people quit over one. This was not an issue in this case.
Depending on the type of issue, how long the malware has been operating, and other factors, you may need to jump through multiple hoops. You’ll need to prove you can pass security scans. You may need to supply your remediation steps and report progress on them to authorities or banks.
It’s important to note that all of the merchants involved in this hack recovered well and faced no severe consequences. It was a storm, but it passed.
Even if your security practices were not at fault, you should still take the opportunity to review and update them. Creating a plan to avoid future hacks can provide proof that you are doing everything you can to keep your customers’ and partners’ information safe. We’re in an escalating arms race with hackers and bad actors on the internet every day.
While there is far more you can do besides the items on this list, here are some of the take-aways from this experience.
While there is much more you can do, if you are not doing the above, you are likely vulnerable to attack. In a previous article, we discuss the top 10 security mistakes Magento 2 merchants make. This could be beneficial information to have when trying to keep your site safe.
If you think your website may be vulnerable or if you have been attacked, please contact us right away for a free consultation!
Orange Lightest Background
Orange Light Background
Orange Medium Background
Orange Dark Background
Orange Darkest Background
Purple Lightest Background
Purple Light Background
Purple Medium Background
Purple Dark Background
Purple Darkest Background
We use cookies to improve your experience. Do you accept?
To find out more about the types of cookies, as well as who sends them on our website, please visit our cookie policy and privacy policy.