- LibreSSL
- BearSSL
- mbedTLS (PolarSSL)
- MatrixSSL
def md4(string) | |
# functions | |
mask = (1 << 32) - 1 | |
f = proc {|x, y, z| x & y | x.^(mask) & z} | |
g = proc {|x, y, z| x & y | x & z | y & z} | |
h = proc {|x, y, z| x ^ y ^ z} | |
r = proc {|v, s| (v << s).&(mask) | (v.&(mask) >> (32 - s))} | |
# initial hash | |
a, b, c, d = 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476 |
module.exports = { | |
hexStringToIntArray: function(str) { | |
var res = [] | |
for(var i = 0; i < str.length; i += 2) { | |
res.push(parseInt(str.substring(i, i+2), 16)) | |
} | |
return res | |
}, | |
byteArrayToHexString: function(array) { |
f0VMRgIBAQAAAAAAAAAAAAIAPgABAAAAsARAAAAAAABAAAAAAAAAALgKAAAAAAAAAAAAAEAAOAAIAEAAHAAbAAYAAAAFAAAAQAAAAAAAAABAAEAAAAAAAEAAQAAAAAAAwAEAAAAAAADAAQAAAAAAAAgAAAAAAAAAAwAAAAQAAAAAAgAAAAAAAAACQAAAAAAAAAJAAAAAAAAcAAAAAAAAABwAAAAAAAAAAQAAAAAAAAABAAAABQAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAFwHAAAAAAAAXAcAAAAAAAAAACAAAAAAAAEAAAAGAAAAYAcAAAAAAABgB2AAAAAAAGAHYAAAAAAAKAIAAAAAAAAwAgAAAAAAAAAAIAAAAAAAAgAAAAYAAAB4BwAAAAAAAHgHYAAAAAAAeAdgAAAAAADQAQAAAAAAANABAAAAAAAACAAAAAAAAAAEAAAABAAAABwCAAAAAAAAHAJAAAAAAAAcAkAAAAAAAEQAAAAAAAAARAAAAAAAAAAEAAAAAAAAAFDldGQEAAAAOAYAAAAAAAA4BkAAAAAAADgGQAAAAAAANAAAAAAAAAA0AAAAAAAAAAQAAAAAAAAAUeV0ZAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAvbGliNjQvbGQtbGludXgteDg2LTY0LnNvLjIABAAAABAAAAABAAAAR05VAAAAAAACAAAABgAAACAAAAAEAAAAFAAAAAMAAABHTlUA9Il3qGrQRKItg7lrcUo3xLlmyI4BAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAASAAAAAAAAAAAAAAAAAAAAAAAAACAAAAASAAAAAAAAAAAAAAAAAAAAAAAAADIAAAAgAAAAAAAAAAAAAAAAAAAAAAAAABkAAAASAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAASAAAA |
#!/usr/env python | |
############################################################################################################### | |
## [Title]: linuxprivchecker.py -- a Linux Privilege Escalation Check Script | |
## [Author]: Mike Czumak (T_v3rn1x) -- @SecuritySift | |
##------------------------------------------------------------------------------------------------------------- | |
## [Details]: | |
## This script is intended to be executed locally on a Linux box to enumerate basic system info and | |
## search for common privilege escalation vectors such as world writable files, misconfigurations, clear-text | |
## passwords and applicable exploits. |
void setup() { | |
size(640, 480); | |
background(255); | |
} | |
void draw() { | |
base(int(random(width)),int(random(height))); | |
delay(100*(30/frameCount)); | |
} |
// life.go | |
// This file solves CSAW CTF 2013 - Misc 300 | |
// Challenge was to take an ASCII Game-of-Life, advance by n generations, and return the new game, then repeat | |
package main | |
import ( | |
"fmt" | |
"net" | |
"regexp" |
CSAW CTF 2013 Recon Write-up -- WildcatSec
I was totally stuck on this one until we recieved the hint "Bro, do you even PNG?" Immediately we know that the key or a hint will be hidden somewhere in an image. First step for recon is always check the judges page, which usually gives you some lead or info. Download the relevant picture (ataylor.png). Then check exif data:
Tanner:csaw $ exiftool ataylor.png
ExifTool Version Number : 9.29
File Name : ataylor.png
Directory : .
# Curve25519+ECDH implementation in Ruby | |
# Disclaimer: This code is for learning purposes ONLY. It is NOT secure. | |
# Tanner Prynn | |
require 'SecureRandom' | |
require 'digest' | |
# Fast Modular Exponentiation (base**exp % mod) | |
def modexp(base, exp, mod) | |
prod = 1 |
def sha1(string) | |
# functions and constants | |
mask = 0xffffffff | |
s = proc{|n, x| ((x << n) & mask) | (x >> (32 - n))} | |
f = [ | |
proc {|b, c, d| (b & c) | (b.^(mask) & d)}, | |
proc {|b, c, d| b ^ c ^ d}, | |
proc {|b, c, d| (b & c) | (b & d) | (c & d)}, | |
proc {|b, c, d| b ^ c ^ d}, | |
].freeze |