1. Trang chủ
  2. » Luận Văn - Báo Cáo

Báo cáo module 14 CEH V12 _ Hacking Web Applications

269 0 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

Hacking Web Applications là quá trình khai thác các lỗ hổng bảo mật trong các ứng dụng web để truy cập trái phép hoặc gây thiệt hại. Đây là một khía cạnh quan trọng trong lĩnh vực an ninh mạng, tập trung vào việc bảo vệ dữ liệu và hệ thống khỏi các cuộc tấn công. Các hình thức tấn công phổ biến: SQL Injection: Kẻ tấn công chèn mã SQL độc hại vào các trường nhập liệu để truy xuất hoặc thay đổi cơ sở dữ liệu. Cross-Site Scripting (XSS): Chèn mã JavaScript độc hại vào trang web để tấn công người dùng khác. Cross-Site Request Forgery (CSRF): Ép người dùng thực hiện các hành động mà họ không mong muốn. File Inclusion: Lợi dụng các lỗi trong quá trình tải file để thực thi mã độc. Brute Force: Tấn công mật khẩu bằng cách thử nhiều tổ hợp khác nhau.

Trang 1

BÁO CÁO THỰC HÀNHĐỀ TÀI

BẢN DỊCH SONG NGỮ

TÊN ĐỀ TÀI : Hacking Web Applications

Trang 2

Module 14

Module 14- Hacking Web Applications

Hacking Web Applications

Hacking web applications refers to gaining unauthorized access to a websiteor its associated data

Hacking ứng dụng web đề cập đến việc truy cập trái phép vào một website hoặc dữ liệu liên quan của nó.

Lab Scenario

Hướng dẫn bài thực hành

A web application is a software application running on a web browser that allows a web user to submit data to and retrieve it from a database over theInternet or within an intranet Web applications have helped to make web pages dynamic as they allow users to communicate with servers using server-side scripts They allow users to perform specific tasks such as searching, sending emails, connecting with friends, online shopping, and tracking and tracing

Ứng dụng web là một ứng dụng phần mềm chạy trên trình duyệt web cho phép người dùng web gửi và lấy dữ liệu từ một cơ sở dữ liệu qua Internet hoặc trong một intranet Ứng dụng web đã giúp làm cho trang web trở nên động bởi chúng cho phép người dùng giao tiếp với máy chủ thông qua các script phía máy chủ Chúng cho phép người dùng thực hiện các nhiệm vụ cụ thể như tìm kiếm, gửi email, kết nối với bạn bè, mua sắm trực tuyến, và theo dõi và truy vết.

Trang 3

Entities develop various web applications to offer their services to users via the Internet Whenever users need access to such services, they can request them by submitting the uniform resource identifier (URI) or uniform resource locator (URL) of the web application in a browser Common web applications include webmail, online retail sales, online auctions, wikis, and many others With the wide adoption of web applications as a cost-effective channel for communication and information exchange, they have also become a major attack vector for gaining access to organizations' information systems Web

applications are an integral component of online business Everyone connected via the Internet uses an endless variety of web applications for different purposes, including online shopping, email, chats, and social networking Increasingly, web applications are becoming vulnerable tomore sophisticated threats and attack vectors

Các thực thể phát triển các ứng dụng web đa dạng để cung cấp dịch vụ của họ cho người dùng qua Internet Khi người dùng cần truy cập vào các dịch vụ như vậy, họ có thể yêu cầu chúng bằng cách nhập chỉ số nhận dạng tài nguyên đồng nhất (URI) hoặc vị trí tài nguyên đồng nhất (URL) của ứng dụng web vào trình duyệt Các ứng dụng web thông dụng bao gồm webmail, bán lẻ trực tuyến, đấu giá trực tuyến, wikis và nhiều ứng dụng khác Với việc áp dụng rộng rãi các ứngdụng web như một kênh tiết kiệm chi phí cho giao tiếp và trao đổi thông tin, chúng cũng trở thành một vector tấn công chính để truy cập vào hệ thống thông tin của các tổ chức Ứng dụng web là một thành phần không thể thiếu của kinh doanh trực tuyến Mọi người kết nối qua Internet sử dụng một loạt các ứng dụngweb vô tận cho các mục đích khác nhau, bao gồm mua sắm trực tuyến, email, trò chuyện và mạng xã hội Ngày càng có nhiều ứng dụng web trở nên dễ bị tấn công trước các mối đe dọa và vector tấn công tinh vi hơn.

Web application hacking is the exploitation of applications via HTTPby manipulating the application logics via an application's graphical webinterface, tampering with the uniform resource identifier (URI) or HTTP elements not contained in the URI Methods for hacking web applications, including SQL injection attacks, cross-site scripting (XSS), cross-site request forgeries (CSRF), and insecure communications

Hacking ứng dụng web là sự khai thác ứng dụng qua HTTP bằng cách thao tác logic ứng dụng qua giao diện web đồ họa của ứng dụng, thay đổi URI hoặc các yếu tố HTTP không có trong URI Các phương pháp hack ứng dụng web, bao

Trang 4

gồm tấn công tiêm SQL, kịch bản chéo trang web (XSS), yêu cầu giả mạo chéo trang web (CSRF), và giao tiếp không an toàn.

The last module involved acting as an attacker and assessing the security of a web server platform Now, it is time to move to the next, and most important, stage of a security assessment An expert ethical hacker or penetration tester (hereafter, pen tester) must test web applications for various attacks such as brute-force, XSS, parameter tampering, and CSRF, and then secure the web applications from such attacks

Phần cuối cùng liên quan đến việc hành động như một kẻ tấn công và đánh giá an ninh của một nền tảng máy chủ web Bây giờ, đã đến lúc chuyển sang giai đoạn tiếp theo, và quan trọng nhất, của việc đánh giá an ninh Một hacker chuyên nghiệp hoặc người kiểm tra thâm nhập (sau đây, người kiểm tra pen) phải kiểm tra các ứng dụng web đối với các cuộc tấn công như brute-force, XSS, thao tác tham số, và CSRF, và sau đó bảo vệ các ứng dụng web khỏi các cuộc tấn công như vậy.

