You are on page 1of 156

ĐẠI HỌC QUỐC GIA HÀ NỘI

TRƯỜNG ĐẠI HỌC CÔNG NGHỆ

Trần Thị Hiền - 19020281

BÁO CÁO BÀI TẬP GIỮA KỲ

Môn học: An toàn và an ninh mạng


Giảng viên: TS. Nguyễn Đại Thọ

Hà Nội - 2021
MỤC LỤC

MỤC LỤC 1

LAB 4.1: Cài đặt dịch vụ chứng nhận 3

LAB 4.2: Cấu hình lớp ổ cắm an toàn 22

LAB 4.4: Cấu hình chứng chỉ tự động đăng ký 36

LAB 5.1: Bắt đầu với Kali Linux 46

LAB 5.2: Giả mạo IP với Hping3 65

LAB 5.3: Nhiễm độc ARP 86

LAB 5.4: Man-in-the-Middle Attack 110

LAB 9.1: Xác minh tính toàn vẹn của tệp máy chủ 125

LAB 9.2: Cài đặt FTP Server Service và Wireshark 137

LAB 9.3: Chụp và phân tích lưu lượng FTP 153


LAB 4.1: Cài đặt dịch vụ chứng nhận

Download Windows Server 2016 ISO


Download Windows Server 2016 thành công
Tạo một Virtual Machine mới tên là TranThiHien Windows Server

Chạy TranThiHien Windows Server vừa tạo


Chọn ổ đĩa và nhấn Start
Chọn Windows Server 2016 Standard Evaluation (Desktop Experience)
Sau khi nhập mật khẩu cho administrator

Truy cập vào Windows 2016 trên VirtualBox


Mở Server Manager => chọn Manage => chọn Add Roles and Features

Chọn Active Directory Domain Services


Chọn Next 3 lần, chọn Install
Chọn cờ thông báo và chọn Promote this server to a domain controller

Chọn Add a new forest => Nhập Test.local => Next


Nhập mật khẩu và chọn Next 2 lần

Nhập TEST và chọn Next 3 lần


Chọn Install
Mở Server Manager => Manage => Add Roles and Features … (Như các bước ở bên
trên)
Chọn Active Directory Certificate Services

Chọn Add Features => chọn Next 2 lần


Chọn Certificate Authority và Certification Authority Web Enrollment

Chọn Add Features => Chọn Next 3 lần => Install


Chọn Configure Active Directory Certificate Services => Chọn Next

Chọn Certification Authority và Certificate Authority Web Enrollment => Chọn Next
Ở Private Key, chọn Create a new private key => Next => Next
Chọn Configure => Close

Mở mmc
Chọn File => Add/Remove Snap-ins

Thêm các snap vào Console Root


Lưu file PKI
LAB 4.2: Cấu hình lớp ổ cắm an toàn

Chạy Windows Server ở Lab 4.1


Mở PKI => mở rộng Enterprise PKI => Chọn Test-WIN…

Nháy đúp vào CA Certificate


Mở rộng Certification Authority (Local) và chọn Test-WIN-..
Chọn Start => chọn Windows Administrative Tools => Internet Information Services
(IIS) Manager
Thực hiện bước 5
Chọn Default Web Site => Authentication

Chọn Default Web Site => SSL Settings


Chọn ServerName => Server Certificate
Chọn Default Web Site => Bindings
Thêm https ở cổng 443, chọn SSL certificate => OK

Chọn Default Web Site => SSL Settings =>chọn Require SSL => Apply
Tạo tài khoản user cho mục đích testing

Nhập email cho tài khoản vừa tạo


LAB 4.4: Cấu hình chứng chỉ tự động đăng ký

Chạy Windows server VM ở lab 4.2


Mở PKI, thêm Group Policy Management
Thực hiện các yêu cầu ở bước 3

Click phải vào Default Domain Policy => Chọn Edit


Click vào Public Key Policy

Click phải vào Certificate Services Client - Auto-enrollment => chọn Properties
Thực hiện các yêu cầu ở cuối bước 3
Ở PKI console, mở rộng Certificate Authority (Local) => mở rộng ServerName =>
Chọn Certificate Templates

Quay lại Console Root => Chọn Certificate Templates => Click phải User => Chọn
Duplicate Template
Thay đổi các thông số ở General

Thay đổi các thông số ở Request Handling tab


Ở tab Security chọn Add

Nhập tên và chọn OK


Thiết lập quyền cho tài khoản vừa tạo => Chọn OK
Quay lại Certificate Authority (Local) => click phải vào Certificate Templates =>
click New => click Certificate Template to Issue

Chọn ServerName => Chọn OK


Nháy đúp vào ServerName => Chọn Cancel
LAB 5.1: Bắt đầu với Kali Linux

Tải Kali Linux


Tạo một virtual machine có tên là Kali Linux TranThiHien => Chọn Create
Chọn VDI (Virtualbox Disk image), Dynamically allocated, set File size = 25GB =>
Chọn Create
Chọn Kali Linux 2016 => Chọn Start
Chọn Graphical install
Nhập Test.com => Chọn Continue
Nhập mật khẩu => Chọn Continue
Ở Partition disks chọn Yes => Chọn Continue
Ở Configure the package manager chọn No => Chọn Continue
Chọn No => Chọn Continue (Bước này em chọn No thì bị lỗi nên em chọn lại Yes thì
được ạ)
Nhập username và password
Vào terminal nhập ifconfig
Giá trị của inet là 127.0.0.1 nên cần start dịch vụ mạng
Chọn Machine => Settings => Network
Ping www.yahoo.com
Chạy Zenmap, nhập uet.vnu.edu.vn => Chọn Scan
LAB 5.2: Giả mạo IP với Hping3
Chọn Windows Server ở lab 4.1 => Settings => Network
Ở tab Adapter 1 chọn NAT Network => Chọn OK
Chọn Kali Linux ở lab 5.1 => Settings => Network
Ở tab Adapter 1 chọn NAT Network => Chọn OK
Mở Control Panel => Chọn Network and Sharing => Ethernet => Properties

Chọn Internet Protocol Version 4 => Chọn Properties


Nhập IP address và subnet mask => Chọn OK
Tạo một virtual machine Windows 10
Tạo virtual machine Windows 10 thành công
Mở Control Panel, click View by => Chọn Small icons => Network and Sharing
Center

Click Change adapters settings => Click phải chọn Ethernet => Chọn Properties
Chọn Internet Protocol Version 4 => Chọn Properties

Nhập IP address và subnet mask


Chạy Kali Linux, chọn Show application => chọn Settings
Mở Setting Wheel => Chọn IPv4 => Nhập IP address và Netmask => Chọn Apply
Vào Terminal nhập hping3 - help
Mở wireshark ở Kali Linux
Nhập hping3 -S 192.168.0.1
Click eth0 => Chọn Capture / Start
Chọn Stop
Start và chọn Continue without Saving
Chọn Stop
LAB 5.3: Nhiễm độc ARP

Chạy Kali Linux => Mở Terminal => Nhập ifconfig


Vào Windows 10 mở cmd, nhập ipconfig /all
Vào Windows Server mở cmd, nhập ipconfig /all
Ở Windows Server ping tới Windows 10
Nhập arp -a ở Windows Server
Ở cmd của Windows 10 nhập arp - a
Chạy Kali Linux, mở wireshark
Chọn Applications => Sniffing & Spoofing => ettercap-graphic
Chọn Sniff => Unified sniffing
Chọn Hosts => chọn Scan for hosts
Chọn Hosts => Chọn Hosts list
Chọn Add to Target 1
Chọn Add to Target 2
Chọn Mitm => Chọn ARP poisoning
Chọn Sniff remote connections => Chọn OK
Nhập arp -d* ở Windows 10
Nhập arp -d* ở bên Windows Server
LAB 5.4: Man-in-the-Middle Attack

ping từ Kali Linux đến Windows Server


Chọn Applications => chọn Sniffing/ Spoofing => Chọn Network Sniffers => Chọn
ettercap-graphical
Chọn unified sniffing => OK
Chọn Scan for hosts
Chọn Host list
Chọn Add to target 1, sau đó chọn Add to Target 2
Chọn Start sniffing
ARP poisoning
Chọn Sniff remote connections => OK
Chọn Manage the plugins
Nháy đúp vào remote_browser
Nhập www.google.com vào trình duyệt web của Windows Server
Nhập www.yahoo.com
Mở cmd nhập arp -d*
Web yahoo đã xuất hiện
LAB 9.1: Xác minh tính toàn vẹn của tệp máy chủ

Tải md5deep-4.4
Đổi tên md5deep-4.4 thành md5
Mở C:\Windows\System32\drivers\etc
Mở file host
Mở md5 bằng cmd => nhập dir
Copy dòng mã trong cmd và paste vào notepad
Lưu file notepad
Sau đó save
2 cái hash giống nhau
LAB 9.2: Cài đặt FTP Server Service và Wireshark

Chạy Windows Server => Mở Server Manager => Chọn Manage => Chọn Add Roles
and Features => Chọn Next
Chọn Next
Chọn Next
Chọn Install
Ở Server Manager => Chọn Tools => Chọn Internet Information Services (IIS)
Manager

Ở Server Manager Dashboard, chọn Add roles and features => Chọn Next
Chọn Next

Chọn Next
Chọn FTP Service => Chọn Next

Chọn Next
Chọn Install

Tạo FTP Data trong ổ C, trong thư mục FTP Data tạo file Credentials.txt
Mở IIS Manager, mở rộng Windows Server, nháy phải chọn Sites, chọn Add FTP Site

Nhập FTP Data và dẫn đường link tới folder đã tạo trước đó => chọn Next
Chọn địa chỉ IP và chọn No SSL => Chọn Next
Ở Authentication chọn Anonymous và Basic, All users. Ở Permissions chọn Read và
Write => chọn Finish

Mở Windows Firewall
Set turn off cho Domain, Private, Public => Chọn Apply => Chọn OK

Vào www.wireshark.com chọn Download


Tải wireshark

Chọn Run
Chọn Next

Chọn Install
Kết thúc cài đặt Wireshark
LAB 9.3: Chụp và phân tích lưu lượng FTP

Mở wireshark
Capture Ethernet
Mở cmd nhập cd \

You might also like