إجمالي مرات مشاهدة الصفحة

تعديل

السبت، 1 فبراير 2014

شرح اداه nmap


السلام عليكم و رحمة الله و بركاته
اليوم درسنا سوف يكون حول اداة ال nmap حيث سوف نقوم بشرح و ظيفتها مع اهم اوامرها

هذه الاداة وظيفتها فحص السرفرات من مختلف النواحي حيث انها تفحص البورتات المفتوحة و نظام التشغيل و البرامج المركبة على السرفر الخ ... 
طيب بعد ما عرفنا وضيفتها كيف يمكننا الاشتغال عليها
الاداة بسيطة جدا و ليستم معقدة تحتوي على واجهتين
الاولى واجهة رسومية كبقية البرامج العادية
و الثانية الواجهة الكتابية و التي يتم تشغيلها عن طريق الدوس
هذه الاداة صدرت بنسختين نسخة تعمل على الونداوز و اخرى تعمل على اللينيكس
انا شخصيا افضل التي على اللينيكس فهي اكثر فاعلية من الونداوز و نتائجها احسن و اصح من الونداوز
يفضل تشغيلها من الواجهة الكتابية دائما و لذالك للتعود على حفظ الاوامر و لتعدد الخيارات في الواجهة الكتابية اكثر المهم عليكم بالواجهة الكتابية لاداعي للكلام الكثير
بعد ما فهمنا هذه الاداة ننتقل الان الى كيفية العمل عليها
طريقة تشغليها سهلة جدا 


لتحميل الاداة من هنا من الموقع الرسمي 

كود PHP:
  http://nmap.org/download.html  
في الونداوز

start-run-cmd ثم نظغط موافق 

ثم نكتب 
كود PHP:
  nmap  
ثم موافق 

و اما في اللينيكس نفتح الكونصول او الترمنال و نكتب

كود PHP:
nmap  
سوف تخرج لينا مجموعة من الاوامر مع شرحها
كل ما سترونه هو اوامر الاداة


كود PHP:
Nmap 4.76 http://nmap.org ) Usagenmap ***91;Scan Type(s)***93; ***91;Options***93; {target specificationTARGET SPECIFICATION:
  
Can pass hostnamesIP addressesnetworksetc.
  
Exscanme.nmap.orgmicrosoft.com/24192.168.0.110.0.0-255.1-254
  
-iL <inputfilename>: Input from list of hosts/networks
  
-iR <num hosts>: Choose random targets
  
--exclude <host1***91;,host2***93;***91;,host3***93;,...>: Exclude hosts/networks
  
--excludefile <exclude_file>: Exclude list from file
HOST DISCOVERY
:
  -
sL: List Scan simply list targets to scan
  
-sPPing Scan go no further than determining if host is online
  
-PNTreat all hosts as online -- skip host discovery
  
-PS/PA/PU ***91;portlist***93;: TCP SYN/ACK or UDP discovery to given ports
  
-PE/PP/PMICMP echo, timestamp, and netmask request discovery probes
  
-PO ***91;protocol list***93;: IP Protocol Ping
  
-n/-RNever do DNS resolution/Always resolve ***91;default: sometimes***93;
  --
dns-servers <serv1***91;,serv2***93;,...>: Specify custom DNS servers
  
--system-dns: Use OS's DNS resolver
SCAN TECHNIQUES:
  -sS/sT/sA/sW/sM: TCP SYN/Connect()/ACK/Window/Maimon scans
  -sU: UDP Scan
  -sN/sF/sX: TCP Null, FIN, and Xmas scans
  --scanflags <flags>: Customize TCP scan flags
  -sI <zombie host***91;:probeport***93;>: Idle scan
  -sO: IP protocol scan
  -b <FTP relay host>: FTP bounce scan
  --traceroute: Trace hop path to each host
  --reason: Display the reason a port is in a particular state
PORT SPECIFICATION AND SCAN ORDER:
  -p <port ranges>: Only scan specified ports
    Ex: -p22; -p1-65535; -p U:53,111,137,T:21-25,80,139,8080
  -F: Fast mode - Scan fewer ports than the default scan
  -r: Scan ports consecutively - don'
t randomize
  
--top-ports <number>: Scan <numbermost common ports
  
--port-ratio <ratio>: Scan ports more common than <ratioSERVICE/VERSION DETECTION:
  -
sVProbe open ports to determine service/version info
  
