Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
This is a Ruby library that wraps the GMSEC API in a Ruby-friendly way. This makes it easy to quickly develop applications that can be deployed in a ground system environment that leverages the various software libraries in the Ruby community.
You will need to compile and install GMSEC 3.6 according to GMSEC documentation. Ensure that
the GMSEC and supporting libraries (Bolt, MBServer, etc) are available in a standard
library location such as /usr/local/lib
. If on Windows, make sure that your PATH
variable
includes the location of where the GMSEC library exists.
After that, simply run: gem install gmsec
to install this gem!
require 'gmsec'
# Create a connection by passing configuration options.
connection = GMSEC::Connection.new(connectiontype: :gmsec_mb)
# Connect based on connection defaults, i.e., localhost.
connection.connect
connection.connected? # Return true
connection.subscribe("TEST.*") do |message|
# Print the message
puts message.to_s
end
# Start auto dispatching so that the above subscription will be automatically kicked off
# when a message is received.
connection.start_auto_dispatch
# Create a new message using connection defaults.
message = connection.new_message
# We can add fields to messages using bracket notation:
message[:foo] = :bar
# We can append hashes to a message, creating multiple fields at once:
message << {answer: 42, baz: true}
# Or we can explicitly create a GMSEC Field object where we specify the data type:
message << GMSEC::Field.new(:bar, "x", type: :char)
message.subject = "TEST.FOO"
# Publish the message.
connection.publish(message)
# We should see:
#
# +---------------+------------------------------------------+
# | TEST.FOO |
# +---------------+------------------------------------------+
# | CONNECTION-ID | 2 |
# | MW-INFO | gmsec_mb: localhost |
# | NODE | xxxxx_local |
# | PROCESS-ID | 64047 |
# | PUBLISH-TIME | 2014-363-00:53:45.604 |
# | UNIQUE-ID | GMSEC_XXXXX_LOCAL_54A0A61980A4_64047_2_1 |
# | USER-NAME | user |
# | answer | 42 |
# | bar | x |
# | baz | true |
# | foo | bar |
# +---------------+------------------------------------------+
# We can also publish messages easily without having to create `Message` instances:
connection.publish({foo: :bar, answer: 42, baz: true}, subject: "TEST.BAZ")
FAQs
Unknown package
We found that gmsec 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
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.