Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
airport-events is a MacOS specific library that receives WiFi related events. It currently supports:
event parameters triggers when
connected String ssid, DateTime date A WiFi networks has been successfully connected.
disconnected DateTime date Computer is going to sleep, airport has been disabled or system halts.
The library is extremely fresh and currently has no tests and has only been tested on MacOS 10.7.5.
I created it to log the amount of time I spend on different WiFi networks. Check out the airport-log utility below for an example implementation.
gem install airport-events
The gem depends on an official Apple command line tool called "airport" which is disabled by default. To enable the "airport" command, symlink it into PATH by running the following command:
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport
require 'airport_events'
# Create a new Watcher instance and set up some event listeners.
watcher = AirportEvents::Watcher.new
watcher.on :connected do |ssid, date|
puts "Connected to #{ssid} on #{date}"
end
watcher.on :disconnected do |date|
puts "Disconnected on #{date}"
end
# Start the watcher, which runs in a separate Thread.
watcher.start
# Keep program alive until interrupted (For instance: CTRL + C).
interrupted = false
trap("INT") { interrupted = true }
while true do
exit if interrupted
sleep 0.1
end
The gem is shipped with a binary called 'airport-log' which logs wifi connect/disconnect events to a JSON file.
For usage instructions run:
airport-log -h
Example JSON output:
[
{
"ssid": "orca",
"connected_at": "2013-02-24T22:35:54+00:00",
"disconnected_at": "2013-02-24T22:47:38-05:00"
},
{
"ssid": "beluga",
"connected_at": "2013-02-24T22:48:23-05:00",
"disconnected_at": null
}
]
When disconnected_at is null it means the network is still connected or a disconnect event was never sent.
FAQs
Unknown package
We found that airport_events 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.