
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
Ruby gem for interfacing with Meshtastic nodes / network.
This gem was created to support alt-comm capabilities w/in a security research framework known as PWN. Contributors of this effort cannot guarantee full functionality or support for all Meshtastic features.
protoc
command: Complete
Complete
Ongoing Effort
Install the gem and add to the application's Gemfile by executing:
$ bundle add meshtastic
If bundler is not being used to manage dependencies, install the gem by executing:
$ gem install meshtastic
At the moment the only module available is Meshtastic::MQTT
. To view MQTT messages, and include only messages containing _APP
and LongFast
strings, use the following code:
require 'meshtastic'
Meshtastic::MQTT.help
mqtt_obj = Meshastic::MQTT.connect
Meshtastic::MQTT.subscribe(
mqtt_obj: mqtt_obj,
include: '_APP, LongFast'
)
This code will dump the contents of every message:
require 'meshtastic'
mqtt_obj = Meshastic::MQTT.connect
Meshtastic::MQTT.subscribe(
mqtt_obj: mqtt_obj,
region: 'US',
channel_topic: '2/e/LongFast/#',
psks: { LongFast: 'AQ==' }
) do |message|
puts message.inspect
end
Sending a message over MQTT:
require 'meshtastic'
mqtt_obj = Meshastic::MQTT.connect
client_id = "!#{mqtt_obj.client_id}"
Meshtastic::MQTT.send_text(
mqtt_obj: mqtt_obj,
from: client_id,
to: '!ffffffff',
topic: "msh/US/2/e/LongFast/#{client_id}",
channel: 93,
text: 'Hello, World!',
psks: { LongFast: 'AQ==' }
)
One of the "gotchas" when sending messages is ensuring you're sending over the proper integer for the channel
parameter. The best way to determine the proper channel
value is by sending a test message from within the meshtastic app and then viewing the MQTT message similar to the following:
require 'meshtastic'
mqtt_obj = Meshastic::MQTT.connect
Meshtastic::MQTT.subscribe(
mqtt_obj: mqtt_obj,
region: 'US',
channel_topic: '2/e/LongFast/#',
psks: { LongFast: 'AQ==' },
include: '!YOUR_CLIENT_ID'
) do |message|
puts message.inspect
end
You should see something like this:
{packet: {from: 4080917205, to: 4294967295, channel: 93, id: 1198634591, rx_time: 1738614021, rx_snr: 0.0, hop_limit: 3, want_ack: false, priority: :HIGH, rx_rssi: 0, delayed: :NO_DELAY, via_mqtt: false, hop_start: 3, public_key: "", pki_encrypted: false, next_hop: 0, relay_node: 0, tx_after: 0, decoded: {portnum: :TEXT_MESSAGE_APP, payload: "WHAT IS MY channel VALUE?", want_response: false, dest: 0, source: 0, request_id: 0, reply_id: 0, emoji: 0, bitfield: 0}, encrypted: :decrypted, topic: "msh/US/2/e/LongFast/!f33ddad5", node_id_from: "!f33ddad5", node_id_to: "!ffffffff", rx_time_utc: "2025-01-01 07:00:00 UTC"}, channel_id: "LongFast", gateway_id: "!f33ddad5"}
Note where is says channel: 93
. This is the channel
value required to send messages in this particular example.
Bug reports and pull requests are welcome on GitHub at https://github.com/0dayinc/meshtastic. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
Everyone interacting in the Meshtastic project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that meshtastic 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.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.