Skip to content

Instantly share code, notes, and snippets.

View uakbr's full-sized avatar
🌏
knowledge knows no bounds.

Umair Akbar uakbr

🌏
knowledge knows no bounds.
View GitHub Profile
@uakbr
uakbr / killbutmakeitlooklikeanaccident.sh
Created July 17, 2022 15:25 — forked from moyix/killbutmakeitlooklikeanaccident.sh
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@uakbr
uakbr / docker.md
Created June 15, 2022 04:29 — forked from FreddieOliveira/docker.md
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

# The CSV will contain the following columns:
# source, destination, protocol, port, sent, received, time
# The CSV will be named log.csv
# The CSV will be saved in the current directory
# The CSV will be sorted by time
# The CSV will be indexed by time
#!/usr/bin/env python
@uakbr
uakbr / socat_caesar_dpi.md
Created February 27, 2022 18:55 — forked from gmurdocca/socat_caesar_dpi.md
Circumventing Deep Packet Inspection with Socat and rot13

Circumventing Deep Packet Inspection with Socat and rot13

I have a Linux virtual machine inside a customer's private network. For security, this VM is reachable only via VPN + Citrix + Windows + a Windows SSH client (eg PuTTY). I am tasked to ensure this Citrix design is secure, and users can not access their Linux VM's or other resources on the internal private network in any way outside of using Citrix.

The VM can access the internet. This task should be easy. The VM's internet gateway allows it to connect anywhere on the internet to TCP ports 80, 443, and 8090 only. Connecting to an internet bastion box on one of these ports works and I can send and receive clear text data using netcat. I plan to use good old SSH, listening on tcp/8090 on the bastion, with a reverse port forward configured to expose sshd on the VM to the public, to show their Citrix gateway can be circumvented.

Rejected by Deep Packet Inspection

I hit an immediate snag. the moment I try to establish an SSH or SSL connection over o

/**
As seen on twitch.tv/cassidoo
*/
// A function that validates an email address
function validateEmail(email) {
const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(email);
}
@uakbr
uakbr / TIFlow.xml
Created January 10, 2021 19:48
TIFlow.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.3">
<description></description>
<groupId>afb1159b-0176-1000-7181-367e61a6a1ba</groupId>
<name>Threat Intel Pipeline</name>
<snippet>
<connections>
<id>10508819-cdfd-3f31-0000-000000000000</id>
<parentGroupId>324cac5c-1af5-3845-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
@uakbr
uakbr / script-template.sh
Created December 15, 2020 21:26 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]