Call us: 1-855-386-2884

The Duo Bulletin

Notes on security, from the desks of Duo Security

Announcing Duo’s University Site License Program

Universities are wonderful breeding grounds for hackers.

My co-founder Jono and I should know.

Twelve years ago, in the Year of Napster, I took a sabbatical between startups to work with old friends at CITI, a classic university security research lab renowned for cutting-edge work in smartcards, secure distributed filesystems, etc. But my interests quickly wandered to other things…

Under the aegis of my advisor, I undertook a one-month, no-holds-barred penetration test of the University of Michigan with the end goal of recovering the Regents’ passwords. All in the name of science, of course. He said he wanted to include them in a presentation he was scheduled to give on university security.

Unsure of his motives, but with official marching orders and a Get-Out-Of-Jail-Free card in hand, I was able to recover the passwords for not only every Regent of the University of Michigan, but also a few hundred of their staff, several thousand faculty and students, and found administrative access to much of the University infrastructure through the use of some novel tools, techniques, and exploits I developed at the time. I was, as friends at the l0pht liked to say, making the theoretical practical.

A few years after starting Arbor Networks, I met Jono when he was still a student, intently hacking our wireless network from the Starbucks below our office (he didn’t get anywhere, though — it was a honeypot!). He did, however, go on to successfully compromise the University of Michigan’s online records and registration system, student ID cards, and single-sign on infrastructure for some 40,000 students.

The beauty of a university research environment is that it admits and encourages disruptive innovation — and protocols like BGP, RADIUS, LDAP, MIME, PPP, etc. could not have been invented anywhere but Ann Arbor because of it (see Merit’s role in NSFNET and the Internet – and more recently, Internet2). But such environments need to be carefully fostered and protected. While Jono and I are mostly harmless (we just suffer a security mindset), this doesn’t hold true for many of the others attacking higher ed and federal research institutions today.

We are deeply indebted to the university and research community we’ve long been part of (participating even long after we transitioned to industry). Today, we are proud to announce our new university site license program which affords universities and their research partners, for the first time, an easy, commercially-supported two-factor solution to deploy at scale for faculty, staff, and students. Finally: two-factor authentication where cost is not a factor!

Join us in supporting InCommon and Internet2’s mission to provide a secure and privacy-preserving trust fabric for research and higher education institutions, and their partners, in the United States — sign up for Duo today!

Posted in Blog, Press  ·  Leave a comment

Protecting University & Federal Research Collaboration

University of Michigan Computer Science & Engineering building

For better or worse, your Facebook, Google, or Twitter accounts serve as your passport to the web today. Nearly every social site accepts such credentials with the goal of establishing your true (or at least, consistently fake) identity.

Such identity federation is a relatively new development for the consumer web, but in the university and federal research community, it’s always been a fundamental issue. True collaboration requires access, and when our educational and research institutions invest billions annually, such access must be carefully protected.

With a deep history in Ann Arbor of research collaboration (University of Michigan’s $1.5 billion annual research spend), internetworking (NSFNET, NANOG, Internet2), and the technology to enable it (invented here: BGP, RADIUS, MIME, LDAP, PPP), we couldn’t be prouder to announce our partnership with InCommon to protect the trust federation for nearly 6 million users across 300 research and higher education institutions in the US!

Earlier this year, we also announced our partnership with Covisint, whose federated platform manages nearly 15 million identities. We’re securing some of the largest federated identity hubs in the world. If you need strong, usable two-factor authentication at scale, give us a call!

Posted in Blog  ·  Leave a comment

Two-Factor Authentication for Windows RDP

Happen to manage any Windows servers remotely? Want to make authenticating to them more secure? You’re in luck.

Today we released our Windows Credential Provider with Duo two-factor authentication support. This adds the ability to use any of the supported Duo 2FA methods to your Windows authentication process: Phone call, OTP, SMS, and Duo Push.

Windows Login with Duo Security
Three input boxes. Two factors.

There are many, many publicly accessible RDP endpoints. Dan Kaminsky estimates “that there’s approximately five million RDP endpoints on the Internet today.” Five million.

Our beloved VPN Hunter even found one on test.com. Who wants to guess if they’re employing two-factor authentication?

Protect yourself. Add Duo to your RDP instances today. As always: No extra fees for this new integration. Add it to your existing account and get rolling.

Get started with the Remote Desktop Protocol Docs »

Windows Login with RDP and Duo Security
Username, Password, Duo.

Posted in Integrations, Releases  ·  Leave a comment

Announcing VPN Hunter

Today, we’re excited to announce the public launch of VPN Hunter!

