Description
Hi, my name is Ruby. I like converting characters into ascii values and then calculating the sum.
Solution
The problem with Ruby is the way it handles ^
and $
. These are treated as
\n
(new line).
So to exploit this service, all we need to do is to generate a string following these three steps
- 10 arbitrary characters
- Add a
0x0A
or\n
- Add some more arbitrary data
Now, just send this string and ruby will happily accept it.
Flag: IW{RUBY_R3G3X_F41L}
References
Egor Homakov - Injects in Various Ruby Websites Through Regexp.