Package core :: Package controllers :: Package payloadTransfer :: Module reverseFTP :: Class reverseFTP
[hide private]
[frames] | no frames]

Class reverseFTP




This is a class that defines how to send a file to a remote server a reverse connection and a ftp like transfer mode ( using a new TCP connection and socket.send/socket.recv )

Instance Methods [hide private]
  __init__(self, execMethod, os, inboundPort)
  canTransfer(self)
This method is used to test if the transfer method works as expected.
  estimateTransferTime(self, size)
  _serve(self, strObject)
Listens for 1 connection on the inbound port, transfers the data and then returns.
  transfer(self, strObject, destination)
This method is used to transfer the strObject from w3af to the compromised server.
  getSpeed(self)

Method Details [hide private]

__init__(self, execMethod, os, inboundPort)
(Constructor)

 
None
Overrides: basePayloadTransfer.basePayloadTransfer.__init__

canTransfer(self)

 
This method is used to test if the transfer method works as expected. The implementation of this should transfer 10 bytes and check if they arrived as expected to the other end.
Overrides: basePayloadTransfer.basePayloadTransfer.canTransfer

estimateTransferTime(self, size)

 
Returns:
An estimated transfer time for a file with the specified size.
Overrides: basePayloadTransfer.basePayloadTransfer.estimateTransferTime

_serve(self, strObject)

 
Listens for 1 connection on the inbound port, transfers the data and then returns. This function should be called with tm.startFunction ; and afterwards you should exec the ftp client on the remote server.

transfer(self, strObject, destination)

 
This method is used to transfer the strObject from w3af to the compromised server. Steps:
  • using echoLnx / echoWin transfer the reverseFTPClient.py file (or the cx_freezed version)
  • start the _serve method
  • call the reverseFTPClient.py file on the remote server using:
    • reverseFTPClient.py <w3af-ip-address> <port> <destination>
  • verify that the file exists
Overrides: basePayloadTransfer.basePayloadTransfer.transfer

getSpeed(self)

 
Returns:
The transfer speed of the transfer object. It should return a number between 100 (fast) and 1 (slow)
Overrides: basePayloadTransfer.basePayloadTransfer.getSpeed