Skip to content

Instantly share code, notes, and snippets.

@groldo
groldo / yara_malpedia_test.py
Created February 2, 2024 15:28
Test Malpedia yara rule scan API endpoint
rule DetectContactToSpecificIP {
meta:
description = "Detect files attempting to contact IP 134.23.9.7"
author = "Your Name"
date = "2024-02-01"
strings:
$ip_string = "134.23.9.7" ascii
condition:
$ip_string
}
@groldo
groldo / microvmstart.sh
Created April 26, 2023 15:59
start a microvm with qemu
#!/bin/bash
sudo apt install qemu
wget https://cloud-images.ubuntu.com/releases/jammy/release/unpacked/ubuntu-22.04-server-cloudimg-amd64-vmlinuz-generic
wget https://cloud-images.ubuntu.com/releases/jammy/release/unpacked/ubuntu-22.04-server-cloudimg-amd64-initrd-generic
wget https://cloud-images.ubuntu.com/releases/jammy/release/ubuntu-22.04-server-cloudimg-amd64-disk-kvm.img
qemu-img create -f qcow2 -F qcow2 -b `pwd`/ubuntu-22.04-server-cloudimg-amd64-disk-kvm.img test.img 8G
@groldo
groldo / fourgoats.md
Last active September 12, 2022 09:22

FourGoats

install android 4.4 emulator

sdkmanager "platforms;android-30"
sdkmanager "system-images;android-29;default;x86_64"
sdkmanager --channel=3 emulator
sdkmanager "build-tools;30.0.3" 
sdkmanager "platforms;android-18"

Android Reversing Tools

get the tools

#!/usr/bin/env bash
WORKDIR="$(pwd)/android-reversing"


get_the_tools () {

drozer

install drozer

sudo apt install python2.7
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
python2.7 get-pip.py
python2.7 -m pip --version
python2.7 -m pip install virtualenv
#!/usr/bin/env bash
# install android sdk and platform tools
# chmod +x install_android_emulator.sh
# run script with . ./install_android_emulator.sh
WORKDIR="$(pwd)/android-sdk"
install_java () {
sudo apt update
sudo apt install openjdk-8-jdk
sudo apt update
sudo apt install gnome-core adwaita-icon-theme-full open-vm-tools-desktop yaru-theme-gtk
sudo reboot
gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark

Openvpn service creation

tested with ubuntu 22.04

config with:

dhcp-option DNS 1.1.1.1
dhcp-option DOMAIN-ROUTE . # routes all dns traffic through vpn
@groldo
groldo / README.md
Created January 19, 2022 12:13
How to install encrypted arch linux on an iMac 6,1

How to install arch linux on an iMac 6,1

I recently purchased an old iMac 6,1. It's capable of some modern nix distributions, but doesn't play well if there is to "much" GUI. (e.g. default kali linux can be a bit laggy) So I decided to install an arch linux from scratch. I won't cover the whole installation as it may vary. And there are already a dozen straigt forward tutorials. So topics to be discussed are:

@groldo
groldo / rpi_mqtt_motion.py
Created October 27, 2021 09:26
motion sensor via mqtt
import RPi.GPIO as GPIO
import time
import logging
import paho.mqtt.client as mqtt
CONFIG = {
"broker": "naboo.lan",
"motion_pin": 11,
"logfile": "motion.log",
"topic": "sensor/flur/motion",