Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
FTP is a protocol that was introduced in the 80's and today has the major problem of non-encrypted communication. Due to this problem, today there are two well-known advancements of the protocol: FTPS and SFTP. Unfortunately, there are still legacy systems in the wild that can only communicate with FTP servers. Depending on the importance and maintenance possibilities of the system, the function of working with one of the encrypted variants cannot be implemented with a realistic effort. If no middleware is then available, there are few options. This is where ftp2sftp comes in and reveals a way to enable communication via SFTP without having to make major changes to the legacy system.
ftp2sftp itself starts an FTP server to which an FTP client (for example the legacy system) can connect. But in the background a connection to a SFTP server is established after a successful login on the FTP server. All information that the FTP client receives actually comes from the SFTP server. They are passed through directly in both directions. This also means that if the FTP client uploads a file, for example, and receives feedback from ftp2sftp that the file has been successfully transferred, the client can be sure that the file has actually arrived on the SFTP server.
If the FTP client (for example, the legacy system) and ftp2sftp are running on the same machine or at least on the same network, and the target SFTP server is only accessible via the Internet, it can thus be ensured that the data transfer via the Internet is appropriately encrypted using the SFTP protocol.
ftp2sftp is a Python 3 module. You can install it like every other one with pip:
pip install --upgrade pdf2sftp
While installing not .exe files is still a mystery for some windows users, I created another repository to hold .exe files which were created using pyinstaller. If you want to run ftp2sftp as a service, you should take a look to nssm, what is a easy way to run any programs as a service.
We imagine the following situation:
A legacy software is configured to connect to an FTP server connected at the following URL: 127.0.0.1:21
as user ftp-user
and password secret
. The software also expects it to write to the following directory as its home directory: /home/ftp-user
.
The bridge should connect to your SFTP server, which can be reached at external-sftp-server:22
. It should connect with the user sftp-user
and the password 1234512
. On the SFTP server /home/sftp-user
is the home directory.
Also, a log is to be written to the /log/ftp2sftp
directory.
For this configuration you have to call ftp2sftp with this arguments:
pdf2sftp --ftp ftp-user:secret@127.0.0.1:21:/home/ftp-user --sftp sftp-user:1234512@external-sftp-server:22:/home/sftp-user --logdir /log/ftp2sftp
Both, the --ftp
and the --sftp
parameter have the same format: username:password@host:port:/homedirectory
. Note: the homedirectory can also be something like /
. It depends on the server or client configuration.
You can see the all command line arguments by using --help
.
You can store your command line options in a textfile. For the example above it could contain the following data:
--ftp
ftp-user:secret@127.0.0.1:21:/home/ftp-user
--sftp
sftp-user:1234512@external-sftp-server:22:/home/sftp-user
--logdir
/log/ftp2sftp
Whe you do so, your only paramter to ftp2sftp could be the path to the file with a as
prefix. If your configuration is in /etc/ftp2sftp.conf
you can call ftp2sftp like this:
ftp2sftp @/etc/ftp2sftp.conf
So it will read its command line arguments from the file.
FAQs
A simple FTP to SFTP bridge
We found that ftp2sftp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.