mirror of
https://github.com/h3xduck/TripleCross.git
synced 2025-12-26 11:23:08 +08:00
Updated my RawTCPLib library with newest version supporting sniffing for payloads. Also new data in preparation for complete RCE module
This commit is contained in:
16
src/helpers/Makefile
Normal file
16
src/helpers/Makefile
Normal file
@@ -0,0 +1,16 @@
|
||||
CC = gcc
|
||||
HEADERS = lib/RawTCP.h
|
||||
EXTRA_CFLAGS= -I$(PWD)/lib
|
||||
|
||||
default:
|
||||
make execve_hijack
|
||||
|
||||
execve_hijack.o: execve_hijack.c $(HEADERS)
|
||||
gcc -c execve_hijack.c
|
||||
|
||||
execve_hijack: execve_hijack.o lib/libRawTCP_Lib.a
|
||||
gcc -lm -o execve_hijack execve_hijack.o -L. lib/libRawTCP_Lib.a
|
||||
|
||||
clean:
|
||||
-rm -f execve_hijack.o
|
||||
-rm -f execve_hijack
|
||||
BIN
src/helpers/execve_hijack.o
Normal file
BIN
src/helpers/execve_hijack.o
Normal file
Binary file not shown.
36
src/helpers/lib/RawTCP.h
Normal file
36
src/helpers/lib/RawTCP.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef HEADER_RAWTCP_LIB
|
||||
#define HEADER_RAWTCP_LIB
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
//Packet_t structure
|
||||
typedef struct packet_t{
|
||||
struct iphdr *ipheader;
|
||||
struct tcphdr *tcpheader;
|
||||
char *payload;
|
||||
int payload_length;
|
||||
char* packet;
|
||||
}packet_t;
|
||||
|
||||
//PacketForger headers
|
||||
packet_t build_standard_packet(
|
||||
u_int16_t source_port,
|
||||
u_int16_t destination_port,
|
||||
const char* source_ip_address,
|
||||
const char* destination_ip_address,
|
||||
u_int32_t packet_length,
|
||||
char* payload
|
||||
);
|
||||
|
||||
int packet_destroy(packet_t packet);
|
||||
|
||||
int set_TCP_flags(packet_t packet, int hex_flags);
|
||||
|
||||
//SocketManager headers
|
||||
int rawsocket_send(packet_t packet);
|
||||
|
||||
packet_t rawsocket_sniff();
|
||||
|
||||
packet_t rawsocket_sniff_pattern(char* payload_pattern);
|
||||
|
||||
#endif
|
||||
BIN
src/helpers/lib/libRawTCP_Lib.a
Normal file
BIN
src/helpers/lib/libRawTCP_Lib.a
Normal file
Binary file not shown.
Reference in New Issue
Block a user