netcat – powerfull tool

netcat is very useful tool. I will try to describe few examples, how use it.

Chat
We can send message to remote host. On first host run nc listen for incoming connections:
nc -v -l -p 3456
where:
- v verbose
- l listen
- p port

On second host:
nc first_host -p 3456
If you write something on first you send text on second and vice-versa.

File sending
We can send text, so why don’t send files?
Run nc on first host for listen.
nc -v -l -p 3456 > file
Send file:
nc first_host -p 3456 < file
Another example – sending via tar pipe
on listening host:
nc -l -p 3456 | tar x
on sending host:
tar cf - * | nc remote_host -p 3456
on listening host we can watch process of the sending file with little program pv
nc -l -p 3456 |pv | tar x
Of course is is not end of ex. We can use stunnel for encryption these connection, dd for reading partition and sending directly on remote_machine…

Like telnet
We can use netcat as telnet – for checking services and sending text.
echo "GET / HTTP/1.0
[enter]
[enter]
"| nc http://www.host.com 80

Like netmap – port scanning
You can scanning port or few ports:
nc -v -i<seconds> -z remote_host <port>-<port>
where:
-i interval in seconds

and more…

Advertisements

md5 – nie zawsze niepowtarzalne sumy

Przy okazji 5-tej edycji Secure Days, szukając rozwiązania na postawione zadanie wygooglałem całkiem ciekawy opis i dowód jak 2 różne pliki mogą posiadać taką samą sumę kontrolną md5. Szczegóły tutaj.

Jeśli ktoś chce się pobawić w crackowanie md5 polecam filmik z tutorialem

Online md5 cracking sites:

Changes

Hi, I was changed design and hosting server on faster and I hope more available. Please comment posts, articles. I hope counter doesn’t count robot entries only 🙂