Security and Privacy for Untrusted Applications in Modern and Emerging Client Platforms