Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Redis can be exploited to run executables ???


From antirez the guy who wrote redis's blog:

'The Redis security model is: “it’s totally insecure to let untrusted clients access the system, please protect it from the outside world yourself”.' -- http://antirez.com/news/96

That blog post also helpfully shows how to write you own key into .ssh/authorized_keys to you can log in as the redis user over ssh. From there use your favourite lunar priv escalation bug to p0wn the box completely. (Or just run your cryptominer as the redis user...)

Note: that's about 5 years old now...


Holy shit! thanks for the details


Yeah - kinda crazy theres no auth by default AND eval is allowed. Pretty trivial for someone to have it download a script and run it pretty much with free reign.


Redis doesn't accept unauthenticated external connections by default for a while now, specifically to try and eliminate this footgun.

https://github.com/redis/redis/commit/edd4d555df57dc84265fdf...


I had an issue where I used the redis docker image and didn't understand docker networking properly so I set the network mode as host so my other container could connect. Not knowing this had exposed redis to the world unauthenticated (in about 2018).

Eventually a kind script set a password on redis which caused me to notice and fix this issue.


Interesting, this definitely happened with a more recent version... Wonder if theres some other exploit at play too (could also be the containerized version?)



It can execute Lua, I'm sure there's plenty of fun for hackers to have with this: https://redis.io/commands/eval




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: