Skip to content

Instantly share code, notes, and snippets.

View rolandshoemaker's full-sized avatar
🏴
┬─┬ノ(ಠ_ಠノ)

Roland Bracewell Shoemaker rolandshoemaker

🏴
┬─┬ノ(ಠ_ಠノ)
View GitHub Profile
#include <windows.h>
#include <stdio.h>
#include <aclapi.h>
#include <tchar.h>
#include <sddl.h>
#define S_IRWXU 0000700 /* RWX mask for owner */
#define S_IRUSR 0000400 /* R for owner */
#define S_IWUSR 0000200 /* W for owner */
#define S_IXUSR 0000100 /* X for owner */
#define S_IRWXG 0000070 /* RWX mask for group */
# Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''Generates a test suite from NIST PKITS test descriptions.
The output is a set of Type Parameterized Tests which are included by
pkits_unittest.h. See pkits_unittest.h for information on using the tests.
GoogleTest has a limit of 50 tests per type parameterized testcase, so the tests
are split up by section number (this also makes it possible to easily skip
# Ghidra script for re-populating (naively) stripped function names from
# Go >1.2 binaries using the pclntab. Should work with both the initial
# 1.2 format pclntab as well as the 1.16 format.
#
# Author: [email protected]
from ghidra.program.model.symbol.SourceType import *
start = None
for section in getMemoryBlocks():
type ocspRequest struct {
TBSRequest tbsRequest
}
type certID struct {
HashAlgorithm pkix.AlgorithmIdentifier
NameHash []byte
IssuerKeyHash []byte
SerialNumber *big.Int
}
@rolandshoemaker
rolandshoemaker / gen_certs.sh
Created April 15, 2020 16:28
/usr/share/doc/openssl-blacklist/examples/gen_certs.sh.gz from openssl-blacklist_0.5-3_all.deb
#!/bin/sh
#
# Author: Jamie Strandboge <[email protected]>
# Copyright (C) 2008 Canonical Ltd.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
// CRLTemplate contains the fields used to create an X.509 v2 Certificate
// Revocation list.
type CRLTemplate struct {
RevokedCertificates []pkix.RevokedCertificate
Number int
ThisUpdate time.Time
NextUpdate time.Time
Extensions []pkix.Extension
}
@rolandshoemaker
rolandshoemaker / grab-ct-roots.go
Created April 26, 2017 15:32
Grab a CT logs roots in a format Trillian with accept
package main
import (
"encoding/base64"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"net/http"
"os"
@rolandshoemaker
rolandshoemaker / results.txt
Created March 24, 2017 19:56
EV + OV GSB results
# Cert details can be viewed by prepending https://crt.sh/?q= to the cert hash
# EV
45/363389 bad (41 skipped)
# SHA256 hash # GSB threats
182eae7d907f92607a398d6b073c463b1725befe7c439bcd5923fc846adef766: [[{gxja86.com/ {MALWARE ANY_PLATFORM URL}}]]
f1da0c3aea8fc31be893bddea2dd5066672b3a6f3bb08f2851acfe3148e51381: [[{lexuncoin.com/ {MALWARE ANY_PLATFORM URL}}]]
a1dc0b61501d0f95f6b9ff3bbd6e594751c8c0cae189f807917ab3cae802f65d: [[{refilldoctors.com/ {MALWARE ANY_PLATFORM URL}}]]
import OpenSSL
key_str = """-----BEGIN PRIVATE KEY-----
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDKcAkiny4Sgt0p
7yzaVWsgBMgB1YsZLrID66AD2UQR9FQKIP6+CTn6CXs+wAYmdmSF1wNoIOuf9OR5
BjZfcMPrGtBGPHgrcv/FnB8as2n1J8lziWbizDyY2idqIgb/9wTOz2YKRc8jWdP9
GbkSnRRrRGPr1/Rl2VFdAN7MWTDqXHtJYRwIgZP7zQEScjNvjvnGe1o82e0dU/Zs
gMsbbBYVst0GLyMIilVRd5Q6dyl5T2f+8AYVSAXFUpNG84bHqLclJyoPmi+amSHg
dXIuyE+agP+gtf27AkiUm0OYJ0MCENImlFf0oFAaSjamG5p0nWZg8b71vBc4bi+i
Ugy3wUdpAgMBAAECggEBAI6q1JVUz5h2J73E9LxOlLe1Buvb/jLaKNUAev4bYZCx
MariaDB [testing]> CREATE TABLE `new_table` (`testing` varchar(255) NOT NULL, `inserted` datetime NOT NULL,PRIMARY KEY (`testing`)) ENGINE=InnoDB;
Query OK, 0 rows affected (0.02 sec)
MariaDB [testing]> INSERT INTO new_table (`testing`, `inserted`) VALUES('e', NOW());
Query OK, 1 row affected (0.00 sec)
MariaDB [testing]> INSERT INTO new_table (`testing`, `inserted`) VALUES('a', NOW());
Query OK, 1 row affected (0.01 sec)
MariaDB [testing]> INSERT INTO new_table (`testing`, `inserted`) VALUES('d', NOW());