VPN Hunter is a service that discovers and classifies the VPNs and other remote access services of any organization. Given only an organization’s domain name (eg. msu.edu), VPN Hunter can find a wide range of remote access services associated with that organization, such as:

  • SSL VPNs: VPN Hunter will seek out SSL VPNs from vendors including Juniper, Cisco, Palo Alto, Citrix, Fortinet, F5, SonicWALL, Barracuda, Microsoft, and Array.
  • Remote Access: VPN Hunter will also discover other remote access services including IPsec, PPTP, OpenVPN, RDP, and SSH.
  • Email Portals: VPN Hunter will find a handful of web-based email portals including Outlook Web App, Gmail, and Zimbra.
  • Generic Login Sites: VPN Hunter can also discover in-house web apps and other generic login sites that aren’t tied to a particular third-party vendor or product.

It’s no coincidence that VPN Hunter is able to discover many of the remote access services supported by Duo’s two-factor platform. Given that remote services must be exposed to the public Internet inherently, it’s vital that they be protected with strong authentication. Having a simple username and password (that is easily guessed, phished, or otherwise stolen) as the only barrier between the Internet and your internal corporate network is far from ideal and borderline negligent.

While VPN Hunter’s underlying techniques aren’t particularly sophisticated, we hope it will raise awareness of how exposed many organizations’ services are to the public Internet. Keep in mind that the automated capabilities of VPN Hunter are a tiny fraction of the reconnaissance effort that a determined attacker would put into “casing” your organization.

With the pleasantries out of the way, feel free to go try out VPN Hunter on your own at www.vpnhunter.com or check out one of the following example results:

If you have any suggestions, comments, or questions about VPN Hunter, feel free to leave them in the comments below. And if you have a VPN to protect, be sure to sign up for a free trial of Duo two-factor!

Posted in Blog  ·  Leave a comment

March 2012 Release

Features, features, features!

We recently pushed a number of updates to our two-factor authentication service. Here’s the round-up.

Duo Push Support for Blackberry

Live a passcode-free life. New to Duo Push? Watch the video »

Duo Push on Blackberry

Account Administrators: To help any of your existing users add a BlackBerry (or any additional phone) access the Duo Administration Interface, click Users, and choose the user for whom you’d like to add a new phone. See the full instructions.

Screenshot of adding a BlackBerry to user's Duo account

Add a phone to a user’s account.

Support for Third-Party Tokens, Including YubiKeys

Feel free to BYOT. Just email support@duosecurity.com and we’ll help you import your tokens so you can start distributing them to your users.

Add HOTP token to user

We have your old habits covered.

Many-to-Many, User-to-Phone Mapping

Share a single phone number across multiple users, tie 10 Google Voice numbers to a single user… The possibilities are endless.

Lots of phones

Smartphone identity crisis? We won’t judge.

Duo Administration Facelift

We’ve updated the admin interface to be a little more friendly and usable. Let us know what you think!

New admin interface

Telephony Credits

Straight-forward pricing & management. (Existing accounts are not affected.)

Export Users & Authentication Logs

We’ve received several requests for better export support. This should be useful for both auditing and reporting.

Log export

These features (along with several others and a few bugfixes) have been rolled out to all Duo accounts. No account yet? Now is a great time to take Duo for a spin. Try Duo free for 30 days »

Posted in Releases  ·  Leave a comment

New Integration: Outlook Web App

While we all enjoy the occasional shock and awe marketing we’d prefer to plug ourselves by making our two-factor authentication service even better. We consistently hear that our customers love how easy Duo is to get up and running in their environment. While we have APIs to add Duo Security’s two-factor authentication to any app, native integration kits make life even better.

Duo Security for Outlook Web App

OWA enrollment flow

Happen to be running Microsoft Exchange (v. 2007 or ’10) at your organization? Want to make it a lot harder for the wrong people to log in as your users? Add Duo!

We’ve released an installation wizard for your MS Exchange server that makes adding Duo support a snap. Check out our online docs and give it a try yourself.

Posted in Integrations  ·  Leave a comment

Duo T-Shirts, Anyone?

Our RSA Conference 2012 tees seemed to be a hit.

We’d like to offer them up to a few more fans. Send us a video of you destroying (dismantling, blending, …) your SecurID token and we’ll hook you up. Post a comment with the YouTube link and a way to get in touch.

Fireplace video by @chriseng

The first video entry comes from Chris Eng (@chriseng), burning his RSA token in his fireplace.

Bulldozer illustration by @mikedamm

