PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Secure Netcat For Windows & Linux

Go down

Secure Netcat For Windows & Linux Empty Secure Netcat For Windows & Linux

Post by jamied_uk 22nd June 2018, 11:35

Secure Netcat




Code:
ncat --ssl -l -p 4444 -e /bin/bash



More examples:


Code:
--ssl-cert             Specify SSL certificate file (PEM) for listening
--ssl-key              Specify SSL private key (PEM) for listening
--ssl-verify           Verify trust and domain name of certificates
--ssl-trustfile        PEM file containing trusted SSL certificates
--ssl-ciphers          Cipherlist containing SSL ciphers to use


If you needed to make SSL connections with the traditional nc client, you could either create an stunnel connection or utilize the openssl s_client command as a ncat client:

Code:
openssl s_client -host ubahmapk.github.io -port 443


geekcabi.net/article/using-ssl-connections-over-ncat



Or put



Or you can just add the --ssl to your syntax.





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Secure version of netcat (for windows) is


Code:
snetcat





http://snetcat.sourceforge.net

https://sourceforge.net/projects/snetcat/files

https://www.google.com/search?q=how+to+secure+netcat+



-s certif    Wrap the connection into SSL, using given certificate file





~~~~~~~~~~~





full Notes


snetcat is a clone of a famous netcat utility developed by the UNIX hacker we know as Hobbit, with SSL and easier port forwarding support. A tiny Matrix SSL lib, with footprint about 50K, was used to implement encryption.

Download



Sources, statically linked binaries for Linux and FreeBSD 5, precompiled Windows executable you can get from Sourceforge project page

Options overview



usage: snetcat [OPTIONS] [ ]
Code:

-u              use UDP instead of TCP

-g              bind to INADDR_ANY

-o file         hexdump passed traffic to a file

-d        Act as listening server, forking childs

-s certif    Wrap the connection into SSL, using given certificate file

-l localport    listen on localport

-e prog         redirect stdin/stdout to program




Usage examples



Fetch web page



Code:
% echo -e "GET /index.html HTTP/1.0\n\n" | snetcat www.yahoo.com 80





Fetch web page via HTTPS



   
Code:
% echo -e "GET /index.html HTTP/1.0\n\n" | snetcat -s "" www.yahoo.com 80





Run port forwarder



   
Code:
% snetcat -l local_port remote_host remote_port





Turn web server on your machine to be HTTPS web server



   
Code:
% snetcat -l 443 -s CERTIFICATE.PEM -d 127.0.0.1 80





Mail client (sh script)

    sendmail

Simple web server (sh script)

    httpd



Author



 Sergey Lyubka



 Matrix SSL
jamied_uk
jamied_uk
Admin

Posts : 2952
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum