Skip to content

Instantly share code, notes, and snippets.

@r0kk0
r0kk0 / Looking-glass-kvmfr-setup-Arch.md
Created March 14, 2025 08:35 — forked from Ruakij/Looking-glass-kvmfr-setup-Arch.md
Looking-glass kvmfr setup Arch

Looking-glass kvmfr setup Arch

More in-depth setup-guide for usage of kvmfr (see https://looking-glass.io/docs/B6/module/)

This setup was done on EndeavourOs (Arch) on Kernel 6.1.12-arch1-1.
QEMU-version 7.2 and libvirt version 9.0.0 .
Running cGroups Policy (if you have AppArmor, some things are different)

Check respective sections in looking-glass docs for other versions (specifcally QEMU <6.2 and libvirt <7.9)

@r0kk0
r0kk0 / gamingVM.md
Created March 9, 2025 19:50 — forked from przemec/gamingVM.md
GPU passthrough + CPU pinning

Windows VM on Linux (Debian) with GPU passthrough and CPU pinning

Short tutorial on how to create optimized gaming Windows VM with GPU passthrough and CPU pinning on Linux Debian-based systems using QEMU/KVM

PART 1 - HOST SYSTEM SETUP - qemu and virt-manager installation + gpu isolation

Part 1 helpers

@r0kk0
r0kk0 / force-mcp-ocp-update
Created September 17, 2024 18:51 — forked from ikurni/force-mcp-ocp-update
How to force openshift MCP to update machine config
### Create file called machine-config-daemon-force in /run ###
ssh [email protected] sudo touch /run/machine-config-daemon-force
### Edit node annotations ###
oc edit node <node-name>
### Check Annotations, change like below sample ###
machineconfiguration.openshift.io/currentConfig: rendered-worker-ab4a1e7216bf3da2a5203f09c871b456
machineconfiguration.openshift.io/desiredConfig: rendered-worker-ab4a1e7216bf3da2a5203f09c871b456
machineconfiguration.openshift.io/reason: ""
@r0kk0
r0kk0 / awk_netstat.sh
Created June 12, 2023 08:57 — forked from staaldraad/awk_netstat.sh
AWK to get details from /proc/net/tcp and /proc/net/udp when netstat and lsof are not available
# Gawk version
# Remote
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($3,index($3,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($3,i,2))}{print x":"strtonum("0x"substr($3,index($3,":")+1,4))}'
# Local
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($2,index($2,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($2,i,2))}{print x":"strtonum("0x"substr($2,index($2,":")+1,4))}'
# No Gawk
# Local
grep -v "rem_address" /proc/net/tcp | awk 'function hextodec(str,ret,n,i,k,c){
@r0kk0
r0kk0 / mysql_backup.sh
Created April 3, 2023 16:39 — forked from tleish/mysql_backup.sh
Bash Script to backup all MySQL databases
#!/bin/bash
#==============================================================================
#TITLE: mysql_backup.sh
#DESCRIPTION: script for automating the daily mysql backups on development computer
#AUTHOR: tleish
#DATE: 2013-12-20
#VERSION: 0.4
#USAGE: ./mysql_backup.sh
#CRON:
# example cron for daily db backup @ 9:15 am
@r0kk0
r0kk0 / kerberos_attacks_cheatsheet.md
Created October 31, 2020 17:06 — forked from TarlogicSecurity/kerberos_attacks_cheatsheet.md
A cheatsheet with commands that can be used to perform kerberos attacks

Kerberos cheatsheet

Bruteforcing

With kerbrute.py:

python kerbrute.py -domain <domain_name> -users <users_file> -passwords <passwords_file> -outputfile <output_file>

With Rubeus version with brute module:

@r0kk0
r0kk0 / Netscaler Diagram
Last active April 1, 2020 16:07
Netscaler Diagram
Good reminder for CS configurations
@r0kk0
r0kk0 / sqlserver_database_rename
Last active April 1, 2020 15:50
rename sql server database with files
use master;
ALTER DATABASE [OldDB] MODIFY NAME = [NewDB]
ALTER DATABASE [NewDB] MODIFY FILE (NAME = N'OldDB', NEWNAME = N'NewDB')
ALTER DATABASE [NewDB] MODIFY FILE (NAME = N'NewDB', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\NewDB.mdf')
ALTER DATABASE [NewDB] MODIFY FILE (NAME = N'OldDB_Log', NEWNAME = N'NewDB_Log')
ALTER DATABASE [NewDB] MODIFY FILE (NAME = N'NewDB_Log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\NewDB_log.ldf')
ALTER DATABASE [NewDB] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE [NewDB] SET OFFLINE
EXEC sp_configure 'show advanced options',1
@r0kk0
r0kk0 / tcp_flags.txt
Last active April 1, 2020 07:49 — forked from tuxfight3r/tcp_flags.txt
tcpdump - reading tcp flags
##TCP FLAGS##
Unskilled Attackers Pester Real Security Folks
==============================================
TCPDUMP FLAGS
Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere)
Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere)
Pester = PSH = [P] (Push Data)
Real = RST = [R] (Reset Connection)
Security = SYN = [S] (Start Connection)
@r0kk0
r0kk0 / README.md
Created July 20, 2018 20:28 — forked from superseb/README.md
Deploy kubernetes-dashboard on Rancher 2.0 cluster exposed using NodePort

Deploy kubernetes-dashboard on Rancher 2.0 cluster exposed using NodePort

Requirements

Step 1: Generate kubeconfig from the UI

Generate the kubeconfig file for your cluster using the Kubeconfig File button in the Cluster view of your cluster. Save the generated file as $HOME/.kube/config and run kubectl get nodes to verify it works.