this post was submitted on 27 May 2025
656 points (99.4% liked)
Programmer Humor
23530 readers
1741 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Tf is "return oriented"?
When you write code for a "runtime" that wasn't intended to run your code.
https://www.youtube.com/watch?v=8Dcj19KGKWM
Seems like not a real programming paradigm, and I don't mean in a No True Scotsman way. It really is in a separate category of thing. Could've said logic programming or stack-oriented programming.
Yeah fair enough now that I think more about it. IDK I just find the concept really cool so I included it.
It's fine memes are permitted to make jokes and it's more of a paradigm than vibe coding.
The one paradigm that's actually missing is logic programming, I would've gotten rid of unstructured to include it. The whole paradigm thing really only started with Dijkstra's rant about unstructured gotos (not the ones C has, in C you can't jump to the middle of another function).
you could've had declarative (e.g. ReactJS, Jetpack Compose) lol
Terraform
That definition would be too broad, as includes any type of exploit.
In ROP, you modify the stack to write return addresses and then return to jump to the first of these addresses, the return addresses go to parts of the executable that end with a return instruction (gadgets), so it will always return to the next of your return address.
(That video is maybe not the easiest introduction to ROP.)
Having ROP in here as normal programming paradigm, as opposed to vibe coding, made the meme so much better.
Do you know what a memory stack and assembly are?
If you want code that does assembly operations A, B, and then C, you might be able to accomplish it by scanning loaded memory (or its corresponding binary) for bits that, when translated into assembly, do:
A
D
return
This set of three instructions is a gadget. In practice, it's a location in memory.
And then you find another gadget.
B
C
return
Then, if you don't care about D, or D does something irrelevant that won't screw up what you're trying to do, or won't crash the program, you can replace the stack with the addresses of gadgets one and two. When gadget one returns, the stack is popped and then gadget two executes.
Since the computer did ADBC and D was irrelevant, the system executed your ABC malware and now you win.
Is finding gadgets that execute actual malware hard? Surprisingly not!