Really is a very creative attack. Still, my understanding is that at the very core, it's still a case of social engineering. The attacker couldn't have done this if he hadn't been given full access to the git repo. I've seen a lot of people blaming NPM for this, but surely this attack would've been possible in any environment which uses package management, be it NPM, Nuget, Maven, pip or any other. The only exception I can see here is that it's harder to detect here, due to the custom of minifying, as my understanding from this summary is that the malicious code was only present in the minified version.
Yes, the main thing was getting permissions to change an established module. NPM's implementation helped hide it. I don't know how much extra processing power it would need from NPM, but the packages should really be minified from the public source by them and not the maintainer, or separate minification matching checks should be performed.
15
u/Vakz Nov 28 '18
Really is a very creative attack. Still, my understanding is that at the very core, it's still a case of social engineering. The attacker couldn't have done this if he hadn't been given full access to the git repo. I've seen a lot of people blaming NPM for this, but surely this attack would've been possible in any environment which uses package management, be it NPM, Nuget, Maven, pip or any other. The only exception I can see here is that it's harder to detect here, due to the custom of minifying, as my understanding from this summary is that the malicious code was only present in the minified version.