Skip to content
New issue

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

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

Already on GitHub? # to your account

Pwncat broken on Parrot OS #201

Closed
mgeddert opened this issue Sep 20, 2021 · 10 comments · Fixed by #202
Closed

Pwncat broken on Parrot OS #201

mgeddert opened this issue Sep 20, 2021 · 10 comments · Fixed by #202
Labels
bug Something isn't working

Comments

@mgeddert
Copy link

Bug Description

On Parrot OS any attempt to create a listener fails, regardless if the python interpreter shipped
with the distribution (3.9.2) or a fresh compiled latest version (3.9.7) is used.

pwncat fails to bind to any port with:

connection failed: generic channel failure

...then drops you into your local pwncat shell.

pwncat version

Provide the output of pwncat --version or a commit hash if working from
a development branch.

$ pwncat --version
0.4.3

Sorry I really gotta learn Markdown !

@mgeddert mgeddert added the bug Something isn't working label Sep 20, 2021
@calebstewart
Copy link
Owner

From our E-mail conversation, you mentioned that you use the following command:

pwncat -m windows -l 4444

However, this is not exactly correct. The command your looking for is:

# You need to tell pwncat you are specifying a port number
pwncat -m windows -lp 4444
# The equivalent command with long-form options is this
pwncat --platform windows --listen --port 9999

The reason it is failing is that the first positional argument is assumed to be a connection string. The port number is intended to be an argument to the --port option, but in the absence of --port, it is treated as a positional argument instead.

Looking back at the documentation, it appears there's a typo here.
image

I'll write up a fix for the documentation later this evening. Also, I'll look into making that error message a little more helpful. Thanks for reporting!

Sorry I really gotta learn Markdown !

No problem at all! Thanks for making the effort 😃

@mgeddert
Copy link
Author

mgeddert commented Sep 20, 2021 via email

@mgeddert
Copy link
Author

mgeddert commented Sep 20, 2021 via email

calebstewart added a commit that referenced this issue Sep 21, 2021
[FIX #201] Correctly handle `--listen` argument and update documentation
@mgeddert
Copy link
Author

mgeddert commented Sep 21, 2021 via email

@mgeddert
Copy link
Author

mgeddert commented Sep 21, 2021 via email

@Mitul16
Copy link
Contributor

Mitul16 commented Sep 21, 2021

@mgeddert

removed suggestion (incorrect)

windows.enumerate.domain:
usr/local/master/lib/python3.9/dist-packages/pwncat/data/PowerSploit/Recon/Get-ComputerDetail.ps1:
psmodule not found

You can Pre-download all Windows builtin plugins using pwncat --download-plugins


I guess that is in the C2 Assembly, right ? Also "sessions" gives me a
traceback....Hmm I'll keep trying.
I'll have to play and roadtest a lot with pwncat.

Could you please elaborate on this?
What kind of Error did you receive?

@mgeddert
Copy link
Author

mgeddert commented Sep 21, 2021 via email

@mgeddert
Copy link
Author

mgeddert commented Sep 21, 2021 via email

@calebstewart
Copy link
Owner

calebstewart commented Sep 21, 2021

That error isn't from the plugins. PowerSploit should be included in the installed Python module. I don't know why it wouldn't have been installed with pwncat. I can't really help diagnose without a copy of the output including the traceback, which you mentioned you'll have tomorrow.

To be clear, the plugins are .dll files which are loaded differently. PowerShell files are not "plugins," but can be side loaded directly, and those scripts specifically should be bundled with the installation of pwncat.

@mgeddert
Copy link
Author

mgeddert commented Sep 22, 2021 via email

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants