News for hackers. Stuff that matters.
Re:Hello wasm-pack by mpolichette on Wednesday April 18, 2018 @12:25PM (#16868649)
I cant help but think of the post about stealing password credentials from the site you build by surreptitiously inserting extra code into the published NPM package. Except wasm packages seem like they'd be even harder to detect.

https://hackernoon.com/im-harvesting-credit-card-numbers-and...

Re:Hello wasm-pack by crispyporkbites on Wednesday April 18, 2018 @12:39PM (#16868776)
I have a package on NPM which is only partially implemented, using it in a production app is a bad idea, a quick glance at the source code or the todo section of the readme makes it pretty obvious. I still gets bug reports and npm says it has hundreds of download every month.

For anything serious, read the source code, at the very least check your dependencies.

Re:Hello wasm-pack by ag_dubs on Wednesday April 18, 2018 @12:44PM (#16868825)
fwiw as a former npm registry engineer i can tell u that "hundreds of download every month" likely is a result of the background bot activity npm gets. but your advice is sound! definitely vet your deps before you use them! and YES! read the source.
Re:Hello wasm-pack by probablycorey on Wednesday April 18, 2018 @02:23PM (#16869666)
Is this realistic though? Every time you update a dependency you would have to read its source (and its source dependencies, and their source dependencies...)

To do that well, it would be someone's fulltime job to read and do security audits on all those dependencies.

Re:Hello wasm-pack by komali2 on Wednesday April 18, 2018 @02:46PM (#16869885)
Last time I went to one of the Bay Area node meetups, that given meetup was being sponsored by just such a company. Can't remember the name, unfortunately.

The idea was though that you'd feed them your package.json and they'd let you know of any vulnerabilities, iirc. Or maybe they had a private repo of packages they'd checked? Can't remember.

Re:Hello wasm-pack by tomsmeding on Wednesday April 18, 2018 @03:08PM (#16870082)
Possibly https://snyk.io/ ?
Re:Hello wasm-pack by illustrioussuit on Wednesday April 18, 2018 @02:46PM (#16869878)
Theoretically, once something is updated all you would have to do is check the diff. Still tedious though.
Re:Hello wasm-pack by Y_Y on Wednesday April 18, 2018 @03:00PM (#16870013)
I look forward to all the clever exploits that result from benign-looking code being added to benign-looking code.
Re:Hello wasm-pack by mpolichette on Wednesday April 18, 2018 @02:25PM (#16869697)
The argument in that article is that it doesn't matter what is in the source. The published package has no guarantees to be from the source.
Re:Hello wasm-pack by maxyme on Wednesday April 18, 2018 @02:03PM (#16869489)
You could already do this tons of ways. Native modules come to mind.
Re:Hello wasm-pack by creatonez on Friday April 20, 2018 @10:07AM (#16884860)
Which don't run in browsers
Re:Hello wasm-pack by eridius on Wednesday April 18, 2018 @03:11PM (#16870116)
Since wasm (currently) requires js to interact with the DOM, you could still read the js code to see if it's passing any sensitive data into wasm.
Re:Hello wasm-pack by mattnewton on Wednesday April 18, 2018 @03:15PM (#16870152)
Js code is sufficiently dynamic where I wouldn’t be confident in anyone using this defense, even with a debugger open.
Re:Hello wasm-pack by eridius on Wednesday April 18, 2018 @03:33PM (#16870303)
The complaint here is that moving from js to wasm means you can't tell if a package is maliciously exfiltrating your sensitive data. That presupposes that you can read and understand the js code. If your argument here is that you can't be confident in your ability to read and understand the js code, then moving to wasm is no longer a problem.
Re:Hello wasm-pack by bzbarsky on Wednesday April 18, 2018 @04:40PM (#16870976)
You can read the JS code.

If it's trying to be sneaky, you _cannot_ understand it, in general. If you think you can, that is false confidence that is best gotten rid of.

Re:Hello wasm-pack by mattnewton on Wednesday April 18, 2018 @04:47PM (#16871035)
That’s probably true, but I do think that the addition of wasm complicated things. Imagine a js bridge that calls window objects by strings built in the wasm blob, or does anytning using eval. Now the wasm code can call anything js can through this bridge.
Re:Hello wasm-pack by eridius on Wednesday April 18, 2018 @05:06PM (#16871195)
I suppose that's true, but you can also tell that the JS is trying to obfuscate what it's doing and just generally distrust it at that point.
Re:Hello wasm-pack by fulafel on Thursday April 19, 2018 @12:04AM (#16873250)
Maybe the code wraps querySelector and getAttribute for wasm, or similar. Or maybe its underhanded code, designed to do something different than it seems to.
Re:Hello wasm-pack by mpolichette on Wednesday April 18, 2018 @04:16PM (#16870762)
Thats neat, cool, given that, we are at least only as susceptible as we were before.
Re:Hello wasm-pack by darepublic on Wednesday April 18, 2018 @10:14PM (#16872846)
Wouldn't the network tab still record any network requests from wasm
Re:Hello wasm-pack by eridius on Wednesday April 18, 2018 @10:47PM (#16872971)
I would assume so, but if the request is encrypted you wouldn't know what's in it.