Top Banner
Names and virtual host discovery Can you spot all names?
20

Names and virtual host discovery

Jul 08, 2015

Download

Internet

jekil

How to discover new host names and virtual host during your penetration test
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Names and virtual host discovery

Names and virtual host discoveryCan you spot all names?

Page 2: Names and virtual host discovery

@jekil

Cuckoo Sandbox (cuckoosandbox.org)

Malwr (malwr.com)

Secdocs (secdocs.org)

Ghiro (getghiro.org)

Hostmap

Page 3: Names and virtual host discovery

How many entry points?

Page 4: Names and virtual host discovery

Virtual hosting

21/tcp (FTP)

80/tcp (HTTP)42.0.0.42

default (42.0.0.42)ftp.antani.comcorp.antani.com

default (42.0.0.42)www.antani.comadmin.antani.com

Page 5: Names and virtual host discovery

Check

Enumeration process

42.0.0.42

DNS Query

Vulnerability

Brute force

Public DB

Info leaks

IP list Name list

Page 6: Names and virtual host discovery

DNS names enumeration

Page 7: Names and virtual host discovery

DNS queriesPTR (reverse lookup)

NS (name server lookup)

MX (mail server lookup)

AXFR (zone transfer vuln)

SRV (service location lookup)

Many resource record types http://en.wikipedia.org/wiki/List_of_DNS_record_types

Page 8: Names and virtual host discovery

DNS names brute force

Perform many A (AAAA) queries

It takes a lot of time

It could overload DNS servers

You need a good wordlist

Not stealth

Page 9: Names and virtual host discovery

Service fingerprints

Page 10: Names and virtual host discovery

Banner grabbing

Services prone to host name leak

Host names in response banner

By default, by design

$ nc 216.18.179.54 25!220 barracuda.ord1.reflected.net ESMTP (e5fb20dbadbd8bd56b3600247242f162)

Page 11: Names and virtual host discovery

SSL/TLS

Page 12: Names and virtual host discovery

X.509 CertificateServices over SSL/TLS

Some properties could expose host names or IP

Example: Common Name (CN)

$ openssl s_client -showcerts -connnect 151.22.70.92:443!....!subject=/C=IT/ST=Venezia/L=Venezia/OU=IT/O=SAVE S.P.A./CN=my.veniceairport.it

Page 13: Names and virtual host discovery

Application layer

Page 14: Names and virtual host discovery

Tough applications

Host name leak in application/protocol

Following HTTP redirects, crawling website

Host names in application errors

Virtual host names brute forcing at application layer

Application host names could be missing in DNS

Page 15: Names and virtual host discovery

Passive enumeration

Page 16: Names and virtual host discovery

Public dataSearch engines (dorking)

GPG key databases

WHOIS

DNS history sites

Passive DNS

Shodan

Webarchive

Internet census / scans

Pick one...

Page 17: Names and virtual host discovery

Tools

Page 18: Names and virtual host discovery

ToolsBile suite

Blacksheepwall

DNSenum.pl

DNSrecon

Hostmap

Fierce2

Maltego

Metasploit

Nmap

Recon-ng

Theharvester

Txdns

A pleteora of small scripts...

Page 19: Names and virtual host discovery
Page 20: Names and virtual host discovery

@jekil - http://jekil.sexy