• Aucun résultat trouvé

Time is on my side

N/A
N/A
Protected

Academic year: 2022

Partager "Time is on my side"

Copied!
48
0
0

Texte intégral

(1)

Forging Wireless Timing Signals to Attack the NTP Server

Time is on my side

Yuwei Zheng @HITB

(2)

Main contents

Time is on my side

• About the NTP server

• The NTP stratum mode

• The reference clock

• Forge radio clock signals

• Forge GPS clock signals

• Attack NTP server

2

(3)

About NTP server

A server for computer to synchronize time.

(4)

About NTP server

Time is on my side

Critical Industries that use NTP servers

4

(5)

The NTP stratum mode

Stratum 0

Reference clocks

Stratum 1

Primary time servers

Stratum 2

Stratum 3

Stratum 16

(6)

About the NTP server

Time is on my side

• NTP servers are deployed with open source NTP v4

6

(7)

The reference clock

Reference Clock Drivers in the open source NTP v4

Type 2 Deprecated: was Trak 8820 GPS Receiver

Type 3 PSTI/Traconex 1020 WWV/WWVH Receiver (WWV_PST) Type 4 Spectracom WWVB/GPS Receivers (WWVB_SPEC)

Type 5 TrueTime GPS/GOES/OMEGA Receivers (TRUETIME) Type 6 IRIG Audio Decoder (IRIG_AUDIO)

Type 7 Radio CHU Audio Demodulator/Decoder (CHU)

Type 39 hopf GPS/DCF77 6039 for PCI-Bus (HOPF_P) Type 40 JJY Receivers (JJY)

Type 41 TrueTime 560 IRIG-B Decoder Type 42 Zyfer GPStarplus Receiver

Type 43 RIPE NCC interface for Trimble Palisade Type 44 NeoClock4X - DCF77 / TDF serial line

(8)

The reference clock

Time is on my side

Why does the stratum-1 NTP server use radio clock and GPS ?

Atomic clock, accurate, but expensive

GPS

radio clock

8

(9)

The reference clock

• Receiver cards supported by NTP V4

(10)

The reference clock

Time is on my side

• Stratum 1 NTP server product for industrial using

10

(11)

The reference clock

• It supports DCF77, MSF, WWVB, and GPS

(12)

Forge long wave timing signals

Time is on my side

• DIY a circuit to transmit radio clock signals support WWVB, JJY, DCF77, and MSF

12

(13)

WWVB encoding and modulation

• Different pulse width represent different data bit

1 2 3 4 t(s)

p

reduced full

0.8s

marker 1 0 1

0.5s 0.2s 0.5s

(14)

WWVB encoding and modulation

Time is on my side

• 60Khz carrier

14

(15)

WWVB encoding and modulation

• ASK modulation

(16)

WWVB encoding and modulation

Time is on my side

• The frame structure

16

(17)

JJY encoding and modulation

Similar to the WWVB

1 2 3 4 t(s)

p

reduced full

0.8s marker

1 0 1

0.5s 0.2s 0.5s

(18)

DCF77 encoding and modulation

Time is on my side

• Similar to WWVB, it uses a 77.5hz carrier

18

(19)

Long wave timing signal transmitter

• Use ad9850 DDS module to generate the carrier

(20)

Long wave timing signal transmitter

Time is on my side

About AD9850 DDS module

supports to output 0-40Mhz wave

sends all radio clock signals with one circuit

Use arduino to control ad9850 Ad9850 serial library for arduino https://github.com/F4GOJ/AD9850

20

(21)

Long wave timing signal transmitter

• A simple JJY transmitter

