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.
This library is intended for people that do not have an static IP from their ISP but want to keep updated their A records at Hetzner DNS service
pip install hdns requests json sys
Example usage to update all A records with the current IPv4 ip
from hdns import arecords, ipv4
zone_id = "XXXXXXX"
auth_api_token = "XXXXXX"
ip = ipv4.get_ipv4()
records = arecords.get_all(zone_id, auth_api_token)
different_ip_zone_ids = []
for record in records:
if record["value"] != ip:
record["value"] = ip
different_ip_zone_ids.append(record)
if different_ip_zone_ids:
insert_records = arecords.insert_records(auth_api_token, different_ip_zone_ids)
print(insert_records)
else:
print("No need for update, IPv4 is still the same!")
ipv4: uses https://api.ipify.org API to get your IPv4 public IP arecords.get_all(): accepts two values the zone_id and the auth_api_token to be able to function ipv4.get_ipv4(): can be called without any value to return your public IP arecords.insert_records(): accepts two values auth_api_token and an json array object with records that need to be modified
FAQs
A simple library to handle Hetzner DNS API
We found that hdns 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.