Archive

Posts Tagged ‘linux’

Defcon talk: USB Attacks, Fun with Plug and 0wn – By Rafael Dominguez Vega

August 6th, 2009 No comments

This talk explained and demonstrated an exploitable Linux Kernel USB driver vulnerability and explained the fuzzing process used to find it. Unfortunately due to legal issues, the details could not be attacks.

While the speaker did not test windows, it is highly likely that these flaws exist in Windows as well.

Categories: Conferences, Defcon Tags: , , ,

A fascinating Linux kernel vulnerability

July 21st, 2009 1 comment

My collegue Otto Jongerius pointed me to this interesting story from the Internet Storm Center.

Source code for a exploit of a Linux kernel vulnerability has been posted by Brad Spengler (Brad is the author of grsecurity). I have to tell you right now – this was one of the most fascinating bugs I’ve read about lately.

Why is it so fascinating? Because a source code audit of the vulnerable code would never find this vulnerability (well, actually, it is possible but I assure you that almost everyone would miss it). However, when you add some other variables into the game, the whole landscape changes.

While technical details about this are a bit complex, generally what’s happening can be easily explained. The vulnerable code is located in the net/tun implementation. Basically, what happens here is that the developer initialized a variable (sk in the code snippet below) to a certain value that can be NULL. The developer correctly checked the value of this new variable couple of lines later and, if it is 0 (NULL), he just returns back an error. The code looks like this:

struct sock *sk = tun->sk;  // initialize sk with tun->sk

if (!tun)
return POLLERR;  // if tun is NULL return error

This code looks perfectly ok, right? Well, it is, until the compiler takes this into its hands. While optimizing the code, the compiler will see that the variable has already been assigned and will actually remove the if block (the check if tun is NULL) completely from the resulting compiled code. In other words, the compiler will introduce the vulnerability to the binary code, which didn’t exist in the source code. This will cause the kernel to try to read/write data from 0×00000000, which the attacker can map to userland – and this finally pwns the box. There are some other highly technical details here so you can check your favorite mailing list for details. Here is a video of the exploit:

YouTube Preview Image

Brad was able to even bypass SELinux protections with this and LSM.

The fix for this is relatively easy, the check has to be done before assigning the value to the sk structure.
Fascinating research that again shows how security depends on every layer, and how even very expensive source code audit can result in missed vulnerabilities.

Categories: Security Tags: , ,

Kerberos Based SSO and Apache

June 30th, 2009 No comments

Similar as OpenSSH Authentication Using Kerberos, but now Transparent Kerberos Authentication via Apache against Active Directory using mod_auth_kerb. This enables SSO from IE and Firefox on Apache, IE and Firefox configurations to enable this are also described in the document.

Abstract:  The Apache authentication module mod_auth_kerb allows Apache to authenticate users against a Kerberos KDC including one from ActiveDirectory. Kerberos itself can be fairly complex to set up. This guide will attempt to show the specific steps required to make this possible as well as discuss security limitations specific to the interoperability matters. This guide assumes a basic understanding of Kerberos V and that the Active Directory domain controller is properly configured prior to starting this process.

Technical Analysis: Apache with mod_auth_kerb and Windows Server

OpenSSH Authentication using Kerberos

June 30th, 2009 No comments

An interesting paper on how to authenticate against Active Directory using Kerberos and OpenSSH. This will enable SSO capabilities between Linux and windows, if used in combination with an Kerberos enabled SSH. And maybe even 2-factor authentication if combined with smartcards, haven’t tested this but should be working in theory if you use an SSH client from windows at least.

Components used:

On linux:

  • openssh
  • openssh-server
  • samba-common
  • samba-client
  • krb5-workstation
  • krb5-libs

On Windows:

  • Windows Support Tools

OpenSSH on Linux using Windows/Kerberos for Authentication

Putty With Kerberos