Skip to content

Instantly share code, notes, and snippets.

View tomaszklim's full-sized avatar

Tomasz Klim tomaszklim

View GitHub Profile
@tomaszklim
tomaszklim / espeo-custom-aws-ecs-user-data.sh
Created August 2, 2019 15:19
Install Espeo Heartbeat on newly created ECS instance in AWS
echo "Installing Espeo custom monitoring client"
yum install -y git
git clone https://github.com/serverfarmer/heartbeat-linux /opt/heartbeat
/opt/heartbeat/setup.sh
echo "http://monitoring.espeo.pl/cgi-bin/heartbeat-local.cgi" >/etc/heartbeat/server.url
@tomaszklim
tomaszklim / configure-swap-file.sh
Last active August 8, 2019 12:06
Configure swap file - eg. on Amazon ECS
#!/bin/sh
if [ ! -f /swapfile ]; then
dd if=/dev/zero of=/swapfile bs=1M count=16384
chmod 0600 /swapfile
mkswap /swapfile
swapon /swapfile
if ! grep -q swapfile /etc/fstab; then
echo "/swapfile none swap sw 0 0" >>/etc/fstab
fi
@tomaszklim
tomaszklim / uptimerobot-edit-check.sh
Created September 4, 2019 09:31
Edit existing Heartbeat-based check in Uptimerobot.com using API (update url and name)
#!/bin/bash
api_key="u123456-qa9oic80zsll1xi0fhbwso1"
if [ "$3" = "" ]; then
echo "usage: $0 <check-id> <search-for> <replace-with> [--execute]"
exit 0
fi
tmp=/tmp/uptimerobot-$1-$$.tmp
@tomaszklim
tomaszklim / build-opencv3-with-python-on-ubuntu20lts.sh
Last active August 10, 2021 14:23
How to build OpenCV 3.x with Python 3.x bindings on Ubuntu 20.04 LTS
# Download and unpack your chosen OpenCV version., eg. as `/usr/local/src/opencv-3.4.1`
# You can use https://github.com/pisecurity/opencv-manager repository as well.
# This is important. On Ubuntu 20.04 LTS, it is not enough to install just python-dev.
apt-get install python-dev python-numpy python-is-python2 python2.7 python2.7-dev python2.7-minimal
# All unrelated build settings were cut off.
cd /usr/local/src/opencv-3.4.1/build
cmake \
-DENABLE_PRECOMPILED_HEADERS=OFF \
@tomaszklim
tomaszklim / kerberos_attacks_cheatsheet.md
Created February 27, 2021 12:34 — 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:

@tomaszklim
tomaszklim / Clear-Event-Log.bat
Last active June 18, 2021 17:23
Source code for articles on Payload.pl
REM Code from https://payload.pl/jak-prosto-wirusy-rozbrajaja-zabezpieczenia-windows-10/
for /f “delims=” %%I in (‘wevtutil el’) do (wevtutil cl “%%I”)
wevtutil sl Security /e:false