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.
libvirt_vmcfg
is a library for generating XML VM specifications for use in libvirt.
It's in an alpha state but pull requests welcome.
Documentation is poor at the moment as I have other priorities. When I have time, I'll create better docs.
from lxml import etree
from libvirt_vmcfg.dom.profiles.linux_virtio import kvm_default_hardware
from libvirt_vmcfg.dom.elements.devices import BridgedInterface
from libvirt_vmcfg.dom.elements.devices import DiskTargetCDROM, DiskTargetDisk
from libvirt_vmcfg.dom.elements.devices import (DiskSourceBlockPath,
DiskSourceNetHTTP, TargetBus)
from libvirt_vmcfg.dom.elements.devices import (Driver, DriverType,
DriverCache, DriverIO,
DriverOptions)
from libvirt_vmcfg.dom.elements.devices import Disk
from libvirt_vmcfg.dom.util.disk import disk_letter
from libvirt_vmcfg.dom import Domain
dev = disk_letter("vd")
elements = kvm_default_hardware(name="poopty", vcpus=2, memory=64*(1024**2),
boot_dev_order=["hd"])
# Build up the disk
source_disk = DiskSourceBlockPath("/dev/zeta-vg/debian-test-01")
target_disk = DiskTargetDisk(next(dev), bus=TargetBus.VIRTIO)
driver_opts_disk = DriverOptions(driver=Driver.QEMU, type=DriverType.RAW,
cache=DriverCache.NONE, io=DriverIO.NATIVE)
disk = Disk(source_disk, target_disk, driver_opts_disk, False)
# Now the CD
source_http = DiskSourceNetHTTP("http://localhost/install/install.iso")
target_cdrom = DiskTargetCDROM(next(dev), bus=TargetBus.VIRTIO)
driver_opts_cdrom = DriverOptions(driver=Driver.QEMU)
cdrom = Disk(source_http, target_cdrom, driver_opts_cdrom, True)
# Specify the Interface
interface = BridgedInterface("br0")
elements.extend((disk, cdrom, interface))
d = Domain(elements=elements)
print(repr(d))
print(d.emit_xml(pretty_print=True))
from libvirt_vmcfg.vol import Volume
GIGABYTE = 1073741824
# Note the default unit for volumes is gigabytes
vol = Volume(name="test", size=3 * GIGABYTE)
print(vol.emit_xml(pretty_print=True))
A lot. I'll get around to most of these eventually. I hope. I'm sadly quite busy these days.
volume
interoperate with domain
where relevantvol
moduleSee the contributing file for more information.
CC0, dedicated to the public domain. Do whatever you want with it.
Unfortunately I have to say this, because this comes up a lot in other projects. Let me make it clear: the project "licensing" (insofar a public domain dedication can be considered a license) is not up for debate. I wanted CC0 and it was a deliberate thoughtful choice. I am fully aware of its ramifications and have no intention to reverse my course on the matter. I was not — nor am not — willing or even able to enforce any restrictions on people or companies. Just do what you want with this. Relicensing is allowed; you may do so if you wish. Or don't. I don't care one way or the other.
You can thank me at my Say Thanks.
You can also donate to help keep me afloat during these tough times.
FAQs
XML builder for libvirt virtual machine configuration
We found that libvirt-vmcfg 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.