Kamis, 21 Agustus 2008

Command2 Jaringan di DOS

micr*soft DOS datang dengan beberapa tool tersembunyi yang akan saya diskusikan disini. Tool ini dapat ditemukan pada direktori c:\\windows jika anda menggunakan win98 dan jika anda menggunakan winxp maka tool ini berada pada C:\\winxp\\system32. WinXP, Win2000 dan WinNT dirilis dengan beberapa tool internet tambahan. Jadi jika anda masih menggunakan win98 maka saya menyarankan agar menggantinya dengan WinXP. Yang tentunya memiliki fitur securiti tambahan dan perintah dos internet yang bagus. Dalam manual ini saya akan membahas mengenai beberapa perintah yang ditemukan pada Win98 dan winXP

Jadi bagi pengguna window, berikut ini perintah-perintah yang tersembunyi pada DOS.

1. ping
2. tracert
3. telnet
4. ftp
5. netstat

OK, inilah keterangannya.

1. ping

Utiliy ini digunakan untuk mencari keberadaan remote host. Yan gmengirmkan sebuah signal SYN ke remote host dan jika remote host membalas maka berarti memang ada suatu remote machine.

Cobalah anda ketik perintah ini:

C:\\windows>ping/?

*************
Newbie tip: mengetik \'/?\' setelah perintah dos menampilkan helpnya. Jadi bagaimana anda belajar aneka perintah dos. Bukankah WinXP, WinNT dan Win2000 juga memiliki perintah ‘help’ untuk menampilkan seluruh perintah dos.
*************
Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
[-r count] [-s count] [[-j host-list] | [-k host-list]]
[-w timeout] destination-list

Options:
-t Ping the specified host until stopped.


To see statistics and continue - type Control-Break;
To stop - type Control-C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don\'t Fragment flag in packet.
-i TTL Time To Live.
-v TOS Type Of Service.
-r count Record route for count hops.
-s count Timestamp for count hops.
-j host-list Loose source route along host-list.
-k host-list Strict source route along host-list.
-w timeout Timeout in milliseconds to wait for each reply.

Jadi saya dapat melakukan ping ke ip address apapun atau domain name untuk memeriksa keberadaannya di internet. Sebagai contoh saya mengetik “ping localhost” maka saya mendapatkan.


Pinging chintan [127.0.0.1] with 32 bytes of data:

Reply from 127.0.0.1: bytes=32 timemput *.*
sends all files from C:\\windows to /etc
5. \'mget\' to get multiple files from remote machine.
contohnya. ftp>mget *.*
gets all files from /etc to C:\\windows
6. \'open\' to establish a connection with remote host.
contohnya. ftp>open www.target.com
7. \'bye\' closes the connection and quits from ftp

Untuk perintah lainnya dari ftp silakan lihat help mereka.

Sekarang pada yang port FTP (prot 21) adalah membuka www.nosecurity.com. Seorang hacker akan terhubung ke situs tersebut menggunakan “ftp www.nosecurity.com” pada dos prompt. Kemudian dia akan mencoba login secara anonymous. Dengan anggapan bahwa www.nosecurity.com menggunakan linux server, maka hacker tersebut akan mengtikkan perintah “get /etc/apsswd” untuk mendaptkan file password dan mengcracknya. Jika anda adalah seorang hacker, maka jangan lupa untuk menghapus log tersebut.





5. netstat

Anda dapat menentukan suatu koneksi dengan remote machine pada port tertentu, hanya saat port tersebut dibuka pada remote machine. Sebagai contoh, jika anda ingin menentukan sebuah koneksi dengan www.target.com pada port 23 (telnet) maka port tersebut seharusnya terbuka pada www.target.com. Dan seluruh aktifitas hacking umumnya menggunakan port yang terbuka. Mengetikkan “netstat /?” pada dos prompt memberikan:


Displays protocol statistics and current TCP/IP network connections.

NETSTAT [-a] [-e] [-n] [-s] [-p proto] [-r] [interval]

-a Displays all connections and listening ports.
-e Displays Ethernet statistics. This may be combined with the -s
option.
-n Displays addresses and port numbers in numerical form.
-p proto Shows connections for the protocol specified by proto; proto
may be TCP or UDP. If used with the -s option to display
per-protocol statistics, proto may be TCP, UDP, or IP.
-r Displays the routing table.
-s Displays per-protocol statistics. By default, statistics are
shown for TCP, UDP and IP; the -p option may be used to specify
a subset of the default.
interval Redisplays selected statistics, pausing interval seconds
between each display. Press CTRL+C to stop redisplaying
statistics. If omitted, netstat will print the current
configuration information once.

Opsi akan menjelaskan fungsinya masing-masing. Dan yang terpenting adalah opsi –a dan –n. Opsi –a menampilkan seluruh port yang terbuka pada mesin tersebut. Dan jika saya menggunakan opsi –n maka akan menunjukkan ip address sebagai ganti dari domain. Saya mendapatkan hal berikut ini jika saya mengetik “netstat –a” pada command prompt.


Active Connections

Proto Local Address Foreign Address State


TCP chintan:1027 0.0.0.0:0 LISTENING
TCP chintan:80 0.0.0.0:0 LISTENING
TCP chintan:135 0.0.0.0:0 LISTENING
TCP chintan:6435 0.0.0.0:0 LISTENING
TCP chintan:1025 0.0.0.0:0 LISTENING
TCP chintan:1026 0.0.0.0:0 LISTENING
TCP chintan:1028 0.0.0.0:0 LISTENING
TCP chintan:1309 0.0.0.0:0 LISTENING
TCP chintan:1310 0.0.0.0:0 LISTENING
TCP chintan:1285 rumcajs.box.sk:80 ESTABLISHED
TCP chintan:1296 l an-202-144-78-3.maa.sify.net:80 CLOSE_WAIT
TCP chintan:1297 lan-202-144-65-14.sify.net:80 ESTABLISHED
TCP chintan:1310 cdn-v13.websys.aol.com:80 ESTABLISHED
TCP chintan:1220 aiedownload.cps.intel.com:ftp ESTABLISHED

”Proto” menyatakan nama protocol tersebut, “localaddress” memberikan ipaddress kita dan port yang terbuka. “Foreign Address” menyatkaan ipaddress dengan namor port yang terhubung ke kita. “State” menyatakan pernyataan saat ini jika suatu koneksi “established” atau listening atau hanya “waiting”.

Sebagai contoh jika saya membuka
http://www.yahoo.com maka saat saya menjalankan “netstat –a” saya akan mendapatkan masukan seperti ini:

\"TCP 203.43.50.81:2034 www.yahoo.com:80 ESTABLISHED\"

Komputer saya dengan ip 203.43.50.81 melalui port 2034 terhubung dengan yahoo pada port 80

*************
Newbie tip: Dengna cara ini anda bisa mendapatkan ip seseorang yang chatting dengan ada. Pertama kali jalankan “netstat –an” dan lihat dibawah foreign ip address. Sekarang mulailah private chating dengan orang lain. Juga jalankan “netstat –an” dan anda akan mendapatkan satu lagin foreign ip pada akhirnya. Inilah ip orang tersebut.
*************






all dos commands
ADDUSERS Add or list users to/from a CSV file
ARP Address Resolution Protocol
ASSOC Change file extension associations
ASSOCIAT One step file association
AT Schedule a command to run at a later time
ATTRIB Change file attributes

BOOTCFG Edit Windows boot settings
BROWSTAT Get domain, browser and PDC info

CACLS Change file permissions
CALL Call one batch program from another
CD Change Directory - move to a specific Folder
CHANGE Change Terminal Server Session properties
CHKDSK Check Disk - check and repair disk problems
CHKNTFS Check the NTFS file system
CHOICE Accept keyboard input to a batch file
CIPHER Encrypt or Decrypt files/folders
CleanMgr Automated cleanup of Temp files, recycle bin
CLEARMEM Clear memory leaks
CLIP Copy STDIN to the Windows clipboard.
CLS Clear the screen
CLUSTER Windows Clustering
CMD Start a new CMD shell
COLOR Change colors of the CMD window
COMP Compare the contents of two files or sets of files
COMPACT Compress files or folders on an NTFS partition
COMPRESS Compress individual files on an NTFS partition
CON2PRT Connect or disconnect a Printer
CONVERT Convert a FAT drive to NTFS.
COPY Copy one or more files to another location
CSVDE Import or Export Active Directory data

DATE Display or set the date
Dcomcnfg DCOM Configuration Utility
DEFRAG Defragment hard drive
DEL Delete one or more files
DELPROF Delete NT user profiles
DELTREE Delete a folder and all subfolders


DevCon Device Manager Command Line Utility
DIR Display a list of files and folders
DIRUSE Display disk usage
DISKCOMP Compare the contents of two floppy disks
DISKCOPY Copy the contents of one floppy disk to another
DNSSTAT DNS Statistics
DOSKEY Edit command line, recall commands, and create macros
DSADD Add user (computer, group..) to active directory
DSQUERY List items in active directory
DSMOD Modify user (computer, group..) in active directory

ECHO Display message on screen
ENDLOCAL End localisation of environment changes in a batch file
ERASE Delete one or more files
EXIT Quit the CMD shell
EXPAND Uncompress files
EXTRACT Uncompress CAB files

FC Compare two files
FDISK Disk Format and partition
FIND Search for a text string in a file
FINDSTR Search for strings in files
FOR Conditionally perform a command several times
FORFILES Batch process multiple files
FORMAT Format a disk
FREEDISK Check free disk space (in bytes)
FSUTIL File and Volume utilities
FTP File Transfer Protocol
FTYPE Display or modify file types used in file extension associations

GLOBAL Display membership of global groups
GOTO Direct a batch program to jump to a labelled line

HELP Online Help
HFNETCHK Network Security Hotfix Checker

IF Conditionally perform a command
IFMEMBER Is the current user in an NT Workgroup
IPCONFIG Configure IP



KILL Remove a program from memory

LABEL Edit a disk label
LOCAL Display membership of local groups
LOGEVENT Write text to the NT event viewer.
LOGOFF Log a user off
LOGTIME Log the date and time in a file

MAPISEND Send email from the command line
MEM Display memory usage
MD Create new folders
MODE Configure a system device
MORE Display output, one screen at a time
MOUNTVOL Manage a volume mount point
MOVE Move files from one folder to another
MOVEUSER Move a user from one domain to another
MSG Send a message
MSIEXEC micr*soft Windows Installer
MSINFO Windows NT diagnostics
MSTSC Terminal Server Connection (Remote Desktop Protocol)
MUNGE Find and Replace text within file(s)
MV Copy in-use files

NET Manage network resources
NETDOM Domain Manager
NETSH Configure network protocols
NETSVC Command-line Service Controller
NBTSTAT Display networking statistics (NetBIOS over TCP/IP)
NETSTAT Display networking statistics (TCP/IP)