void sendMark() {

// Send high for 0.2 sec DDS.setfreq(freq, phase);

delay(200);

// Send low for 0.8 sec DDS.down();

delay(800);

return;

(22)

Long wave timing signal transmitter

Time is on my side

• A simple JJY transmitter

void sendBit1() {

// Send high for 0.5 sec DDS.setfreq(freq, phase);

delay(500);

// Send low for 0.5 sec DDS.down();

delay(500);

return;

}

22

(23)

Long wave timing signal transmitter

• A simple JJY transmitter

void sendBitZero() {

// Send high for 0.8 sec DDS.setfreq(freq, phase);

delay(800);

// Send low for 0.2 sec DDS.down();

delay(200);

return;

(24)

Long wave timing signal transmitter

Time is on my side

• Get the antenna from an JJY receiver

L = 1890uH.

𝑓 = $

%& '( , for 60khz carrier C = 3.6nF For the 77.5khz carrier, C = 2.2nF

24

(25)

Long wave timing signal transmitter

• The whole circuit of the uniform transmitter

(26)

Long wave timing signal transmitter

Time is on my side 26

• Long distance transmitter

Design a power amplifier with MOSFET IR540.

(27)

Attack GPS NTP receiver

• GPS receiver

• GPS tech briefing

• Generate GPS signal

• Have a try

• Upgrade attack algorithm

(28)

GPS receiver

Time is on my side

• Multiply Connection

PCI

USB

Serial port

28

(29)

GPS tech briefing

• Complicated principle

• But doesn’t matter, it’s open-sourced

• Defcon23 “GPS Spoofing - Lin Huang”

(30)

GPS tech briefing

Time is on my side 30

Subframe 1 Subframe 2 Subframe 3 Subframe 4 Subframe 5

Time information Ephemeris

(31)

Generate GPS signal

(32)

Have a try

Time is on my side 32

(33)

Panic

(34)

Update attack algorithm

Time is on my side 34

• Find GPSTime

• Replace it

• Re-ParityCheck

(35)

Setup an NTP server

• Setup an NTP server using JJY as clock source

server 127.127.40.0 mode 1 prefer fudge 127.127.40.0 flag1 stratum 0

(36)

Setup an NTP server

Time is on my side

• This NTP server with JJY reference clock

36

(37)

Setup an NTP server ( JJY )

(38)

Attack the NTP server

Time is on my side

• Can we inject any time ?

The time offset must be less than 4 hours.

• Inject a time that is one hour slow than real time

Server crashed !!!

38

(39)

Attack the NTP server

• Can we inject any time ?

If the time offset is more than 1000s, the server will shutdown.

(40)

Attack the NTP server

Time is on my side

• Can we inject any time ?

the offset > 1000s, require manually adjust

40

(41)

Root Dispersion

RFC5905

(42)

Attack Demo

Time is on my side 42

(43)

Real Attack ?

(44)

Real Attack ?

Time is on my side 44

(45)

Real Attack ?

(46)

Real Attack?

Time is on my side

• Sensitive & expensive

46

(47)

References

• “GPS Spoofing – Huang Lin”

• https://www.eecis.udel.edu/~mills/ntp/

html/refclock.html

• http://www.sundgren.se/1-recreation/2- electronics/dcf77_simulator.htm

• https://github.com/F4GOJ/AD9850

• https://github.com/sywcxx/gps-sim

(48)

Thanks

Hacking Femtocell

• Any question?

• Feel free to contact us!

48

Références

Documents relatifs

We have compared the similarity among (i) the representative mapping sets from the harmonisation (see Section 2), (ii) the UMLS-based reference mappings of the track, and (iii)

The conclusion is unequivocal: without exception the science teachers we worked with completed all their formal education – basic and professional one – with no contact at all

Le signal horaire DCF77 est composé d'une fréquence porteuse très stable de 77,5 kHz, modulée en amplitude par les signaux horaires codés en BCD (binary coded decimal)..

Sans entrer dans le détail, on peut définir les variables de STUDENT de différentes façons.. Cette présentation est celle envisagée par GOSSET, la variable aléatoire X étant

Ps ycho logi cal Aspect s of W omen 's Career Devel opme nt.. princ ipals wer e women.. Wha tever reasons , women have not as pi red t o be adminis trators and hav e not acti

encouragement, supervision and monitoring, finalize decisions, and arranges for compensation (Appendix-VIII; Table-01). In fact, the vital role of BFD is to supervise and monitor

du corps humain avec les Maladies & les Remèdes par Si Hylaire , troifiéme édition. latin avec Figures. latin, avec Fig. 7 h Anatomie de l’Homme fuivant les dernieres

« malaise » que les Québécois ressentent face à leurs usages linguistiques, la « source de préoccupation » que la langue constitue pour eux, ainsi que le rôle que leur situation