The labs in this module provide hands-on experience with various web application attacks to help audit web application security in the target organization

Các phòng thực hành trong mô-đun này cung cấp kinh nghiệm thực tế với các cuộc tấn công ứng dụng web khác nhau để giúp kiểm toán an ninh ứng dụng web trong tổ chức mục tiêu.

Lab Objective

Mục Tiêu Của Bài Thực Hành

The objective of the lab is to perform web application hacking and other tasks that include, but are not limited to:

Mục tiêu của phòng thực hành là thực hiện hack ứng dụng web và các nhiệm vụ khác bao gồm nhưng không giới hạn:

Trang 5

* Footprinting a web application using various information-gathering tools

Dò tìm thông tin của ứng dụng web sử dụng các công cụ thu thập thông tin đa dạng

* Performing web spidering, detect load balancers, and identify web server directories

Thực hiện spider web, phát hiện bộ cân bằng tải, và xác định các thư mục máy chủ web

* Performing web application vulnerability scanning

Thực hiện quét lỗ hổng ứng dụng web

* Performing brute-force and cross-site request forgery (CSRF) attack

Thực hiện tấn công brute-force và giả mạo yêu cầu chéo trang web (CSRF)

* Exploiting parameter tampering and cross-site scripting (XSS) vulnerabilities

Khai thác lỗ hổng thao tác tham số và kịch bản chéo trang web (XSS)

* Exploiting WordPress plugin vulnerabilities

Khai thác lỗ trên WordPress plugin

* Exploiting remote command execution vulnerability

Khai thác lỗ hổng thực thi từ xa

* Exploiting file upload vulnerability

Khai thác lỗ hổng cho tệp tải lên

* Gaining backdoor access via a web shell

Đạt được quyền truy cập hậu cần qua web shell

* Detecting web application vulnerabilities using various web application security tools

Phát hiện lỗ hổng ứng dụng web sử dụng các công cụ bảo mật ứng dụng web khác nhau

Lab Environment

Trang 6

Môi trường thực hành

To carry out this lab, you need: Để thực hiện bài lab này, bạn cần

Windows 11virtual machine

Máy ảo Windows 11

Windows Server 2022 virtual machine

Máy ảo Windows Server 2022

Windows Server 2019 virtual machine

Máy ảo Windows Server 2019

Parrot Security virtual machine

Máy ảo sử dụng hệ điều hành ParrotSec

Ubuntu virtual machine

Máy ảo chạy hệ điều hành Ubuntu

Web browsers with an Internet connection

Trình duyệt web có kết nối Internet

Administrator privileges to run the tools

Quyền quản trị thiết bị để sử dụng các phần mềm

Lab Duration

Time: 215 Minutes

Overview of Web Applications Tổng quan về ứng dụng web

Trang 7

Web applications provide an interface between end-users and web servers through a set of web pages generated at the server end or that contain script code to be executed dynamically in a client's Web browser

Ứng dụng web cung cấp một giao diện giữa người dùng cuối và máy chủ web thông qua một tập hợp các trang web được sinh ra ở phía máy chủ hoặc chứa mãscript để được thực thi một cách động trong trình duyệt Web của khách hàng.

Web applications run on web browsers and use a group of server-side scripts (such as ASP and PHP) and client-side scripts (such as HTML and JavaScript) to execute the application The working of a web application depends on its architecture, which includes the hardware and software that performs tasks such as reading the request, searching, gathering, and displayingthe required data

Ứng dụng web chạy trên trình duyệt web và sử dụng một nhóm các script phía máy chủ (như ASP và PHP) và các script phía khách hàng (như HTML và JavaScript) để thực thi ứng dụng Việc hoạt động của một ứng dụng web phụ thuộc vào kiến trúc của nó, bao gồm phần cứng và phần mềm thực hiện các nhiệm vụ như đọc yêu cầu, tìm kiếm, thu thập và hiển thị dữ liệu cần thiết.

Nội dung Lab

Ethical hackers or pen testers use numerous tools and techniques to perform webapplication attacks on the target web application Recommended labs that will assist you in learning

Các hacker hay kiểm thử viên thâm nhập sử dụng nhiều công cụ và kỹ thuật khác nhau để thực hiện các cuộc tấn công vào ứng dụng web mục tiêu Bài Lab này sẽ học về:

1 Footprint the Web Infrastructure

1 Tạo Footprint cho cơ sở hạ tầng Web

1.1 Perform Web Application Reconnaissance

Trang 8

using Nmap and Telnet

Thực hiện kiểm thử ứng dụng Web sử dụng Nmap và Telnet 1.2 Perform Web Application Reconnaissance using WhatWeb

Thực hiện kiểm thử ứng dụng Web sử dụng WhatWeb 1.3 Perform Web Spidering using OWASP ZAP Thực hiện Spider Web sử dụng OWASP ZAP

1.4 Detect Load Balancers using Various Tools Phát hiện bộ cân bằng tải sử dụng các công cụ khác nhau

1.5 Identify Web Server Directories using Various Tools Xác định thư mục máy chủ web sử dụng các công cụ khác nhau

1.6 Perform Web Application Vulnerability Scanning using Vega Thực hiện quét lỗ hổng của ứng dụng Web sử dụng Vega

1.7 Identify Clickjacking Vulnerability usingClickjackPoc Xác định lỗ hổng Clickjacking sử dụng ClickjackPoc

2 Perform Web Application Attacks

Thực hiện các cuộc tấn công Web

2.1 Perform a Brute-force Attack using Burp Suite Thực hiện các cuộc tấn công Brute-force sử dụng Burp Suite 2.2 Perform Parameter Tampering using Burp Suite Thực hiện thao tác tham số sử dụng Burp Suite

2.3 Identify XSS Vulnerabilities in Web Applications using PwnXSS Xác định lỗ hổng XSS trong ứng dụng web sử dụng PwnXSS

