CAS-001 · Question #389
The security administrator finds unauthorized tables and records, which were not present before, on a Linux database server. The database server communicates only with one web server, which connects…
The correct answer is A. Privilege escalation F. Update crontab with: find / \( -perm -4000 \) -type f -print0 | xargs -0 ls -I | email.sh. The web server logs reveal three distinct attack attempts: (1) a URL-encoded SQL injection attempt via 'create%20table%20hidden', (2) a directory traversal attempt ('../../root/.bash_history'), and (3) a cross-site scripting probe. However, the critical finding is the 'ls -al…
Question
The security administrator finds unauthorized tables and records, which were not present before, on a Linux database server. The database server communicates only with one web server, which connects to the database server via an account with SELECT only privileges. Web server logs show the following:
90.76.165.40 -- [08/Mar/2014:10:54:04] "GET calendar.php?create%20table%20hidden HTTP/1.1" 200 5724 90.76.165.40 -- [08/Mar/2014:10:54:05] "GET ../../../root/.bash_history HTTP/1.1" 200 90.76.165.40 -- [08/Mar/2014:10:54:04] "GET index.php?user<;scrip>;Creat<;/scrip>; HTTP/1.1" 200 5724 The security administrator also inspects the following file system locations on the database server using the command `ls -al /root' drwxrwxrwx 11 root root 4096 Sep 28 22:45 . drwxr-xr-x 25 root root 4096 Mar 8 09:30 .. -rws------ 25 root root 4096 Mar 8 09:30 .bash_history -rw------- 25 root root 4096 Mar 8 09:30 .bash_history -rw------- 25 root root 4096 Mar 8 09:30 .profile -rw------- 25 root root 4096 Mar 8 09:30 .ssh Which of the following attacks was used to compromise the database server and what can the security administrator implement to detect such attacks in the future? (Select TWO).
Options
- APrivilege escalation
- BBrute force attack
- CSQL injection
- DCross-site scripting
- EUsing input validation, ensure the following characters aresanitized.<>
- FUpdate crontab with: find / ( -perm -4000 ) -type f -print0 | xargs -0 ls -I | email.sh
- GImplement the following PHP directive: $clean_user_input = addslashes($user_input)
- HSet an account lockout policy
How the community answered
(63 responses)- A46% (29)
- B2% (1)
- C27% (17)
- D8% (5)
- E2% (1)
- G3% (2)
- H13% (8)
Explanation
The web server logs reveal three distinct attack attempts: (1) a URL-encoded SQL injection attempt via 'create%20table%20hidden', (2) a directory traversal attempt ('../../root/.bash_history'), and (3) a cross-site scripting probe. However, the critical finding is the 'ls -al /root' output showing 'drwxrwxrwx' permissions on the root directory - meaning the root home directory is world-writable. This is evidence of privilege escalation: an attacker has gained or is attempting to gain elevated privileges by exploiting misconfigured file system permissions. The appropriate remediation is option F, which uses 'find' with '-perm -4000' to locate all SUID (Set User ID) binaries - files that run with the owner's privileges rather than the caller's. SUID binaries are a classic privilege escalation vector. Discovering and auditing them via crontab-scheduled scanning allows the administrator to monitor for unauthorized privilege escalation paths. Option E (input sanitization for XSS) addresses a symptom seen in the logs but not the root cause of the unauthorized tables/records or the filesystem misconfiguration.
Topics
Community Discussion
No community discussion yet for this question.