r/programming • • 5d ago

Ruby2Shell

https://verialabs.com/ruby2shell/
184 Upvotes

44 comments sorted by

83

u/Pierma 5d ago

I just had a painful 16 production machines update day becuase ß uppercased is SS??????????

29

u/simon_o 5d ago

Even the more modern uppercasing to ẞ would not have helped in this case, though. :-(

(Not that it would have been possible on these legacy character encodings.)

14

u/vytah 5d ago edited 5d ago

There are tons of characters that uppercase to more characters, ß is just the most common one.

EDIT: That being said, ß seems to be the only one present and affected in the affected encodings.

27

u/RippedRaven8055 5d ago

Ah scheiße! Here we go again

325

u/razialx 5d ago

And you get a 2shell! And you get a 2shell!!! Everybody gets a 2shell!!!!!!

108

u/KaMaFour 5d ago

Java got a 4shell

36

u/razialx 5d ago

Waiting for Fortran2Shell to drop

13

u/fripletister 5d ago

QBASIC2Shell

8

u/razialx 5d ago

My first language!

0

u/0x53r3n17y 5d ago

Mabolge2Shell

2

u/dlanod 5d ago

Staring at the 1000+ Fortran files in our codebase and shuddering...

1

u/razialx 5d ago

You gotta pump up those numbers!

9

u/blake_ch 5d ago

And what about the 3shells?

4

u/oORocketOo 4d ago

No one knows how to use them

2

u/pixel_gaming579 2d ago

She sells 3shells by the sea shore

1

u/lylesback2 4d ago

3 is too predictable as a number. So 4 was used. No one would ever guess the number 4.

1

u/CafeSleepy 3d ago

She sells 3shells…

2

u/__konrad 5d ago

It should be Shell4J

1

u/Bemteb 3d ago

When 5shell?

-13

u/Imaginary-Roll-5665 5d ago

I am a recent grad, tbh i do not know to code and have only vibecoded bs. I actually never saw projects to end and just initial vibe codes. Now that i graduated i realised how fucked i am.

I am unable to decide what to learn n now. Do i learn manual coding so that i can build stuff without ai and then use ai to accelerate. Or do i just learn to prompt better somehow. But how do i prompt better if i do not know what direction do i take the project apart from the vague output i have in mind. How do i get engineering part

54

u/RustOnTheEdge 5d ago

I really struggle how you can do remote code execution by writing a single, predetermined byte out of bounds. Can anyone explain that to me? I just don’t see how this is realistically exploitable?

24

u/He_Who_Browses_RDT 5d ago

I remember reading the "smashing the stack for fun and profit" in the 90's. I can still recommend it in 2026.

You'll get a better understanding of it.

6

u/RustOnTheEdge 5d ago

Thanks for the tip!

19

u/freddylmao 5d ago

You can control the length of the buffer. This means that this is a primitive for writing one byte at a time, from finish to start. It is likely difficult to set up a shell using this, unless you are keenly aware of the memory layout on the server. My guess is that you'd have to rely on some coincidence between the letters 'S' and 's' and some architecture's bytecode.

48

u/gwillen 5d ago

It's possible the exploitability is overstated. People are prone to that. It may be exploitable only under hypothetical or unrealistic conditions. You might be surprised, though.

46

u/GoldenShackles 5d ago

Unfortunately this is where AI excels. These types of issues used to be flagged as lower priority issues because on careful examination from expert devs, they couldn't see a way it could be exploited.

11

u/coriandor 5d ago

It's not one byte. It's one byte per ß. The writeup says the buffer is allocated as len + 20, so you need 21 ßs to overflow 1 byte. Make that "ß*100<payload>", and you've pushed your payload 80 bytes past the buffer.

2

u/fakehalo 5d ago

Its confusing, because looking at the code snippet itself it appears like the while(to<to_len) check iterating through each character would still only allow this the be a single byte overflowing the very last iteration.. since the *to++ is happening/incrementing 2 times each loop to keep the check (except for the very last one)

22

u/Skellicious 5d ago

Yeah I'm sceptical too. It's probably possible in some way or another, but it's also "CVE pending" so there's no score however flawed those scores may be.

But better give it a 2shell name for some attention before the risk factor is even evaluated.

5

u/red75prime 5d ago

We'll be publishing a proof of concept demonstrating remote code execution on stock Rails on 25 November 2026, or later if major vendors have not shipped a fix by then.

What are you skeptical about, specifically?

4

u/drdavidawheeler 4d ago

Hi, I work for the Open Source Security Foundation (OpenSSF) on security. It's *possible* it isn't really exploitable. However, that is *not* where I would place my bet. This kind of vulnerability (ability to write a single byte out of bounds at will) has turned into practical exploits before, so attackers already have patterns to learn from, and the best AI models are now *really* good at chaining together "minor defects" into a full remote code execution (RCE). I think the "right thing" to do now is to make it *easy* to update your software (including your dependencies) and make sure it passes a good test suite. If you get an update that says "please update for this vulnerability, I've already verified your thorough test suite passes", it's easy to accept. If you have to do a lot of manual analysis, you've already lost before you begin. There are going to be a LOT more vulnerabilities found in software. Now is the time to get ready for the updates.

20

u/arcrad 5d ago

DeezNuts2Shell

7

u/sblinn 5d ago edited 5d ago

Destination: hell

Ruby ruby ruby ruby 2 shell

17

u/ScottContini 5d ago

WARNING: Do not enter https://ruby2shell.com in your browser. Just don’t do it.

7

u/jigarthanda-paal 5d ago

You f*ck

5

u/FickleQuail8944 5d ago

What happened?

4

u/ScottContini 5d ago

I could tell you, but you wouldn't like it.

2

u/maifee 4d ago

Waiting for shell2shell now

3

u/ungemutlich 4d ago

https://sshhole.com/ instead of secure shell 2 shell, but there you go

4

u/zombiecalypse 5d ago

2shells1cup

1

u/this_knee 5d ago

Oh come on!

1

u/Darmo_ 3d ago

ßhell lol someone doesn't know what ß is

1

u/T-J_H 2d ago

Guys, you do not need to market vulnerabilities. Stop with the cringe names already