2.4 Exploit Parameter Tampering and XSS Vulnerabilities in Web Applications

Khai Thác Lỗ Hổng Thao Tác Tham Số và XSS trong Ứng Dụng Web 2.5 Perform Cross-Site Request Forgery (CSRF) Attack Thực hiện Tấn Công CSRF

Trang 9

2.6 Enumerate and Hack a Web Application using WPScan and Metasploit

Liệt Kê và Hack Ứng Dụng Web sử dụng WPScan và Metasploit 2.7 Exploit a Remote Command Execution Vulnerability to Compromise a Target Web Server

Khai Thác Lỗ Hổng Thực Thi Lệnh Từ Xa để Thâm Nhập Máy Chủ Web Mục Tiêu

2.8 Exploit a File Upload Vulnerability at Different Security Levels

Khai Thác Lỗ Hổng Tải Tệp Lên ở Các Mức Độ Bảo Mật Khác Nhau 2.9 Gain Access by exploiting Log4j Vulnerability

Đạt Quyền Truy Cập bằng cách khai thác Lỗ Hổng Log4j

3 Detect Web Application Vulnerabilities using Various Web Application Security Tools

Phát Hiện Lỗ Hổng Ứng Dụng Web sử dụng Các Công Cụ Bảo Mật Ứng Dụng Web Khác Nhau

3.1 Detect Web Application Vulnerabilities using N-Stalker Web Application Security Scanner

Phát Hiện Lỗ Hổng Ứng Dụng Web sử dụng

Remark: Chú ý

EC-Council has prepared a considered amount of lab exercises for student to practice during the 5-day class and at their free time to enhance their knowledge and skill

EC-Council đã chuẩn bị một lượng lớn bài thực hành để sinh viên có thể luyện tập trong suốt khóa học 5 ngày và vào thời gian rảnh để nâng cao kiến thức và kỹ năng của họ.

*Core - Lab exercise(s) marked under Core are recommended by EC-Council to be practised during the 5-day class

Trang 10

*Core - Bài thực hành đánh dấu dưới Core được EC-Council khuyến nghị thực hành trong khóa học 5 ngày.

**Self-study - Lab exercise(s) marked under self-study is for students to practise at their free time Steps to access the

additional lab exercises can be found in the first page of CEHvl2 volume 1book.**Tự học - Bài thực hành đánh dấu dưới tự học là để sinh viên thực hành vào thời gian rảnh của họ Các bước để truy cập thêm bài thực hành có thể tìm thấy trên trang đầu tiên của sách CEHv12 volume 1.

***CyberQ - Lab exercise(s) marked under CyberQ are available in our CyberQ solution CyberQ is a cloud-based virtual lab environment

preconfigured with vulnerabilities, exploits, tools and scripts, and can be accessed from anywhere with an Internet connection If you are interested to learn more about our CyberQ solution, please contact your training center or visit https://www.cyberq.io/

***CyberQ - Bài thực hành đánh dấu dưới CyberQ có sẵn trong giải pháp CyberQ của chúng tôi CyberQ là một môi trường thực hành ảo dựa trên đám mây được cấu hình trước với lỗ hổng, công cụ tấn công, công cụ và kịch bản, vàcó thể truy cập từ bất cứ đâu với kết nối Internet Nếu bạn quan tâm muốn tìm hiểu thêm về giải pháp CyberQ của chúng tôi, vui lòng liên hệ với trung tâm đàotạo của bạn hoặc truy cập https://www.cyberq.io/.

Lab Analysis Phân tích bài Lab

Analyze and document the results related to this lab exercise Give an opinion on your targets security posture

Phân tích và ghi chép kết quả liên quan đến bài thực hành này Đưa ra ý kiến về tình trạng an ninh của mục tiêu.

Trang 11

PLEASE TALK TO YOUR INSTRUCTOR IF YOU HAVE QUESTIONS RELATED TO THIS LAB

VUI LÒNG ĐẶT CÂU HỎI VỚI GIÁO VIÊN CỦA BẠN NẾU BẠN CÓ CÂUHỎI LIÊN QUAN ĐẾN PHÒNG THỰC HÀNH NÀY.

LAB 1

Footprint the Web Infrastructure Phác Thảo Cơ Sở Hạ Tầng Web

Web infrastructure footprinting is the process of gathering complete

information about the target web application, its related components, and how they work

Footprinting cơ sở hạ tầng web là quá trình thu thập thông tin đầy đủ về ứng dụng web mục tiêu, các thành phần liên quan, và cách chúng hoạt động.

Lab Scenario

Nội dung phòng thực hành

The first step in web application hacking for an ethical hacker or pen tester is to gather the maximum available information about the target

organization website by performing web application footprinting using

various techniques and tools In this step, you will use techniques such as web spidering and vulnerability scanning to gather complete information about the target web application

Bước đầu tiên trong việc hack ứng dụng web đối với một hacker hay một người thử nghiệm thâm nhập (pen tester) là thu thập thông tin tối đa có thể về trang web của tổ chức mục tiêu bằng cách thực hiện footprinting ứng dụng web sử dụng nhiều kỹ thuật và công cụ khác nhau Trong bước này, bạn sẽ sử dụng các kỹ thuật như web spidering và quét lỗ hổng để thu thập thông tin đầy đủ về ứng dụng web mục tiêu.

Trang 12

Web infrastructure footprinting helps you to identify vulnerable web

applications, understand how they connect with peers and the technologies they use, and find vulnerabilities in specific parts of the web app architecture These vulnerabilities can further help you to exploit and gain unauthorized access to web applications

Footprinting cơ sở hạ tầng web giúp bạn xác định các ứng dụng web có khả năng bị tấn công, hiểu cách chúng kết nối với các đối tác và công nghệ mà chúng sử dụng, và tìm ra lỗ hổng trong các bộ phận cụ thể của kiến trúc ứng dụng web Những lỗ hổng này có thể giúp bạn khai thác và đạt được quyền truy cập trái phép vào các ứng dụng web.

