FortiGuard Labs’ AI-driven OSS malware detection system has recently discovered a series of malicious NPM packages designed to steal sensitive information from compromised systems. These packages are believed to have been created between March 5 and March 14 by a threat actor known as tommyboy_h1 and tommyboy_h2 to target PayPal users.
PayPal is a widely used platform holding sensitive financial information. Using PayPal-related names helps these malicious packages avoid detection, making it easier for attackers to steal sensitive information. By including "PayPal" in the name of the malicious packages, such as oauth2-paypal and buttonfactoryserv-paypal, the attackers also create a false sense of legitimacy, tricking developers into installing them. The code collects and exfiltrates system data, such as usernames and directory paths, which can then be used to target PayPal accounts or be sold for fraudulent purposes.
The code has very similar characteristics, aiming to steal sensitive information and send it to remote servers. Users would lose their private info without knowing it.
The preinstall hook runs a malicious script automatically before the package is installed, bypassing user or security tool detection. The script collects system data like the current user, working directory, and hostname, which helps the attacker understand the environment for further malicious actions. This information is then encoded into hexadecimal format and obfuscated by truncating and splitting directory paths to make it harder for security measures to detect. The obfuscated data is sent to an external server controlled by the attacker, with the dynamically generated URL making it more difficult to block. The sensitive data exfiltrated may be used in further attacks. The hacker published numerous malicious packages in a short time.
Figure 5: The author published numerous malicious packages in a short time.
These attacks function by using a "preinstall hook" in malicious NPM packages, automatically running a script when the package is installed. This script collects system information, like the user, hostname, and directory paths, and then sends it to an attacker-controlled server. To spot a compromise, look for unusual NPM packages with names like "paypal" (e.g., oauth2-paypal or buttonfactoryserv-paypal). Other signs include unexpected network connections to unknown servers, so also check your network logs for any suspicious activity. If you find any suspicious packages, remove them, change compromised credentials, and scan your system for further threats. Make sure your security software is up to date to detect such issues.
The authors of tommyboy_h1 and tommyboy_h2 are likely the same person, publishing multiple malicious packages in a short time. We suspect that the same author created these packages to target PayPal users. We urge the public to be cautious when downloading packages and to ensure they are from trusted sources to avoid falling victim to such attacks.
FortiGuard AntiVirus detects the malicious files identified in this report as:
bankingbundleserv_1.20.0: Bash/TommyBoy.A!tr
buttonfactoryserv-paypal_3.50.0: Bash/TommyBoy.A!tr
buttonfactoryserv-paypal_3.99.0:Bash/TommyBoy.A!tr
tommyboytesting_1.0.1:Bash/TommyBoy.A!tr
tommyboytesting_1.0.2:Bash/TommyBoy.A!tr
tommyboytesting_1.0.5:Bash/TommyBoy.A!tr
tommyboytesting_1.0.6:Bash/TommyBoy.A!tr
tommyboytesting_1.0.7:Bash/TommyBoy.A!tr
tommyboytesting_1.0.8:Bash/TommyBoy.A!tr
tommyboytesting_1.0.9:Bash/TommyBoy.A!tr
tommyboytesting_1.0.10:Bash/TommyBoy.A!tr
tommyboytesting_1.0.11:Bash/TommyBoy.A!tr
tommyboytesting_1.0.12:Bash/TommyBoy.A!tr
compliancereadserv-paypal_2.1.0:Bash/TommyBoy.A!tr
oauth2-paypal_0.6.0:Bash/TommyBoy.A!tr
oauth2-paypal_1.6.0:Bash/TommyBoy.A!tr
oauth2-paypal_2.6.0:Bash/TommyBoy.A!tr
oauth2-paypal_4.8.0:Bash/TommyBoy.A!tr
oauth2-paypal_7.5.0:Bash/TommyBoy.A!tr
oauth2-paypal_10.0.0:Bash/TommyBoy.A!tr
oauth2-paypal_699.0.0:Bash/TommyBoy.A!tr
Paymentapiplatformservice-paypal_1.20.0:Bash/TommyBoy.A!tr
Userbridge-paypal_1.20.0:Bash/TommyBoy.A!tr
userrelationship-paypal_1.20.0:Bash/TommyBoy.A!tr
The FortiGuard AntiVirus service is supported by FortiGate, FortiMail, FortiClient, and FortiEDR. Customers running current AntiVirus updates are protected.
The FortiGuard Web Filtering Service detects and blocks the download URLs cited in this report as Malicious.
The FortiDevSec SCA scanner detects malicious packages, including those cited in this report that may operate as dependencies in users' projects in test phases, and prevents those dependencies from being introduced into users' products.
If you believe these or any other cybersecurity threat has impacted your organization, please contact our Global FortiGuard Incident Response Team.
File |
Hash (sha256) |
Detection |
bankingbundleserv_1.20.0 |
796deae716a6d66b49a99d00e541056babe34fd2fcbcea0380491de4b792afba |
Bash/TommyBoy.A!tr |
buttonfactoryserv-paypal_3.50.0 |
18e45358462363996688ceabfc098e17f855d73842f460b34c683e58c728149f |
Bash/TommyBoy.A!tr |
buttonfactoryserv-paypal_3.99.0 |
88bd580aa51129e4e5fa69e148131874c862015e7c51d59497e11f22db2d72c6 |
Bash/TommyBoy.A!tr |
tommyboytesting_1.0.1 |
23664decf3c2f28a3f552dc98d90017926617969713ccccdc9f5fd3178d76dbf |
Bash/TommyBoy.A!tr |
tommyboytesting_1.0.2 |
ba63fbf6f7bab000bc1b1bf92319415328cea238872450adbaac6a6069132779 |
Bash/TommyBoy.A!tr |
tommyboytesting_1.0.5 |
f359b687fb9e1a4c27fdf5174380abc9877f940ef6a6fd4d38e9ef40bb778107 |
Bash/TommyBoy.A!tr |
tommyboytesting_1.0.6 |
815ebfc4fb5bddf1f9ca1b12ae2a1b0e37736a93ea9babe858747096ad9ce671 |
Bash/TommyBoy.A!tr |
tommyboytesting_1.0.7 |
d21ae84e104a305b5aebee8e6fbb4837976ef26935dac90372637f913ef58154 |
Bash/TommyBoy.A!tr |
tommyboytesting_1.0.8 |
0c006540abcb768cad80a1a8ced926fa58f10cf9eb0be16c4185850df83bff82 |
Bash/TommyBoy.A!tr |
tommyboytesting_1.0.9 |
847e684a228292dc905205d7353ed9458e10129105fe3b387c4e9374d6afd783 |
Bash/TommyBoy.A!tr |
tommyboytesting_1.0.10 |
ed6a350c4b1baa6f098293c328d0a62d35aafb4ab62b93e6f3a611f06be9aa29 |
Bash/TommyBoy.A!tr |
tommyboytesting_1.0.11 |
123480357ab54d2c2067640105b5683445777ae1d20fd52551a5df9327692103 |
Bash/TommyBoy.A!tr |
tommyboytesting_1.0.12 |
3710742057e470e8882a84412721ed19652e3f13977af21a937bad27d75b6f96 |
Bash/TommyBoy.A!tr |
compliancereadserv-paypal_2.1.0 |
dd1a177126d48072381db98af74c964100c8ef2e43286f3a31114461251a164c |
Bash/TommyBoy.A!tr |
oauth2-paypal_0.6.0 |
0d8c5bb69c567e3949cc6e087610d79c886d9140d0eda88cc92d3ec63fb7a3b9 |
Bash/TommyBoy.A!tr |
oauth2-paypal_1.6.0 |
b6bc001bc9b4171a27fb2a485cb3e3d8f23bc1ee6b4a03bbcfbba63b7d208477 |
Bash/TommyBoy.A!tr |
oauth2-paypal_2.6.0 |
2c7bf841a659fa1d8105d26f6664ebc3a78b99e0c071eb7f529503346c40f778 |
Bash/TommyBoy.A!tr |
oauth2-paypal_4.8.0 |
cbbe1d5a7d4a721c61b9c3b8b6a8e5d65508f02c70e708698d8165d92e154383 |
Bash/TommyBoy.A!tr |
oauth2-paypal_7.5.0 |
25034c2542757ac93cb6008479a5bfc594f9e92f66249f6fb862447a18847ba7 |
Bash/TommyBoy.A!tr |
oauth2-paypal_10.0.0 |
148d3552db2acf469c84e26889336f06167c6cf455248e08d703282bc0556fb8 |
Bash/TommyBoy.A!tr |
oauth2-paypal_699.0.0 |
7186674c208242b8e6fdf7b0f4e7539218590618fee517aa264e8446247d3440 |
Bash/TommyBoy.A!tr |
Paymentapiplatformservice-paypal_1.20.0 |
7a48db17a02e94c97a329cc1a578777d8b4fb74221bdb22202369d6590917fd0 |
Bash/TommyBoy.A!tr |
Userbridge-paypal_1.20.0 |
7a48db17a02e94c97a329cc1a578777d8b4fb74221bdb22202369d6590917fd0 |
Bash/TommyBoy.A!tr |
userrelationship-paypal_1.20.0 |
ca7dc2b0856f89e71ce9da6f179b34c8879456b5dffda0b5bd3f0fd73bab1c50 |
Bash/TommyBoy.A!tr |