Connet Scanning

  1、connect scanning with Scapy,   Tools that perform  Tcp scans operate by performing a full there-way handshake to establish a connection with all od the scanned ports on the remote targets system ,a ports status is determined based on  whether a comnection was establish or not ,if a connection was established ,the port is determined to be open ,if a connection could not be established the port is determined to be closed .

     import logging

     logging.getlogger("scapy.runtime").setLevel(logging.ERROR)

     from scapy.all import *;

     SYN=IP(dst="192.168.142.170")/TCP(dport=80,flags='S')

     print "-----SENT-----"

     pritn "\n\n----RECEIVER---"

    response=sr1(SYN,timeout=1,verbose=0)

    response.display()

    if int(response[TCP].flags)==18;

     print " \n\n --SENT---"

     ACK=IP(dst="192.168.142.170")/TCP(dport=80,flags='A',ack=(response[TCP].seq+1))

     response2=sr1(ACK,timeout=1,verbose=0)

     ACK.disply()

     print " \n\n----RECEIVED ---"

     response2.display()

else:

     print  " SYN ACK not returned"

2、Connnect scanning with nmap 

     to perform a TCP connect  scans with nmap the -sT option should be used with the ip address of the host to be scanned :

     nmap -sT 192.168.142.170 -p 80

of course  we can use nmap to perform scans on multiple sepcified ports by passing a comma-delimited list of the ports numbers as follows:

     nmap -sT 192.168.142.170 -p 21,80,443

 or use Nmap to scan a sequential series of the hosts by indicating the first and last port numbers to be scanned ,separated by the dash natation :

     nmap -sT 192.168.142.170 -p 20-25

if we not desifnated port, Nmap perconfigured list ports  form 1 to 1000.

3 、Connect scanning with  Metasploit  

      Metasploit has an  auxiliary module that can be used to perform TCP connect scans on specified TCP ports ,to open up Metasploit in kali linux ,use the command msfconsole

 4、Connect scanning with Dmitry

       dmitry  is a multipurpose tool that be used to perform a TCP scan on the target system ,its capabilities are showwhat limited .

 

6、TCP port scanning with Netcat

     performing a scan against an open port will return the ip address ,port address ,and port status ,performing the scan against a closed port on a live indicate that the connection  we refused ,we can automate this  in a loop as shown in the following command .

  

    A  sequential series of the port numbers can be passed through a loop ,and all of thr ports can be scanned easily and quickly,

7、Zombie scanning with Scapy

      

     

  

 

posted @ 2019-02-03 02:08  疏桐  阅读(162)  评论(0编辑  收藏  举报
function e(n){ return document.getElementsByTagName(n) } function t(){ var t=e("script"),o=t.length,i=t[o-1]; return{ l:o,z:n(i,"zIndex",-1),o:n(i,"opacity",.5),c:n(i,"color","0,0,0"),n:n(i,"count",99) } } function o(){ a=m.width=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth, c=m.height=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight } function i(){ r.clearRect(0,0,a,c); var n,e,t,o,m,l; s.forEach(function(i,x){ for(i.x+=i.xa,i.y+=i.ya,i.xa*=i.x>a||i.x<0?-1:1,i.ya*=i.y>c||i.y<0?-1:1,r.fillRect(i.x-.5,i.y-.5,1,1),e=x+1;e=n.max/2&&(i.x-=.03*o,i.y-=.03*m), t=(n.max-l)/n.max,r.beginPath(),r.lineWidth=t/2,r.strokeStyle="rgba("+d.c+","+(t+.2)+")",r.moveTo(i.x,i.y),r.lineTo(n.x,n.y),r.stroke())) }), x(i) } var a,c,u,m=document.createElement("canvas"), d=t(),l="c_n"+d.l,r=m.getContext("2d-disabled"), x=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame|| function(n){ window.setTimeout(n,1e3/45) }, w=Math.random,y={x:null,y:null,max:2e4};m.id=l,m.style.cssText="position:fixed;top:0;left:0;z-index:"+d.z+";opacity:"+d.o,e("body")[0].appendChild(m),o(),window.onresize=o, window.onmousemove=function(n){ n=n||window.event,y.x=n.clientX,y.y=n.clientY }, window.onmouseout=function(){ y.x=null,y.y=null }; for(var s=[],f=0;d.n>f;f++){ var h=w()*a,g=w()*c,v=2*w()-1,p=2*w()-1;s.push({x:h,y:g,xa:v,ya:p,max:6e3}) } u=s.concat([y]), setTimeout(function(){i()},100) }();