123/udp - Pentesting NTP

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!

基本情報

ネットワーク時間プロトコル (NTP) は、可変遅延ネットワーク上でコンピュータやネットワークデバイスが時計を正確に同期させることを保証します。これは、IT運用、セキュリティ、ログ記録において正確な時間管理を維持するために重要です。NTPの正確性は不可欠ですが、適切に管理されない場合はセキュリティリスクも伴います。

概要とセキュリティのヒント:

  • 目的: ネットワーク上でデバイスの時計を同期させる。

  • 重要性: セキュリティ、ログ記録、運用にとって重要。

  • セキュリティ対策:

  • 認証付きの信頼できるNTPソースを使用する。

  • NTPサーバーへのネットワークアクセスを制限する。

  • 改ざんの兆候がないか同期を監視する。

デフォルトポート: 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増幅攻撃

NTP DDoS攻撃の仕組み

NTPプロトコルは、UDPを使用しており、TCPとは異なり、ハンドシェイク手順なしで動作することができます。この特性は、NTP DDoS増幅攻撃で悪用されます。ここでは、攻撃者が偽のソースIPを持つパケットを作成し、攻撃リクエストが被害者から来ているように見せかけます。これらのパケットは最初は小さいですが、NTPサーバーははるかに大きなデータ量で応答し、攻撃を増幅させます。

_MONLIST_コマンドは、その使用頻度は低いものの、NTPサービスに接続した最後の600クライアントを報告することができます。このコマンド自体は単純ですが、その悪用は重大なセキュリティ脆弱性を浮き彫りにします。

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}

経験豊富なハッカーやバグバウンティハンターとコミュニケーションを取るために、HackenProof Discordサーバーに参加しましょう!

ハッキングの洞察 ハッキングのスリルと課題に深く掘り下げたコンテンツに参加しましょう

リアルタイムハックニュース リアルタイムのニュースと洞察を通じて、急速に変化するハッキングの世界を把握しましょう

最新のお知らせ 新しいバグバウンティの開始や重要なプラットフォームの更新について情報を得ましょう

Discordに参加して、今日からトップハッカーとコラボレーションを始めましょう!

HackTricksをサポートする

Last updated