SITUATION: A rogue insider has compromised CyberCorp's infrastructure. Sensitive client data, including government contracts, is at risk. The attacker has left behind a complex trail of misconfigured permissions, hidden files, and encrypted messages.
YOUR MISSION: You are the lead forensic analyst. You must navigate through the compromised Linux systems, identify security vulnerabilities, decrypt hidden messages, and secure the breach before the data is exfiltrated at midnight.
2025-11-17 03:47:23 [INFO] User login: jsmith
2025-11-17 03:47:31 [WARN] Failed sudo attempt: jsmith
2025-11-17 03:47:45 [INFO] User login: admin_backup
2025-11-17 03:47:52 [CRITICAL] Permission escalation detected: admin_backup
2025-11-17 03:48:15 [WARN] File access: /home/ceo/confidential/contracts.pdf
2025-11-17 03:48:23 [CRITICAL] Data exfiltration attempt blocked
2025-11-17 03:49:01 [INFO] User logout: admin_backup
/home/ ├── jsmith/ │ ├── .bash_history (rw-r--r--) │ └── documents/ (rwxr-xr-x) ├── admin_backup/ ← SUSPICIOUS │ ├── .ssh/ (rwx------) │ ├── tools/ (rwxrwxrwx) ← MISCONFIGURED! │ └── secret_data.enc (rw-------) └── ceo/ ├── confidential/ (rwx------) └── contracts.pdf (rw-------)
QUESTION 1: The attacker used the admin_backup account. Examine the file permissions above. Which directory has the MOST DANGEROUS permission setting that allowed the attacker to plant malicious tools?
QUESTION 2: What chmod numeric value should this directory have for proper security (owner: rwx, group: r-x, others: no access)?
total 48
drwxr-xr-x 5 root root 4096 Nov 17 03:45 .
drwxr-xr-x 23 root root 4096 Nov 17 03:40 ..
-rw-rw-rw- 1 root finance 2048 Nov 17 03:47 salary_data.xlsx
-rwxrwxrwx 1 dbadmin db_team 1024 Nov 17 03:48 backup_script.sh
-rw-r--r-- 1 ceo executive 3072 Nov 17 03:46 quarterly_report.pdf
-rwxr-xr-x 1 root root 512 Nov 17 03:49 system_monitor.py
-rw------- 1 root root 4096 Nov 17 03:44 root_access_keys.pem
-rw-r--r-- 1 marketing team 1536 Nov 17 03:43 campaign_data.csv
You've discovered SEVEN files. Three of them have CRITICAL security vulnerabilities. Your task: identify all three vulnerable files and provide the correct permissions.
jsmith:x:1001:1001:John Smith:/home/jsmith:/bin/bash admin_backup:x:1002:1002:Backup Admin:/home/admin_backup:/bin/bash temp_contractor:x:1003:1003:Temporary Access:/home/temp_contractor:/bin/bash sys_monitor:x:1004:1004:System Monitor:/home/sys_monitor:/bin/bash
root:x:0: sudo:x:27:jsmith,admin_backup,temp_contractor admin:x:999:jsmith,admin_backup finance_admin:x:1050:jsmith,sys_monitor
temp_contractor pts/1 192.168.1.147 Sun Nov 17 03:47 - 03:49 (00:02) admin_backup pts/0 192.168.1.147 Sun Nov 17 03:47 - 03:51 (00:04) jsmith tty1 Sat Nov 16 09:15 still logged in sys_monitor pts/2 192.168.1.89 Sun Nov 17 02:30 - 02:33 (00:03)
TASK 1: Remove temp_contractor from sudo group (user should be deleted)
TASK 2: Remove admin_backup from sudo group (keep user, remove privilege)
TASK 3: Remove sys_monitor from finance_admin group
TASK 4: Create a new security_audit group for proper monitoring
total 32 drwx------ 2 admin_backup admin_backup 4096 Nov 17 03:48 . drwxr-xr-x 6 admin_backup admin_backup 4096 Nov 17 03:47 .. -rw-r----- 1 admin_backup admin_backup 512 Nov 17 03:48 .message1.enc -rwxr-x--- 1 admin_backup admin_backup 1024 Nov 17 03:48 .message2.enc -rw------- 1 admin_backup admin_backup 2048 Nov 17 03:48 .message3.enc -rwxrwx--- 1 admin_backup admin_backup 256 Nov 17 03:48 .key_fragment.txt
The attacker encoded a message using the NUMERIC VALUES of file permissions. Each file's permission number (3 digits) represents a letter's position in the alphabet.
Example: Permission 640 could mean: 6=F, 4=D, 0=? (ignore zeros)
Permission 754 = 7=G, 5=E, 4=D
Your task: Convert the permission values of .message1.enc, .message2.enc, and .message3.enc into letters (A=1, B=2, C=3... Z=26). Ignore zeros.
.message1.enc: -rw-r----- = 640 → 6, 4, 0 .message2.enc: -rwxr-x--- = 750 → 7, 5, 0 .message3.enc: -rw------- = 600 → 6, 0, 0 .key_fragment.txt: -rwxrwx--- = 770 → 7, 7, 0
DECODE THE MESSAGE: Extract non-zero digits from each file's permission (in order: message1, message2, message3, key_fragment). Convert to letters.
The decoded word will reveal the attacker's next target. Common targets include: DATABASE, FIREWALL, BACKUP, GATEWAY
The attacker has planted a time-bomb script in /opt/malware/payload.sh.
To neutralize the threat, you must write a COMPLETE bash script that: