Banner Grabbing

Definició #

  • Recopilar informació del sistema mitjançant la informació proporcionada pels Banners dels serveis
  • Pot considerar-se un subcas de port scan

tipus #

  • Banner grabbing des de missatges d'error
  • Sniffing
    • A través dels paquets es pot trobar la infromació

nmap #

Cercar per cada port obert

nmap -sV –script=banner 192.168.1.1

Cercar la informació per un port concret

nmap -Pn -p 80 -sV –script=banner 192.168.1.1

  • exemple
$ nmap   192.168.1.36 -p 22 --script=banner

Starting Nmap 7.60 ( https://nmap.org ) at 2018-10-15 11:18 CEST
Nmap scan report for 192.168.1.36
Host is up (0.0058s latency).

PORT   STATE SERVICE
22/tcp open  ssh
|_banner: SSH-2.0-OpenSSH_7.4p1 Debian-10+deb9u4

Nmap done: 1 IP address (1 host up) scanned in 0.34 seconds
  • Eina de zmap

curl (per HTTP) #

curl -s -I 192.168.1.1 | grep -e “Server: “

Telnet #

Exemple amb ssh

telnet 192.168.1.1 22
  • exemple
telnet www.iescarlesvallbona.cat 80
Trying 149.202.75.48...
Connected to www.iescarlesvallbona.cat.
Escape character is '^]'.
GET / HTTP1.0/
HTTP/1.1 400 Bad Request
Date: Sun, 30 Dec 2018 12:04:29 GMT
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.7
Content-Length: 226
Connection: close
Content-Type: text/html; charset=iso-8859-1

netcat #

Exemple amb ssh

nc –v 192.168.1.1 22
  • exemple amb HTTP
nc -vv www.iescarlesvallbona.cat 80
Connection to www.iescarlesvallbona.cat 80 port [tcp/http] succeeded!
GET /
HTTP/1.1 400 Bad Request
Date: Sun, 30 Dec 2018 12:01:15 GMT
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.7
Content-Length: 226
Connection: close
Content-Type: text/html; charset=iso-8859-1

dimitry #

Exemple scan all ports

dmitry -b 192.168.1.10