Skip to content

Latest commit

 

History

History
69 lines (46 loc) · 2.76 KB

README.md

File metadata and controls

69 lines (46 loc) · 2.76 KB

Week 3

Key terms


DNS zone transfers

A DNS zone transfer is a type of DNS transaction. It is used by administrators as a method to replicate DNS databases across a group of DNS servers. The primary DNS server sends a DNS "zone" to secondary DNS servers. This allows for more than one DNS server able to handle requests about a particular zone. In a zone transfer, there is a master DNS server, and one or more slave DNS servers. The slave servers must ask the master server for a copy of the records for that zone.

Why is this important? Because the data contained in a particular DNS zone may contain sensitive information, such as details about infrastructure and existing subdomains. If a DNS server is misconfigured, this gives adversaries the opportunity to make a DNS zone transfer attack. The adversary "pretends" to be a slave DNS server and can request – what could be – sensitive information from the master server.

Virtual hosting

Virtual hosting is a method for hosting multiple domain names on a single server. For example, it is possible to have www.example1.com and www.example2.com running on a single machine.

There are three types of virtual hosting: IP-based virtual hosting, name-based virtual hosting, and port-based virtual hosting.

IP-based

With IP-based virtual hosting, each website on a single server has a unique IP address.

An example configuration of virtual IP-based hosts on an Apache server is outlined below.

<VirtualHost 172.20.30.40:80>
  ServerAdmin [email protected]
  DocumentRoot "/www/vhosts/example1/"
  ServerName "www.example1.com"
  ErrorLog "/www/logs/example1/
</VirtualHost>

<VirtualHost 172.20.30.50:80>
  ServerAdmin [email protected]
  DocumentRoot "/www/vhosts/example2/"
  ServerName "www.example2.com"
  ErrorLog "/www/logs/example2/"
</VirtualHost>

Name-based

With name-based virtual hosting, a single IP address may have several host names. For example, a server could be receiving requests for two domains www.mysite1.com and www.mysite2.com, both of which resolve to the same IP address.

Port-based

Port-based virtual hosting involves explicitly binding each website to a unique port number and IP address.


Hands on

  • Install PHP on a virtual machine and write a script that echoes back the parameter in a URL
  • Install MySQL on a virtual machine and create a script that retrieves information from the URL
  • Create a page that sends data to itself using a POST request

« Previous week Next week »