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

MsfRPC: Authentication failed #7

Open
dowloa opened this issue Jan 1, 2023 · 2 comments
Open

MsfRPC: Authentication failed #7

dowloa opened this issue Jan 1, 2023 · 2 comments

Comments

@dowloa
Copy link

dowloa commented Jan 1, 2023

I'm having msfrpc authentication failed error. Just wondering does anyone facing the same issue?

running ./run-msrpc.py is ok.

[*] MSGRPC Service:  127.0.0.1:55553 
[*] MSGRPC Username: admin
[*] MSGRPC Password: admin
[*] Successfully loaded plugin: msgrpc

running ./run-server.sh is ok.

 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:8040
 * Running on http://172.17.0.2:8040

testing connecting with msfrpc client works fine.

> msfrpc -U admin -P admin -a 127.0.0.1 -S
[*] The 'rpc' object holds the RPC client interface
[*] Use rpc.call('group.command') to make RPC calls

>> 

just that when I run shennina.py the msfrpc connection failed.

Traceback (most recent call last):
  File "/home/kali/py3.9/lib/python3.9/site-packages/pymetasploit3/msfrpc.py", line 218, in login
    if auth['result'] == 'success':
KeyError: 'result'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/shennina/rpc_test.py", line 4, in <module>
    client = MsfRpcClient("password", host="localhost", port=55553)
  File "/home/kali/py3.9/lib/python3.9/site-packages/pymetasploit3/msfrpc.py", line 191, in __init__
    self.login(kwargs.get('username', 'msf'), password)
  File "/home/kali/py3.9/lib/python3.9/site-packages/pymetasploit3/msfrpc.py", line 224, in login
    raise MsfAuthError("MsfRPC: Authentication failed")
pymetasploit3.msfrpc.MsfAuthError: 'MsfRPC: Authentication failed'

my env is python3.9 and I have tried with pymetasploit 1.0, 1.0.1, 1.0.2 and 1.0.3 (all versions)
still the same result.
Not really sure where to go from here.

error from Shennina

[%] Starting at 19:42:19 / 01-01-2023
'MsfRPC: Authentication failed' (I've modified the script to print out the exception error.)
[!] [19:42:19] Error connecting to MSFRPC server.
@GitClo
Copy link

GitClo commented Feb 27, 2023

I cannot connect too.

Connection refused - connect(2) for [::1]:55553 (Errno::ECONNREFUSED)

@iL3sor
Copy link

iL3sor commented Jan 1, 2024

change the content of msfrpc-config.json to this:

{
  "password": "admin",
  "user": "msf",
  "host": "127.0.0.1",
  "port": 55553,
  "ssl": false
}

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

3 participants