3. The following sources all come from the same device (IP address 172.16.0.50) and were captured during a routine risk assessment. Use them to answer parts A through E.
Source 1 — Device Firewall Settings
Rule Number | Action | Source | Destination | Direction | Port Number | Protocol |
|---|---|---|---|---|---|---|
1 | Allow | ALL | 172.16.0.50 | Inbound | 80 | HTTP |
2 | Allow | ALL | 172.16.0.50 | Inbound | 443 | HTTPS |
3 | Allow | 10.0.0.0/8 | 172.16.0.50 | Inbound | 22 | SSH |
4 | Allow | ALL | 172.16.0.50 | Inbound | 3389 | RDP |
5 | Allow | 172.16.0.50 | ALL | Outbound | 53 | DNS |
6 | Allow | 172.16.0.50 | ALL | Outbound | 443 | HTTPS |
7 | Deny | ALL | 172.16.0.50 | Inbound | 3306 | MySQL |
8 | Deny | ALL | ALL | Inbound | ALL | ALL |
Source 2 — /home/sysadmin/.bash_history
cat /home/sysadmin/.bash_history
1 sudo apt-get update
2 sudo apt-get upgrade -y
3 systemctl restart nginx
4 cd /var/www/html/app
5 nano db_connect.php
6 ./deploy.sh
7 ufw status numbered
8 tail -f /var/log/nginx/access.logSource 3 — /var/log/auth.log
sudo tail -n 12 /var/log/auth.log
1 Oct 14 09:12:01 web01 sshd[1422]: Accepted publickey for sysadmin from 10.5.2.15 port 50212 ssh2
2 Oct 14 09:12:01 web01 sshd[1422]: pam_unix(sshd:session): session opened for user sysadmin
3 Oct 14 09:15:22 web01 xrdp[2105]: connection from 198.51.100.73 port 49152
4 Oct 14 09:15:23 web01 xrdp[2105]: pam_unix(xrdp-sesman:auth): authentication failure; logname= uid=0 euid=0 tty=xrdp ruser= rhost=198.51.100.73 user=admin
5 Oct 14 09:15:25 web01 xrdp[2106]: connection from 198.51.100.73 port 49154
6 Oct 14 09:15:26 web01 xrdp[2106]: pam_unix(xrdp-sesman:auth): authentication failure; logname= uid=0 euid=0 tty=xrdp ruser= rhost=198.51.100.73 user=administrator
7 Oct 14 09:15:28 web01 xrdp[2107]: connection from 198.51.100.73 port 49156
8 Oct 14 09:15:29 web01 xrdp[2107]: pam_unix(xrdp-sesman:auth): authentication failure; logname= uid=0 euid=0 tty=xrdp ruser= rhost=198.51.100.73 user=root
9 Oct 14 09:15:31 web01 xrdp[2108]: connection from 198.51.100.73 port 49158
10 Oct 14 09:15:32 web01 xrdp[2108]: pam_unix(xrdp-sesman:auth): authentication failure; logname= uid=0 euid=0 tty=xrdp ruser= rhost=198.51.100.73 user=sysadmin
11 Oct 14 09:18:45 web01 kernel: [UFW BLOCK] IN=eth0 OUT= MAC=00:15:5d:01:ca:05 SRC=203.0.113.88 DST=172.16.0.50 LEN=60 TOS=0x00 PREC=0x00 TTL=54 ID=12345 DF PROTO=TCP SPT=55214 DPT=3306 WINDOW=65535 RES=0x00 SYN URGP=0
12 Oct 14 09:20:00 web01 CRON[2210]: pam_unix(cron:session): session opened for user rootSource 4 — /var/log/nginx/access.log
sudo tail -n 8 /var/log/nginx/access.log
1 10.5.2.15 - - [14/Oct/202X:09:21:05 +0000] "GET / HTTP/1.1" 200 1452 "-" "Mozilla/5.0"
2 10.5.2.15 - - [14/Oct/202X:09:21:06 +0000] "GET /assets/style.css HTTP/1.1" 200 834 "http://172.16.0.50/" "Mozilla/5.0"
3 203.0.113.88 - - [14/Oct/202X:09:22:10 +0000] "GET /.env HTTP/1.1" 404 153 "-" "curl/7.68.0"
4 203.0.113.88 - - [14/Oct/202X:09:22:11 +0000] "GET /.git/config HTTP/1.1" 404 153 "-" "curl/7.68.0"
5 203.0.113.88 - - [14/Oct/202X:09:22:12 +0000] "GET /backup.zip HTTP/1.1" 404 153 "-" "curl/7.68.0"
6 203.0.113.88 - - [14/Oct/202X:09:22:13 +0000] "GET /db_connect.php.bak HTTP/1.1" 403 162 "-" "curl/7.68.0"
7 203.0.113.88 - - [14/Oct/202X:09:22:14 +0000] "GET /admin/ HTTP/1.1" 403 162 "-" "curl/7.68.0"
8 192.168.1.100 - - [14/Oct/202X:09:25:00 +0000] "GET /index.php HTTP/1.1" 200 2048 "-" "Mozilla/5.0"Source 5 — ls -l /var/www/html/app
ls -l /var/www/html/app
drwxr-xr-x 2 sysadmin www-data 4096 Oct 10 11:20 assets
-rw-r----- 1 sysadmin www-data 256 Oct 12 09:15 config.php
-rw-r----- 1 sysadmin www-data 512 Oct 12 09:15 db_connect.php
-rwxrwxrwx 1 sysadmin www-data 1024 Oct 14 09:10 deploy.sh
-rw-r--r-- 1 sysadmin www-data 4096 Oct 13 14:22 index.php
-rw-r--r-- 1 sysadmin www-data 2048 Oct 13 14:22 login.phpSource 6 — Acceptable Use Policy
Keep operating systems and software applications updated to the latest versions.
Use multi-factor authentication (MFA) for all remote administrative access.
Connecting approved encrypted USB drives for data backup purposes.
Storing credentials, passwords, or API keys in plaintext files.
Modifying firewall rules or access controls without formal change approval.
Consider the policy for the device in Source 6.
Explain how one part of the policy helps protect the device.
Explain how one rule in the current policy could be modified to make the device more secure. Include a specific example in your response.
In the authorization log (Source 3), there is evidence of a password attack.
Describe the evidence in the log file that indicates a password attack. Include specific entries from the log file in your response.
Identify the IP address of the adversary.
Consider the file listing in Source 5.
Explain how the permission settings for deploy.sh determine the level of access for that file for the owner, group, and all other users on the system.
Other than removing all permissions from all users, describe one way the permission settings for deploy.sh could be configured to restrict access for some users on the device.
Using the explanation from part C (ii), write one or more chmod commands that set the permissions described.
Consider the firewall settings in Source 1 and the authorization log in Source 3.
Explain how one connection attempt on the device was blocked by the device’s firewall. Include evidence from a log file in your response.
Other than allowing all traffic for all services, describe a modification to one firewall rule that would allow the connection attempt identified in part D (i).
Other than allowing the connection attempt identified in part D (i), describe one impact of your modification from part D (ii) on incoming or outgoing network traffic on the device.
Apart from the password attack identified in part B, there is evidence of another attack on the device in the web server access log (Source 4).
Determine the type of attack evidenced in the log file.
Describe specific information in the log file that indicates the attack named in part E (i).
Describe one way an automated system could halt this type of attack in real time.
This attack could be mitigated by an automated system, such as a firewall, IDS, IPS, or AI. Identify a different countermeasure that could mitigate, prevent, or deter the attack.
00:00
cat /home/sysadmin/.bash_history
1 sudo apt-get update
2 sudo apt-get upgrade -y
3 systemctl restart nginx
4 cd /var/www/html/app
5 nano db_connect.php
6 ./deploy.sh
7 ufw status numbered
8 tail -f /var/log/nginx/access.logsudo tail -n 12 /var/log/auth.log
1 Oct 14 09:12:01 web01 sshd[1422]: Accepted publickey for sysadmin from 10.5.2.15 port 50212 ssh2
2 Oct 14 09:12:01 web01 sshd[1422]: pam_unix(sshd:session): session opened for user sysadmin
3 Oct 14 09:15:22 web01 xrdp[2105]: connection from 198.51.100.73 port 49152
4 Oct 14 09:15:23 web01 xrdp[2105]: pam_unix(xrdp-sesman:auth): authentication failure; logname= uid=0 euid=0 tty=xrdp ruser= rhost=198.51.100.73 user=admin
5 Oct 14 09:15:25 web01 xrdp[2106]: connection from 198.51.100.73 port 49154
6 Oct 14 09:15:26 web01 xrdp[2106]: pam_unix(xrdp-sesman:auth): authentication failure; logname= uid=0 euid=0 tty=xrdp ruser= rhost=198.51.100.73 user=administrator
7 Oct 14 09:15:28 web01 xrdp[2107]: connection from 198.51.100.73 port 49156
8 Oct 14 09:15:29 web01 xrdp[2107]: pam_unix(xrdp-sesman:auth): authentication failure; logname= uid=0 euid=0 tty=xrdp ruser= rhost=198.51.100.73 user=root
9 Oct 14 09:15:31 web01 xrdp[2108]: connection from 198.51.100.73 port 49158
10 Oct 14 09:15:32 web01 xrdp[2108]: pam_unix(xrdp-sesman:auth): authentication failure; logname= uid=0 euid=0 tty=xrdp ruser= rhost=198.51.100.73 user=sysadmin
11 Oct 14 09:18:45 web01 kernel: [UFW BLOCK] IN=eth0 OUT= MAC=00:15:5d:01:ca:05 SRC=203.0.113.88 DST=172.16.0.50 LEN=60 TOS=0x00 PREC=0x00 TTL=54 ID=12345 DF PROTO=TCP SPT=55214 DPT=3306 WINDOW=65535 RES=0x00 SYN URGP=0
12 Oct 14 09:20:00 web01 CRON[2210]: pam_unix(cron:session): session opened for user rootsudo tail -n 8 /var/log/nginx/access.log
1 10.5.2.15 - - [14/Oct/202X:09:21:05 +0000] "GET / HTTP/1.1" 200 1452 "-" "Mozilla/5.0"
2 10.5.2.15 - - [14/Oct/202X:09:21:06 +0000] "GET /assets/style.css HTTP/1.1" 200 834 "http://172.16.0.50/" "Mozilla/5.0"
3 203.0.113.88 - - [14/Oct/202X:09:22:10 +0000] "GET /.env HTTP/1.1" 404 153 "-" "curl/7.68.0"
4 203.0.113.88 - - [14/Oct/202X:09:22:11 +0000] "GET /.git/config HTTP/1.1" 404 153 "-" "curl/7.68.0"
5 203.0.113.88 - - [14/Oct/202X:09:22:12 +0000] "GET /backup.zip HTTP/1.1" 404 153 "-" "curl/7.68.0"
6 203.0.113.88 - - [14/Oct/202X:09:22:13 +0000] "GET /db_connect.php.bak HTTP/1.1" 403 162 "-" "curl/7.68.0"
7 203.0.113.88 - - [14/Oct/202X:09:22:14 +0000] "GET /admin/ HTTP/1.1" 403 162 "-" "curl/7.68.0"
8 192.168.1.100 - - [14/Oct/202X:09:25:00 +0000] "GET /index.php HTTP/1.1" 200 2048 "-" "Mozilla/5.0"ls -l /var/www/html/app
drwxr-xr-x 2 sysadmin www-data 4096 Oct 10 11:20 assets
-rw-r----- 1 sysadmin www-data 256 Oct 12 09:15 config.php
-rw-r----- 1 sysadmin www-data 512 Oct 12 09:15 db_connect.php
-rwxrwxrwx 1 sysadmin www-data 1024 Oct 14 09:10 deploy.sh
-rw-r--r-- 1 sysadmin www-data 4096 Oct 13 14:22 index.php
-rw-r--r-- 1 sysadmin www-data 2048 Oct 13 14:22 login.php