Application and operating system hardening