Skip to content

Instantly share code, notes, and snippets.

View leonjza's full-sized avatar
[hip, hip]

Leon Jacobs leonjza

[hip, hip]
View GitHub Profile
@leonjza
leonjza / dump.sh
Last active March 24, 2024 08:32
Dump iOS executable content headers using radare2
#!/usr/bin/env bash
#
# Dump headers for binaries in an extracted iOS applications'
# Payload folder using radare2.
dumpdir="headers/"
mkdir -p $dumpdir
find . -perm +111 -type f | grep -iv "libswift" | while read -r bin; do
echo "< Processing -> $bin"
@leonjza
leonjza / README.md
Last active December 5, 2020 22:08
Traefik docker-compose with Trauth, Wildcard Certs & Metrics

traefik service docker-compose example

Traefik docker-compose with Trauth, Wildcard Certs & Metrics

Ref:

@leonjza
leonjza / README.md
Last active October 12, 2022 19:40
A PHP eval() reverse shell.

php eval shell

A reverse shell that lets you evaluate PHP.
This is not an OS command reverse shell per-se but you could eval a function like system("id") for that if you wanted to.

Useful to poison an existing PHP file and explore the currently loaded environment.

example

@leonjza
leonjza / README.md
Created September 23, 2021 15:46
SenseCon '21 Announce Challenge

Hello world!

This was the internal @sensepost SenseCon 2021 announcement email (stripped), together with the supporting challenge.

Have phun!

@leonjza
leonjza / clone-and-write.ps1
Created October 29, 2021 05:29
Cobalt Strike Clone Executable Signature for code-signer Malleable Profile block
# clone the certificate for SysInternals TCPView.exe and save
# it as cert.pfx
$o = Get-PfxCertificate -FilePath .\tcpview.exe
$cl = New-SelfSignedCertificate -CloneCert $o
$p = ConvertTo-SecureString -String "password" -Force -AsPlainText
Export-PfxCertificate -FilePath cert.pfx -Cert $cl -Password $p
@leonjza
leonjza / picker.patch
Created January 30, 2022 08:29
objection boot target picker poc
diff --git a/objection/console/cli.py b/objection/console/cli.py
index f9738d1..4814eff 100644
--- a/objection/console/cli.py
+++ b/objection/console/cli.py
@@ -3,6 +3,8 @@ import time
from pathlib import Path
import click
+from prompt_toolkit import prompt
+from prompt_toolkit.completion import FuzzyCompleter, WordCompleter
@leonjza
leonjza / DOCKER-IN-AN-HOUR.md
Last active February 19, 2025 15:58
Docker in an hour Workshop

docker-in-an-hour

@leonjza

Welcome to docker-in-an-hour! This is a "JIT" for docker, with many explanations being just enough to defend yourself. It is highly recommended that you go and at least Google some of the stuff here after doing the workshop. Read the official docs with real explanations.

toc

@leonjza
leonjza / enable_vnc.sh
Created May 28, 2022 13:02
macOS enable vnc remotely via ssh
#!/bin/bash
# simple script to enable remote management via an ssh
set -e
if [ "$EUID" -ne 0 ]
then echo "please run as root (eg: sudo $0)"
exit
fi
@leonjza
leonjza / README.md
Last active December 7, 2024 22:38
Forward a remote iOS device, locally.

fwd_ios.sh

Forwards a remote iOS device, exposed via usbmuxd on Linux to a local macOS client.
The inverse (aka ssh -R) is left as an excercise to the reader, but shouldn't be too hard :)

This is basically a simple usbfluxd that only depends on socat.

install

Copy the bash script to a local file, say fwd_ios.sh and make it executable with chmod +x fwd_ios.sh.

@leonjza
leonjza / countips.py
Created August 24, 2022 09:15 — forked from joswr1ght/countips.py
Read a file of network + CIDR masks, one per line; count the number of IP addresses it represents
#!/usr/bin/env python3
#
# original: https://gist.github.com/joswr1ght/595d49d5a7914cf7305b73512f37186a
import sys
def countips(netblock):
v = netblock.split('/')
# nothing?