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

netexec vs crackmapexec --key-file #253

Closed
nealgoogs opened this issue Apr 11, 2024 · 6 comments · Fixed by #254
Closed

netexec vs crackmapexec --key-file #253

nealgoogs opened this issue Apr 11, 2024 · 6 comments · Fixed by #254
Labels
bug Something isn't working
Milestone

Comments

@nealgoogs
Copy link

In crackmapexec, if I run this command, crackmapexec ssh $IP --key-file id_ecdsa -u usernames.txt -p passwords.txt --port 2222, I will get a successful login. However, if i try to run the same command use NetExec, the command will not return a successful login.

Following are the two commands that show different outputs.
crackmapexec ssh $IP --key-file id_ecdsa -u usernames.txt -p passwords.txt --port 2222
SSH 192.168.172.246 2222 192.168.172.246 [+] anita:fireball (keyfile: id_ecdsa)

As you can see from the + sign, it is a success.
However, not the same for NetExec

netexec ssh $IP --key-file id_ecdsa -u usernames.txt -p passwords.txt --port 2222
SSH 192.168.172.246 2222 192.168.172.246 [-] anita:fireball (keyfile: id_ecdsa) private key file is encrypted

I get a private key file is encrypted. Which honestly I don't know how to deal with. I have scoured the internet to fix this.

@NeffIsBack
Copy link
Contributor

Thanks for the bug report, I will take a look into it. Is the target a windows or Linux host?

@NeffIsBack NeffIsBack added the bug Something isn't working label Apr 11, 2024
@Marshall-Hallenbeck
Copy link
Collaborator

I remember the key code not working at all so I had to fix it a while back, I'll take a look as well and see what I missed to allow for decryption

@NeffIsBack
Copy link
Contributor

Atleast back at the PR from Xiaoli everything worked as intended: #25

@Marshall-Hallenbeck
Copy link
Collaborator

Atleast back at the PR from Xiaoli everything worked as intended: #25

Did we test encrypted keys?

@NeffIsBack
Copy link
Contributor

Atleast back at the PR from Xiaoli everything worked as intended: #25

Did we test encrypted keys?

If I remember correctly yes. But we'll see :D

@NeffIsBack
Copy link
Contributor

@nealgoogs can you try #254?

@mpgn mpgn added this to the v1.2.0 milestone Apr 12, 2024
@NeffIsBack NeffIsBack linked a pull request Apr 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants