Malicious npm packages are impersonating legitimate Flashbots tools to steal credentials and private keys.
Check your project dependencies! A recent supply chain attack targets devs by using fake npm packages to harvest sensitive data.These packages use sophisticated methods to exfiltrate private keys.
Always verify package authenticity before installing.
Interesting case study and cautionary tale about the rush to app development using codebases that are plentiful but untrusted. For the sake of taking a little extra time in development, you can either establish that trust with some form of code-signing or just build it yourself.
It strikes me one mitigation would be to shut down outbound SMTP connections to the server or over the port in question (2525?). I am not sure I would call it a "sophisticated" means of retrieving the keys. SMTP has been around for almost 45 years, but again, one of the issues with using these all-encompassing frameworks/codebases (like NPM). You end up with an app that has far more capability than you need, and if an attacker can get in there, they can leverage those capabilities to do what they want. Again, these vulnerabilities are all because we don't want to spend a little more time on the development side.
The supply chain attack resulted in a total of 18 packages with over 2.5 billion weekly downloads being poisoned with malware.
Any system where the poisoned packages were installed should be considered fully compromised. You should remove the affected packages right away. Cloud environments that served code using the infected package versions are also considered at risk. Should rotate all secrets and keys on the machine from a different, secure computer.