4 February 2018
Last weekend I read two very informative posts on Antivirus Evasion by Mattia Campagnano. But part 2  puzzled me somewhat.
“Following up to my previous post Tips for an Information Security Analyst/Pentester career – Ep. 43: AV Evasion (pt. 1), we’re going now to perform the same attack on a genuine Windows 10 machine, where all latest updates have been installed.”
For a moment I thought ‘a security professional mistakes compliance for security’ because ‘fully patched’ means not that the system is resilient against cyber-attacks. But both posts show that even the most secure Windows ever is vulnerable against privilege escalation and AV evasion if the basic configuration is not changed and fundamental elements of cyber hygiene are missing.
Why are such attacks successful?
First, the user was logged in with permanent administrative privileges. This makes life easy for attackers and fosters lateral movement.
Revoking permanent administrative privileges on workstations and servers must be a basic element of any cyber security program. Under normal conditions, standard users should not have any administrative privileges for their devices at all. If needed, they can be temporarily granted through User Account Control (UAC).
Second, UAC was not set to the highest level “Always notify me”. Unfortunately this is the standard setting after a fresh installation of Windows. With this, privilege escalation is possible without user notification. If configured properly, UAC will notify the user even if he works with administrative privileges.
The BypassUAC method in the meterpreter attack framework will fail, if UAC is set to the highest level. The following excerpt of the code  makes this clear
"UAC is set to 'Always Notify'. This module does not bypass this setting, exiting..."
print_good('UAC is set to Default')
print_good('BypassUAC can bypass this setting, continuing...')
print_warning('UAC set to DoNotPrompt - using ShellExecute "runas" method instead')
Standards like the DISA STIG for Windows 10  activate all UAC features to make life for the attackers as difficult as possible. From my point of view, the STIGs should be considered also in industry to create workplaces resilient against cyber-attacks. And Microsoft should raise the Windows default for UAC to “Always notify me” for all versions. If a user wants to reduce the security level, he should do this on his own responsibility.
Besides the secure configuration of IT systems and cyber hygiene is user awareness training the third essential pillar of a security program. Users and help desk staff must take proper actions if their system unexpectedly enters the secure desktop and asks for permissions of an action they never asked.
Have a good weekend.
- Campagnano, M. Tips for an Information Security Analyst/Pentester career – Ep. 44: AV Evasion (pt 2). The S@vvy_Geek Tips Tech Blog
- Rapid7 bypassuac_vbs.rb Metasploit Framework. (Accessed: 3rd February 2018)
- Windows 10 Security Technical Implementation Guide. STIG Viewer | Unified Compliance Framework® Available at: https://www.stigviewer.com/stig/windows_10/. (Accessed: 3rd February 2018)
- Campagnano, M. Tips for an Information Security Analyst/Pentester career – Ep. 43: AV Evasion (pt.1). The S@vvy_Geek Tips Tech Blog