68 lines
1.4 KiB
Ruby
68 lines
1.4 KiB
Ruby
##
|
|
# This file is part of the Metasploit Framework and may be subject to
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
|
# Framework web site for more information on licensing and terms of use.
|
|
# http://metasploit.com/projects/Framework/
|
|
##
|
|
|
|
require 'msf/core'
|
|
require 'telephony'
|
|
|
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
|
|
|
include Msf::Exploit::Remote::Dialup
|
|
|
|
def initialize(info = {})
|
|
super(update_info(info,
|
|
'Name' => 'Test Dialup Exploit',
|
|
'Description' => %q{
|
|
This exploit connects to a system's modem over dialup and provides
|
|
the user with a readout of the login banner.
|
|
},
|
|
'Version' => '$Revision: 1 $',
|
|
'Author' =>
|
|
[
|
|
'I)ruid',
|
|
],
|
|
'Arch' => ARCH_CMD,
|
|
'Platform' => ['unix'],
|
|
'License' => MSF_LICENSE,
|
|
'Payload' =>
|
|
{
|
|
'Space' => 1000,
|
|
'BadChars' => '',
|
|
'DisableNops' => true,
|
|
},
|
|
'PayloadCompat' =>
|
|
{
|
|
'PayloadType' => 'cmd_tty',
|
|
},
|
|
'Targets' =>
|
|
[
|
|
['Automatic', { } ],
|
|
],
|
|
'DefaultTarget' => 0
|
|
))
|
|
|
|
end
|
|
|
|
def exploit
|
|
# Connect to the system via dialup
|
|
modem = connect_dialup
|
|
if ! modem
|
|
print_error("Unable to connect.")
|
|
return
|
|
end
|
|
|
|
# Log in
|
|
|
|
# Handoff to the shell handler
|
|
modem.display = false
|
|
handler(modem.sock)
|
|
|
|
disconnect_dialup(modem)
|
|
end
|
|
|
|
end
|