123/udp - Pentesting NTP

Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Support HackTricks

Join HackenProof Discord server to communicate with experienced hackers and bug bounty hunters!

Hacking Insights Engage with content that delves into the thrill and challenges of hacking

Real-Time Hack News Keep up-to-date with fast-paced hacking world through real-time news and insights

Latest Announcements Stay informed with the newest bug bounties launching and crucial platform updates

Join us on Discord and start collaborating with top hackers today!

Basic Information

Το Network Time Protocol (NTP) διασφαλίζει ότι οι υπολογιστές και οι δικτυακές συσκευές σε δίκτυα με μεταβλητή καθυστέρηση συγχρονίζουν τις ρολόγια τους με ακρίβεια. Είναι ζωτικής σημασίας για τη διατήρηση ακριβούς χρονομέτρησης σε λειτουργίες IT, ασφάλεια και καταγραφή. Η ακρίβεια του NTP είναι ουσιώδης, αλλά ενέχει επίσης κινδύνους ασφάλειας αν δεν διαχειριστεί σωστά.

Summary & Security Tips:

  • Purpose: Συγχρονίζει τις ρολόγια των συσκευών μέσω δικτύων.

  • Importance: Κρίσιμο για την ασφάλεια, την καταγραφή και τις λειτουργίες.

  • Security Measures:

  • Χρησιμοποιήστε αξιόπιστες πηγές NTP με αυθεντικοποίηση.

  • Περιορίστε την πρόσβαση στο δίκτυο του διακομιστή NTP.

  • Παρακολουθήστε τον συγχρονισμό για σημάδια παρεμβολής.

Default port: 123/udp

PORT    STATE SERVICE REASON
123/udp open  ntp     udp-response

Καταμέτρηση

ntpq -c readlist <IP_ADDRESS>
ntpq -c readvar <IP_ADDRESS>
ntpq -c peers <IP_ADDRESS>
ntpq -c associations <IP_ADDRESS>
ntpdc -c monlist <IP_ADDRESS>
ntpdc -c listpeers <IP_ADDRESS>
ntpdc -c sysinfo <IP_ADDRESS>
nmap -sU -sV --script "ntp* and (discovery or vuln) and not (dos or brute)" -p 123 <IP>

Εξέταση αρχείων ρυθμίσεων

  • ntp.conf

Επίθεση Ενίσχυσης NTP

Πώς Λειτουργεί η Επίθεση DDoS NTP

Το ** πρωτόκολλο NTP**, χρησιμοποιώντας UDP, επιτρέπει τη λειτουργία χωρίς την ανάγκη διαδικασιών χειραψίας, σε αντίθεση με το TCP. Αυτή η χαρακτηριστική εκμεταλλεύεται σε επιθέσεις ενίσχυσης DDoS NTP. Εδώ, οι επιτιθέμενοι δημιουργούν πακέτα με ψεύτικη διεύθυνση IP προέλευσης, κάνοντάς το να φαίνεται ότι τα αιτήματα επίθεσης προέρχονται από το θύμα. Αυτά τα πακέτα, αρχικά μικρά, προκαλούν τον διακομιστή NTP να απαντήσει με πολύ μεγαλύτερους όγκους δεδομένων, ενισχύοντας την επίθεση.

Η εντολή MONLIST, παρά τη σπάνια χρήση της, μπορεί να αναφέρει τους τελευταίους 600 πελάτες που συνδέθηκαν στην υπηρεσία NTP. Ενώ η εντολή αυτή είναι απλή, η κακή χρήση της σε τέτοιες επιθέσεις αναδεικνύει κρίσιμες ευπάθειες ασφαλείας.

ntpdc -n -c monlist <IP>

Shodan

  • ntp

HackTricks Αυτόματες Εντολές

Protocol_Name: NTP    #Protocol Abbreviation if there is one.
Port_Number:  123     #Comma separated if there is more than one.
Protocol_Description: Network Time Protocol         #Protocol Abbreviation Spelled out

Entry_1:
Name: Notes
Description: Notes for NTP
Note: |
The Network Time Protocol (NTP) ensures computers and network devices across variable-latency networks sync their clocks accurately. It's vital for maintaining precise timekeeping in IT operations, security, and logging. NTP's accuracy is essential, but it also poses security risks if not properly managed.

https://book.hacktricks.xyz/pentesting/pentesting-ntp

Entry_2:
Name: Nmap
Description: Enumerate NTP
Command: nmap -sU -sV --script "ntp* and (discovery or vuln) and not (dos or brute)" -p 123 {IP}

Join HackenProof Discord server to communicate with experienced hackers and bug bounty hunters!

Hacking Insights Engage with content that delves into the thrill and challenges of hacking

Real-Time Hack News Keep up-to-date with fast-paced hacking world through real-time news and insights

Latest Announcements Stay informed with the newest bug bounties launching and crucial platform updates

Join us on Discord and start collaborating with top hackers today!

Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Support HackTricks

Last updated