Trustwave SpiderLabs Security Advisory TWSL2016-003: Unsafe unlinking of files in Sophos Antivirus Published: 03/09/2016 Version: 1.0 Vendor: Sophos (www.sophos.com) Product: Sophos Anti-Virus Version affected: prior to 9.2.10 for Mac OS X Product description: Anti-Virus for Mac OS X platform. Finding 1: Unsafe unlinking of files Credit: Martin Rakhmanov of Trustwave SophosAutoUpdate process on Mac OS X runs as root. It unsafely unlinks file /tmp/.com.sophos.sau.lock when Sophos Update is launched via GUI or via /usr/local/bin/SophosUpdate. As a result, any unprivileged local user can remove root-owned files, including configuration files. Proof-of-concept: As an unprivileged local user on Mac OS X, create symbolic link to some root-owned file via: $ ln -s /etc/sudo_lecture /tmp/.com.sophos.sau.lock Then run Sophos update (no permissions required): $ /usr/local/bin/SophosUpdate Observe that the /etc/sudo_lecture has zero length now. Remediation Steps: Upgrade to version 9.2.10 for Mac OS X. Sophos 9.3.x for Mac OS X is not affected. Revision History: 01/25/2016 - Vulnerability disclosed to vendor 03/03/2016 - Vendor releases fix 03/09/2016 - Advisory published About Trustwave: Trustwave helps businesses fight cybercrime, protect data and reduce security risk. With cloud and managed security services, integrated technologies and a team of security experts, ethical hackers and researchers, Trustwave enables businesses to transform the way they manage their information security and compliance programs. More than three million businesses are enrolled in the Trustwave TrustKeeper cloud platform, through which Trustwave delivers automated, efficient and cost-effective threat, vulnerability and compliance management. Trustwave is headquartered in Chicago, with customers in 96 countries. For more information about Trustwave, visit https://www.trustwave.com. About Trustwave SpiderLabs: SpiderLabs(R) is the advanced security team at Trustwave focused on application security, incident response, penetration testing, physical security and security research. The team has performed over a thousand incident investigations, thousands of penetration tests and hundreds of application security tests globally. In addition, the SpiderLabs Research team provides intelligence through bleeding-edge research and proof of concept tool development to enhance Trustwave's products and services. https://www.trustwave.com/spiderlabs Disclaimer: The information provided in this advisory is provided "as is" without warranty of any kind. Trustwave disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Trustwave or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Trustwave or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.