--version-intensity <level>: Set from 0 (lightto 9 (try all probes)
  --
version-lightLimit to most likely probes (intensity 2)
  --
version-all: Try every single probe (intensity 9)
  --
version-traceShow detailed version scan activity (for debuggingSCRIPT SCAN:
  -
sCequivalent to --script=default
  --
script=<Lua scripts>: <Lua scriptsis a comma separated list of
           directories
script-files or script-categories
  
--script-args=<n1=v1,***91;n2=v2,...***93;>: provide arguments to scripts
  
--script-traceShow all data sent and received
  
--script-updatedbUpdate the script databaseOS DETECTION:
  -
OEnable OS detection
  
--osscan-limitLimit OS detection to promising targets
  
--osscan-guessGuess OS more aggressively
TIMING 
AND PERFORMANCE:
  
Options which take <timeare in millisecondsunless you append 's'
  
(seconds), 'm' (minutes), or 'h' (hoursto the value (e.g30m).
  -
T***91;0-5***93;: Set timing template (higher is faster)
  --
min-hostgroup/max-hostgroup <size>: Parallel host scan group sizes
  
--min-parallelism/max-parallelism <time>: Probe parallelization
  
--min-rtt-timeout/max-rtt-timeout/initial-rtt-timeout <time>: Specifies
      probe round trip time
.
  --
max-retries <tries>: Caps number of port scan probe retransmissions.
  --
host-timeout <time>: Give up on target after this long
  
--scan-delay/--max-scan-delay <time>: Adjust delay between probes
  
--min-rate <number>: Send packets no slower than <numberper second
  
--max-rate <number>: Send packets no faster than <numberper second
FIREWALL
/IDS EVASION AND SPOOFING:
  -
f; --mtu <val>: fragment packets (optionally w/given MTU)
  -
<decoy1,decoy2***91;,ME***93;,...>: Cloak a scan with decoys
  
-<IP_Address>: Spoof source address
  
-<iface>: Use specified interface
  -
g/--source-port <portnum>: Use given port number
  
--data-length <num>: Append random data to sent packets
  
--ip-options <options>: Send packets with specified ip options
  
--ttl <val>: Set IP time-to-live field
  
--spoof-mac <mac address/prefix/vendor name>: Spoof your MAC address
  
--badsumSend packets with a bogus TCP/UDP checksum
OUTPUT
:
  -
oN/-oX/-oS/-oG <file>: Output scan in normalXMLs|<rIpt kIddi3,
     and 
Grepable formatrespectivelyto the given filename.
  -
oA <basename>: Output in the three major formats at once
  
-vIncrease verbosity level (use twice or more for greater effect)
  -
d***91;level***93;: Set or increase debugging level (Up to 9 is meaningful)
  --
openOnly show open (or possibly openports
  
--packet-traceShow all packets sent and received
  
--iflist: Print host interfaces and routes (for debugging)
  --
log-errorsLog errors/warnings to the normal-format output file
  
--append-outputAppend to rather than clobber specified output files
  
--resume <filename>: Resume an aborted scan
  
--stylesheet <path/URL>: XSL stylesheet to transform XML output to HTML
  
--webxmlReference stylesheet from Nmap.Org for more portable XML
  
--no-stylesheetPrevent associating of XSL stylesheet w/XML output
MISC
:
  -
6Enable IPv6 scanning
  
-AEnables OS detection and Version detectionScript scanning and Tra

  
--datadir <dirname>: Specify custom Nmap data file location
  
--send-eth/--send-ipSend using raw ethernet frames or IP packets
  
--privilegedAssume that the user is fully privileged
  
--unprivilegedAssume the user lacks raw socket privileges
  
-V: Print version number
  
-h: Print this help summary pageEXAMPLES:
  
nmap --A scanme.nmap.org
  nmap 
--sP 192.168.0.0/16 10.0.0.0/8
  nmap 
--iR 10000 -PN -p 80
SEE THE MAN PAGE 
FOR MANY MORE OPTIONSDESCRIPTIONS, AND EXAMPLES  

هذه اغلب الاوامر و لكنها ليست كلها يمكنكم البحث في جوجل او في الموقع الرسمي للادة هنا 

كود PHP:
  http://nmap.org/  
ناتي الان لشرح كيفية تطبيق الاوامر في هذه الاداة
مثلا لفحص البورتات المفتوحة في سرفر ما
نكتب في الدوس


كود PHP:
   nmap -sS  (ip adress)  
مثلا 

كود PHP:
  nmap -sS 192.168.1.254  
و بعد الفحص انظرو النتيجة 

كود PHP:
Starting Nmap 4.76 http://nmap.org ) at 2009-07-12 14:21 Paris, Madrid (heure 
Interesting ports on speedtouch.lan (192.168.1.254): Not shown995 filtered ports
PORT     STATE  SERVICE
21
/tcp   open   ftp
23
/tcp   open   telnet
80
/tcp   open   http
443
/tcp  closed https
1723
/tcp open   pptp
MAC Address
00:90:D0:31:20:D2 (Thomson Telecom Belgium)Nmap done1 IP address (1 host upscanned in 5.51 seconds  
هذا مجرد مثال بسيط يمكنكم البحث و ايجاد العديد من الاوامر
احيانا قد تفحصون ايبيها و لا تجدون شيئا هذا شيء منطقي فبعض السرفرات اكون عاملة حماية من هذه الاداة و لكن هناك الكثير من المواقع لفحصها
المهم اظن الان ان الشرح واضح و لا يحتاج الى مزيد من التفصيل
و اهمية هذه الاداة خاصة في فحص البرامج المركبة على السرفر ليتمكن المخترق من معرفتها و محاولة ايجاد ثغرات لها 


و هكذا نكون قد انهينا الدرس
كامل الدرس من اعدادي الشخصي
و السلام عليكم

0 التعليقات:

إرسال تعليق

Twitter Delicious Facebook Digg Stumbleupon Favorites More