Skip to content

Instantly share code, notes, and snippets.

View dguerri's full-sized avatar

Davide Guerri dguerri

View GitHub Profile
@dguerri
dguerri / gist:6668397
Created September 23, 2013 09:43
Simple LibVirt//KVM backup with memory dump.
#!/bin/bash
#
# VirSH Simple Backup (davide.guerri@gmail.com)
#
# Version 1.0.1 - 20130301 (1362127750)
#
VIRSH="/usr/bin/virsh"
QEMU_IMG="/usr/bin/qemu-img"
backup_dir="/backups"
@dguerri
dguerri / qnap-clientenc-decrypt.sh
Last active September 25, 2023 09:01
Quick shell script to decrypt client-side encrypted file using QNAP HBS *Sync* jobs. Only work with version 2 files - Doesn't work with QNAP HBS Backup jobs!
#!/bin/sh
set -ue
[ "$#" -lt 2 ] && { echo "Syntax: $0 <filename> <key>"; exit 1; }
filename="$1"
key="$2"
# Compose the key by repeating the user input until we have 32 characters (64 hex digits)
@dguerri
dguerri / upwned247.php
Created December 9, 2023 12:35 — forked from Wack0/upwned247.php
UCam247/Phylink/Titathink/YCam/Anbash/Trivision/Netvision/others IoT webcams : remote code exec: reverse shell PoC. (works only in qemu usermode)
<?php
/*
Updated version, 2016-12-02: fixed shellcode so it *actually* works on QEMU
usermode emulation (seems I pushed an old version), and removed debug output.
-------------------------
NB: THIS PoC ONLY WORKS IN QEMU USERMODE EMULATION!
If anyone wants to fix this, go ahead (no pun intended).
However, I don't have a vulnerable product and am unwilling to acquire one.