CEH v5 Module 11 Hacking Webservers PDF
CEH v5 Module 11 Hacking Webservers PDF
CEH v5 Module 11 Hacking Webservers PDF
Version 5
Module XI
Hacking Web Servers
Scenario
SpeedCake4u, a cake manufacturing firm wants to
set up a website for showcasing its products. Matt, a
high school graduate was assigned the task of
building the website. Even though Matt was not a
pro in website building, the $2000 pay was the main
motivation for him to take up the task.
He builds a website with all the features that the
company management asked.
The following day the cake manufacturing firms
website was defaced with the Title Your cake
stinks!
How was it possible to deface the website?
Is Matt the culprit?
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Security News
http://news.com.com/2102-7349_3-6085589.html?tag=st.util.print
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Module Objective
This module will familiarize you with the following:
~
Web Servers
Patch Management
Countermeasures
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Module Flow
Web Servers
Hacking Tools to
Exploit Vulnerabilities
Patch Management
Apache Vulnerability
Vulnerability Scanners
Countermeasures
Increasing
Web Server Security
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
EC-Council
Server
machine
running a web
server
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
4.
3.
EC-Council
6.
Misconfigurations: In operating
systems or networks
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
~ Password
brute force
Administrator account
~ DNS
~ DNS
~ FTP
server intrusion
server intrusion
~ Web
application bugs
EC-Council
SQL Injection
SSH intrusion
Telnet intrusion
URL poisoning
Apache Vulnerability
~
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
::$DATA vulnerability
showcode.asp vulnerability
Warning
These outdated vulnerability has been presented here as a proof
of concept to demonstrate how a buffer overflow attack works
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
IIS Components
~
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
GET/scripts/..%c0%af../winnt/system32/cmd.exe?/
c+dir=c:\ HTTP/1.0
Warning
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Unicode
~
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
A malformed URL could be used to access files and folders that lie
anywhere on the logical drive that contains the web folders
This would enable the malicious user to add, change or delete data, run
code already on the server, or upload new code to the server and run it
Warning
This outdated vulnerability has been presented here as a proof of
concept to demonstrate how privilege escalation attack works.
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
tool automates
the directory
traversal exploit in
IIS
~ It created the
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Warning
This outdated vulnerability has been presented here as a proof
of concept to demonstrate how a buffer overflow attack works
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Warning
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Warning
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
ASN Exploits
~
The attacker can run a program that will cause machines using a
vulnerable version of the ASN.1 Library to reboot, producing a socalled denial-of-service attack
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
IIS Logs
~
IIS logs all the visits in log files. The log file is located at:
<%systemroot%>\logfiles
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
This tool clears the log entries in the IIS log files filtered by
an IP address
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
When executables and DLL files are not preceded by a path in the
registry (e.g. explorer.exe does not have a fixed path by default)
Windows NT 4.0 / 2000 will search for the file in the following
locations in this order:
the directory from which the application loaded
the current directory of the parent process
...\system32
...\system
the windows directory
the directories specified in the PATH environment variable
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Metasploit Framework
~
http://www.metasploit.com
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Metasploit - Screenshot
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Screenshot 1
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Screenshot 2
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Core Impact
~
By safely exploiting
vulnerabilities in your network
infrastructure, the product
identifies real, tangible risks to
information assets while testing
the effectiveness of your
existing security investments
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Screenshots
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Screenshots
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Screenshots
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Solution: UpdateExpert
~
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Screenshot
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
~It
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
cacls.exe Utility
~
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Vulnerability Scanners
~
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Refer to the output of this simple scan below and you will
see that Whisker has identified several potentially
dangerous files on this IIS5Server
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Screenshots
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
SecureIIS
~
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Countermeasures
~
IISLockdown:
IISLockdown restricts anonymous access to system utilities as well as the ability to write to web
content directories
~URLScan:
UrlScan is a security tool that screens all incoming requests to the server by
filtering the requests based on rules that are set by the administrator
~MBSA
Utility:
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Use of Firewalls
Legal Notices
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Run MBSA utility on a regular interval to check for latest operating system and components
updates
2.
3.
4.
5.
IISLockdown
Services
Script Mappings
Extensions not used by the application are mapped to 404.dll (.idq,.htw, .ida, .shtml, .shtm,
.stm, idc, .htr, .printer)
6.
7.
Protocols
Disable WebDAV
Disable NetBIOS and SMB (Block ports 137, 138, 139, and 445)
ISAPI Filters
- Remove unused ISAPI filters
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Accounts
Disable guest
9.
IIS Metabase
10.
Web site root directory has deny write for IUSR COMPUTERNAME
11.
Server Certificates
12.
The certificate's public key is valid, all the way to a trusted root authority
Shares
13.
1.
2.
14.
Ports
15.
EC-Council
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
Summary
~
The inherent security risks owing to compromised web servers have impact on the
local area networks that host these websites, even on the normal users of web
browsers
Looking through the long list of vulnerabilities that had been discovered and patched
over the past few years provides an attacker ample scope to plan attacks to unpatched
servers
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited
EC-Council
Copyright by EC-Council
All Rights reserved. Reproduction is strictly prohibited