BỘ GIÁO DỤC VÀ ĐÀO TẠO
TRƯỜNG ĐẠI HỌC SƯ PHẠM KỸ THUẬT
TP.HCM KHOA CÔNG NGHỆ THÔNG TIN
BỘ MÔN AN TOÀN THÔNG TIN
🙚🙤🙦🙘
BÁO CÁO BÀI THỰC HÀNH
LAB 03: Authentication
MÃ MÔN HỌC: INSE330380_23_2_03
THỰC HIỆN: Lê Quang Trọng Nghĩa
MSSV: 22162029
GI=NG VIÊN HƯỚNG DẪN: TS. HuAnh Nguyên ChCnh
Tp. Hồ ChC Minh, tháng 03 năm 2024
1. Password policies
a) Linux:Ubuntu
Step 1. Install package: PAM (lib-pamquality)
$sudoaptinstalllibpam-pwquality
Step 2. Edit the configuration:
$sudovi/etc/pam.d/common-password
Options:
o Retry = 4 : Sốlầnliêntiếpngườidùngcóthểnhậpsaimậtkhẩu
o Minlen = 9 : độdàingắnnhấtcủamậtkhẩu
o Difok = 4 : Sốkýtựcóthểgiốngvớimậtkhẩu
o Lcredit = -2: Sốchữthườngtốithiểulà2
o Ucredit = -2: Sốchữhoatốithiểulà2
o Dcredit = -1: Sốchữsốtốithiểulà1
o Ocredit = -1: Kýtựđặcbiệttốithiểulà1
o Reject_username: Từchốimậtkhẩuchứatênngườidùng
o Enforce_for_root: Cũngthựcthichínhsáchchongườidùngroot.
- ĐểchỉnhsửacầnphảivôINSERT bằngcúpháp sauđóđổicúphápShift + A,
thành:
password requisite pam_pwquality.so retry=4 minlen=9 difok=4 lcredit=-
2 ucredit=-2 dcredit=-1 ocredit=-1 reject_username enforce_for_root
Đểthoátragõ‘ :qw!
Verify the configuration (Xác thực cấu hình) :
Tạotàikhoảnbằng2câulệnh:$sudouseraddtestuser
 $sudopasswdtestuser
Đăngnhậpvàouser:testuser(chuyểnmànhình:Ctrl+Alt+F1,quayvề:Ctrl
+Alt+F7.
Step 3. Edit the configuration:
$sudovi/etc/login.defs
- Cấuhìnhnàyđểđiềuchỉnhcácquytắcliênquanđếntuổithọmậtkhẩu(password
agingcontrols)vàcấuhìnhcácgiớihạnchoviệctựđộngchọnUID(UserID)khitạo
mớitàikhoảnbằnglệnhuseradd.Dướiđâylàgiảithíchtừngphần:
Min/Max Values for Automatic UID Selection:
+ UID_MIN UID_MAX làgiớihạntốithiểuvàtốiđachoviệctựđộng
chọn khibạntạomộttàikhoảnmớibằnglệnhUser ID (UID) useradd.
+ Trongtrườnghợpnày,tàikhoảnmớisẽđượcgánmộtUIDtrongkhoảngtừ
1000đến60000.Điềunàycónghĩalànếubạntạomộttàikhoảnmớimàkhôngcungcấp
UIDcụthể,hệthốngsẽtựchọnUIDtrongkhoảngnàyđểgánchotàikhoản.
+ Việcgiớihạngiữa và giúpquảnlý tránhxungUID_MIN UID_MAX UID
độtvàhỗtrợquảnlýtàikhoảnngườidùngtrênhệthống
LOGIN_RETRIES: Sốlầnthửpassword
LOGIN_TIMEOUT:Thờigiantốiđađểđăngnhập
b) MS Windows
- Tạomộttàikhoảnvàkiểmtramộtsốchứcnăng:
+ Độdàimậtkhẩutốithiểu
+ Mậtkhẩumạnh
+ Ngưỡngkhóatàikhoản
Bước 1: Thiếtlậpcấutrúcliênkếtmạng(Set up the network topology)
Cấu hình IP cho Window Server 2022
Cấu hình IP cho Windows 10
Tiếnhànhpingthử2máy:
Bước 2: NângmáyServerlênthànhDomainController(HCMUTE.VN) vàtạomột
tàikhoản(testusesr)
- ĐầutiêntảiActive Directory Domain Services
- SauđócấuhìnhDomain Controller
- CấuhìnhmậtkhẩuchoDomain Controller:
- HiệnraDomain Name:
Bước 3: ChoPCgianhậpvàoDomainController(tài khoản : testuser)
- Đầutiên,tạotàikhoảntestuser:Tools → Active Directory Users and Computers
→ HCMUTE.VN → Users → bấm chuột trái → New →User. Sauđónhậpthông
tintàikhoản và .testuser password
- Cho gianhậpvào : →PC (Win 10) Domain Controller System Advanced system
settings → Change → Chọn Domain: HCMUTE.VN → OK → Đăng nhập tài khoản
đã tạo ở trên
Bước 4: CấuhìnhchínhsáchmậtkhẩutrongDomain Controller
- Đểcấuhìnhchínhsáchtathựchiện:Tools →Group Policy Management Editor →
Domains → HCMUTE.VN → Default Domain Policy → Edit → Computer
Configuration → Policies → Windows Settings → Security Settings → Account
Policies → Password Policy.
- Sauđóchỉnhnhữngchínhsáchtươngứngmàmìnhmuốnchỉnh
VD: Chỉnhpasswordlengthsang5.
- Chỉnh lên4(Khinhậpsaimậtkhẩu4lầntàikhoảnsẽbịAccount lockout threshold
khóa)
- Accountlockoutduration:thờigiankhóalà5phút.
Bước 5: Xácthựccácchínhsáchcấuhìnhởmáyclient
ÁpdụngchínhsáchAccountlockoutthreshold(nhậpsaimậtkhẩuquá4lầnthì
thựchiệnkhóa).
Thờigiankhóalà5phút.
2. WiFi authentication (WPA2)
Networktopology
Step 1. Configure DHCP server
- IPaddress:192.168.10.254
- DHCPserver:
o Network:192.168.10.0/24
o IPrange:192.168.10.100–192.168.10.200
o Defaultgateway:192.168.10.1
o DNS:8.8.8.8
Step 2. Configure AP
- SSID:ATTT
- Authentication:WPA2–Personal
- Password:12345678
Step 3. Verify the configuration
TestontheLaptop:IPaddress,pingtootherPCs.
3. Authentication with Radius server (802.1X)
Networktopology:
Labenvironment:Cisco Packet Tracer
Step 1. Configure IP address & DHCP server
- DHCPserver:192.168.10.254/24
- ConfigureDHCPserver
o Network:192.168.10.0/24
o IPrange:192.168.10.100–192.168.10.200
o Defaultgateway:192.168.10.1
o DNS:8.8.8.8
Step 2. Configure AP’s IP address
- AP’sIPaddress:192.168.10.250/24
- SSID:ATTT
- Authentication(radiusserver):WPA2–Enterprise
Step 3. Configure RADIUS server
- SettheIPaddressoftheRadiusclient(theauthenticator–AP’sIPaddress)
- Setthe key-ID
- Createaccounts
Step 4. Configure RADIUS client ( authenticator) on the AP
- SettheIPaddressoftheRadiusserver
- Setthe (thesameasKey-IDontheRadiusserver)key-ID

