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.
heiafr-hydrocontest-sensor_api
Advanced tools
The Sensor API for the Raspberry Pi is a web service that give access to environmental information of a Raspberry Pi. It uses the sensors of the Sense Hat as well as the internal CPU thermometer.
It returns the information as a JSON structure:
{
"C": 50.464,
"H": 39.45915603637695,
"P": 941.78369140625,
"T": 34.720176696777344
}
Install the required software:
sudo apt update
sudo apt install sense-hat libatlas-base-dev libopenjp2-7-dev gunicorn3
Install the app:
sudo pip install heiafr-hydrocontest-sensor_api
If you want to test the service you can just start it localy using gunicorn:
gunicorn3 heiafr.hydrocontest.sensor_api:app
You can now go to http://127.0.0.1:8000 and check the result.
In a production environment, you would rather start the service using systemd and use a reverse proxy (e.g. Nginx) in front of it.
You can use this systemd service file (you can name it heiafr-hydrocontest-sensor_api.service
):
[Unit]
Description=HEIAFR Hydrocontest Sensor API
After=network.target
[Service]
User=root
Group=root
ExecStart=/usr/bin/gunicorn3 --bind=0.0.0.0:8081 heiafr.hydrocontest.sensor_api:app
[Install]
WantedBy=multi-user.target
This is a possible Nginx configuration:
location /sensors {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:8081/;
proxy_read_timeout 90;
}
FAQs
Sensor servers for Telecom Box
We found that heiafr-hydrocontest-sensor_api 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
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.