-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
res0nat0r/nmap
#1Labels
Description
Describe the bug
When accessing a SOCK5 proxy that requires a password authentication ; one has to provide the password on the command line. What is typically consider as a bad practice [1] since it exposes the password in the system process list.
To Reproduce
ncat --proxy 192.168.1.1:1080 --proxy-type socks5 --proxy-auth user:pass 10.1.2.3 8080
run ps aux and recognize the password is displayed in clear text.
Expected behavior
Support the follow syntax:
export NCAT_PROXY_AUTH="user:pass"
ncat --proxy 192.168.1.1:1080 --proxy-type socks5 10.1.2.3 8080
Additional context
[1] https://www.netmeister.org/blog/passing-passwords.html
Alternative solutions
- Manipulate argv to hide the password (see https://unix.stackexchange.com/questions/385339/how-does-curl-protect-a-password-from-appearing-in-ps-output/385349#385349 and example in
curlhttps://github.com/curl/curl/blob/45a560390c4356bcb81d933bbbb229c8ea2acb63/src/tool_paramhlp.c#L139 or another example here https://github.com/FreeRDP/FreeRDP/blob/c11939e32579cb77534933b4e63132586555a893/client/common/cmdline.c#L3371) - Use a configuration file to specify parameters
Reactions are currently unavailable