Skip to content

Instantly share code, notes, and snippets.

@JamesConlan96
Last active May 30, 2023 15:51
Show Gist options
  • Save JamesConlan96/d6564b13d7176296e3cc5ef891eec37c to your computer and use it in GitHub Desktop.
Save JamesConlan96/d6564b13d7176296e3cc5ef891eec37c to your computer and use it in GitHub Desktop.
A script for checking NTP mode 6 queries as part of a pentest
#!/usr/bin/env bash
# NTP6
# A script for checking NTP mode 6 queries as part of a pentest
# $1: IP address
if [ "$#" -ne 1 ]; then
echo "Usage: ntp6 <ip_address>"
exit 1
fi
echo "> ntpq -c rv $1"
ntpq -c rv $1
echo ""
echo "> msfconsole -qx \"use auxiliary/scanner/ntp/ntp_unsettrap_dos; set RHOSTS $1; run; exit\""
msfconsole -qx "use auxiliary/scanner/ntp/ntp_unsettrap_dos; set RHOSTS $1; run; exit"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment