OpenVPN servers can be vulnerable to Shellshock Bash vulnerability

Some OpenVPN configuration options open remote attack vectors for Bash vulnerabilities, VPN provider warns

Virtual private network servers based on OpenVPN might be vulnerable to remote code execution attacks through Shellshock and other recent flaws that affect the Bash Unix shell.

The OpenVPN attack vector was described in a post on Hacker News Tuesday by Fredrik Strömberg, co-founder of a commercial VPN service called Mullvad.

"OpenVPN has a number of configuration options that can call custom commands during different stages of the tunnel session," Strömberg said. "Many of these commands are called with environmental variables set, some of which can be controlled by the client."

Shellshock and several other flaws found in the Bash Unix shell over the past week stem from errors in how the command-line interpreter parses strings passed to it as environment variables. These strings can be crafted to trick Bash into evaluating parts of them as separate commands.

Various applications call Bash in different circumstances and could be used by attackers to pass malicious strings to the shell. This is the case of CGI scripts running on Web servers, the CUPS printing system for Unix-like operating systems, the Secure Shell (SSH) and others.

The security community is still investigating the full scope of the Shellshock flaws and which applications open up remote attack vectors for them. Security researcher Rob Fuller has put together a list of proof-of-concept exploits published so far.

One OpenVPN configuration option that allows for Shellshock exploitation is called auth-user-pass-verify. According to the software's official documentation this directive provides a plug-in-style interface for extending an OpenVPN server's authentication capabilities.

The option executes an administrator-defined script via the command-line interpreter in order to validate user names and passwords supplied by connecting clients. This opens up the possibility of clients supplying maliciously crafted user names and passwords that exploit the Shellshock vulnerability when passed to Bash as strings.

Amagicom, the Swedish company that owns Mullvad, informed the OpenVPN developers and some VPN service providers about the auth-user-pass-verify issue last week, but waited before going public to allow them to take the appropriate actions. This Shellshock attack vector is one of the more serious ones, because it does not require authentication.

However, it does appear that the developers of OpenVPN knew about the general security risks associated with auth-user-pass-verify even before the recent Bash flaws were discovered.

"Care must be taken by any user-defined scripts to avoid creating a security vulnerability in the way that these strings are handled," the official OpenVPN documentation warns for this configuration option. "Never use these strings in such a way that they might be escaped or evaluated by a shell interpreter."

In other words, the script author needs to make sure that the user name and password strings received from clients do not contain any dangerous characters or sequence of characters before passing them to the shell interpreter. However, instead of relying on the ability of script writers to filter out possible exploits, it's probably best to deploy the latest Bash patch in this case.

Join the CSO newsletter!

Error: Please check your email address.

Tags patchessecurityAmagicomAccess control and authenticationExploits / vulnerabilities

More about CGINewsSSH

Show Comments

Featured Whitepapers

Editor's Recommendations

Solution Centres

Stories by Lucian Constantin

Latest Videos

  • 150x50

    CSO Webinar: The Human Factor - Your people are your biggest security weakness

    ​Speakers: David Lacey, Researcher and former CISO Royal Mail David Turner - Global Risk Management Expert Mark Guntrip - Group Manager, Email Protection, Proofpoint

    Play Video

  • 150x50

    CSO Webinar: Current ransomware defences are failing – but machine learning can drive a more proactive solution

    Speakers • Ty Miller, Director, Threat Intelligence • Mark Gregory, Leader, Network Engineering Research Group, RMIT • Jeff Lanza, Retired FBI Agent (USA) • Andy Solterbeck, VP Asia Pacific, Cylance • David Braue, CSO MC/Moderator What to expect: ​Hear from industry experts on the local and global ransomware threat landscape. Explore a new approach to dealing with ransomware using machine-learning techniques and by thinking about the problem in a fundamentally different way. Apply techniques for gathering insight into ransomware behaviour and find out what elements must go into a truly effective ransomware defence. Get a first-hand look at how ransomware actually works in practice, and how machine-learning techniques can pick up on its activities long before your employees do.

    Play Video

  • 150x50

    CSO Webinar: Get real about metadata to avoid a false sense of security

    Speakers: • Anthony Caruana – CSO MC and moderator • Ian Farquhar, Worldwide Virtual Security Team Lead, Gigamon • John Lindsay, Former CTO, iiNet • Skeeve Stevens, Futurist, Future Sumo • David Vaile - Vice chair of APF, Co-Convenor of the Cyberspace Law And Policy Community, UNSW Law Faculty This webinar covers: - A 101 on metadata - what it is and how to use it - Insight into a typical attack, what happens and what we would find when looking into the metadata - How to collect metadata, use this to detect attacks and get greater insight into how you can use this to protect your organisation - Learn how much raw data and metadata to retain and how long for - Get a reality check on how you're using your metadata and if this is enough to secure your organisation

    Play Video

  • 150x50

    CSO Webinar: How banking trojans work and how you can stop them

    CSO Webinar: How banking trojans work and how you can stop them Featuring: • John Baird, Director of Global Technology Production, Deutsche Bank • Samantha Macleod, GM Cyber Security, ME Bank • Sherrod DeGrippo, Director of Emerging Threats, Proofpoint (USA)

    Play Video

  • 150x50

    IDG Live Webinar:The right collaboration strategy will help your business take flight

    Speakers - Mike Harris, Engineering Services Manager, Jetstar - Christopher Johnson, IT Director APAC, 20th Century Fox - Brent Maxwell, Director of Information Systems, THE ICONIC - IDG MC/Moderator Anthony Caruana

    Play Video

More videos

Blog Posts

Market Place