
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
fakesmtpd
A fake SMTP server with a minimal HTTP API. Inspired by mailtrap.
fakesmtpd
may be installed either as a Ruby gem or by directly
downloading the server file which may then be used as an executable,
e.g.:
gem install fakesmtpd
OR
curl -o fakesmtpd https://raw.github.com/modcloth-labs/fakesmtpd/master/lib/fakesmtpd/server.rb
chmod +x fakesmtpd
fakesmtpd
is usable either as an executable or from within a Ruby
process. The following examples are roughly equivalent.
# example command line invocation:
fakesmtpd 9025 ./fakesmtpd-messages -p ./fakesmtpd.pid -l ./fakesmtpd.log
# example in-process Ruby invocation:
require 'fakesmtpd'
FakeSMTPd::Server.main(
%w(9025 ./fakesmtpd-messages -p ./fakesmtpd.pid -l ./fakesmtpd.log)
)
The FakeSMTPd::Runner
class is intended to provide a
formalized way to spawn and manage a separate Ruby process running
FakeSMTPd::Server
. This example is also equivalent to those provided
above:
require 'fakesmtpd'
fakesmtpd = FakeSMTPd::Runner.new(
dir: File.expand_path('../fakesmtpd-messages', __FILE__),
port: 9025,
logfile: File.expand_path('../fakesmtpd.log', __FILE__),
pidfile: File.expand_path('../fakesmtpd.pid', __FILE__)
)
# This spawns another Ruby process via `RbConfig.ruby`
fakesmtpd.start
# ... do other stuff ...
# This will kill the previously-spawned process
fakesmtpd.stop
Once FakeSMTPd::Server.main
has been invoked via one of the above
methods, there will be both an SMTP and HTTP server running in a single
Ruby process. The HTTP port is one more than the SMTP port specified.
The HTTP API provides an index of all sent messages, the ability to fetch sent message content, and the ability to clear sent messages via the following:
GET /
Contains almost nothing but a link to /messages
.
GET /messages
Contains an index of all sent messages, their IDs, their absolute filenames, and links to the content for each.
GET /messages/[[:digit:]]
Returns the content of the message with the given ID.
DELETE /messages
Clears all files out of the sent messages directory.
FAQs
Unknown package
We found that fakesmtpd demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.