The labs in this exercise demonstrate how easily hackers can gather information about your web application and describe the vulnerabilities that exist in web applications

Các bài thực hành trong bài tập này minh họa cách mà hacker có thể dễ dàng thuthập thông tin về ứng dụng web của bạn và mô tả các lỗ hổng tồn tại trong ứng dụng web.

Lab Objectives Mục tiêu thực hành

Perform web application reconnaissance using Nmap and Telnet

Thực hiện công tác trinh sát ứng dụng web sử dụng Nmap và Telnet

Perform web application reconnaissance using WhatWeb

Thực hiện công tác trinh sát ứng dụng web sử dụng WhatWeb

Perform web spidering using OWASP ZAP

Thực hiện web spidering sử dụng OWASP ZAP

Detect load balancers using various tools

Phát hiện load balancers sử dụng các công cụ khác nhau

Identify web server directories using various tools

Xác định các thư mục máy chủ web sử dụng các công cụ khác nhau

Trang 13

Perform web application vulnerability scanning using Vega

Thực hiện quét lỗ hổng ứng dụng web sử dụng Vega

Identify clickjacking vulnerability using ClickjackPoc

Xác định lỗ hổng clickjacking sử dụng ClickjackPoc

Lab Environment

Môi trường thực hành bài Lab

To carry out this lab, you need: Để thực hiện bài lab này bạn cần: * Windows 11virtual machine Máy ảo Windows 11

* Windows Server 2022 virtual machine Máy ảo Windows Server 2022

* Windows Server 2019 virtual machine Máy ảo Windows Server 2019

* Parrot Security virtual machine Máy ảo sử dụng hệ điều hành ParrotSec * Ubuntu virtual machine

Máy ảo chạy hệ điều hành Ubuntu

* Web browsers with an Internet connection Trình duyệt web có kết nối Internet

* Administrator privileges to run the tools Quyền quản trị thiết bị để sử dụng các phần mềm

Lab Duration Độ dài bài Lab

Trang 14

Time: 65 Minutes Thời gian: 65 phút

Overview of Footprinting the Web Infrastructure Tổng Quan về Việc Footprinting Cơ Sở Hạ Tầng Web

Footprinting the web infrastructure allows attackers to engage in the following tasks:

Footprinting cơ sở hạ tầng web cho phép kẻ tấn công thực hiện các nhiệm vụ sau:

Server Discovery: Attackers attempt to discover the physical servers that host a web application using techniques such as Whois Lookup, DNS Interrogation, and Port Scanning

Phát Hiện Máy Chủ: Kẻ tấn công cố gắng khám phá các máy chủ vật lý chứa ứng dụng web bằng cách sử dụng các kỹ thuật như Whois Lookup, DNS Interrogation, và Port Scanning.

Service Discovery: Attackers discover services running on web servers to determine whether they can use some of them as attack paths for hacking a web app

Phát Hiện Dịch Vụ: Kẻ tấn công tìm hiểu các dịch vụ đang hoạt động trên máy chủ web để xác định xem có thể sử dụng một số dịch vụ như các con đường tấn công vào ứng dụng web hay không.

Server Identification: Attackers use banner-grabbing to obtain server banners; this helps to identify the make and version of the web server software Nhận Dạng Máy Chủ: Kẻ tấn công sử dụng banner-grabbing để thu thập các banner của máy chủ; điều này giúp xác định loại và phiên bản của phần mềm máy chủ web.

Trang 15

Hidden Content Discovery: Footprinting also allows attackers to extract content and functionality that is not directly linked to or reachable from the main visible content

Phát Hiện Nội Dung Ẩn: Footprinting cũng cho phép kẻ tấn công trích xuất nội dung và chức năng không trực tiếp liên kết hoặc không thể truy cập từ nội dung chính hiển thị.

Lab Tasks

Nội dung bài thực hành

Task 1: Perform Web Application Reconnaissance using Nmap and Telnet

Nhiệm Vụ 1: Thực Hiện Footprinting Ứng Dụng Web Sử Dụng Nmap và Telnet

In web application reconnaissance, you must perform various tasks such as server discovery, service discovery, server identification or banner grabbing, and hidden content discovery A professional ethical hacker or pen tester must gather as much information as possible about the target website by performing web application footprinting using various techniques and tools Trong quá trình Footprinting ứng dụng web, bạn phải thực hiện nhiều nhiệm vụ như phát hiện máy chủ, phát hiện dịch vụ, nhận dạng máy chủ hoặc banner grabbing, và phát hiện nội dung ẩn Một hacker chuyên nghiệp hoặc người thử nghiệm thâm nhập phải thu thập càng nhiều thông tin càng tốt về trang web mụctiêu bằng cách thực hiện Footprinting ứng dụng web sử dụng các kỹ thuật và công cụ khác nhau.

In this task, we will perform web application reconnaissance to gather information about server IP address, DNS names, location and type of server, open ports and services, make, model, version of the web server software, and server-side technology

Trang 16

Trong nhiệm vụ này, chúng ta sẽ thực hiện việc kiểm thử ứng dụng web để thu thập thông tin về địa chỉ IP máy chủ, tên DNS, vị trí và loại máy chủ, cổng mở và dịch vụ, hãng sản xuất, mô hình, phiên bản của phần mềm máy chủ web, và công nghệ phía máy chủ.

Note: In this task, the target website (www.moviescope.com) is hosted by the victim machine (Windows Server 2019) Here, the host machine is the Parrot Security machine

Lưu ý: Trong nhiệm vụ này, trang web mục tiêu (www.moviescope.com) được lưu trữ bởi máy chủ nạn nhân (Windows Server 2019) Ở đây, máy chủ chính là máy Parrot Security.

1 Turn on the Windows Server 2019 and Parrot Security virtual machines.Khởi động máy ảo Windows Server 2019 và Parrot Security

2 Switch to the Parrot Security virtual machine In the login page, the attacker username will be selected by default Enter password as toor in the Password field and press Enter to log in to the machine

