Skip to content

Instantly share code, notes, and snippets.

View leptoid's full-sized avatar

eliforp leptoid

  • Virginia
View GitHub Profile
@out0xb2
out0xb2 / Check-Dbx.ps1
Last active May 7, 2024 13:25 — forked from mattifestation/UEFISecDatabaseParser.ps1
Parses signature data from the pk, kek, db, and dbx UEFI variables.
Write-Host "Checking for Administrator permission..."
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Warning "Insufficient permissions to run this script. Open the PowerShell console as administrator and run this script again."
Break
} else {
Write-Host "Running as administrator — continuing execution..." -ForegroundColor Green
}
$patchfile = $args[0]
@api0cradle
api0cradle / Copy-AuthenticodeSignedFile.ps1
Created November 13, 2019 13:28 — forked from mattifestation/Copy-AuthenticodeSignedFile.ps1
When supplied with an Authenticode-signed PowerShell script, Copy-AuthenticodeSignedFile generates the same signed, validated file but with a different file hash.
function Copy-AuthenticodeSignedFile {
<#
.SYNOPSIS
Creates a copy of an Authenticode-signed PowerShell file that has a unique file hash but retains its valid signature.
.DESCRIPTION
Copy-AuthenticodeSignedFile creates a copy of an Authenticode-signed PowerShell file that has a unique file hash but retains its valid signature. This is used to bypass application whitelisting hash-based blacklist rules.
@fluential
fluential / mirroring-ubuntu-ESM-repo.md
Last active March 23, 2024 17:37
How to mirror ubuntu ESM protected repository

Via https://ubuntu.com/esm#faq

"We're mirroring the repository on our internal Landscape server. Can we still get Ubuntu ESM if using Landscape? ESM is just a regular Ubuntu archive, but authenticated and served over HTTPS. Archive mirroring is already available in Landscape and is the only supported mechanism for mirroring the ESM archive."

TL;DR

It seems its just possible to use URI with login:pass

@seanthegeek
seanthegeek / installpwshdeps.sh
Last active October 25, 2019 03:43
Installs missing dependencies from Debian 9 (stretch) for Powershell on Debian 10 (buster) and higher (including Kali Linux)
#!/bin/bash
# Installs missing dependencies from Debian 9 (stretch) for Powershell on Debian 10 (buster) and higher (including Kali Linux)
mkdir /tmp/pwshtmp
cd /tmp/pwshtmp
wget http://http.us.debian.org/debian/pool/main/i/icu/libicu57_57.1-6+deb9u3_amd64.deb
wget http://http.us.debian.org/debian/pool/main/i/icu/icu-devtools_57.1-6+deb9u3_amd64.deb
wget http://http.us.debian.org/debian/pool/main/u/ust/liblttng-ust0_2.9.0-2+deb9u1_amd64.deb
wget http://http.us.debian.org/debian/pool/main/libu/liburcu/liburcu4_0.9.3-1_amd64.deb
@7MinSec
7MinSec / Tweenager_cell_phone_contract.md
Last active February 19, 2024 19:45
Tweenager Cell Phone Contract

Below is the cell phone agreement I have with my kids. It was largely inspired by this contract which had some excellent ideas.


Tweenager Cell Phone Responsibilities

  • I understand that my cell phone is a privilege, not a right. Mom and dad can look at anything on my phone and take it away for any length of time and for any reason.

Quiet times

I will silence and put away or turn off my phone:

  • At 7:30 p.m. each night, and I will put the phone on the charger upstairs
@7MinSec
7MinSec / Fixing_unquoted_service_paths.md
Last active January 20, 2022 15:05
How to fix unquoted service paths

In episode #341 of the 7 Minute Security podcast I talked about how to identify - and remediate - the unquoted service path vulnerabilities you might see pop up on a vulnerability scan. Here's the breakdown of resources that will help you understand and fix this pesky vuln:

  • Here's a great article describing unquoted service paths and why they're a risk to your enterprise.

  • If you want to create a fake service with unquoted service paths so you can then test fixing it, check out this gist which has you run something like the following:

New-Service -Name 'TotesFakeService' -BinaryPathName 'C:\program files\system32\something.exe' -DisplayName 'Totes Fake Dude' -StartupType Manual
@rasmi
rasmi / setup.md
Last active May 12, 2024 13:03
Python development environment setup on Chromebook

Python development environment setup on Chromebook

Check for updates

Do this first!

sudo apt-get update && sudo apt-get dist-upgrade

Set root password

@milanboers
milanboers / clone.bash
Last active May 2, 2024 20:03
Clone all repositories of a Github user
curl -s https://api.github.com/users/milanboers/repos | grep \"clone_url\" | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g' | xargs -n1 git clone