Skip to content

Instantly share code, notes, and snippets.

@rollwagen
rollwagen / vmnet.sh
Last active November 5, 2020 18:20
VMware Fusion Networking
sudo vi /Library/Preferences/VMware\ Fusion/vmnet8/nat.conf
sudo vi /Library/Preferences/VMware\ Fusion/networking
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --configure
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --start
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --configure; sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop; sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --start

TL;DR (to inspect azure cli traffic)

  • start mitmproxy
  • set proxy environment variable
  • tell the Azure CLI to not validate SSL
  • run az commands
mitmproxy
@rollwagen
rollwagen / ESXi.md
Last active September 6, 2024 13:01
ESXi links, info, one-liners etc

esxi (on mac mini)

prepare USB boot install drive

adding a USB datastore

@rollwagen
rollwagen / ssrf.py
Last active March 16, 2024 20:22
Minimal SSRF vulnerable python flask example application.
from flask import *
import requests
app = Flask(__name__)
@app.route('/follow')
def follow_url():
url = request.args.get('url', '')
if url:
return (requests.get(url).text)
@rollwagen
rollwagen / synack.md
Last active May 7, 2021 15:03
SYN-ACK with scapy
  • Listening...
python -m http.server
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
  • Scapy
    • Crafting and sending single TCP SYN packet
from scapy.all import *
@rollwagen
rollwagen / vagrant_libvirt_macos.md
Last active May 24, 2021 09:56
Vagrant on macos with libvirt

Vagrant using libvirt on macos

Pre-reqs

   brew install qemu gcc libvirt
   brew services start libvirt
   vagrant plugin install vagrant-libvirt
@rollwagen
rollwagen / lsof_netstat_on_macos.md
Last active November 25, 2024 09:58
lsof / netstat on macos

lsof / netstat on macos

lsof - list open files

  • display (list) all open TCP+UDP ports and grep for listening ones
    • sudo lsof -i -P | grep LISTEN
      COMMAND     PID           USER   FD   TYPE             DEVICE SIZE/OFF   NODE NAME
      launchd       1           root   11u  IPv6 0x26dd73cb700390df      0t0    TCP *:22 (LISTEN)
      ....
@rollwagen
rollwagen / archlinux_arm_on_esxi_fling.md
Last active August 20, 2023 20:24
Arch Linux ARM on ESXi Fling (on Raspberry Pi 4)

arch linux arm on esxi fling (on raspberry pi 4)

  • create / Register VM -> Linux / Other 4.x or Later (64bit) -> ...

    • CD/DVD Drive: use a Linux ISO that can boot into a recue shell e.g 'debian-10.9.0-arm64-netinst.iso'; make sure "Connect at power on" is selected
    • VM Options / Boot options: Firmware "EFI" (should be the default anyways)
  • power On VM -> should see GNU GRUB welcome screen (from debian ISO/cdrom) -> Advanced Options -> Rescue mode

    • go through menu selections (language, keyborad, etc) until you have a shell ('Execute a shell in the intaller environment')
  • partition the disk; see also ArchLinux Wiki Partition the disk

@rollwagen
rollwagen / aws_cloudformation_validation.md
Last active October 4, 2021 12:51
aws_cloudformation_validation

aws cloudformation "validation"

consider the following sample cloudformation yaml file y.yaml

Resources:
  S3SampleBucketinstacks3bucketF253E29D:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: "Test_S3SampleBucketinstacks3bucketF253E29D"
      BucketVersioningConfiguration: Enabled

Dynamo DB Data Models and Modelling

It’s a bad idea to model your data in DynamoDB the same way you model your data in a relational database. The entire point of using a NoSQL datastore is to get some benefit you couldn’t get with a relational database. If you model the data in the same way, you not only won’t get that benefit but you will also end up with a solution that’s worse than using the relational database!

from Alex DeBrie: The DynamoDB book