logoalt Hacker News

DropDeadtoday at 3:14 PM3 repliesview on HN

Why didn't some make av rule to find stuff like this, they are just plain text files


Replies

nine_ktoday at 4:05 PM

The rule must be very simple: any occurrence of `eval()` should be a BIG RED FLAG. It should be handled like a live bomb, which it is.

Then, any appearance of unprintable characters should also be flagged. There are rather few legitimate uses of some zero-width characters, like ZWJ in emoji composition. Ideally all such characters should be inserted as \xNNNN escape sequences, and not literal characters.

Simple lint rules would suffice for that, with zero AI involvement.

show 3 replies
aboundtoday at 3:27 PM

Yeah it would have been nice to end with "and here's a five-line shell script to check if your project is likely affected". But to their credit, they do have an open-source tool [1], I'm just not willing to install a big blob of JavaScript to look for vulns in my other big blobs of JavaScript

[1] https://github.com/AikidoSec/safe-chain

show 1 reply
charcircuittoday at 8:03 PM

Isn't that what this article is about? Advertising an av rule in their product that catches this.