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

Báo cáo CEHV12 Module 4 ENUMERATION

163 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

Enumeration trong an ninh mạng là quá trình thu thập thông tin chi tiết về hệ thống, mạng, hoặc ứng dụng mục tiêu. Đây là giai đoạn quan trọng trong một cuộc tấn công vì thông tin thu thập được có thể giúp kẻ tấn công tìm ra các lỗ hổng bảo mật để khai thác. Các loại Enumeration phổ biến: Network Enumeration: Tìm hiểu các thông tin về mạng như địa chỉ IP, các thiết bị mạng, và các dịch vụ đang chạy trên mạng. User Enumeration: Xác định tài khoản người dùng và nhóm người dùng trên một hệ thống. Service Enumeration: Thu thập thông tin về các dịch vụ đang chạy trên máy chủ như các phiên bản phần mềm, các cổng đang mở. SNMP Enumeration: Khai thác thông tin từ các thiết bị mạng qua giao thức SNMP (Simple Network Management Protocol). DNS Enumeration: Thu thập thông tin về cấu trúc DNS của một tổ chức, bao gồm tên miền và địa chỉ IP.

Trang 1

BÁO CÁO CEH

Thực hành An toàn thông tin

ENUMERATION

Trang 2

BỘ CÔNG THƯƠNGTRƯỜNG ĐH KINH TẾ - KỸ THUẬT CÔNG NGHIỆPKhoa Công Nghệ Thông Tin

BÁO CÁO CEH

Thực hành An toàn thông tin

Sinh viên thựchiện:

Vũ Văn Sơn 20103100673

Nguyễn TrọngHiệp

20103100661Nguyễn Minh Sâm 2010310068

6Nguyễn Xuân Thực 2010310069

1

Trang 3

Giảng viên hướng dẫn: Nguyễn Hoàng Chiến

Hà Nội – 2023

Trang 5

Lab 4: Perform NFS Enumeration 69

5.6.1 Task 1: Perform DNS Enumeration using Zone Transfer 81

Lab 6: Perform SMTP Enumeration 94

Trang 7

Với sự phát triển của các công nghệ và ứng dụng mạng, các cuộc tấn công mạngđang gia tăng rất nhiều cả về số lượng và mức độ nghiêm trọng Những attacker liên tụctìm kiếm các lỗ hổng dịch vụ và ứng dụng trên mạng và máy chủ Khi họ tìm thấy một lỗhổng hoặc kẽ hở trong một dịch vụ Run qua Internet, họ ngay lập tức khai thác nó để thỏahiệp toàn bộ hệ thống Bất kỳ dữ liệu nào khác mà họ tìm thấy có thể được sử dụng thêmđể xâm phạm các hệ thống mạng bổ sung Tương tự, những attacker tìm kiếm và sử dụngcác máy trạm có đặc quyền quản trị và chạy các ứng dụng thiếu sót, để thực thi mã tùy ýhoặc cấy virus nhằm tăng cường thiệt hại cho mạng.

In the first step of the security assessment and penetration testing of yourorganization, you gather open-source information about your organization In the secondstep, you collect information about open ports and services, OSes, and any configurationlapses

Trong bước đầu tiên của đánh giá bảo mật và kiểm tra thâm nhập của tổ chức củabạn, bạn thu thập thông tin nguồn mở về tổ chức của bạn Trong bước thứ hai, bạn thuthập thông tin về các cổng và dịch vụ mở, hệ điều hành và bất kỳ lỗi cấu hình nào.

Trang 8

The next step for an ethical hacker or penetration tester is to probe the targetnetwork further by performing enumeration Using various techniques, you should extractmore details about the network such as lists of computers, usernames, user groups, ports,OSes, machine names, network resources, and services

Bước tiếp theo cho một hacker có đạo đức hoặc người kiểm tra thâm nhập là thămdò mạng mục tiêu hơn nữa bằng cách thực hiện liệt kê Sử dụng các kỹ thuật khác nhau,bạn nên trích xuất thêm chi tiết về mạng như danh sách máy tính, tên người dùng, nhómngười dùng, cổng, hệ điều hành, tên máy, tài nguyên mạng và dịch vụ.

The information gleaned from enumeration will help you to identify thevulnerabilities in your system's security that attackers would seek to exploit Suchinformation could also enable attackers to perform password attacks to gain unauthorizedaccess to information system resources

Thông tin lượm lặt được từ việc liệt kê sẽ giúp bạn xác định các lỗ hổng trong bảomật hệ thống của bạn mà attacker sẽ tìm cách khai thác Những thông tin như vậy cũngcó thể cho phép attacker thực hiện các cuộc tấn công mật khẩu để truy cập trái phép vàotài nguyên hệ thống thông tin.

In the previous steps, you gathered necessary information about a target withoutcontravening any legal boundaries However, please note that enumeration activities maybe illegal depending on an organization's policies and any laws that are in effect in yourlocation As an ethical hacker or penetration tester, you should always acquire properauthorization before performing enumeration

Trong các bước trước, bạn đã thu thập thông tin cần thiết về mục tiêu mà không viphạm bất kỳ ranh giới pháp lý nào Tuy nhiên, xin Note rằng các hoạt động liệt kê có thểlà bất hợp pháp tùy thuộc vào chính sách của tổ chức và bất kỳ luật nào có hiệu lực tại địađiểm của bạn Là một hacker có đạo đức hoặc người kiểm tra thâm nhập, bạn phải luôncó được sự cho phép thích hợp trước khi thực hiện liệt kê.

▪ Usernames and user groups

▪ Lists of shares on individual hosts on the network ▪ Policies and passwords