Preview text:

BỘ GIÁO DỤC VÀ ĐÀO TẠO
TRƯỜNG ĐẠI HỌC SƯ PHẠM KỸ THUẬT
TP.HCM KHOA CÔNG NGHỆ THÔNG TIN
BỘ MÔN AN TOÀN THÔNG TIN 🙚🙤🙦  🙘
BÁO CÁO BÀI THỰC HÀNH LAB 03: Authentication
MÃ MÔN HỌC: INSE330380_23_2_03
THỰC HIỆN: Lê Quang Trọng Nghĩa MSSV: 22162029
GI=NG VIÊN HƯỚNG DẪN: TS. HuAnh Nguyên ChCnh

Tp. Hồ ChC Minh, tháng 03 năm 2024 1. Password policies a) Linux:Ubuntu
Step 1. Install package: PAM (lib-pamquality)
$sudoaptinstalllibpam-pwquality
Step 2. Edit the configuration:
$sudovi/etc/pam.d/common-password Options: o
Retry = 4 : Sốlầnliêntiếpngườidùngcóthểnhậpsaimậtkhẩu o
Minlen = 9 : độdàingắnnhấtcủamậtkhẩu o
Difok = 4 : Sốkýtựcóthểgiốngvớimậtkhẩu o
Lcredit = -2: Sốchữthườngtốithiểulà2 o
Ucredit = -2: Sốchữhoatốithiểulà2 o
Dcredit = -1: Sốchữsốtốithiểulà1 o
Ocredit = -1: Kýtựđặcbiệttốithiểulà1 o
Reject_username: Từchốimậtkhẩuchứatênngườidùng o
Enforce_for_root: Cũngthựcthichínhsáchchongườidùngroot.
- ĐểchỉnhsửacầnphảivôINSERT bằngcúphápShift + A, sauđóđổicúpháp thành:
password requisite pam_pwquality.so retry=4 minlen=9 difok=4 lcredit=-
2 ucredit=-2 dcredit=-1 ocredit=-1 reject_username enforce_for_root
 Đểthoátragõ‘ ’ :qw!
Verify the configuration (Xác thực cấu hình) :
Tạotàikhoảnbằng2câulệnh:$sudouseraddtestuser
 $sudopasswdtestuser
