Skip to content

Instantly share code, notes, and snippets.

View vpnwall-services's full-sized avatar

Vpnwall Services vpnwall-services

View GitHub Profile
@vpnwall-services
vpnwall-services / SYSPREP-101.md
Created June 5, 2023 08:57
[SYSPREP 101] Sysprep 101 #sysprep #101 #windows #prepare #cloning

SYSPREP 101

Prepare system

  • Run sysprep %WINDIR%\system32\sysprep\sysprep.exe /generalize /shutdown /oobe

  • Run sysprep for converting physical machine to vm %WINDIR%\system32\sysprep\sysprep.exe /generalize /shutdown /oobe /mode:vm

@vpnwall-services
vpnwall-services / haproxy.conf
Last active June 14, 2023 14:02 — forked from phobos182/haproxy.conf
[LogStash Configuration for HAProxy] Logstash configuration for Haproxy #logstash #haproxy
input {
syslog {
type => "haproxy-access"
port => 514
}
}
filter {
grok {
type => "haproxy-access"
@vpnwall-services
vpnwall-services / OVH-VPS-101.md
Last active May 22, 2023 22:12
[OVH VPS 101] OVH VPS 101 #ovh #vps #101 #dd #backup #restore

OVH VPS 101

  • Backup from rescue to ssh remote using dd from backup server ssh root@target.server "dd if=/dev/sdb | gzip" > /tmp/disk-image.raw.gz

  • Unzip on backup server gunzip -d /tmp/disk-image.raw.gz

  • Restore from ssh remote using dd from target

@vpnwall-services
vpnwall-services / elastalert-101.md
Last active May 22, 2023 16:57
[Elastalert 101] Elastalert 101 #elastalert #101

Elastalert 101

  • Test configuration elastalert --config /opt/elastalert/config.yaml --rule sql_injection_attempt --verbose
@vpnwall-services
vpnwall-services / rescue-chroot.sh
Last active June 1, 2023 08:09
[RESCUE CHROOT] Rescue chroot #rescue #chroot #ovh #debian
#!/bin/bash
TARGET_DIR=/mnt/chroot
mkdir ${TARGET_DIR}
mount /dev/sdb1 ${TARGET_DIR}
sudo mount -t sysfs /sys ${TARGET_DIR}/sys
sudo mount -t proc /proc ${TARGET_DIR}/proc
sudo mount --bind /dev ${TARGET_DIR}/dev
sudo mount -t devpts /dev/pts ${TARGET_DIR}/dev/pts
sudo mount --bind /tmp ${TARGET_DIR}/tmp
sudo chroot ${TARGET_DIR}/ /bin/bash
@vpnwall-services
vpnwall-services / secorder2.sh
Last active May 11, 2023 21:50
[Secorder2] Secorder2
#!/bin/bash
wget https://raw.githubusercontent.com/jschmid1/gopro_as_webcam_on_linux/master/gopro
#put cam in GoConnect mode
sudo bash gopro webcam -u debian -r 1080
# record
ffmpeg -nostdin -threads 1 -i 'udp://@0.0.0.0:8554?overrun_nonfatal=1&fifo_size=50000000' -f:v mpegts -fflags nobuffer -vf format=yuv420p -f v4l2 /dev/video42 -c copy fart.mkv
# re-encode later
ffmpeg -i mjpeg.mkv -c:v libx264 -crf 23 -preset medium -pix_fmt yuv420p out.mkv
@vpnwall-services
vpnwall-services / WEB-BENCHMARK-101.md
Last active May 10, 2023 08:56
[WEB BENCHMARK 101] Web Benchmark 101 #web #benchmark #101 #python #bash

WEB BENCHMARK 101

  • Locust (swarm website with thousands of users) (pip3 install locust)
#locustfile.py
from locust import HttpUser, between, task

class WebsiteUser(HttpUser):
 wait_time = between(5, 15)
@vpnwall-services
vpnwall-services / HASHICORP 101.md
Last active May 3, 2023 02:29
[HASHICORP 101] Hashicorp 101 #hashicorp #101 #consul #nomad #docker

HASHICORP 101

  • Install go see go installer

  • Download hashi-up

curl -sLS https://get.hashi-up.dev | sh
sudo install hashi-up /usr/local/bin/
@vpnwall-services
vpnwall-services / EPP-SEC-101.md
Last active May 4, 2023 14:13
[EPP SEC 101] EPP SEC 101 #epp #sec #101 #debian #web #vuln #scan #spider

EPP SEC 101

  • Skipfish check website skipfish --auth-form https://xxxxxxxxx/login --auth-user xxxxxx --auth-pass='xxxxxxx' -o skipfish_report/ https://xxxxxxx

  • Gospider gospider --cookie 'cookie_name=cookie_value' -s 'https://xxxxxxxx' -o xxxxx_spider.txt

  • Add session cookie to nikto configuration

@vpnwall-services
vpnwall-services / QEMU-101.md
Last active August 27, 2023 19:39
[QEMU 101] Qemu 101 #qemu #101

QEMU 101

  • Start default network sudo virsh net-start default

  • Shared copy/paste between host and guest sudo apt install spice-vdagent -y && sudo reboot

  • Convert vdi to qcow2