▪ Routing tables

▪ Audit and service settings ▪ SNMP and FQDN details

Trang 9

Mục tiêu của thí nghiệm là trích xuất thông tin về tổ chức mục tiêu bao gồm, nhưngkhông giới hạn ở:

▪ Tên máy, hệ điều hành, dịch vụ và cổng của chúng▪ Tài nguyên mạng

▪ Tên người dùng và nhóm người dùng

▪ Danh sách chia sẻ trên các máy chủ riêng lẻ trên mạng▪ Chính sách và mật khẩu

▪ Bảng định tuyến

▪ Thiết đặt kiểm tra và dịch vụ▪ Chi tiết SNMP và FQDN

Lab Environment

Môi trường thí nghiệm

To carry out this lab, you need: ▪ Windows 11 virtual machine

▪ Windows Server 2022 virtual machine ▪ Windows Server 2019 virtual machine ▪ Parrot Security virtual machine

▪ Ubuntu virtual machine ▪ Android virtual machine

▪ Web browsers with an Internet connection ▪ Administrator privileges to run the tools Để thực hiện thí nghiệm này, bạn cần:

▪ Máy ảo Windows 11

▪ Máy ảo Windows Server 2022▪ Máy ảo Windows Server 2019▪ Máy ảo Parrot Security

▪ Máy ảo Ubuntu▪ Máy ảo Android

▪ Trình duyệt web có kết nối Internet▪ Đặc quyền Admin để chạy các công cụ.

Overview of Enumeration

Tổng quan về liệt kê

Enumeration creates an active connection with the system and performs directedqueries to gain more information about the target It extracts lists of computers,usernames, user groups, ports, Oses, machine names, network resources, and servicesusing various techniques Enumeration techniques are conducted in an intranetenvironment

Trang 10

Liệt kê tạo ra một kết nối hoạt động với hệ thống và thực hiện các truy vấn đượcđịnh hướng để có thêm thông tin về mục tiêu Nó trích xuất danh sách máy tính, tênngười dùng, nhóm người dùng, cổng, Oses, tên máy, tài nguyên mạng và dịch vụ bằngcác kỹ thuật khác nhau Kỹ thuật liệt kê được tiến hành trong môi trường mạng nội bộ.

Lab 1: Perform NetBIOS Enumeration

Thí nghiệm 1: Thực hiện liệt kê NetBIOS

NetBIOS enumeration is a process of obtaining sensitive information about thetarget such as a list of computers belonging to a target domain, network shares, policies,etc

Liệt kê NetBIOS là một quá trình thu thập thông tin nhạy cảm về mục tiêu nhưdanh sách các máy tính thuộc miền đích, chia sẻ mạng, chính sách, v.v

1.1 Lab Scenario

1.1 Kịch bản thí nghiệm

As a professional ethical hacker or penetration tester, your first step in theenumeration of a Windows system is to exploit the NetBIOS API NetBIOS enumerationallows you to collect information about the target such as a list of computers that belongto a target domain, shares on individual hosts in the target network, policies, passwords,etc This data can be used to probe the machines further for detailed information aboutthe network and host resources

Là một hacker đạo đức chuyên nghiệp hoặc người kiểm tra thâm nhập, bước đầutiên của bạn trong việc liệt kê hệ thống Windows là khai thác API NetBIOS Liệt kêNetBIOS cho phép bạn thu thập thông tin về mục tiêu như danh sách các máy tính thuộcmiền đích, chia sẻ trên các máy chủ riêng lẻ trong mạng đích, chính sách, mật khẩu, v.v.Dữ liệu này có thể được sử dụng để thăm dò thêm các máy để biết thông tin chi tiết vềmạng và tài nguyên máy chủ

1.2 Lab Objectives

1.2 Mục tiêu thí nghiệm

▪ Perform NetBIOS enumeration using Windows command-line utilities ▪ Perform NetBIOS enumeration using NetBIOS Enumerator

▪ Perform NetBIOS enumeration using an NSE Script

▪ Thực hiện liệt kê NetBIOS bằng các tiện ích dòng lệnh Windows▪ Thực hiện liệt kê NetBIOS bằng NetBIOS Enumerator

▪ Thực hiện liệt kê NetBIOS bằng NSE Script

1.3 Lab Environment

1.3 Môi trường thí nghiệm

Trang 11

To carry out this lab, you need: ▪ Windows 11 virtual machine

▪ Windows Server 2022 virtual machine ▪ Windows Server 2019 virtual machine ▪ Parrot Security virtual machine

▪ Web browsers with an Internet connection ▪ Administrator privileges to run the tools Để thực hiện thí nghiệm này, bạn cần:

▪ Máy ảo Windows 11

▪ Máy ảo Windows Server 2022▪ Máy ảo Windows Server 2019▪ Máy ảo Parrot Security

▪ Trình duyệt web có kết nối Internet▪ Đặc quyền Admin để Run các công cụ

1.4 Lab Duration

1.4 Thời gian thí nghiệmTime: 15 Minutes

Thời gian: 15 phút

1.5 Overview of NetBIOS Enumeration

1.5 Tổng quan về NetBIOS Enumeration

NetBIOS stands for Network Basic Input Output System Windows uses NetBIOSfor file and printer sharing A NetBIOS name is a unique computer name assigned toWindows systems, comprising a 16-character ASCII string that identifies the networkdevice over TCP/IP The first 15 characters are used for the device name, and the 16th isreserved for the service or name record type

NetBIOS là viết tắt của Network Basic Input Output System Windows sử dụngNetBIOS để chia sẻ tệp và máy in Tên NetBIOS là một tên máy tính duy nhất được gáncho các hệ thống Windows, bao gồm một chuỗi ASCII gồm 16 ký tự xác định thiết bịmạng qua TCP / IP 15 ký tự đầu tiên được sử dụng cho tên thiết bị và ký tự thứ 16 đượcdành riêng cho loại bản ghi dịch vụ hoặc tên.

The NetBIOS service is easily targeted, as it is simple to exploit and runs onWindows systems even when not in use NetBIOS enumeration allows attackers to reador write to a remote computer system (depending on the availability of shares) or launcha denial of service (DoS) attack

Trang 12

Dịch vụ NetBIOS dễ dàng bị nhắm mục tiêu, vì nó dễ khai thác và Run trên các hệthống Windows ngay cả khi không sử dụng Liệt kê NetBIOS cho phép attacker đọc hoặcghi vào hệ thống máy tính từ xa (tùy thuộc vào tính khả dụng của chia sẻ) hoặc khởi độngcuộc tấn công từ chối dịch vụ (DoS).

Nbtstat giúp khắc phục sự cố độ phân giải tên NETBIOS Lệnh nbtstat loại bỏ vàsửa các mục được tải sẵn bằng cách sử dụng một số công tắc phân biệt chữ hoa chữthường Nbtstat có thể được sử dụng để liệt kê thông tin như NetBIOS qua thống kê giaothức TCP / IP (NetBT), bảng tên NetBIOS cho cả máy tính cục bộ và từ xa và bộ đệm ẩntên NetBIOS.

Net use connects a computer to, or disconnects it from, a shared resource It alsodisplays information about computer connections

Sử dụng mạng kết nối máy tính với, hoặc ngắt kết nối nó từ, một tài nguyên đượcchia sẻ Nó cũng hiển thị thông tin về các kết nối máy tính.

Here, we will use the Nbtstat, and Net use Windows command-line utilities toperform NetBIOS enumeration on the target network

Ở đây, chúng ta sẽ sử dụng Nbtstat và Net sử dụng các tiện ích dòng lệnhWindows để thực hiện liệt kê NetBIOS trên mạng đích.

Note: Here, we will use the Windows Server 2019 (10.10.1.19) machine to target

a Windows 11 (10.10.1.11) machine

Note: Ở đây, chúng tôi sẽ sử dụng máy Windows Server 2019 (10.10.1.19) để

nhắm mục tiêu máy Windows 11 (10.10.1.11 )

1 Turn on the Windows 11 and Windows Server 2019 virtual machines

2 Switch to the Windows Server 2019 virtual machine Click Ctrl+Alt+Del toactivate the machine By default, Administrator user profile is selected, type Pa$

$word in the Password field and press Enter to login

Trang 13

Note: Networks screen appears, click Yes to allow your PC to be discoverable by

other PCs and devices on the network

3 Open a Command Prompt window

4 Type nbtstat -a [IP address of the remote machine] (in this example, thetarget IP address is 10.10.1.11) and press Enter

Note: In this command, -a displays the NetBIOS name table of a remote

computer

5 The result appears, displaying the NetBIOS name table of a remote computer (in

this case, the WINDOWS11 machine), as shown in the screenshot 1 Bật máy ảo Windows 11 và Windows Server 2019.

2 Chuyển sang máy ảo Windows Server 2019 Nhấp Ctrl + Alt + Del để kíchhoạt máy Theo mặc định, hồ sơ người dùng Administrator được chọn, nhập Pa$

$word vào trường Mật khẩu và nhấn Enter để đăng nhập

Note: Màn hình Mạng xuất hiện, bấm Yes để cho phép các PC và thiết bị khác

trên mạng có thể phát hiện PC của bạn

3 Mở cửa sổ Command Prompt

4 Nhập nbtstat -a [Địa chỉ IP của máy từ xa] (trong ví dụ này, địa chỉ IP đích là

10.10.1.11) và nhấn Enter

Note: Trong lệnh này, -a hiển thị bảng tên NetBIOS của máy tính từ xa

5 Kết quả xuất hiện, hiển thị bảng tên NetBIOS của máy tính từ xa (trong trường

hợp này, máy WINDOWS11), như thể hiện trong ảnh chụp màn hình

6 In the same Command Prompt window, type nbtstat -c and press Enter

Trang 14

Note: In this command, -c lists the contents of the NetBIOS name cache of the

6 Trong cùng một cửa sổ Command Prompt, gõ nbtstat -c và nhấn Enter

Note: Trong lệnh này, -c liệt kê nội dung của bộ đệm ẩn tên NetBIOS của máy

tính điều khiển từ xa.

7 Kết quả xuất hiện, hiển thị nội dung của bộ đệm tên NetBIOS, bảng tênNetBIOS và địa chỉ IP đã giải quyết của chúng.

Note: Có thể trích xuất thông tin này mà không cần tạo phiên null (phiên không

được xác thực)

8 Now, type net use and press Enter The output displays information about the

target such as connection status, shared folder/drive and network information, asshown in the screenshot

8 Bây giờ, gõ net use và nhấn Enter Đầu ra hiển thị thông tin về mục tiêu như

trạng thái kết nối, thư mục / ổ đĩa được chia sẻ và thông tin mạng, như được hiểnthị trong ảnh chụp màn hình.

Trang 15

9 Using this information, the attackers can read or write to a remote computersystem, depending on the availability of shares, or even launch a DoS attack 10 This concludes the demonstration of performing NetBIOS enumeration usingWindows command-line utilities such as Nbtstat and Net use

11 Close all open windows and document all the acquired information

