A communication device for facilitating detecting attacks on single-sided two-way ranging sessions, comprising: - a communication unit configured to execute a time-of-flight ranging session with an external communication counterpart; - a clock offset measurement unit configured to measure a frequency offset of a device clock, wherein said device clock is configured to be used by the communication unit when said ranging session is executed; - a processing unit configured to determine whether the measured frequency offset of the device clock has a predefined correlation with a frequency offset of a counterpart clock, wherein said counterpart clock is configured to be used by the external communication counterpart when said ranging session is executed; wherein the frequency offsets are frequency scaling factors; wherein the predefined correlation is that a measured frequency scaling factor of the device clock is equal to the inverse of a measured frequency scaling factor of the counterpart clock within a given tolerance range; characterized in that the processing unit is further configured to determine whether the measured frequency offset of the device clock has a further predefined correlation with a predetermined clock offset between the device clock and a reference clock and a predetermined clock offset between the counterpart clock and said reference clock; wherein the predetermined clock offsets are predetermined relative frequency scaling factors; wherein the further predefined correlation is that the product of the measured frequency scaling factor of the device clock and a predetermined relative frequency scaling factor between the device clock and the reference clock is equal to a predetermined relative frequency scaling factor between the counterpart clock and said reference clock within a given tolerance range. - a communication unit configured to execute a time-of-flight ranging session with an external communication counterpart; - a clock offset measurement unit configured to measure a frequency offset of a device clock, wherein said device clock is configured to be used by the communication unit when said ranging session is executed; - a processing unit configured to determine whether the measured frequency offset of the device clock has a predefined correlation with a frequency offset of a counterpart clock, wherein said counterpart clock is configured to be used by the external communication counterpart when said ranging session is executed; wherein the frequency offsets are frequency scaling factors; wherein the predefined correlation is that a measured frequency scaling factor of the device clock is equal to the inverse of a measured frequency scaling factor of the counterpart clock within a given tolerance range; characterized in that the processing unit is further configured to determine whether the measured frequency offset of the device clock has a further predefined correlation with a predetermined clock offset between the device clock and a reference clock and a predetermined clock offset between the counterpart clock and said reference clock; wherein the predetermined clock offsets are predetermined relative frequency scaling factors; wherein the further predefined correlation is that the product of the measured frequency scaling factor of the device clock and a predetermined relative frequency scaling factor between the device clock and the reference clock is equal to a predetermined relative frequency scaling factor between the counterpart clock and said reference clock within a given tolerance range. <EOS>