Chuyển sang máy ảo Parrot Security Trên trang đăng nhập, tên người dùng kẻ tấn công sẽ được chọn mặc định Nhập mật khẩu là toor vào trường Mật khẩu vànhấn Enter để đăng nhập vào máy.

3 Perform a Whois lookup to gather information about the IP address of the web server and the complete information about the domain such as its registration details, name servers, IP address, and location

Thực hiện tra cứu Whois để thu thập thông tin về địa chỉ IP của máy chủ web vàthông tin đầy đủ về tên miền như chi tiết đăng ký, máy chủ tên miền, địa chỉ IP và vị trí.

4 Use tools such as Netcraft (https://www.netcraft.com), Smartwhois (https://www.tamos.com), WHOIS Lookup (https://whois.domaintools.com), and Batch IP Converter (http://www.sabsoft.com) to perform the Whois lookup Sử dụng các công cụ như Netcraft (https://www.netcraft.com), Smartwhois (https://www.tamos.com), WHOIS Lookup (https://whois.domaintools.com), và Batch IP Converter (http://www.sabsoft.com) để thực hiện tra cứu Whois.

5 Perform DNS Interrogation to gather information about the DNS servers,DNS records, and types of servers used by the target organization DNS zone

Trang 17

data include DNS domain names, computer names, IP addresses, domain mail servers, service records, etc

Thực hiện Điều tra DNS để thu thập thông tin về máy chủ DNS, bản ghi DNS và loại máy chủ được tổ chức mục tiêu sử dụng Dữ liệu vùng DNS bao gồm tênmiền DNS, tên máy tính, địa chỉ IP, máy chủ thư của miền, bản ghi dịch vụ, v.v 6 Use tools such as, DNSRecon (https://github.com), and DNS Records (https://network- tools.com), Domain Dossier (https://centralops.net) to perform DNS interrogation

Sử dụng các công cụ như DNSRecon (https://github.com), và DNS Records (https://network-tools.com), Domain Dossier (https://centralops.net) để thực hiện điều tra DNS.

7 Now, we will perform port scanning to gather information about the open ports and services running on the machine hosting the target website Bây giờ, chúng ta sẽ thực hiện quét cổng để thu thập thông tin về các cổng mở và dịch vụ đang chạy trên máy chủ lưu trữ trang web mục tiêu.

8 Click the MATE Terminal icon at the top of the Desktop window to open a Terminal window.

Nhấp vào biểu tượng MATE Terminal ở đầu cửa sổ Desktop để mở cửa sổ Terminal.

9 A Parrot Terminal window appears In the terminal window, type sudo su and press Enter to run the programs as a root user

Cửa sổ Terminal Parrot xuất hiện Trong cửa sổ terminal, gõ sudo su và nhấn Enter để chạy các chương trình như một người dùng root.

Note: If a Question pop-up window appears, asking for you to update the machine, click No to close the window

Lưu ý: Nếu cửa sổ pop-up Câu hỏi xuất hiện, yêu cầu bạn cập nhật máy, nhấp Không để đóng cửa sổ.

10 In the [sudo] password for attacker field, type toor as a password and press Enter

Trong trường [sudo] mật khẩu cho tấn công, nhập toor làm mật khẩu và nhấn Enter.

Note: The password that you type will not be visible

Trang 18

Lưu ý: Mật khẩu bạn nhập sẽ không hiển thị.

11 Now, type cd and press Enter to jump to the root directory Bây giờ, nhập cd và nhấn Enter để nhảy vào thư mục gốc.

12 In the Parrot Terminal window, type nmap -T4 -A -v [Target Web Application] (here, the target web application is www.moviescope.com) and press Enter to perform a port and service discovery scan.

Trong cửa sổ Terminal Parrot, gõ nmap -T4 -A -v [Ứng Dụng Web Mục Tiêu] (ở đây, ứng dụng web mục tiêu là www.moviescope.com) và nhấn Enter để thựchiện quét khám phá cổng và dịch vụ

Note: In this command, -T4: specifies setting time template 5), -A: specifies aggressive scan, and -v: enables the verbose output (include all hosts and ports in the output)

(0-Lưu ý: Trong lệnh này, -T4: chỉ định thiết lập mẫu thời gian (0-5), -A: chỉ định quét hung hăng, và -v: kích hoạt đầu ra chi tiết (bao gồm tất cả máy chủ và cổngtrong kết quả).

13 The result appears, displaying the open ports and services runningon the machine hosting the target website

Kết quả xuất hiện, hiển thị các cổng mở và dịch vụ đang chạy trên máy chủ lưu trữ trang web mục tiêu.

Trang 21

15 Now, perform banner grabbing to identify the make, model, and version of the target

Cuộn xuống để xem kết quả đầy đủ Bạn có thể quan sát được tên máy chủ mục tiêu,

16 In the terminal window, type telnet www.moviescope.com 80 and press Enter to establish a telnet connection with the target machine Trong cửa sổ terminal, gõ telnet www.moviescope.com 80 và nhấn Enter để thiết lập kết nối telnet với máy chủ mục tiêu.

Note: Port 80 is the port number assigned to the commonly used Internet communication protocol, Hypertext Transfer Protocol (HTTP) Lưu ý: Port 80 là cổng được gán cho giao thức truyền thông Internet thường được sử dụng, Hypertext Transfer Protocol (HTTP).

17 The Trying 10.10.1.19 message appears; type GET / HTTP/1.0 and press Enter two times

Tin nhắn "Trying 10.10.1.19 " xuất hiện; gõ GET / HTTP/1.0 và nhấn Enter hai lần.

Trang 22

18 The result appears, displaying information related to the server name and its version, technology used

Tin nhắn "Trying 10.10.1.19 " xuất hiện; gõ GET / HTTP/1.0 và nhấn Enter hai lần.

19 Here, the server is identified as Microsoft-1IS/10.0 and the technology used is ASP.NET

Ở đây, máy chủ được xác định là Microsoft-IIS/10.0 và công nghệ sử dụng là ASP.NET.

Note: In real-time, an attacker can specify either the IP address of a target machine or the URL of a website In both cases, the attacker obtains the banner information of the respective target In other words, if the attacker entered an IP address, they receive the banner information of the target machine; if they enter the URL of a website, they receive the banner information of the respective web server that hosts the website

Lưu ý: Trong thực tế, một kẻ tấn công có thể chỉ định hoặc là địa chỉ IP của máychủ mục tiêu hoặc URL của một trang web Trong cả hai trường hợp, kẻ tấn công đều có thể thu được thông tin banner của đối tượng mục tiêu Nói cách khác, nếu kẻ tấn công nhập vào một địa chỉ IP, họ sẽ nhận được thông tin bannercủa máy chủ mục tiêu; nếu họ nhập vào URL của một trang web, họ sẽ nhận được thông tin banner của máy chủ web chứa trang web đó.

Trang 23

20 This concludes the demonstration of how to perform web application reconnaissance (Whois lookup, DNS interrogation, port and services discovery, banner grabbing, and firewall detection)

Điều này kết thúc minh họa cách thực hiện trinh sát ứng dụng web (Whois lookup, điều tra DNS, phát hiện cổng và dịch vụ, banner grabbing, và phát hiện tường lửa).

21 Close all open windows and document all acquired information Đóng tất cả các cửa sổ và ghi chép lại tất cả thông tin đã thu thập.

Task 2: Perform Web Application Reconnaissance using WhatWeb Task 2: Thực Hiện Trinh Sát Ứng Dụng Web Sử Dụng WhatWeb

WhatWeb identifies websites and recognizes web technologies, including content management systems (CMS), blogging platforms, statistics and

analytics packages, JavaScript libraries, web servers, and embedded devices It also identifies version numbers, email addresses, account IDs, web

framework modules, SQL errors, and more

WhatWeb nhận diện các trang web và nhận dạng các công nghệ web, bao gồm hệ thống quản lý nội dung (CMS), nền tảng blogging, các gói thống kê và phân tích, thư viện JavaScript, máy chủ web, và các thiết bị nhúng Nó cũng nhận

Trang 24

dạng số phiên bản, địa chỉ email, ID tài khoản, mô-đun framework web, lỗi SQL, và nhiều hơn nữa.

Here, we will perform web application reconnaissance using the WhatWeb tool Ở đây, chúng ta sẽ thực hiện trinh sát ứng dụng web sử dụng công cụ WhatWeb.

Note: In this task, the target website (www.moviescope.com) is hosted by the victim machine

(Windows Server 2019) Here, the host machine is the Parrot Security machine Lưu ý: Trong nhiệm vụ này, trang web mục tiêu (www.moviescope.com) được lưu trữ bởi máy chủ nạn nhân (Windows Server 2019) Ở đây, máy chủ chính là máy Parrot Security.

Note: Ensure that the Windows Server 2019 virtual machine is running Lưu ý: Đảm bảo rằng máy ảo Windows Server 2019 đang chạy.

1 Click the MATE Terminal icon at the top of the Desktop window to open a Terminal window

Nhấp vào biểu tượng MATE Terminal ở đầu cửa sổ Desktop để mở cửa sổ Terminal.

2 A Parrot Terminal window appears In the terminal window, type sudosu and press Enter to run the programs as a root user

Một cửa sổ Parrot Terminal xuất hiện Trong cửa sổ terminal, gõ sudo su và nhấn Enter để chạy các chương trình như người dùng root.

3 In the [sudo] password for attacker field, type toor as a password and press Enter

Trong trường [sudo] password for attacker, gõ toor làm mật khẩu và nhấn Enter Note: The password that you type will not be visible

Lưu ý: Mật khẩu bạn nhập sẽ không hiển thị.

4 Now, type cd and press Enter to jump to the root directory Bây giờ, gõ cd và nhấn Enter để chuyển đến thư mục gốc.

Trang 25

5 In the Terminal window, type whatweb and press Enter It displays a list of the commands available with WhatWeb

Trong cửa sổ Terminal, gõ whatweb và nhấn Enter Nó sẽ hiển thị một danh sách các lệnh có sẵn với WhatWeb.

6 Now, type whatweb [Target Web Application] (here, the target web application is www.moviescope.com) and press Enter to perform website footprinting on the target website

Bây giờ, gõ whatweb [Ứng Dụng Web Mục Tiêu] (ở đây, ứng dụng web mục tiêu là www.moviescope.com) và nhấn Enter để thực hiện việc footprinting trang web mục tiêu.

7 The result appears, displaying the MovieScope website infrastructure, as shown in the screenshot

Kết quả hiển thị cấu trúc hạ tầng của trang web MovieScope, như được hiển thị trong ảnh chụp màn hình.

Trang 26

8 In the terminal, type whatweb -v [Target Web Application] (here, the target web application is www.moviescope.com) and press Enter to run a verbosity scan on the target website

Trong terminal, gõ whatweb -v [Ứng Dụng Web Mục Tiêu] (ở đây, ứng dụng web mục tiêu là www.moviescope.com) và nhấn Enter để thực hiện quét chi tiết trên trang web mục tiêu.

9 The result appears, displaying a detailed report on the target website such as its IP address, plugin information, and HTTP header

information, as shown in the screenshot

Kết quả hiển thị một báo cáo chi tiết về trang web mục tiêu như địa chỉ IP, thông tin plugin, và thông tin HTTP header, như được hiển thị trong ảnh chụp màn hình.

Trang 28

10 Now, type whatweb log-verbose=MovieScope_Report www.moviescope.com and press Enter to export the results returned by

WhatWeb as a text file

Bây giờ, gõ whatweb log-verbose=MovieScope_Report

www.moviescope.com và nhấn Enter để xuất kết quả trả về bởi WhatWeb thànhmột tệp văn bản.

Note: This will generate a report with the name MovieScope_Report and save this file in the root folder

Lưu ý: Điều này sẽ tạo một báo cáo với tên MovieScope_Report và lưu tệp này trong thư mục gốc.

11 Type, pluma MovieScope_Report and press Enter to open the file Gõ pluma MovieScope_Report và nhấn Enter để mở tệp.

12 The MovieScope_Report text file appears, as shown in the screenshot Tệp văn bản MovieScope_Report xuất hiện, như được hiển thị trong ảnh chụp màn hình.

Note: In real-time, attackers use this information to determine the website infrastructure and find underlying

vulnerabilities, and later exploit them to launch further attacks

Lưu ý: Trong thực tế, kẻ tấn công sử dụng thông tin này để xác định cấu trúc hạ tầng của trang web và tìm các lỗ hổng cơ bản, sau đó khai thác chúng để phát động thêm các cuộc tấn công.

Trang 29

13 This concludes the demonstration of how to perform websitereconnaissance on a target website using the WhatWeb tool

Điều này kết thúc minh họa cách thực hiện trinh sát trang web trên một trang web mục tiêu sử dụng công cụ WhatWeb.

14 Close all open windows and document all acquired information Đóng tất cả các cửa sổ và ghi chép lại tất cả thông tin đã thu thập.

Task 3: Perform Web Spidering using OWASP ZAP Task 3:

OWASP Zed Attack Proxy (ZAP) is an integrated penetration testing tool for finding vulnerabilities in web applications It offers

automated scanners as well as a set of tools that allow you to find security vulnerabilities manually ZAP provides functionality for a range of skill levels—from developers to testers new to security testing, to security testing

specialists

Trang 30

OWASP Zed Attack Proxy (ZAP) là một công cụ kiểm thử thâm nhập tích hợp để tìm lỗ hổng trong các ứng dụng web Nó cung cấp các máy quét tự động cũngnhư một bộ công cụ cho phép bạn tìm kiếm các lỗ hổng bảo mật một cách thủ công ZAP cung cấp các chức năng cho một phạm vi các cấp độ kỹ năng—từ các nhà phát triển đến những người mới thử nghiệm bảo mật, cho đến các chuyên gia thử nghiệm bảo mật.

Here, we will perform web spidering on the target website using OWASP ZAP Ở đây, chúng ta sẽ thực hiện web spidering trên trang web mục tiêu sử dụng OWASP ZAP.

Note: In this task, the target website (www.moviescope.com) is hosted by the victim machine (Windows Server 2019) Here, the host machine is the Parrot Security machine

Lưu ý: Trong nhiệm vụ này, trang web mục tiêu (www.moviescope.com) được lưu trữ bởi máy chủ nạn nhân (Windows Server 2019) Ở đây, máy chủ chính là máy Parrot Security.

Note: Ensure that the Windows Server 2019 virtual machine is running Lưu ý: Đảm bảo rằng máy ảo Windows Server 2019 đang chạy.

1 Click the MATE Terminal icon at the top of the Desktop window to open a Terminal window

Nhấp vào biểu tượng MATE Terminal ở đầu cửa sổ Desktop để mở cửa sổ Terminal.

2 A Parrot Terminal window appears In the terminal window, type sudo su and press Enter to run the programs as a root user

Một cửa sổ Parrot Terminal xuất hiện Trong cửa sổ terminal, gõ sudo su và nhấn Enter để chạy các chương trình như người dùng root.

3 In the [sudo] password for attacker field, type toor as a password and press Enter

Trong trường [sudo] password for attacker, gõ toor làm mật khẩu và nhấn Enter.

Trang 31

Note: The password that you type will not be visible Lưu ý: Mật khẩu bạn nhập sẽ không hiển thị.

4 Now, type cd and press Enter to jump to the root directory Bây giờ, gõ cd và nhấn Enter để chuyển đến thư mục gốc.

5 In the Terminal window, type zaproxy and press Enter to launch OWASP ZAP

Trong cửa sổ Terminal, gõ zaproxy và nhấn Enter để khởi chạy OWASP ZAP.

6 The OWASP ZAP initializing window appears; wait for it to complete Cửa sổ khởi tạo OWASP ZAP xuất hiện; đợi cho đến khi quá trình hoàn tất 7 After completing initialization, a prompt that reads Do you want to persist the ZAP Session? appears; select the No, I do not want to persist this session at this moment in time radio button and click Start

Sau khi hoàn tất khởi tạo, một cửa sổ nhắc xuất hiện với thông báo Do you wantto persist the ZAP Session?; chọn nút radio No, I do not want to persist this session at this moment in time và nhấn Start.

Trang 32

Note: If a Manage Add-ons window appears, click the Close button Lưu ý: Nếu cửa sổ Manage Add-ons xuất hiện, nhấn nút Close để đóng cửa sổ 8 The OWASP ZAP main window appears Under the Quick Start tab, click the Automated Scan option under Welcome to OWASP ZAP

Cửa sổ chính OWASP ZAP xuất hiện Dưới tab Quick Start, nhấp vào tùy chọn Automated Scan dưới phần Welcome to OWASP ZAP.

Trang 33

9 The Automated Scan wizard appears; enter the target website under the URL to attack field (here, www.moviescope.com) Leave the other settings to default and click the Attack button

Cửa sổ hướng dẫn Automated Scan xuất hiện; nhập trang web mục tiêu vào trường URL to attack (ở đây, www.moviescope.com) Để các cài đặt khác ở mặc định và nhấn nút Attack.

Trang 34

10 OWASP ZAP starts scanning the target website You can observe various URLs under the Spider tab

OWASP ZAP bắt đầu quét trang web mục tiêu Bạn có thể quan sát các URL khác nhau dưới tab Spider.

Trang 35

11 After performing web spidering, OWASP ZAP performs active

scanning Navigate to the Active Scan tab to observe the various scanned links Sau khi thực hiện web spidering, OWASP ZAP thực hiện quét hoạt động Chuyển đến tab Active Scan để quan sát các liên kết đã quét.

12 After completing the active scan, the results appear under the Alerts tab, displaying the various vulnerabilities and issues associated with the target website, as shown in the screenshot

Sau khi hoàn thành quét hoạt động, kết quả xuất hiện dưới tab Alerts, hiển thị các lỗ hổng và vấn đề liên quan đến trang web mục tiêu, như được hiển thị trongảnh chụp màn hình.

Trang 36

Note: In this task, the objective being web spidering, we will focus on the information obtained while performing web spidering

Lưu ý: Trong nhiệm vụ này, mục tiêu là web spidering, chúng ta sẽ tập trung vào thông tin thu được khi thực hiện web spidering.

13 Now, click on the Spider tab from the lower section of the window to view the web spidering information By default, the URLs tab appears under theSpider tab

Bây giờ, nhấp vào tab Spider ở phần dưới cùng của cửa sổ để xem thông tin web spidering Theo mặc định, tab URLs xuất hiện dưới tab Spider.

14 The URLs tab contains various links for hidden content and functionality associated with the target website (www.moviescope.com)

Tab URLs chứa các liên kết cho nội dung và chức năng ẩn liên quan đến trang web mục tiêu (www.moviescope.com).

Trang 37

15 Now, navigate to the Messages tab under the Spider tab to view more detailed information regarding the URLs obtained while

performing the web spidering, as shown in the screenshot

Bây giờ, chuyển đến tab Messages dưới tab Spider để xem thông tin chi tiết hơn liên quan đến các URL thu được trong quá trình web spidering, như được hiển thị trong ảnh chụp màn hình.

Note: In real-time, attackers perform web spidering or crawling to discover hidden content and functionality, which is not reachable from the main visible content, to exploit user privileges within the application It also allows attackers to recover backup copies of live files, configuration and log files containing sensitive data, backup archives containing snapshots of files within the web root, and new functionality that is not linked to the main application

Lưu ý: Trong thực tế, kẻ tấn công thực hiện web spidering hoặc crawling để khám phá nội dung và chức năng ẩn, không thể truy cập từ nội dung chính hiển thị, để khai thác quyền của người dùng trong ứng dụng Nó cũng cho phép kẻ tấn công khôi phục các bản sao dự phòng của các tệp sống, các tệp cấu hình và

Trang 38

log chứa dữ liệu nhạy cảm, các bản sao lưu chứa ảnh chụp của các tệp trong webroot và chức năng mới không được liên kết với ứng dụng chính.

16 This concludes the demonstration of how to perform web spidering on a target website using OWASP ZAP

Điều này kết thúc minh họa cách thực hiện web spidering trên một trang web mục tiêu sử dụng OWASP ZAP.

17 Close all open windows and document all acquired information Đóng tất cả các cửa sổ và ghi chép lại tất cả thông tin đã thu thập.

Task 4: Detect Load Balancers using Various Tools

Task 4: Phát Hiện Load Balancers Sử Dụng Các Công Cụ Khác Nhau

Organizations use load balancers to distribute web server load over multiple servers and increase the productivity and reliability of web

applications Generally, there are two types of load balancers, namely, DNS load balancers (Layer 4 load balancers) and http load balancers (layer 7 load

Trang 39

balancers) You can use various tools such as dig and load balancing detector (Ibd) to detect the load balancers of the target organization along with their real IP addresses

Các tổ chức sử dụng load balancers để phân phối tải máy chủ web qua nhiều máy chủ và tăng cường năng suất và độ tin cậy của các ứng dụng web Nói chung, có hai loại load balancers, đó là DNS load balancers (Layer 4 load balancers) và http load balancers (layer 7 load balancers) Bạn có thể sử dụng các công cụ như dig và load balancing detector (lbd) để phát hiện load balancerscủa tổ chức mục tiêu cùng với địa chỉ IP thực của họ.

Here, we will detect load balancers using dig command and Ibd tool

Ở đây, chúng ta sẽ phát hiện load balancers sử dụng lệnh dig và công cụ lbd.

Note: In this task, we will detect the load balancers on the website

www.yahoo.com, as the websites hosted by our lab environment do not use loadbalancers However, you can select a target of your own choice

Lưu ý: Trong nhiệm vụ này, chúng ta sẽ phát hiện load balancers trên trang web

www.yahoo.com, vì các trang web được lưu trữ trong môi trường thực hành củachúng tôi không sử dụng load balancers Tuy nhiên, bạn có thể chọn một mục tiêu theo ý của bạn.

1 Click the MATE Terminal icon at the top of the Desktop window to open a Terminal window

Nhấp vào biểu tượng MATE Terminal ở đầu cửa sổ Desktop để mở cửa sổ Terminal.

2 A Parrot Terminal window appears In the terminal window, type sudo su and press Enter to run the programs as a root user

Một cửa sổ Parrot Terminal xuất hiện Trong cửa sổ terminal, gõ sudo su và nhấn Enter để chạy các chương trình như người dùng root.

Trang 40

3 In the [sudo] password for attacker field, type toor as a password and press Enter

Trong trường [sudo] password for attacker, gõ toor làm mật khẩu và nhấn Enter Note: The password that you type will not be visible

Lưu ý: Mật khẩu bạn nhập sẽ không hiển thị.

4 Now, type cd and press Enter to jump to the root directory Bây giờ, gõ cd và nhấn Enter để chuyển đến thư mục gốc.

5 A Parrot Terminal window appears; type dig yahoo.com and press Enter Một cửa sổ Parrot Terminal xuất hiện; gõ dig yahoo.com và nhấn Enter.

6 The result appears, displaying the available load balancers of the target website, as the screenshot demonstrates Here, a single host resolves to multiple IP addresses, which possibly indicates that the host is using a load balancer

Kết quả xuất hiện, hiển thị các load balancers có sẵn của trang web mục tiêu, như ảnh chụp màn hình minh họa Ở đây, một host đơn giản được phân giải thành nhiều địa chỉ IP, có thể cho thấy rằng host đó đang sử dụng một load balancer.

Ngày đăng: 10/08/2024, 18:38

w