Another entry comes from Mike Damm (@mikedamm). Mike makes a good point that folks should be eligible for such an awesome shirt and not be punished if they haven’t purchased a RSA token to destroy. So Mike submitted his photo-realistic rendering of what he would do if he had a RSA token to destroy:

 

Axe photo series by @laplinker

@laplinker tweeted a literal blow-by-blow series of pictures pitting a RSA SecurID token against an axe! Here’s all the pictures arranged together:

Golf club video by @NearbySystems

@NearbySystems tees up for a T.

Thermite video by @cdzombak

Fresnel lens video by @withzombies

Posted in Blog  ·  Leave a comment

Covisint & Duo Security Demo at RSA Conference 2012

Here’s a quick video taken from Covisint’s booth (#554) at the RSA Conference in San Francisco.

lo-fi, uploaded right from the show!

Posted in Videos  ·  Leave a comment

Duo Raises $5M from Google Ventures to Democratize Strong Authentication

Today we announced of our latest round of investment led by Google Ventures!

We’re seriously thrilled to be working with outstanding investors—GV, True, and RVP. We have big plans for the future of the Duo authentication platform, and this raise will help us get there even faster.

Thank you to all of our customers, partners, and users. Your demand for a better multifactor authentication experience is a large part of why we exist.

And one more thing…

We also just announced a new partnership with Covisint, a Compuware Company. They will be demoing our mobile app with their enterprise collaboration platform at the RSA Conference Expo, Booth #554. Stop by the Moscone Center today between 11 AM – 6 PM to check it out.

Oh, and if you find Dug, Jon, or Brian at the RSA Conference this week… We’re buying the drinks. Cheers!

Posted in Press  ·  Leave a comment

A look at ASLR in Android Ice Cream Sandwich 4.0

When I first saw the release notes for the new Android Ice Cream Sandwich (ICS) platform, I was excited to see that Google mentioned that “Android 4.0 now provides address space layout randomization”:

For the uninitiated, ASLR randomizes where various areas of memory (eg. stack, heap, libs, etc) are mapped in the address space of a process. Combined with complementary mitigation techniques such as non-executable memory protection (NX, XN, DEP, W^X, whatever you want to call it), ASLR makes the exploitation of traditional memory corruption vulnerabilities probabilistically difficult.

However, ASLR is commonly an all-or-nothing proposition. If ASLR is not applied to all areas of memory in a process, its effectiveness is often nullified. A single executable mapping that is mapped in a static location in the address space is often sufficient to construct a ROP payload. For example, this was the indeed case with the OS X prior to 10.7, where the dynamic linker was not randomized, providing a sufficient gadget source for a ROP payload.

So, let’s take a look at this new-fangled ICS 4.0 platform and see if ASLR was properly and fully implemented.

ASLR with the Linux Kernel

It’s a bit misleading to talk about how Android implements ASLR. In fact, ASLR is primarily provided by the Linux kernel, which happens to be the OS of the Android platform. Usually, in Linux-land, ASLR can apply to a variety of memory areas:

  • Stack: The userspace stack mapping set up by the kernel during exec(2) should be sufficiently randomized. Stack randomization is performed by the randomize_stack_top() function.
  • Heap: The heap location returned by the brk(2) system call when a program is first exec’ed should be randomized. Heap randomization is performed by the arch_randomize_brk() function.
  • Libs and mmap: After NX was introduced, static library mapping led to the popularity of ret-to-libc and more generic ret-to-lib attacks. The location of libraries and other mmap’ed regions should be randomized.
  • Exec: Even if you’re randomized the mapping of all the shared libaries that an executable uses, you still need to randomize the location of the executable itself when it is mapped into the address space. Otherwise, the executable mapping can be used as a source for ROP gadgets.
  • Linker: On most Linux systems, the ld.so dynamic linker provided by glibc can self-relocate itself, so its mapping is randomized. However, as we’ll see, this isn’t the case for all linkers.
  • VDSO: The VDSO (Virtual Dynamically-linked Shared Object) is an executable mapping of a virtual shared library provided by the kernel for syscall transitions. However, most Android devices run on the ARM architecture, which doesn’t use a VDSO.

So while a modern kernel on a recent desktop or server Linux distribution will commonly offer full ASLR, there’s plenty of opportunity to screw up any of the above ASLR mappings with improper system, toolchain, libc, or linker configurations.

ASLR Support in Android 2.x

Prior to ICS 4.0, ASLR in Android was almost non-existent. One way to easily and quickly test the ASLR support of a platform is to dump the memory map for a process across multiple executions. For example, the /proc/pid/maps for the vold process across multiple executions on a Nexus S device running Android 2.3.4 looks like the following:

As the memory maps show, the only randomized memory region across two consecutive executions of the vold process is the stack. The executable region (vold), heap, libraries (libc.so), and linker are loaded at the same locations in the address space.

Where does our stack randomization come from on Android? From the arch-independent code in fs/binfmt_elf.c that is invoked when executing ELF binaries. More specifically, the load_elf_binary() function calls randomize_stack_top():

#ifndef STACK_RND_MASK
#define STACK_RND_MASK (0x7ff >> (PAGE_SHIFT - 12)) /* 8MB of VA */
#endif
static unsigned long randomize_stack_top(unsigned long stack_top)
{
    unsigned int random_variable = 0;
    if ((current->flags & PF_RANDOMIZE) &&
        !(current->personality & ADDR_NO_RANDOMIZE)) {
        random_variable = get_random_int() & STACK_RND_MASK;
        random_variable <<= PAGE_SHIFT;
    }
#ifdef CONFIG_STACK_GROWSUP
    return PAGE_ALIGN(stack_top) + random_variable;
#else
    return PAGE_ALIGN(stack_top) - random_variable;
#endif
}

And that’s where we get our small bit of stack ASLR in Android 2.x! It’s clear from these results that ASLR is almost non-existent in Android 2.x. So how does ASLR fare in the latest and great ICS 4.0 that has touted ASLR as a new feature?

ASLR Support in Android ICS 4.0

Prior to mid-2010, the ARM architecture support in the Linux kernel didn’t actually support any ASLR (besides the arch-independent stack randomization). Why? Well, despite there being a huge number of ARM-powered devices out there in the world, there wasn’t as much of a security focus on ARM until the explosion of our modern consumer mobile devices. In June 2010, three commits from Nicolas Pitre changed that.

The first commit (cc92c28b2d) added support for randomization of the libs/mmap mappings:

--- a/arch/arm/mm/mmap.c
+++ b/arch/arm/mm/mmap.c
@@ -80,6 +81,9 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
 	        start_addr = addr = TASK_UNMAPPED_BASE;
 	        mm->cached_hole_size = 0;
 	}
