# ICMP vulnerability:

## ICMP issue on ubuntu server

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FmlrYvjJmzKztEQnRb5no%2Fimage.png?alt=media&#x26;token=e4cf9027-69c1-44f2-b799-b39afff5dc76" alt=""><figcaption></figcaption></figure>

Issue:&#x20;

The remote host answers to an ICMP timestamp request. This allows an attacker to know the date that is set on the targeted machine, which may assist an unauthenticated, remote attacker in defeating time-based authentication protocols.

Timestamps returned from machines running Windows Vista / 7 / 2008 / 2008 R2 are deliberately incorrect, but usually within 1000 seconds of the actual system time.

Filter out the ICMP timestamp requests (13), and the outgoing ICMP timestamp replies (14).

```bash
# Block ICMP timestamp requests
sudo iptables -A INPUT -p icmp --icmp-type timestamp-request -j DROP

# Block outgoing ICMP timestamp replies
sudo iptables -A OUTPUT -p icmp --icmp-type timestamp-reply -j DROP
```

These commands add rules to the firewall (`iptables`) to drop incoming ICMP timestamp requests and outgoing ICMP timestamp replies. This prevents the disclosure of system time through ICMP packets.

#### Openssl and openssl latest version:&#x20;

```
wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.7p1.tar.gz
tar -xzvf openssh-9.7p1.tar.gz
sudo apt install build-essential libssl-dev zlib1g-dev
cd openssh-9.7p1
./configure
make
sudo make install

```

Verify now:&#x20;

```
ssh -V
```

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FsxFyMRplfVdBIZoWEQA2%2Fimage.png?alt=media&#x26;token=24480c09-4c6f-45cb-a115-44074e2d4488" alt=""><figcaption></figcaption></figure>