9 Sử dụng thông tin này, những attacker có thể đọc hoặc ghi vào hệ thống máytính từ xa, tùy thuộc vào sự sẵn có của cổ phiếu, hoặc thậm chí khởi động mộtcuộc tấn công DoS.

10 Phần này kết thúc phần trình diễn cách thực hiện liệt kê NetBIOS bằng các tiệních dòng lệnh của Windows như Nbtstat và Net use.

11 Đóng tất cả các cửa sổ đang mở và ghi lại tất cả thông tin thu được.

1.6.2 Task 2: Perform NetBIOS Enumeration using NetBIOS Enumerator

1.6.2 Nhiệm vụ 2: Thực hiện liệt kê NetBIOS bằng NetBIOS Enumerator

NetBIOS Enumerator is a tool that enables the use of remote network support andseveral other techniques such as SMB (Server Message Block) It is used to enumeratedetails such as NetBIOS names, usernames, domain names, and MAC addresses for agiven range of IP addresses

NetBIOS Enumerator là một công cụ cho phép sử dụng hỗ trợ mạng từ xa và mộtsố kỹ thuật khác như SMB (Server Message Block) Nó được sử dụng để liệt kê các chitiết như tên NetBIOS, tên người dùng, tên miền và địa chỉ MAC cho một dải địa chỉ IPnhất định.

Here, we will use the NetBIOS Enumerator to perform NetBIOS enumeration onthe target network

Ở đây, chúng ta sẽ sử dụng NetBIOS Enumerator để thực hiện liệt kê NetBIOStrên mạng đích.

Note: Here, we will use the Windows 11 machine to target Windows Server2019 and Windows Server 2022 machines

Note: Ở đây, chúng tôi sẽ sử dụng máy Windows 11 để nhắm mục tiêu các máyWindows Server 2019 và Windows Server 2022

1 Turn on Windows Server 2022 virtual machine

Note: Ensure that the Windows 11 and Windows Server 2019 virtual machines

are running

2 Switch to the Windows 11 virtual machine By default, Admin user profile isselected, type Pa$$word in the Password field and press Enter to login

Trang 16

Note: If Welcome to Windows wizard appears, click Continue and in Sign inwith Microsoft wizard, click Cancel

Note: Networks screen appears, click Yes to allow your PC to be discoverable by

other PCs and devices on the network

3 In the Windows 11 machine, navigate to E:\CEH-Tools\CEHv12 Module 04

Enumeration\NetBIOS Enumeration Tools\NetBIOS Enumerator and

double-click NetBIOS Enumerater.exe

Note: If the Open - File Security Warning pop-up appears, click Run

4 The NetBIOS Enumerator main window appears, as shown in the screenshot 1 Bật máy ảo Windows Server 2022

Note: Đảm bảo rằng các máy ảo Windows 11 và Windows Server 2019 đang

2 Chuyển sang máy ảo Windows 11 Theo mặc định, hồ sơ người dùng Adminđược chọn, nhập Pa$$word vào trường Mật khẩu và nhấn Enter để đăng nhập

Note: Nếu Welcome to Windows xuất hiện, bấm Continue và trong trình hướng

dẫn Sign in with Microsoft, bấm Cancel

Note: Màn hình Mạng xuất hiện, bấm Yes để cho phép các PC và thiết bị khác

trên mạng có thể phát hiện PC của bạn

3 Trong máy Windows 11, điều hướng đến E:\CEH-Tools\CEHv12 Module 04

Enumeration\NetBIOS Enumeration Tools\NetBIOS Enumerator và nhấp đúpNetBIOS Enumerater.exe

Note: Nếu cửa sổ bật lên Open - File Security Warning xuất hiện, hãy nhấp vàoRun

4 Cửa sổ chính NetBIOS Enumerator xuất hiện, như thể hiện trong ảnh chụp

màn hình

Trang 17

5 Under IP range to scan, enter an IP range in the from and to fields and clickthe Scan button to initiate the scan (In this example, we are targeting the IP range

10.10.1.15- 10.10.1.100)

Note: Ensure that the IP address in to field is between 10.10.1.100 to 10.10.1.250.

If the IP address is less than 10.10.1.100, the tool might crash

5 Trong IP range to scan, nhập IP range vào các trường from và to và nhấp vàonút Scan để bắt đầu quét (Trong ví dụ này, chúng tôi đang nhắm mục tiêu phạm viIP 10.10.1.15 - 10.10.1.100)

Note: Đảm bảo rằng địa chỉ IP trong trường đến nằm trong khoảng từ 10.10.1.100

đến 10.10.1.250 Nếu địa chỉ IP nhỏ hơn 10.10.1.100, công cụ có thể gặp sự cố

6 NetBIOS Enumerator scans for the provided IP address range On completion,the scan results are displayed in the left pane, as shown in the screenshot

Trang 18

7 The Debug window section in the right pane shows the scanning range of IPaddresses and displays Ready! after the scan is finished

Note: It takes approximately 5 minutes for the scan to finish

6 NetBIOS Enumerator quét dải địa chỉ IP được cung cấp Sau khi hoàn thành, kếtquả quét được hiển thị trong ngăn bên trái, như thể hiện trong ảnh chụp màn hình.

7 Phần Debug window trong ngăn bên phải hiển thị phạm vi quét của địa chỉ IPvà hiển thị Ready! sau khi quá trình quét kết thúc

Note: Mất khoảng 5 phút để quá trình quét kết thúc

8 Click on the expand icon (+) to the left of the 10.10.1.19 and 10.10.1.22 IP

addresses in the left pane of the window Then click on the expand icon to the left

of NetBIOS Names to display NetBIOS details of the target IP address, as shown

in the screenshot