+	/* 8 bits of randomness in 20 address space bits */
+	if (current->flags & PF_RANDOMIZE)
+		addr += (get_random_int() % (1 << 8)) << PAGE_SHIFT;

 full_search:
 	if (do_align)

The second commit (990cb8acf2) added support for randomization of the heap/brk mapping:

--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -421,3 +422,9 @@ unsigned long get_wchan(struct task_struct *p)
 	} while (count ++ < 16);
 	return 0;
 }
+
+unsigned long arch_randomize_brk(struct mm_struct *mm)
+{
+	unsigned long range_end = mm->brk + 0x02000000;
+	return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
+}

The third commit (e4eab08d60) added support for randomization of the executable mapping:

--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -800,7 +800,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
 			 * default mmap base, as well as whatever program they
 			 * might try to exec.  This is because the brk will
 			 * follow the loader, and is not movable.  */
-#ifdef CONFIG_X86
+#if defined(CONFIG_X86) || defined(CONFIG_ARM)
 			load_bias = 0;
 #else
 			load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);

These three commits were included in the 3.x kernel shipping with the Galaxy Nexus, so Android 4.0 should inherit full ASLR support just by using an updated Linux kernel, right? Ideally, yes, but let’s take a look at a real Galaxy Nexus device (running 4.0.2) to see what randomization is actually present:

Well, there’s a slight improvement: the location of libc.so and other shared libraries mapped into the vold address space are randomized. But why aren’t the heap, executable, and linker mappings randomized?

Heap Randomization

According to commit 990cb8acf2, the heap/brk mapping should be randomized. However, the heap randomization enabled in that commit is still contingent on a sysctl parameter, kernel.randomize_va_space.

If kernel.randomize_va_space is set to 1, the mmap, stack, VDSO, and executable mapping are randomized. However, the heap is not randomized unless kernel.randomize_va_space is set to 2. The reasoning behind this setting is that some legacy applications assume that the heap is mapped in a specific location.

So, checking out the Galaxy Nexus device, we see that the randomize_va_space attribute is still set to 1, preventing the heap mapping from being randomization:

shell@android:/ # cat /proc/sys/kernel/randomize_va_space
1

What happens if we manually set kernel.randomize_va_space to 2? Let’s try:

shell@android:/ # echo 2 > /proc/sys/kernel/randomize_va_space
shell@android:/ # cat /proc/sys/kernel/randomize_va_space
2

Re-running our vold binary with randomize_va_space set to 2, we see that the heap location is now successfully randomized:

Executable Randomization

