Skip to content

This is clear and Useful Tunnel for Red-Team in ICMP protocol, that use encryption in payload section

License

Notifications You must be signed in to change notification settings

TestCoper/ICMP_Tunnel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ICMP Tunnel

This repository contains code for a client-server application that uses ICMP and UDP protocols for communication. The client sends data or requests to the server using ICMP or UDP packets, and the server responds accordingly.

Setup and Configuration Client

  1. Install the required dependencies:

    • Python 3.x
    • scapy
  2. Clone the repository:

    git clone https://github.com/TestCoper/ICMP_Tunnel
    cd ICMP_Tunnel
    
  3. Configure the application by editing the config.ini file. Make sure to set the appropriate values for the configuration options.

  4. Run the application:

    python main.py
    

Setup and Configuration Server

  1. Install the required dependencies:

    • Python 3.x
    • scapy
  2. Clone the repository:

    git clone https://github.com/TestCoper/ICMP_Tunnel
    cd ICMP_Tunnel
    
  3. Configure the application by editing the config.ini file. Make sure to set the appropriate values for the configuration options.

  4. Run the application:

    python server.py
    
  5. Make sure Data folder is in write mode or Run this code with sudo

Usage

The application provides a menu-based command line interface with the following options:

  1. Check Alive Servers: Sends an ICMP packet to check the availability of servers.

  2. Check TLS: Checks the TLS revision number from the servers.

  3. Send File: Sends a file to the server using either UDP or ICMP.

Choose the desired option by entering the corresponding number and follow the prompts.

Extra Discripttion

  1. Import the required libraries: import os, import sys, import math, import codecs, import ntpath, import random, import logging, import colorlog, import binascii, import configparser, from scapy.all import IP, ICMP, Raw, send, get_if_addr, sniff, conf.
  2. Set up the necessary configuration and logging.
  3. Use the provided functions to perform various operations:
    • send_icmp(dst, payText, ImId=None, ImSq=None): Send ICMP packets with a payload to the specified destination.
    • send_UDP(FilePath): Send data using the UDP protocol.
    • server_online(): Check online servers for sending data or receiving the public key.
    • check_status(): Check the last revision number of TLS from the server.
    • split_to_1024byte(FilePath, SendStat): Split a file into 1024-byte chunks and send them using UDP or ICMP. If the file size is larger than 5,000,000 bytes, it will be sent using UDP.
    • send_data(FilePath): Send a file using UDP or ICMP, based on its size.
  4. Implement the necessary server-side functionality:
    • client_icmp(packet_rec): Handle received ICMP packets on the server side.

ICMP Communication

The client communicates with the server using ICMP packets. It supports the following ICMP message types:

  • Alive Packet: Sent by the client to check the availability of servers.

  • Check-Status Packet: Sent by the client to request the TLS revision number from the servers.

  • Send-Data Packet: Sent by the client to send a file to the server.

UDP Communication

The application also supports file transfer using UDP. However, the UDP functionality is not implemented in the current version of the code.

Configuration

The application uses a configuration file config.ini to specify various settings. Ensure that the configuration file is present and correctly formatted.

Logging

The application logs events and messages using the Python logging module. The log level is set to DEBUG by default. You can modify the log level in the code if needed.

Contact

For any questions or issues, please contact [ [email protected]].

About

This is clear and Useful Tunnel for Red-Team in ICMP protocol, that use encryption in payload section

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages