SV-259159r1003736_rule
V-259159
SRG-APP-000516-WSR-000174
VCLD-80-000101
CAT II
10
Navigate to and open:
/opt/vmware/etc/lighttpd/applmgmt-lighttpd.conf
If header "X-Content-Type-Options" is not present, add the following line to the end of the file:
setenv.add-response-header += ("X-Content-Type-Options" => "nosniff")
If header "X-Content-Type-Options" is present and not set to "nosniff", update the value as shown below:
"X-Content-Type-Options" => "nosniff",
Note: The last line in the parameter does not need a trailing comma if part of a multi-line configuration.
Restart the service with the following command:
# systemctl restart cap-lighttpd
At the command prompt, run the following command:
# /opt/vmware/cap_lighttpd/sbin/lighttpd -p -f /var/lib/vmware/cap-lighttpd/lighttpd.conf 2>/dev/null|awk '/setenv\.add-response-header/,/\)/'|sed -e 's/^[ ]*//'|grep "X-Content-Type-Options"
Example result:
"X-Content-Type-Options" => "nosniff",
If the response header "X-Content-Type-Options" is missing or not configured to "nosniff", this is a finding.
Note: The command must be run from a bash shell and not from a shell generated by the "appliance shell". Use the "chsh" command to change the shell for the account to "/bin/bash". Refer to KB Article 2100508 for more details:
https://kb.vmware.com/s/article/2100508
V-259159
False
VCLD-80-000101
At the command prompt, run the following command:
# /opt/vmware/cap_lighttpd/sbin/lighttpd -p -f /var/lib/vmware/cap-lighttpd/lighttpd.conf 2>/dev/null|awk '/setenv\.add-response-header/,/\)/'|sed -e 's/^[ ]*//'|grep "X-Content-Type-Options"
Example result:
"X-Content-Type-Options" => "nosniff",
If the response header "X-Content-Type-Options" is missing or not configured to "nosniff", this is a finding.
Note: The command must be run from a bash shell and not from a shell generated by the "appliance shell". Use the "chsh" command to change the shell for the account to "/bin/bash". Refer to KB Article 2100508 for more details:
https://kb.vmware.com/s/article/2100508
M
5571