intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

bảo vệ Hacking tấn công vào trang web

Chia sẻ: Nguyen Mao | Ngày: | Loại File: PDF | Số trang:44

105
lượt xem
26
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

The server sends the HTML text for the web page to the browser...

Chủ đề:
Lưu

Nội dung Text: bảo vệ Hacking tấn công vào trang web

  1. Ethical Hacking Version 5 Module XI Hacking Web Servers
  2. Module Objective This module will familiarize you with the following: Web Servers Popular Web Servers and Common Vulnerabilities Apache Web Server Security IIS Server Security Attacks against Web Servers Tools used in Attack Patch Management Understanding Vulnerability Scanners Countermeasures Increasing Web Server Security Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited
  3. Module Flow Hacking Tools to Web Servers Exploit Vulnerabilities Patch Management Web Server Defacement Vulnerability Scanners Apache Vulnerability Countermeasures Attacks against IIS Increasing Web Server Vulnerabilities Web Server Security Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited
  4. How Web Servers Work The browser connects to the server and requests a page The server sends back the requested page Machine running web browser Server machine running a web server Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited
  5. How Web Servers Work (cont’d) The browser breaks the URL into 1. Following the HTTP protocol, 4. three parts: the browser sends a GET 1. The protocol ("http") request to the server, asking for 2. The server name ("www.website.com") the file http://webpage.html 3. The filename The server sends the HTML 5. ("webpage.html") text for the web page to the The browser communicates with a 2. name server, which translates the browser server name, www.website.com, into an IP address The browser reads the HTML 6. The browser then forms a TCP 3. tags and formats the page onto connection to the web server at the screen that IP address on port 80 Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited
  6. How are Web Servers Compromised? Misconfigurations: In operating systems or networks Bugs: OS bugs may allow commands to be run on the web Installing the server with defaults: Service packs may not be applied in the process, leaving holes behind Lack of proper security policy, procedures, and maintenance may create many loopholes for attackers to exploit Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited
  7. Web Server Defacement Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited
  8. How are Web Servers Defaced? Web shares misconfigurations Credentials through Man-in- the-middle attack Wrongly assigned permissions Password brute force Rerouting after firewall attack Administrator account Rerouting after router attack DNS attack through cache SQL Injection poisoning SSH intrusion DNS attack through social Telnet intrusion engineering URL poisoning FTP server intrusion Web Server extension Mail server intrusion intrusion Remote service intrusion Web application bugs Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited
  9. Apache Vulnerability The Apache Week tracks the vulnerabilities in Apache Server. Even Apache has its share of bugs and fixes For instance, consider the vulnerability which was found in the Win32 port of Apache 1.3.20 • Long URLs passing through the mod_negative, mod_dir and mode_autoindex modules could cause Apache to list directory contents • The concept is simple but requires a few trial runs • A URL with a large number of trailing slashes: – /cgi-bin /////////////// / // / / / / / // / / / could produce directory listing of the original directory Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited
  10. Attacks Against IIS IIS is one of the most widely used web server platforms on the Internet Microsoft's web server has been a frequent target over the years Various vulnerabilities have attacked it Examples include: • ::$DATA vulnerability • showcode.asp vulnerability • Piggy backing vulnerability • Privilege command execution • Buffer Overflow exploits (IIShack.exe) • WebDav / RPC Exploits Warning These outdated vulnerability has been presented here as a proof of concept to demonstrate how a buffer overflow attack works Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited
  11. IIS Directory Traversal (Unicode) Attack The vulnerability in unpatched Windows 2000 machine results because of a canonicalization error affecting CGI scripts and ISAPI extensions (.ASP is probably the best known ISAPI-mapped file type) Canonicalization is the process by which various equivalent forms of a name can be resolved to a single, standard name For example, "%c0%af" and "%c1%9c" are overlong representations for ?/? and ?\? Thus, by feeding the HTTP request (as shown below) to IIS, arbitrary commands can be executed on the server: GET/scripts/..%c0%af../winnt/system32/cmd.exe?/ c+dir=c:\ HTTP/1.0 Warning This outdated vulnerability has been presented here as a proof of concept to demonstrate how a buffer overflow attack works Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited
  12. Unicode ASCII characters for the dots are replaced with the Unicode equivalent (%2E) ASCII characters for the slashes are replaced with Unicode equivalent (%c0%af) Unicode 2.0 allows multiple encoding possibilities for each characters Unicode for "/": 2f, c0af, e080af, f08080af, f8808080af, ..... Overlong Unicode is NOT malformed, but not allowed by a correct Unicode encoder and decoder Maliciously used to bypass filters that check only short Unicode Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited
  13. Unicode Directory Traversal Vulnerability Occurs due to a canonicalization error in Microsoft IIS 4.0 and 5.0 A malformed URL could be used to access files and folders that lie anywhere on the logical drive that contains the web folders This allows the attacker to escalate his privileges on the machine 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 This vulnerability can be exploited by using the NETCAT as the backdoor (Trojan horse) Warning This outdated vulnerability has been presented here as a proof of concept to demonstrate how privilege escalation attack works. Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited
  14. Hacking Tool: IISxploit.exe This tool automates the directory traversal exploit in IIS It created the Unicode string for exploitation Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited
  15. Msw3prt IPP Vulnerability The ISAPI extension responsible for IPP is msw3prt.dll An oversized print request containing a valid program code can be used to perform a new function or load a different separate program and cause buffer overflow Warning This outdated vulnerability has been presented here as a proof of concept to demonstrate how a buffer overflow attack works Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited
  16. WebDAV / ntdll.dll Vulnerability WebDAV stands for "Web-based Distributed Authoring and Versioning" The IIS WebDAV component utilizes ntdll.dll when processing incoming WebDAV requests. By sending a specially crafted WebDAV request to an IIS 5.0 server, an attacker may be able to execute arbitrary code in the Local System security context, essentially giving the attacker complete control of the system This vulnerability enables attackers to cause: • Denial-of-service against Win2K machines • Execution of malicious codes Warning This outdated vulnerability has been presented here as a proof of concept to demonstrate how a Denial of Service attack works Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited
  17. RPC DCOM Vulnerability It exists in Windows Component Object Model (COM) subsystem, which is a critical service used by many Windows applications DCOM service allows COM objects to communicate with one another across a network RPC Exploit-GUI Hacking Tool and is activated by default on Windows NT, 2000, XP, and 2003 Attackers can reach for the vulnerability in COM via any of the following ports: • TCP and UDP ports 135 (Remote Procedure Call) • TCP ports 139 and 445 (NetBIOS) • TCP port 593 (RPC-over-HTTP) • Any IIS HTTP/HTTPS port if COM Internet Warning Services are enabled This outdated vulnerability has been presented here as a proof of concept to demonstrate how a buffer overflow works Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited
  18. ASN Exploits ASN, or Abstract Syntax Notation, is used for representing different types of binary data such as numbers or strings of text The ASN.1 exploit targets a Windows authentication protocol known as NT LAN Manager V2, or NTLMV2 The attacker can run a program that will cause machines using a vulnerable version of the ASN.1 Library to reboot, producing a so- called denial-of-service attack Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited
  19. ASP Trojan (cmd.asp) ASP Trojan is a small script when uploaded to a Web Server allows you complete control of the remote PC ASP Trojan can be easily attached to shrink wrap applications thereby creating a backdoor Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited
  20. IIS Logs IIS logs all the visits in log files. The log file is located at: \logfiles If proxies are not used, then IP can be logged This command lists the log files: http://victim.com/scripts/..%c0%af../..%c0%af../..%c 0%af../..%c0%af../..%c0%af../..%c0%af../..%c0%af../. .%c0%af../winnt/system32/cmd.exe?/c+dir+C:\Winnt\sys tem32\Logfiles\W3SVC1 Copyright © by EC-Council EC-Council All Rights reserved. Reproduction is strictly prohibited

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2