8 Nhấp vào biểu tượng mở rộng (+) ở bên trái địa chỉ IP 10.10.1.19 và 10.10.1.22

trong khung bên trái của cửa sổ Sau đó nhấp vào biểu tượng mở rộng ở bên trái

của tên NetBIOS để hiển thị chi tiết NetBIOS của địa chỉ IP đích, như thể hiện

trong ảnh chụp màn hình

Trang 19

9 This concludes the demonstration of performing NetBIOS enumeration usingNetBIOS Enumerator This enumerated NetBIOS information can be used tostrategize an attack on the target

10 Close all open windows and document all the acquired information

11 Turn off the Windows 11 and Windows Server 2019 virtual machines

9 Điều này kết thúc việc trình diễn thực hiện liệt kê NetBIOS bằng NetBIOSEnumerator Thông tin NetBIOS được liệt kê này có thể được sử dụng để lập chiếnlược tấn công vào mục tiêu.

10 Đóng tất cả các cửa sổ đang mở và ghi lại tất cả thông tin thu được.

11 Tắt máy ảo Windows 11 và Windows Server 2019.

1.6.3 Task 3: Perform NetBIOS Enumeration using an NSE Script

1.6.3 Nhiệm vụ 3: Thực hiện liệt kê NetBIOS bằng cách sử dụng NSE Script

NSE allows users to write (and share) simple scripts to automate a wide variety ofnetworking tasks NSE scripts can be used for discovering NetBIOS shares on thenetwork Using the nbstat NSE script, for example, you can retrieve the target's NetBIOSnames and MAC addresses Moreover, increasing verbosity allows you to extract allnames related to the system

NSE cho phép người dùng viết (và chia sẻ) các tập lệnh đơn giản để tự động hóanhiều tác vụ mạng Các tập lệnh NSE có thể được sử dụng để khám phá các chia sẻNetBIOS trên mạng Ví dụ: sử dụng tập lệnh nbstat NSE, bạn có thể truy xuất tên

Trang 20

NetBIOS và địa chỉ MAC của mục tiêu Hơn nữa, tăng độ chi tiết cho phép bạn trích xuấttất cả các tên liên quan đến hệ thống.

Here, we will run the nbstat script to enumerate information such as the name ofthe computer and the logged-in user

Ở đây, chúng ta sẽ Run tập lệnh nbstat để liệt kê các thông tin như tên của máytính và người dùng đã đăng nhập.

Note: Ensure that the Windows Server 2022 virtual machine is running Note: Đảm bảo rằng máy ảo Windows Server 2022 đang Run.

1 Turn on the Parrot Security virtual machine

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

Note: If a Parrot Updater pop-up appears at the top-right corner of Desktop,

ignore and close it

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

click No to close the window

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

Note: The password that you type will not be visible

6 In the terminal window, type nmap -SV -v script nbstat.nse [Target IP

Address] (in this example, the target IP address is 10.10.1.22) and press Enter

1 Bật máy ảo Parrot Security.

2 Trong trang đăng nhập, tên người dùng của attacker sẽ được chọn theo mặcđịnh Nhập mật khẩu dưới dạng toor trong trường Mật khẩu và nhấn Enter để

đăng nhập vào máy

Note: Nếu cửa sổ bật lên Parrot Updater xuất hiện ở góc trên cùng bên phải củaDesktop, hãy bỏ qua và đóng nó

Note: Nếu cửa sổ bật lên Question xuất hiện yêu cầu bạn cập nhật máy, hãy bấm

No để đóng cửa sổ

3 Nhấp vào biểu tượng MATE Terminal ở đầu Desktop để mở cửa sổ Terminal.4 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 với tư cách là người dùng root

Trang 21

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

Enter

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

6 Trong cửa sổ terminal, nhập nmap -SV -v script nbstat.nse [Địa chỉ IP đích](trong ví dụ này, địa chỉ IP đích là 10.10.1.22) và nhấn Enter

Note: -sV detects the service versions, -v enables the verbose output (that is,

includes all hosts and ports in the output), and script nbstat.nse performs the

NetBIOS enumeration

7 The scan results appear, displaying the open ports and services, along with their

versions Displayed under the Host script results section are details about the

target system such as the NetBIOS name, NetBIOS user, and NetBIOS MACaddress, as shown in the screenshot

Note: -sV phát hiện các phiên bản dịch vụ, -v cho phép đầu ra chi tiết (nghĩa là

bao gồm tất cả các máy chủ và cổng trong đầu ra) và script nbstat.nse thực

hiện liệt kê NetBIOS

7 Kết quả quét xuất hiện, hiển thị các cổng và dịch vụ đang mở, cùng với các

phiên bản của chúng Hiển thị trong phần Kết quả tập lệnh máy chủ là chi tiết

về hệ thống đích như tên NetBIOS, người dùng NetBIOS và địa chỉ MACNetBIOS, như thể hiện trong ảnh chụp màn hình

Trang 22

8 In the terminal window, type nmap -sU -p 137 script nbstat.nse [Target IP

Address] (in this case, the target IP address is 10.10.1.22) and press Enter

8 Trong cửa sổ terminal, nhập nmap -sU -p 137 script nbstat.nse [Địa chỉ IP

đích] (trong trường hợp này, địa chỉ IP đích là 10.10.1.22) và nhấn Enter

Note: -SU performs a UDP scan, -p specifies the port to be scanned, and scriptnbstat.nse performs the NetBIOS enumeration

9 The scan results appear, displaying the open NetBIOS port (137) and, under the

Host script results section, NetBIOS details such as NetBIOS name, NetBIOS

user, and NetBIOS MAC of the target system, as shown in the screenshot

