Tag: scan

Detection, Integrity, Microsoft Windows, Tools

Scan the integrity of all protected Windows 7 system files

Open an elevated command prompt. To do this, click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator. If you are prompted for an administrator password or for a confirmation, type the password, or click Allow. At the command prompt, type the following command, and then press ENTER: sfc …

Python

TCP Full Connect Scan with Python

A simple tcp full connect port scanner in Python: import optparse from socket import *   def connect(targetHost, targetPort): try: connsocket = socket(AF_INET, SOCK_STREAM) connsocket.connect((targetHost, targetPort)) connsocket.close() print ‘%d/tcp port openn’%targetPort except: print ‘%d/tcp port closedn’%targetPort   def scanner(targetHost, targetPorts): try: ip = gethostbyname(targetHost) except: print "unable to resolve ‘%s’: Unknown hostn"%targetHost return   try: …

Metasploit, NMAP

Port Scanning with Nmap and Metasploit

Port Scanning Nmap is a free and open source tool for network discovery and security auditing. Nmap is able to determine what hosts are available on the network, what operating systems and services are running on target hosts, identify the type of the firewalls that are in use, and dozens of other capabilities. It is …

Python

ARP scanning using python and scapy

Run the following scipt with administrative rights to discover all alive hosts on the network! #!/usr/bin/env python   import sys from scapy.all import *   if len(sys.argv) != 2: print "Usage: python arp-scan.py 192.168.1.0/24" sys.exit(1)   try: alive,dead=srp(Ether(dst="ff:ff:ff:ff:ff:ff")/ARP(pdst=sys.argv[1]), timeout=2, verbose=0) print "MAC – IP" for i in range(0,len(alive)): print alive[i][1].hwsrc + " – " + …

Enumeration, Linux, Network, NMAP

Host discovery

Host discovery arp-scan sudo arp-scan 192.168.1.0/24sudo arp-scan 192.168.1.0/24 To install arp-scan issue the command: sudo apt-get install arp-scansudo apt-get install arp-scan arp-scan home page http://nta-monitor.com/tools-resources/security-tools/arp-scan ping ping -c 2 192.168.1.2ping -c 2 192.168.1.2 send 2 ICMP ECHO REQUEST packets to 192.168.1.2 machine nmap sudo nmap -sn -PE –send-ip 192.168.1.0/24sudo nmap -sn -PE –send-ip 192.168.1.0/24 -sn …

Python

Scan for open ports with Python

A simple and fast port scanner written in Python. #!/usr/bin/env python from socket import *   if __name__ == ‘__main__’: target = "localhost" target_ip = gethostbyname(target) print "Scanning", target, "-", target_ip   for i in range(1, 1024): sock = socket(AF_INET, SOCK_STREAM)   result = sock.connect_ex((target_ip, i))   if(result == 0) : print ‘Port %d: OPEN’ …

Enumeration, Network, Tools

NetBIOS name enumeration

We are going to use nbtscan tool to enumeratate NetBIOS names. NBTscan is a program for scanning IP networks for NetBIOS name information. It sends NetBIOS status query to each address in supplied range and lists received information in human readable form. To install it in Ubuntu: sudo apt-get install nbtscansudo apt-get install nbtscan How …

Linux, NMAP, Tor

Anonymous port scanning through the tor network

To accomplish this task you have to install privoxy and proxychains on your system. For ubuntu users just issue the following command: sudo apt-get install privoxy proxychains proxychains is configured by default to work with the Tor network. Now that we have privoxy and proxychains installed we can issue the following command in the terminal: …