Luca Puzzoni

aka k0d14k.

Neonify (web)

by k0d14k

Neonify its a web page written in Ruby that prints a glowing text provided by the user input.

The application logic is pretty simple:

In the POST method is looking for a neon parameter and if it respects a regex it will be printed in the template and the CSS will neonify the output.

A way to easily escape the control at row 14 it’s by providing a \n.

In this way the validator will be broken at the \n and then we can inject our payload.

Now we have our injection point and then we are going the get the flag

payload : <%= IO.popen('ls ').readlines() %>

payload : <%= File.open('flag.txt').read %>


Flag: HTB{r3pl4c3m3n7_s3cur1ty}