Closed tkmru closed 1 year ago
Sounds like we might be able to add an ARCH_CMD
target. Combine that with the existing cmd/unix/generic
payload, and you'd be able to execute whatever payload you want.
Actually we already have a module for it. You can use auxiliary/scanner/redis/redis_server to just run a command.
Summary
The Redis Replication Code Execution module uses reverse tcp to run the commands, but redis allows you to execute commands and get the results without using a reverse shell.
Basic example
After executing MODE LOAD exp.so, I could execute
id
command in redis-cli, as shown in the following execution example.The same is possible with socket communication, even without using redis-cli. For example, this PoC does not use a reverse shell.
Motivation
By removing the reverse tcp payload, we can shave off one useless external communication from this module. I also think it will probably make it harder for the SOC to detect when attacking. I want to try it!