Note: -SU thực hiện quét UDP, -p chỉ định cổng cần quét và script nbstat.nse

thực hiện liệt kê NetBIOS

Trang 23

9 Kết quả quét xuất hiện, hiển thị cổng NetBIOS đang mở (137) và, trong phần

Host script results, các chi tiết NetBIOS như tên NetBIOS, người dùng NetBIOS

và NetBIOS MAC của hệ thống đích, như thể hiện trong ảnh chụp màn hình

10 This concludes the demonstration of performing NetBIOS enumeration usingan NSE script

11 Other tools may also be used to perform NetBIOS enumeration on the target

network such as Global Network Inventory (http://www.magnetosoft.com),

Advanced IP Scanner (https://www.advanced-ip-scanner.com), Hyena

(https://www.systemtools.com), and Nsauditor Network Security Auditor

(https://www.nsauditor.com)

12 Close all open windows and document all the acquired information

13 Turn off the Parrot Security and Windows Server 2022 virtual machines

10 Điều này kết thúc việc trình diễn thực hiện liệt kê NetBIOS bằng cách sử dụngtập lệnh NSE.

11 Các công cụ khác cũng có thể được sử dụng để thực hiện liệt kê NetBIOS trênmạng đích chẳng hạn như Global Network Inventory(http://www.magnetosoft.com), Advanced IP Scanner (https://www.advanced-ip-scanner.com), Hyena

(https://www.systemtools.com) và Nsauditor Network Security Auditor (https://

www.nsauditor.com)

12 Đóng tất cả các cửa sổ đang mở và ghi lại tất cả các thông tin thu được.

Trang 24

13 Tắt máy ảo Parrot Security và Windows Server 2022

Lab 2: Perform SNMP Enumeration

Thí nghiệm 2: Thực hiện liệt kê SNMP

SNMP enumeration uses SNMP to obtain a list of user accounts and devices on atarget system

Liệt kê SNMP sử dụng SNMP để lấy danh sách tài khoản người dùng và thiết bịtrên hệ thống đích

2.1 Lab Scenario

As a professional ethical hacker or penetration tester, your next step is to carry outSNMP enumeration to extract information about network resources (such as hosts,routers, devices, and shares) and network information (such as ARP tables, routing tables,device-specific information, and traffic statistics)

Là một hacker có đạo đức nghề nghiệp hoặc người kiểm tra thâm nhập, bước tiếptheo của bạn là thực hiện liệt kê SNMP để trích xuất thông tin về tài nguyên mạng (nhưmáy chủ, bộ định tuyến, thiết bị và chia sẻ) và thông tin mạng (như bảng ARP, bảng địnhtuyến, thông tin cụ thể của thiết bị và thống kê lưu lượng).

Using this information, you can further scan the target for underlyingvulnerabilities, build a hacking strategy, and launch attacks

Sử dụng thông tin này, bạn có thể quét thêm mục tiêu để tìm các lỗ hổng cơ bản,xây dựng chiến lược hack và khởi động các cuộc tấn công.

2.2 Lab Objectives

▪ Perform SNMP enumeration using snmp-check

▪ Perform SNMP enumeration using SoftPerfect Network Scanner ▪ Perform SNMP enumeration using SnmpWalk

▪ Perform SNMP enumeration using Nmap

▪ Thực hiện liệt kê SNMP bằng cách sử dụng snmp-check▪ Thực hiện liệt kê SNMP bằng SoftPerfect Network Scanner▪ Thực hiện liệt kê SNMP bằng SnmpWalk

▪ Thực hiện liệt kê SNMP bằng Nmap

▪ Ubuntu virtual machine

Trang 25

▪ Android virtual machine

▪ Web browsers with an Internet connection ▪ Administrator privileges to run the tools Để thực hiện thí nghiệm này, bạn cần:

▪ Máy ảo Windows 11

▪ Máy ảo Windows Server 2022▪ Máy ảo Windows Server 2019▪ Máy ảo Parrot Security

▪ Máy ảo Ubuntu▪ Máy ảo Android

▪ Trình duyệt web có kết nối Internet▪ Đặc quyền Admin để Run các công cụ

SNMP (Giao thức quản lý mạng đơn giản) là một giao thức lớp ứng dụng Run trênUDP (Giao thức gói dữ liệu người dùng) và duy trì và quản lý các bộ định tuyến, trungtâm và thiết bị chuyển mạch trên mạng IP Các tác nhân SNMP Run trên các thiết bịmạng trên mạng Windows và UNIX.

SNMP enumeration uses SNMP to create a list of the user accounts and devices ona target computer SNMP employs two types of software components for communication:the SNMP agent and SNMP management station The SNMP agent is located on thenetworking device, and the SNMP management station communicates with the agent

Liệt kê SNMP sử dụng SNMP để tạo danh sách các tài khoản người dùng và thiếtbị trên máy tính mục tiêu SNMP sử dụng hai loại thành phần phần mềm để liên lạc: tácnhân SNMP và trạm quản lý SNMP Tác nhân SNMP được đặt trên thiết bị mạng và trạmquản lý SNMP liên lạc với tác nhân.

2.6 Lab Tasks

2.6.1 Task 1: Perform SNMP Enumeration using snmp-check

2.6.1 Nhiệm vụ 1: Thực hiện liệt kê SNMP bằng cách sử dụng snmp-check

Trang 26

snmp-check is a tool that enumerates SNMP devices, displaying the output in a

simple and reader-friendly format The default community used is "public." As an ethical

hacker or penetration tester, it is imperative that you find the default community stringsfor the target device and patch them up

snmp-check là một công cụ liệt kê các thiết bị SNMP, hiển thị đầu ra ở định dạng

đơn giản và thân thiện với người đọc Cộng đồng mặc định được sử dụng là "công khai."

Là một hacker có đạo đức hoặc người kiểm tra thâm nhập, điều bắt buộc là bạn phải tìmcác chuỗi cộng đồng mặc định cho thiết bị mục tiêu và vá chúng

Here, we will use the snmp-check tool to perform SNMP enumeration on thetarget IP address

Ở đây, chúng ta sẽ sử dụng công cụ snmp-check để thực hiện liệt kê SNMP trênđịa chỉ IP đích

Note: We will use the Parrot Security (10.10.1.13) machine to target theWindows Server 2022 (10.10.1.22) machine

Note: Chúng tôi sẽ sử dụng máy Parrot Security (10.10.1.13) để nhắm mục tiêu

vào máy Windows Server 2022 (10.10.1.22)

1 Turn on the Parrot Security and Windows Server 2022 virtual machines 2 In the login page, the attacker username will be selected by default Enterpassword as toor in the Password field and press Enter to log in to the machine

Note: If a Parrot Updater pop-up appears at the top-right corner of Desktop,

ignore and close it

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

click No to close the window

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

window

Note: Before starting SNMP enumeration, we must first discover whether the

SNMP port is open SNMP uses port 161 by default; to check whether this port isopened, we will first run Nmap port scan

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

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

Enter

Note: The password that you type will not be visible

6 Now, type cd and press Enter to jump to the root directory 1 Bật máy ảo Parrot Security và Windows Server 2022.

Trang 27

2 Trong trang đăng nhập, tên người dùng của attacker sẽ được chọn theo 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

Note: Trước khi bắt đầu liệt kê SNMP, trước tiên chúng ta phải khám phá xem

cổng SNMP có đang mở hay không SNMP sử dụng cổng 161 theo mặc định; đểkiểm tra xem cổng này đã được mở chưa, trước tiên chúng ta sẽ Run Nmap portscan

4 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 với tư cách là người dùng root

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

Enter

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

6 Bây giờ, gõ cd và nhấn Enter để chuyển đến thư mục gốc

7 In the Parrot Terminal window, type nmap -SU -p 161 [Target IP address]

(in this example, the target IP address is 10.10.1.22) and press Enter

Note: -sU performs a UDP scan and -p specifies the port to be scanned

8 The results appear, displaying that port 161 is open and being used by SNMP,

as shown in the screenshot

7 Trong cửa sổ Parrot Terminal, nhập nmap -SU -p 161 [Địa chỉ IP mục tiêu]

(trong ví dụ này: địa chỉ IP đích là 10.10.1.22) và nhấn Enter

Trang 28

Note: -sU thực hiện quét UDP và -p chỉ định cổng cần quét

8 Kết quả xuất hiện, hiển thị rằng cổng 161 đang mở và đang được SNMP sử

dụng, như thể hiện trong ảnh chụp màn hình

9 We have established that the SNMP service is running on the target machine.Now, we shall exploit it to obtain information about the target system

10 In the Parrot Terminal window, type snmp-check [Target IP Address] (in

this example, the target IP address is 10.10.1.22) and press Enter

11 The result appears as shown in the screenshot It reveals that the extracted

SNMP port 161 is being used by the default "public" community string

Note: If the target machine does not have a valid account, no output will be

displayed

12 The snmp-check command enumerates the target machine, listing sensitive

information such as System information and User accounts

9 Chúng tôi đã thiết lập rằng dịch vụ SNMP đang Run trên máy đích Bây giờ,chúng ta sẽ khai thác nó để có được thông tin về hệ thống mục tiêu.

10 Trong cửa sổ Parrot Terminal, nhập snmp-check [Địa chỉ IP mục tiêu]

(trong ví dụ này, địa chỉ IP mục tiêu là 10.10.1.22) và nhấn Enter.

11 Kết quả xuất hiện như thể hiện trong ảnh chụp màn hình Nó tiết lộ rằng cổng

SNMP 161 được trích xuất đang được sử dụng bởi chuỗi cộng đồng "công khai"

mặc định.

Note: Nếu máy đích không có tài khoản hợp lệ, sẽ không có đầu ra nào được hiển

thị

Trang 29

12 Lệnh snmp-check liệt kê máy đích, liệt kê các thông tin nhạy cảm như thông

tin hệ thống và tài khoản người dùng

13 Scroll down to view detailed information regarding the target network under

the following sections: Network information, Network interfaces, Network IPand Routing information, and TCP connections and listening ports

13 Cuộn xuống để xem thông tin chi tiết về mạng đích theo các phần sau:

Network information, Network interfaces, Network IP và Routinginformation, và TCP connections và listening ports

Trang 30

14 Similarly, scrolling down reveals further sensitive information on Processes,

Storage information, File system information, Device information, Share, etc.

14 Tương tự, cuộn xuống hiển thị thêm thông tin nhạy cảm về Processes,

Storage information, File system information, Device information, Share, v.v.

Trang 33

15 Attackers can further use this information to discover vulnerabilities in thetarget machine and further exploit them to launch attacks

16 This concludes the demonstration of performing SNMP enumeration using thesnmp-check

17 Close all open windows and document all the acquired information

15 Những attacker có thể sử dụng thêm thông tin này để phát hiện các lỗ hổngtrong máy mục tiêu và tiếp tục khai thác chúng để phát động các cuộc tấn công.16 Điều này kết thúc việc trình diễn thực hiện liệt kê SNMP bằng cách sử dụngsnmp-check.

17 Đóng tất cả các cửa sổ đang mở và ghi lại tất cả thông tin thu được.

2.6.2 Task 2: Perform SNMP Enumeration using SoftPerfect Network Scanner

2.6.2 Nhiệm vụ 2: Thực hiện liệt kê SNMP bằng SoftPerfect Network Scanner

SoftPerfect Network Scanner can ping computers, scan ports, discover sharedfolders, and retrieve practically any information about network devices via WMI(Windows Management Instrumentation), SNMP, HTTP, SSH, and PowerShell

SoftPerfect Network Scanner có thể ping máy tính, quét cổng, khám phá các thưmục được chia sẻ và truy xuất thực tế bất kỳ thông tin nào về các thiết bị mạng thông quaWMI (Windows Management Instrumentation), SNMP, HTTP, SSH và PowerShell.

The program also scans for remote services, registries, files, and performancecounters It can check for a user-defined port and report if one is open, and is able toresolve hostnames as well as auto-detect your local and external IP range SoftPerfectNetwork Scanner offers flexible filtering and display options, and can export the NetScanresults to a variety of formats, from XML to JSON In addition, it supports remoteshutdown and Wake-On-LAN

Chương trình cũng quét các dịch vụ từ xa, đăng ký, tệp và bộ đếm hiệu suất Nó cóthể kiểm tra cổng do người dùng xác định và báo cáo nếu một cổng đang mở và có thểphân giải tên máy chủ cũng như tự động phát hiện dải IP cục bộ và bên ngoài của bạn.SoftPerfect Network Scanner cung cấp các tùy chọn lọc và hiển thị linh hoạt và có thểxuất kết quả NetScan sang nhiều định dạng khác nhau, từ XML sang JSON Ngoài ra, nóhỗ trợ tắt máy từ xa và Wake-On-LAN.

Here, we will use the SoftPerfect Network Scanner to perform SNMP enumerationon a target system

Ở đây, chúng ta sẽ sử dụng SoftPerfect Network Scanner để thực hiện liệt kêSNMP trên một hệ thống đích.

Trang 34

Note: Ensure that the Parrot Security and Windows Server 2022 virtual

machines are running

Note: Đảm bảo rằng các máy ảo Parrot Security và Windows Server 2022 đang

Note: Networks screen appears, click Yes to allow your PC to be discoverable by

other PCs and devices on the network

3 Click Search icon () on the Desktop Type network in the search field, the

Network Scanner appears in the results, select Network Scanner to launch it

1 Bật các máy ảo Windows 11, Windows Server 2019, Ubuntu và Android.2 Chuyển sang máy ảo Windows Server 2019 Bấm Ctrl+Alt+Del, sau đó đăngnhập vào hồ sơ người dùng Administrator bằng Pa$$word làm mật khẩu

Note: Màn hình Mạng xuất hiện, bấm Có để cho phép các PC và thiết bị khác trên

mạng có thể phát hiện PC của bạn

3 Nhấp chuột biểu tượng Search () trên Desktop Nhập Network vào trườngtìm kiếm, Network Scanner xuất hiện trong kết quả, chọn Network Scanner để

khởi chạy nó

Trang 35

Note: If a User Account Control pop-up appears, click Yes

4 When the Welcome to the Network Scanner! wizard appears, click Continue

Note: Nếu cửa sổ bật lên User Account Control xuất hiện, hãy bấm Yes

4 Khi Welcome to the Network Scanner! xuất hiện, hãy nhấp vào Continue

5 The SoftPerfect Network Scanner GUI window will appear, as shown in the

screenshot

5 Cửa sổ SoftPerfect Network Scanner GUI sẽ xuất hiện, như thể hiện trong

ảnh chụp màn hình

Trang 36

6 Click on the Options menu, and select Remote SNMP from the dropdownlist The SNMP pop-up window will appear

6 Nhấp vào menu Options và chọn Remote SNMP từ danh sách thả xuống.Các cửa sổ bật lên SNMP sẽ xuất hiện

Trang 37

7 Click the Mark All/None button to select all the items available for SNMP

scanning and close the window

7 Nhấn vào nút Mark All/None có để chọn tất cả các mục có sẵn để quét SNMP

và đóng cửa sổ

Trang 38

8 To scan your network, enter an IP range in the IPv4 From and To fields (in thisexample, the target IP address range is 10.10.1.5-10.10.1.23), and click the Start

9 Thanh trạng thái ở góc dưới bên phải của GUI hiển thị trạng thái quét

10 Kết quả quét xuất hiện, hiển thị các máy chủ đang hoạt động trong dải địa chỉIP đích, như thể hiện trong ảnh chụp màn hình.

Trang 39

11 To view the properties of an individual IP address, right-click a particular IP

address (in this example, 10.10.1.22) and select Properties, as shown in the

screenshot

11 Để xem các thuộc tính của một địa chỉ IP riêng lẻ, nhấp chuột phải vào một địa

chỉ IP cụ thể (trong ví dụ này, 10.10.1.22) và chọn Properties, như thể hiện trong

ảnh chụp màn hình

12 The Properties window appears, displaying the Shared Resources, IP

Address, MAC Address, Response Time, Host Name, Uptime, and SystemDescription of the machine corresponding to the selected IP address

12 Cửa sổ Properties xuất hiện, hiển thị Shared Resources, IP Address, MAC

Address, Response Time, Host Name, Uptime, và System Description của máy

tương ứng với địa chỉ IP đã chọn

Trang 40

13 Close the Properties window

14 To view the shared folders, note the scanned hosts that have a + node beforethem Expand the node to view all the shared folders

Ngày đăng: 10/08/2024, 21:28

w