tags:

views:

420

answers:

6

Hello all, 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.

+4  A: 

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.

Chris Kimpton
+4  A: 

You can use the Wireshark application: http://www.wireshark.org/

It should have decent parsing capabilities for FTP as well as other protocols.

kshahar
+1  A: 

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.

Paul
+1  A: 

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.

Tuminoid
A: 

On Unix, tcpdump might be your friend. Maybe you should first state which OS you're targeting, though.

Thomas Tempelmann
A: 

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.

Curt Sampson