So if the kernel supports randomizing ELF executable mappings and randomize_va_space is set to an appropriate value, why isn’t the Android platform randomizing the location of the vold binary?

In order for executable mappings to be randomized, the binary being executed needs to be compiled appropriately so that it can be relocated at runtime. In particular, the binary must be compiled with GCC’s -pie -fPIE flags to result in a Position Independent Executable (PIE).

One easy way to check whether a binary is PIE-enabled is with the readelf command. If readelf reports that the binary is of type EXEC, it means that it is not a PIE. If readelf reports a type of DYN, it means that it is a PIE and can be randomized by the kernel when it is mapped.

Running readelf on the vold binary on the Galaxy Nexus device shows the non-PIE EXEC type ELF binary:

$ arm-eabi-readelf -h vold | grep Type
 Type: EXEC (Executable file)

Running readelf on a PIE-binary on a normal non-Android Linux system shows the expected DYN type:

$ readelf -h /bin/cat | grep Type
 Type: DYN (Shared object file)

To address this issue, all executables on the Android system need to be compiled with PIE support. Unfortunately, PIE does impose a non-trivial performance penalty for architectures with limited GPRs, but that may be an acceptable trade-off for certain high-risk Android executables.

Linker Randomization

Last but certainly not least, the custom dynamic linker that Android uses it not randomized. This is a serious concern as the linker will be present at a static address across most, if not all, processes on the system. The executable linker mapping also provides a plentiful source for gadgets that can be used to construct a ROP payload when exploiting a memory corruption vulnerability.

Simply put, the amount of code available in the static dynamic linker mapping completely nullifies the efficacy of the ASLR in ICS 4.0. Hopefully Google modifies it’s dynamic linker to support relocation in the near future.

Additional ASLR Concerns on Android

Regardless of the platform version, ASLR in Android is also complicated by two issues that are a bit more inherent in the current platform design and architecture:

  • 32-bit address space: So far, our mobile devices have remained limited to 32-bit address spaces. With a 32-bit system, there’s limited address space available to shift memory regions around, making ASLR less effective especially in scenarios where an attacker may have multiple tries to exploit the process. It’s not unreasonable to consider mobile devices that may address more than 4 GB of physical memory and require a move to 64-bit CPUs, allowing much more address space for randomization, but who knows how far off in the future that is.
  • Zygote system process: The Zygote process on the Android platform acts as the prototypical process for all new Android applications. When a new process is launched, the Zygote will fork(2) its process and launch the requested app. This is simply a performance optimization that eliminates the overhead of spinning up a new Dalvik VM from scratch when an application is launched. However, it also means that the memory mappings inherited from the Zygote address space are identical across all Dalvik applications. One could imagine a scenario where a malicious app on a victim’s device leaks address mappings from its own process off to an attacker to assist in exploiting another process (eg. the browser) that might have higher privilege or valuable data. It’s a bit of an exotic scenario though, so the Zygote issue is fairly low risk for now.

Wrap-up

Unfortunately, the ASLR support in Android 4.0 did not live up to expectations and is largely ineffective for mitigating real-world attacks, due to the lack of randomization of the executable and linker memory regions. It also would be beneficial to randomize the heap/brk by setting kernel.randomize_va_space=2.

In addition to ASLR, Android could certainly stand to beef up some of it’s other exploit mitigation mechanisms. Non-executable memory support was recently added and GCC’s stack protector is now enabled in the default NDK CFLAGS, but other mitigations are still lacking. RELRO is missing allowing GOT overwrites as demonstrated in Stealth’s GingerBreak exploit.

I’d also love to see code signing support similar to iOS, which prevents the introduction of new executable code in an address space. In addition, code signing would hamper the ability to pull down additional malicious code at runtime, a technique I demonstrated two years ago at SummerCon that the RootSmart malware authors have recently adopted.

Let’s just hope that we don’t have to wait for another major version release of the Android platform to get the same exploit mitigations that have been available on desktop and server platforms for years.

As Dug eloquently summarizes below: “TL;DR: ICS ASLR = FUBAR

UPDATE: Nick Kralevich from the Android Security Team provided the following updates in the comments below:

  • kernel.randomize_va_space is set to 2 in ICS 4.0.3, randomizing the heap/brk mapping.
  • Support for randomizing the linker mapping will be available in a future Android release.
  • Support for randomizing executable mappings (PIE) will be available in a future Android release.

Sounds promising! We’ll be sure to check back in when those updates are live!

UPDATE #2: Nick checked back in with a set of patches allowing for PIE and linker randomization!

Posted in Android, Blog  ·  Leave a comment

Protect your organization with Duo Security.  Try it free for 30 days.  Get started »