How to insert client ip source inside FTP payload - ftp

I've scenario where ftp client and server are separe with a proxy server.
I want to insert ip source address into ftp client payload so that the ftp server can retrieve it.
The problem is that i don't know how to proceed.
Help me out please.
With regards.

FTP is text-based protocol.
If you can re-implement both the client and the server, just make them understand a new command for your purpose.
E.g. you can have the client send a XIP command just after authentication (or even before, if you need):
XIP 203.0.113.0
The server will just parse the IP and respond something like this (to follow the FTP specification):
200 OK
And then carry on as in a normal FTP session.

Related

Is ftp connection to secure server in c++ program secure with libcurl?

Is ftp connection to secure server in c++ program secure with libcurl?I need to make a client program that will receive and write data to the host.
FTP is insecure, it transfers data, user names & passwords in the clear. Don't use it. Use either https, scp or sftp.

Connect a Biztalk send port to a ftps server

I currently working on BizTalk and I got a problem when I try to configure a send port to a ftps server.
I send a request to an amazon server to get a file and I want to send this file on a ftp server.
I use an adapter nsoftware.ftp v3 for my sending port to the ftp server. But when I try it, I got this error message :
This system contains a plaintext-only license, however the( Ftp:Adresse) send port is configured to run with security enabled. You must disable the security features for the send port to execute.
Do I need a certificate with a private key or just the configuration any is ok with the nsoftware adapter?
So actually I use a first flow to get a file on a amazon server and it works . After, I create a send port who must take this file and send him to an ftps server (it is the server of a client). So I use the property BTS.SPName to activate this send port at the file reception and I use a nsoftware.ftp adapter (free version) for the transport type. The client send to me the certificate of the server and I install it on the server.
#Martin is right. The error is due to licensing. The version of the license you have does not support SSL/TLS connections. Please submit a support ticket and we can provide information on using the latest version of the adapters (V3 is also a few major versions old).

Wininet FTP get server responses at runtime

I use wininet to connect to ftp server, i see that wininet only gives true:false for each command that is used to communicate with the server and the classic GetLastError() to get the specific error if any.
What i cant find with wininet is how to get responses from the ftp server whithout sending commands like a stand by mode, i cant find the way if the server choose to disconect me or timeout my session how to get back that response from the ftp server so i can know what is going on with the connection and do the appropiate actions after each response.
Anyone knows ?

is ftp data connection is only for one file?

I have a client trying to upload multiple files to FTP server in passive mode.
The client sends PASV command and the server responds with the relevant ip and port.
Is it possible to send multiple files on this one data connection? or the client need to send the PASV command and get a new port for each file?
Since the only indicator of the end of file is the close of the connection and because you cannot transfer any more data after the connection has closed, you will not be able to transfer more than one file using the same data connection.
But, maybe you tried to ask a different question, that is if is possible to have multiple data transfers (and thus multiple data connections) after a single PASV command? I can see nothing in RFC959 which directly would prevent this and reusing the same target port on the server. And because access would be done from different source ports on the client this should also not give problems with TCP connection states. But, in practice you will probably see problems because if you try to use this from the client side, because lots of servers create the listener only for a single data connection. So you better precede each data transfer with a new PASV command, like existing clients do.

How do I monitor what commands my ftp application is sending to a ftp server

F
Is there a way to monitor the FTP port so that I can know what commands my FTP application is sending to a FTP server?
I am using a closed-source FTP client application, which is not working with a closed-source FTP application server. The client and the server are not communicating well with each other, and I would like to find out why. I wish to reverse-engineer the client to see what commends the client are sending to the sever. I used a web test tool before that allowed me to monitor the content transferring through HTTP, but I can't seem to find such tool for FTP. I appreciate it if you can help me out, thanks.
Sounds like you need a packet sniffer - assuming your network admins/company policy allows it...I have used wireshark fairly successfully before.
The core FTP commands should be visible in the packets.
You can use the Wireshark application: http://www.wireshark.org/
It should have decent parsing capabilities for FTP as well as other protocols.
Can you configure a proxy with the client? Then you could install an ftp proxy server using the logging on that to see what's going on?
There's a proxy server for Linux here: http://frox.sourceforge.net/doc/FAQ.html
Paul.
Do you have access to ftp-server logs? Its likely those commands would be logged there.
If they aren't, your next option would be to configure the server to log them, if you have access.
If thats not an option or server does not log such things, then you have to go to either packet sniffer or a proxy, as suggested by previous posters.
On Unix, tcpdump might be your friend. Maybe you should first state which OS you're targeting, though.
If you have the ability (often requiring root access) to use a packet sniffer, tcpflow sniffing the TCP control channel will show you the commands and responses going back and forth in an easy-to-read format.
If you don't have such access, tools such as ktrace and strace will allow you to see all data read and written on the socket for this connection, though it will be a little work to extract it.
If you could tell us just what tool you were using for HTTP traffic, that would allow us to look for something similar for FTP traffic.

Resources