Đăngnhậpvàouser:testuser(chuyểnmànhình:Ctrl+Alt+F1,quayvề:Ctrl +Alt+F7.
Step 3. Edit the configuration:
$sudovi/etc/login.defs
- Cấuhìnhnàyđểđiềuchỉnhcácquytắcliênquanđếntuổithọmậtkhẩu(password
agingcontrols)vàcấuhìnhcácgiớihạnchoviệctựđộngchọnUID(UserID)khitạo
mớitàikhoảnbằnglệnhuseradd.Dướiđâylàgiảithíchtừngphần: 
Min/Max Values for Automatic UID Selection: +
UID_MIN UID_MAX làgiớihạntốithiểuvàtốiđachoviệctựđộng
chọnUser ID (UID) khibạntạomộttàikhoảnmớibằnglệnhuseradd. +
Trongtrườnghợpnày,tàikhoảnmớisẽđượcgánmộtUIDtrongkhoảngtừ
1000đến60000.Điềunàycónghĩalànếubạntạomộttàikhoảnmớimàkhôngcungcấp
UIDcụthể,hệthốngsẽtựchọnUIDtrongkhoảngnàyđểgánchotàikhoản. +
ViệcgiớihạngiữaUID_MIN vàUID_MAX giúpquảnlý tránhxung UID
độtvàhỗtrợquảnlýtàikhoảnngườidùngtrênhệthống 
LOGIN_RETRIES: Sốlầnthửpassword 
LOGIN_TIMEOUT:Thờigiantốiđađểđăngnhập b) MS Windows
- Tạomộttàikhoảnvàkiểmtramộtsốchứcnăng:
+ Độdàimậtkhẩutốithiểu + Mậtkhẩumạnh
+ Ngưỡngkhóatàikhoản
Bước 1: Thiếtlậpcấutrúcliênkếtmạng(Set up the network topology)
Cấu hình IP cho Window Server 2022
Cấu hình IP cho Windows 10
 Tiếnhànhpingthử2máy:
Bước 2: NângmáyServerlênthànhDomainController(HCMUTE.VN) vàtạomột
tàikhoản(testusesr)
- ĐầutiêntảiActive Directory Domain Services
- SauđócấuhìnhDomain Controller -
CấuhìnhmậtkhẩuchoDomain Controller: -
HiệnraDomain Name:
Bước 3: ChoPCgianhậpvàoDomainController(tài khoản : testuser)
- Đầutiên,tạotàikhoảntestuser:Tools → Active Directory Users and Computers
→ HCMUTE.VN → Users → bấm chuột trái → New →User. Sauđónhậpthông
tintàikhoảntestuser vàpassword.
- ChoPC (Win 10)gianhậpvàoDomain Controller:System →Advanced system
settings → Change → Chọn Domain: HCMUTE.VN → OK → Đăng nhập tài khoản đã tạo ở trên
Bước 4: CấuhìnhchínhsáchmậtkhẩutrongDomain Controller
- Đểcấuhìnhchínhsáchtathựchiện:Tools →Group Policy Management Editor →
Domains → HCMUTE.VN → Default Domain Policy → Edit → Computer
Configuration → Policies → Windows Settings → Security Settings → Account
Policies → Password Policy.

- Sauđóchỉnhnhữngchínhsáchtươngứngmàmìnhmuốnchỉnh
VD: Chỉnhpasswordlengthsang5.
- ChỉnhAccount lockout threshold lên4(Khinhậpsaimậtkhẩu4lầntàikhoảnsẽbị khóa)
- Accountlockoutduration:thờigiankhóalà5phút.
Bước 5: Xácthựccácchínhsáchcấuhìnhởmáyclient
 ÁpdụngchínhsáchAccountlockoutthreshold(nhậpsaimậtkhẩuquá4lầnthì thựchiệnkhóa).
 Thờigiankhóalà5phút.
2. WiFi authentication (WPA2) Networktopology
Step 1. Configure DHCP server - IPaddress:192.168.10.254 - DHCPserver: o Network:192.168.10.0/24 o
IPrange:192.168.10.100–192.168.10.200 o
Defaultgateway:192.168.10.1 o DNS:8.8.8.8 Step 2. Configure AP - SSID:ATTT -
Authentication:WPA2–Personal - Password:12345678
Step 3. Verify the configuration
TestontheLaptop:IPaddress,pingtootherPCs.
3. Authentication with Radius server (802.1X) Networktopology:
Labenvironment:Cisco Packet Tracer
Step 1. Configure IP address & DHCP server
-
DHCPserver:192.168.10.254/24 - ConfigureDHCPserver o Network:192.168.10.0/24 o
IPrange:192.168.10.100–192.168.10.200 o
Defaultgateway:192.168.10.1 o DNS:8.8.8.8
Step 2. Configure AP’s IP address -
AP’sIPaddress:192.168.10.250/24 - SSID:ATTT -
Authentication(radiusserver):WPA2–Enterprise
Step 3. Configure RADIUS server -
SettheIPaddressoftheRadiusclient(theauthenticator–AP’sIPaddress) - Setthekey-ID - Createaccounts
Step 4. Configure RADIUS client ( authenticator) on the AP -
SettheIPaddressoftheRadiusserver -
Setthekey-ID(thesameasKey-IDontheRadiusserver)