Swiss-army knife for TCP/IP [nc]

netcat alias Swiss-army knife for TCP/IP adalah sebuah utiliti tool yang digunakan untuk berbagai hal yang berkaitan dengan protokol TCP atau UDP. Yang dapat membuka koneksi TCP, mengirimkan paket­paket UDP, listen pada port ­port TCP dan UDP, melakukan scanning port, dan sesuai dengan IPV4 dan IPV6.

Perintah dasar Netchat
Code:
-4              Use IPv4
-6              Use IPv6
-D              Enable the debug socket option
-d              Detach from stdin
-h              This help text
-I length       TCP receive buffer length
-i secs         Delay interval for lines sent, ports scanned
-k              Keep inbound sockets open for multiple connect
-l              Listen mode, for inbound connects
-n              Suppress name/port resolutions
-O length       TCP send buffer length
-P proxyuser    Username for proxy authentication
-p port         Specify local port for remote connects
-r              Randomize remote ports
-s addr         Local source address
-T toskeyword   Set IP Type of Service
-C              Send CRLF as line-ending
-t              Answer TELNET negotiation
-U              Use UNIX domain socket
-u              UDP mode
-V rtable       Specify alternate routing table
-v              Verbose
-w secs         Timeout for connects and final net reads
-X proto        Proxy protocol: "4", "5" (SOCKS) or "connect"
-x addr[:port]  Specify proxy address and port
-z              Zero-I/O mode [used for scanning]
Port numbers can be individual or ranges: lo-hi [inclusive]

TRANSFERT FILE
Code:
~client# nc -lp 1234 > file.tar.gz
** l = listen
** p = port

Code:
~server# nc -w 1 ip.client.com 1234 < file.tar.gz
** w = timeout

CLONING HARDDISK
Code:
~client# ==> nc -l -p 1234 | dd of=/dev/sda
~server# ==> dd if=/dev/sda | nc ip.client.com 1234
**ini belum pernah saya coba

PORT SCANNER
Code:
~server# nc -v -w 1 localhost -z 1-1000
~server# nc -v -n -z -w 1 192.168.1.2 1-1000

CHATTING CLIENT - SERVER
Code:
~client# ==> nc -lp 1234
~server# ==> nc ip.client.com 1234

SPOOFING HTTP Headers

Method GET
Code:
~client# nc server.com 80
GET /index.php?x=exp HTTP/1.1
Host: example.com
Referrer: example.com
User-Agent: my-browser

Method POST
Code:
~client# nc localhost 80
POST /index.php HTTP/1.1
Host: localhost
Referrer: localhost
User-Agent: Firefox
Cookie: PHPSESSID=c1d9f9192c1650ab7b3c71c14268aa44
Content-Type: application/x-www-form-urlencoded
Content-Length: 75
Connection: close

username=admin&password=admin&submit=Login
Penulisan harus benar, spasi setelah titik dua ( : ) dan penggunaan huruf besar setia awal nama reguest dan banyak CRLF/Enter.
[Image: nc.png]

** Untuk HTTP Headers jika perintah sukses maka respone header akan tampil "HTTP/1.1 200 OK" seperti ini:
Code:
HTTP/1.1 200 OK
Date: Fri, 07 Sep 2012 09:58:06 GMT
Server: Apache/2.2.21 (Win32) DAV/2 mod_ssl/2.2
perl/2.0.4 Perl/v5.10.1
X-Powered-By: PHP/5.3.8
Content-Length: 1961
Connection: close
Content-Type: text/html

NC Terbaru dan yang lama, terbaru dikompil bulan ramadhan kmren dgn cygwin. yg lama gk butuh file cygwin.
NC for Win
Pengguna linux udah ada bawaan linux.

Extrak file tersebut copikan ke 
Code:
%systemroot%\systen32
atau
C:\Windows\System32
menjalankannya menggunakan dos di windows dan terminal di linux.

part2



source : http://devilzc0de.org/forum/thread-16758.html
Reply Post
 
© Copyrigt 2012 | Design by YingZuckerberg | Powered by Blogger.com.