Skip to content

Instantly share code, notes, and snippets.

View roycewilliams's full-sized avatar
💭
:cheeeeeese:

Royce Williams roycewilliams

💭
:cheeeeeese:
View GitHub Profile
@paragonie-scott
paragonie-scott / argon2id-bench.php
Created October 11, 2018 16:29
Updated argon2id-bench.php
<?php
define('BENCH_ROUNDS', 200);
$start = $stop = 0.0;
$short = str_repeat("A", 16);
$long = str_repeat("A", 1 << 20);
$start = microtime(true);
for ($i = 0; $i < BENCH_ROUNDS; ++$i) {
sodium_crypto_pwhash_str($short, SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE, SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE);
@gnusosa
gnusosa / yubikey-get-oath.el
Last active March 15, 2019 23:27
Get Yubikey OATH token from ykman with Ivy - Emacs
(defcustom ykman-path "/usr/local/bin/ykman"
"Set this to the path of the command line ykman client for your OS.")
(defun yubikey-get-oath ()
"Copy a OATH token to your kill-ring"
(interactive)
(let ((ivy-hash (make-hash-table :test 'equal))
(cb (lambda (choice)
(with-temp-buffer
@epixoip
epixoip / bcrypt.md
Last active March 21, 2019 17:14
Maxwell/Pascal bcrypt Benchmark

Maxwell/Pascal bcrypt Benchmarks

Product: Sagitta Invictus-based dev box

Software: Hashcat v3.6.0-39-gc918173, Nvidia driver 381.22

Accelerator: 1x GTX 970 reference, 1x GTX 980 reference, 1x GTX Titan X (Maxwell) reference, 1x GTX 1080 Ti FE

root@dev:~/hashcat# ./hashcat -w 4 -b -m 3200
library(sf)
library(dplyr)
library(ggplot2)
library(gganimate) # needs development version from github
# helper function to place a geometric object at a desired position
# and scale
place_geometry <- function(geometry, position, scale = 1) {
(geometry - st_centroid(geometry)) * scale +
st_sfc(st_point(position))
@mattifestation
mattifestation / SimpleTCGLogParser.ps1
Last active April 14, 2019 01:43
If you have the HgsDiagnostics PowerShell module, then you can parse TCG logs.
Import-Module HgsDiagnostics
$GetHgsTrace = Get-Command Get-HgsTrace
$RemoteAttestationCoreReference = $GetHgsTrace.ImplementingType.Assembly.GetReferencedAssemblies() | Where-Object { $_.Name -eq 'Microsoft.Windows.RemoteAttestation.Core' }
Add-Type -AssemblyName $RemoteAttestationCoreReference.FullName
$MostRecentTCGLog = Get-ChildItem C:\Windows\Logs\MeasuredBoot | Sort-Object -Property LastWriteTime -Descending | Select-Object -First 1 | Select-Object -ExpandProperty FullName
$LogBytes = [IO.File]::ReadAllBytes($MostRecentTCGLog)
$ParsedTCGLog = [Microsoft.Windows.RemoteAttestation.Core.TcgEventLog]::Parse($LogBytes)
$ParsedTCGLog.TcgData.Children | Sort-Object -Property PcrIndex | Group-Object -Property PcrIndex
@ilbelkyr
ilbelkyr / gist:61a07ae69fdfcf2f8b99
Last active June 15, 2019 20:20
freenode channel successor logic

Channel successor logic on freenode

(This covers what Atheme services as used on freenode will do if all founder (+F) accounts of a channel are dropped. It does not go into any staff policies on related matters. In particular, single-# channels have policies that services cannot reasonably implement¹ as they commonly involve talking to actual people.)

For single-# channels, the freenode-staff role account is always chosen as successor; normal channel successor logic does not apply in this case.

Otherwise, the "best" user will be selected from the channel's ACL according to the following criteria:

  • They may not have the +b flag. This ensures AKICKed users will never inherit a channel.
  • They need to be able to accomodate the channel registration; users who already have 30 channels registered cannot inherit a channel unless they have been granted the RegNoLimit flag.²
@kennwhite
kennwhite / default_openssl_version.md
Last active July 5, 2019 03:43
Major Linux distributions default version of OpenSSL

Default versions of OpenSSL as of Feb 2018

Name Release System OpenSSL ver TLS 1.1 and 1.2 Supported Notes
Debian 10* 1.1.0 Yes Buster (dev)
Debian 9 1.1.0 + 1.0.1 Yes Stretch
Debian 8 1.0.1 Yes Jessie
Debian 7 1.0.1 Yes Wheezy
@NotMedic
NotMedic / markvulnerable.py
Last active July 11, 2019 02:11
Script to mark hosts as vulnerable in Bloodhound.
#!/usr/bin/python
import sys, json, urllib, urllib2
#Define the Bloodhound Database
url = 'http://bloodhound-server:7474/db/data/cypher/'
#Define the Bloodhound Credentials
#echo neo4j:bloodhound | base64
base64auth = 'bmVvNGo6Ymxvb2Rob3VuZA=='
request = urllib2.Request(url)
@atoponce
atoponce / password_strength.md
Last active July 11, 2019 04:20
A document evaluating different open source password generators and password strength testers. See the other Gists at the end of the document for the password results.

Open Source Password Generator / Strength Meter Testing

This is a collection of password generators and strength meter testing. Each generator produces a different array of passwords, of which are then tested against each of the strength meters. The defaults are used where possible, otherwise sane options are provided.

The Results

The following results are tables showing the generators, passwords, and strength testers described below.

  1. Randomly generaterd passwords: atoponce/random_results_table.md