NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Glassworm Is Back: A New Wave of Invisible Unicode Attacks Hits Repositories (aikido.dev)
btown 29 minutes ago [-]
IMO while the bar is high to say "it's the responsibility of the repository operator itself to guard against a certain class of attack" - I think this qualifies. The same way GitHub provides Secret Scanning [0], it should alert upon spans of zero-width characters that are not used in a linguistically standard way (don't need an LLM for this, just n-tuples).

Sure, third-party services like the OP can provide bots that can scan. But if you create an ecosystem in which PRs can be submitted by threat actors, part of your commitment to the community should be to provide visibility into attacks that cannot be seen by the naked eye, and make that protection the norm rather than the exception.

[0] https://docs.github.com/en/get-started/learning-about-github...

andrewflnr 2 minutes ago [-]
Regardless of the thorny question of whether it's Github's responsibility, it sure would be a good thing for them to do ASAP.
gnabgib 1 hours ago [-]
minus7 39 minutes ago [-]
The `eval` alone should be enough of a red flag
kordlessagain 28 minutes ago [-]
No it’s not.
pavel_lishin 19 minutes ago [-]
When is an eval not at least a security "code smell"?
SahAssar 19 minutes ago [-]
It really is. There are very few proper use-cases for eval.
faangguyindia 9 minutes ago [-]
Back in time I was on hacking forums where lot of script kiddies used to make malicious code.

I am wondering how that they've LLM, are people using them for making new kind of malicious codes more sophisticated than before?

DropDead 2 hours ago [-]
Why didn't some make av rule to find stuff like this, they are just plain text files
nine_k 40 minutes ago [-]
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.

trollbridge 21 minutes ago [-]
In our repos, we have some basic stuff like ruff that runs, and that includes a hard error on any Unicode characters. We mostly did this after some un-fun times when byte order marks somehow ended up in a file and it made something fail.

I have considered allowing a short list that does not include emojis, joining characters, and so on - basically just currency symbols, accent marks, and everything else you'd find in CP-1521 but never got around to it.

abound 1 hours ago [-]
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

nine_k 16 minutes ago [-]
Something like this should work, assuming your encoding is Unicode (normally UTF-8), which grep would interpret:

  grep -P '[\x{200B}\x{200C}\x{200D}\x{FEFF}]' code.ts
See https://stackoverflow.com/q/78129129/223424
robutsume 44 minutes ago [-]
[dead]
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 16:46:15 GMT+0000 (Coordinated Universal Time) with Vercel.