peass-ng / PEASS-ng

PEASS - Privilege Escalation Awesome Scripts SUITE (with colors)
https://book.hacktricks.xyz
Other
15.73k stars 3.05k forks source link

[QUESTION] - netcat used in PEASS #330

Closed D3vil0p3r closed 1 year ago

D3vil0p3r commented 1 year ago

Hey @carlospolop I have a simple question related to the usage of netcat in PEASS project. In Linux environment there are two main netcat packages:

The main differences between them can be easily read here: https://www.quora.com/What-is-the-difference-between-the-openBSD-netcat-and-the-GNU-netcat (in the verbosity section should be an error because GNU version does not show the "listening IP" string, it works only with OpenBSD version).

So, since I'm using only openbsd-netcat, PEASS (or better LinPEAS) can use openbsd-netcat well or it works only with gnu-netcat?

Thank you in advance

carlospolop commented 1 year ago

Hey @D3vil0p3r,

Being honest, you could have tried that or checked the code instead of opening an issue.

Anyway, here you have the code related to the use of netcat:

https://github.com/carlospolop/PEASS-ng/blob/e29c9e88d5dc5c33682fd2aeb36f3cae60d3fa21/linPEAS/builder/linpeas_parts/linpeas_base.sh#L595-L609

https://github.com/carlospolop/PEASS-ng/blob/a4b226c16e19e82c73b9a248713fd2b25396d50c/linPEAS/builder/linpeas_parts/linpeas_base.sh#L808-L816

I can see one nc being called nc.openbsd so I suppose it's supported (I haven't touch that part in a long time). But check it and reopen the issue if it doesn't please!

D3vil0p3r commented 1 year ago

Thanks man!