Disable TCP and ICMP Timestamps
Disable TCP Timestamps
The downside of TCP timestamps is adversaries can remotely calculate the system uptime and boot time of the machine and the host's clock down to millisecond precision. These calculated uptimes and boot times can also help to detect hidden network-enabled operating systems, as well as link spoofed IP and MAC addresses together and more. 
To prevent this information leaking to an adversary, it is recommended to disable TCP timestamps on any operating systems in use. The less information available to attackers, the better the security.
To temporarily disable TCP timestamps for testing purposes (rather than permanently), see the footnote. 
Disable the rfc1323 protocol which handles TCP timestamps.
TCP timestamps are disabled by default in Qubes R3.1 and above. 
To disable TCP timestamps on Windows, run the following root command. 
netsh int tcp set global timestamps=disabled
Disable ICMP Timestamps
The Internet Control Message Protocol (ICMP) is used by network devices, including routers, to send operational information and error messages such as whether a service is available or if a host/router cannot be reached. Unlike TCP and UDP, it is a network level, not transport layer protocol. Commonly network utilities are based on ICMP messages, such as traceroute and ping. 
The ICMP protocol includes timestamps for time synchronization, with the originating timestamp being set to the time (in milliseconds since midnight) since the sender last touched the packet. A timestamp reply is also generated, consisting of the originating timestamp (sent by the sender) as well as a "receive timestamp", which captures when the timestamp was received and a reply sent. 
ICMP timestamps need to be blocked with the firewall.  This is distribution dependent and varies widely as does having a firewall enabled on your specific OS. Be aware that some distributions do not turn on the firewall by default.
There are various ways to block ICMP timestamps on the command line, therefore it is recommended to consult your specific distribution's documentation.  The easiest method is to download a GUI front-end (like gufw [archive]), then configure the firewall to silently drop all incoming connections by default, and only allow outgoing traffic from the machine.
MacOS systems should have ICMP timestamps disabled by default. This means if the firewall is enabled and "Stealth Mode" is set, the system should not respond to any ICMP requests. Follow these steps to check the system is properly secured: 
Security & Privacy
- Click the
- Check the firewall is
The "Block all incoming connections" option should also be checked for greater security.
It is also possible to manually change / check the ICMP timestamp status -- refer to the system variable
net.inet.icmp.timestamp in the /etc/sysctl.conf file. 
To permanently disable ICMP timestamps, run. 
sudo sh -c "echo net.inet.icmp.timestamp=0 >> /etc/sysctl.conf"
The easiest solution is to configure the firewall to block incoming and outgoing ICMP packets with ICMP types 13 (timestamp request) and 14 (timestamp response). 
0 (it is enabled by default). In a terminal, run.
sysctl -w net.inet.icmp.tstamprepl=0
ICMP timestamps are disabled by default in Qubes R3.1 and above. 
The firewall in recent Windows operating systems (Win 10, Win 8/8.1, Win 7) should have ICMP disabled by default. 
From the Menu
The status of ICMP timestamps can be manually checked and changed on Windows systems via the Firewall settings. 
Right-click on Start button →
Select Control Panel →
Select Windows Firewall →
Select Advanced Settings tab
The ICMP Settings dialog box should show the ICMP timestamp is disabled:
Allow incoming timestamp request is unchecked. 
From the Command Line
ICMP timestamp responses can be disabled via the netsh command line utility. This is necessary for Vista and earlier Windows versions. 
Open a terminal and run this command as root (administrator).
netsh firewall set icmpsetting 13 disable
Outgoing ICMP timestamp responses are now blocked.
- https://forensicswiki.org/wiki/TCP_timestamps [archive]
Note: If a permanent solution is desired, skip this temporary option and apply the chapter's main instructions instead.
To dynamically disable TCP timestamping on Linux (Qubes: in the NetVM).
echo 0 > /proc/sys/net/ipv4/tcp_timestamps
- https://serverfault.com/questions/216956/how-to-check-tcp-timeout-in-linux-macos [archive]
- https://macosx.com/threads/slow-tcp-ip-smc-router.9132/ [archive]
- https://seconfig.sytes.net/blog/p/9201755583327191420/office-where-mac-computers-couldn-t-browse-https-sites [archive]
- https://github.com/QubesOS/qubes-issues/issues/1344 [archive]
- https://hackertarget.com/sample-vulnerability-report/openvas-report-win7.html [archive]
- https://en.wikipedia.org/wiki/ICMP_Timestamp [archive]
- https://en.wikipedia.org/wiki/ICMP_Timestamp#Timestamp [archive]
- Advanced users can of course use IP tables. For example in Debian [archive]:
ipchains -p icmp -s $INTIP/0 13 -i $INTIF -j DENYand
ipchains -p icmp -s 0.0.0.0/0 14 -i $EXTIF -j DENY
- For instance, Debian users [archive] can edit the /etc/systcl.conf file manually and add
net.ipv4.icmp_echo_ignore_all = 1.
- http://osxdaily.com/2015/11/18/enable-stealth-mode-mac-os-x-firewall/ [archive]
- https://security.stackexchange.com/questions/46090/why-is-icmp-timestamping-disabled-on-os-x [archive]
- https://superuser.com/questions/680200/os-x-how-to-make-it-reply-to-icmp-time-stamp-query [archive]
- https://beyondsecurity.zendesk.com/hc/en-us/articles/203609549--How-can-I-mitigate-ICMP-Timestamp- [archive]
- https://github.com/QubesOS/qubes-issues/issues/1346 [archive]
- https://www.sysprobs.com/enable-ping-reply-and-ftp-traffic-in-windows-10-and-server [archive]
- https://answers.microsoft.com/en-us/windows/forum/windows_7-security/check-icmp-timestamp-response/062ffa99-ffae-4ab0-a328-84371ed46ed8?tab=question&status=AllReplies#tabs [archive]
- https://msdn.microsoft.com/en-us/library/ms912869%28v=winembedded.5%29.aspx [archive]
- https://social.technet.microsoft.com/Forums/windows/en-US/219f3dcc-3e5b-4d9b-88ae-137215575c7f/icmp-timestamp-response?forum=w7itprosecurity [archive]
This is a wiki. Want to improve this page? Help is welcome and volunteer contributions are happily considered! Read, understand and agree to Conditions for Contributions to Whonix ™, then Edit! Edits are held for moderation.
Copyright (C) 2012 - 2019 ENCRYPTED SUPPORT LP. Whonix ™ is a trademark. Whonix ™ is a licensee [archive] of the Open Invention Network [archive]. Unless otherwise noted, the content of this page is copyrighted and licensed under the same Freedom Software license as Whonix ™ itself. (Why?)