Skip to content

Instantly share code, notes, and snippets.

💭
Offensive Sencha Consultant

Mariusz B. mgeeky

💭
Offensive Sencha Consultant
Block or report user

Report or block mgeeky

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mgeeky
mgeeky / get-rid-of-razor-bloatware.md
Created Nov 11, 2019
Getting rid of Razor Bloatware to only have it's core service running. This core service will then serve the purpose of interpreting Mouse extra buttons. Tested on Synapse3
View get-rid-of-razor-bloatware.md

Getting rid of Razor bloatware

I've got myself a decent Razor mouse coming with 4 extra buttons on it's sides. Two of them are recognized by the Windows system as XButton1 and XButton2 (AutoHotKey's nomenclature), whereas two other ones are only properly recognized and translated by Razor's service executable.

Unfortunately, this service - located here:

C:\Program Files (x86)\Razer\Synapse3\Service\Razer Synapse Service.exe

Spawns additional unwanted bloatware acting as Razor's Synapse packages for fancy highlights and game sensing to adjust hardware profiles.

@mgeeky
mgeeky / git-grep-recursively.sh
Created Nov 6, 2019
git grep being scripted to run recursively top-down through all of repositories spanning from specified directory. Useful for finding sensitive commits
View git-grep-recursively.sh
#!/bin/bash
if [ $# -lt 1 ]; then
echo "Usage: ./git-grep.sh <expression> [path]"
exit 1
fi
path=.
if [ $# -eq 2 ]; then
path=$2
@mgeeky
mgeeky / tmux.md
Created Oct 28, 2019 — forked from andreyvit/tmux.md
tmux cheatsheet
View tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a
@mgeeky
mgeeky / punch-q-installation-guide.md
Last active Oct 28, 2019
Installation guide for pymqi & punch-q
View punch-q-installation-guide.md

punch-mq installation notes

Step 1: Pre-requisites: IBM MQ Client

  1. Download the IBM MQ V9.0.0.4 LTS Clients - the file should be named: 9.0.0.4-IBM-MQC-LinuxX64.tar.gz (9.0.0.4 Client install image for IBM MQ on Linux X86-64) - size: 397MB
  2. Extract it to whatever directory.
  3. Install debian/Kali/Ubuntu pre-requisities apt install -y python-dev rpm
  4. Accept the license: sudo ./mqlicense.sh -accept or sudo ./mqlicense.sh -text_only
  5. Do the following:
@mgeeky
mgeeky / Enable-Mailboxes.ps1
Created Oct 17, 2019
Enable Mailboxes for all Active Directory users defined.
View Enable-Mailboxes.ps1
Import-Module Activedirectory
Add-PSSnapin Microsoft.Exchange.Management.Powershell.SnapIn;
$OU = "OU=Users,DC=Contoso,DC=corp"
$users = Get-ADUser -LDAPFilter '(name=*)' -searchBase $OU
foreach( $user in $users)
{
Enable-Mailbox -Identity $user.SamAccountName
}
@mgeeky
mgeeky / .block
Created Oct 11, 2019 — forked from mbostock/.block
The Gist to Clone All Gists
View .block
license: gpl-3.0
View sqlmitm.py
from scapy.all import *
import unicodedata
import sys, getopt
import time, datetime
import argparse
import socket
import fcntl
import struct
import threading
View portfwd.cna
#
# port foreward alias in Beacon and SSH
#
# pull common code into a function
sub _portfwd {
if ($2 eq "stop") {
btask($1, "Tasked session to stop forward to $3");
call("beacons.pivot_stop_port", $null, $3);
}
@mgeeky
mgeeky / Set-PrincipalAllowedToDelegateToAccount.ps1
Created Aug 22, 2019
Script for setting "msDS-AllowedToActOnBehalfOfOtherIdentity" property on the user's object, allowing incoming trust to the previously compromised Machine object, as described by Elad Shamir in his: https://shenaniganslabs.io/2019/01/28/Wagging-the-Dog.html#unconstrained-domain-persistence
View Set-PrincipalAllowedToDelegateToAccount.ps1
#
# Unconstrained Domain Persistence helper
#
# Usage:
# PS> . .\Set-PrincipalAllowedToDelegateToAccount.ps1
# PS> Set-PrincipalAllowedToDelegateToAccount -TargetUser krbtgt -TargetComputer COMPROMISED$
#
# Will allow for COMPROMISED$ machine account to perform S4U2 constrained delegation by the use
# of Resource-Based Constrained Delegation flavour attack.
#
@mgeeky
mgeeky / Decode-Base64.ps1
Last active Jun 20, 2019
Base64 Decode in Powershell
View Decode-Base64.ps1
function Decode-Base64Ascii ($data) {
$chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
$ss = "[^" + $chars + "=]"
$data = $data -replace $ss, ""
$pad = ""
$r = ""
if (($data[$data.Length - 1]) -eq '=') {
if (($data[$data.Length - 2]) -eq '=') {
$pad = "AA"
You can’t perform that action at this time.