Metasploit mailing list archives

not validating ip addresses on route command


From: Robin Wood <robin () digininja org>
Date: Thu, 12 Aug 2010 16:23:56 +0100

I know this is my mistake for putting the /24 in but there is no
validation on the ip address passed to the route command. Not really a
bug but nice handling would be good.

Robin

 route add 10.1.1.0/24 255.255.255.0 1
[-] Error while running command route: no address for 10.1.1.0/24

Call stack:
/usr/lib/ruby/1.8/resolv.rb:93:in `getaddress'
/usr/lib/ruby/1.8/resolv.rb:43:in `getaddress'
/usr/src/metasploit/lib/rex/socket.rb:142:in `getaddress'
/usr/src/metasploit/lib/rex/socket.rb:194:in `resolv_nbo'
/usr/src/metasploit/lib/rex/socket.rb:201:in `resolv_nbo_i'
/usr/src/metasploit/lib/rex/socket/switch_board.rb:40:in `initialize'
/usr/src/metasploit/lib/rex/socket/switch_board.rb:154:in `new'
/usr/src/metasploit/lib/rex/socket/switch_board.rb:154:in `add_route'
/usr/src/metasploit/lib/rex/socket/switch_board.rb:151:in `synchronize'
/usr/src/metasploit/lib/rex/socket/switch_board.rb:151:in `add_route'
/usr/src/metasploit/lib/rex/socket/switch_board.rb:77:in `add_route'
/usr/src/metasploit/lib/msf/ui/console/command_dispatcher/core.rb:809:in
`cmd_route'
/usr/src/metasploit/lib/rex/ui/text/dispatcher_shell.rb:246:in `send'
/usr/src/metasploit/lib/rex/ui/text/dispatcher_shell.rb:246:in `run_command'
/usr/src/metasploit/lib/rex/ui/text/dispatcher_shell.rb:208:in `run_single'
/usr/src/metasploit/lib/rex/ui/text/dispatcher_shell.rb:202:in `each'
/usr/src/metasploit/lib/rex/ui/text/dispatcher_shell.rb:202:in `run_single'
/usr/src/metasploit/lib/rex/ui/text/shell.rb:141:in `run'
./msfconsole:117
_______________________________________________
https://mail.metasploit.com/mailman/listinfo/framework


Current thread: