Skip to content

Instantly share code, notes, and snippets.

View gdisneyleugers's full-sized avatar

gdisneyleugers

  • Juniper Networks
View GitHub Profile
require 'rubygems'
require 'openssl'
key = OpenSSL::PKey::RSA.new(4096)
cipher = OpenSSL::Cipher::AES.new(128, :CBC)
ctx = OpenSSL::SSL::SSLContext.new
public_key = key.public_key
printf "Common Name: "
cn = gets
commonname = cn.chomp
printf "Orgnization: "
require 'rubygems'
require 'openssl'
key = OpenSSL::PKey::RSA.new(4096)
cipher = OpenSSL::Cipher::AES.new(128, :CBC)
ctx = OpenSSL::SSL::SSLContext.new
public_key = key.public_key
printf "Common Name: "
cn = gets
commonname = cn.chomp
printf "Orgnization: "
require 'rubygems'
require 'openssl'
puts "Warning this tool only works with DER encoded certificates"
key = OpenSSL::PKey::RSA.new(2048)
cipher = OpenSSL::Cipher::AES.new(256, :CBC)
ctx = OpenSSL::SSL::SSLContext.new
public_key = key.public_key
raw = File.read "root.cer"
cert = OpenSSL::X509::Certificate.new raw
cert.not_before = Time.now
require 'rubygems'
require 'openssl'
puts "Warning this tool only works with DER encoded certificates"
key = OpenSSL::PKey::RSA.new(2048)
cipher = OpenSSL::Cipher::AES.new(256, :CBC)
ctx = OpenSSL::SSL::SSLContext.new
public_key = key.public_key
raw = File.read "root.cer"
cert = OpenSSL::X509::Certificate.new raw
cert.not_before = Time.now
require 'rubygems'
require 'openssl'
puts "Warning this tool only works with DER encoded certificates"
key = OpenSSL::PKey::RSA.new(2048)
cipher = OpenSSL::Cipher::AES.new(256, :CBC)
ctx = OpenSSL::SSL::SSLContext.new
public_key = key.public_key
raw = File.read "root.cer"
cert = OpenSSL::X509::Certificate.new raw
cert.not_before = Time.now
require 'rubygems'
require 'openssl'
puts "Warning this tool only works with DER encoded certificates"
key = OpenSSL::PKey::RSA.new(2048)
cipher = OpenSSL::Cipher::AES.new(256, :CBC)
ctx = OpenSSL::SSL::SSLContext.new
public_key = key.public_key
raw = File.read "root.cer"
cert = OpenSSL::X509::Certificate.new raw
cert.not_before = Time.now
require 'rubygems'
require 'openssl'
require 'digest/md5'
key = OpenSSL::PKey::RSA.new(2048)
cipher = OpenSSL::Cipher::AES.new(256, :CBC)
ctx = OpenSSL::SSL::SSLContext.new
raw = File.read "root.cer"
cert = OpenSSL::X509::Certificate.new raw
cert.not_before = Time.now
cert.not_after = Time.now + 365+365+365+365 * 24 * 60 * 60
require 'rubygems'
require 'digest/md5'
puts "Warning this tool only works with DER encoded certificates"
puts "Please save CA to spoof root.cer"
$i = {}
for $i in 1..99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
system("ruby castealer.rb")
puts "==== Running Collision ===="
printf "Root: "
a = puts Digest::MD5.hexdigest(File.read('root.cer'))
require 'rubygems'
require 'openssl'
require 'digest/md5'
key = OpenSSL::PKey::RSA.new(2048)
cipher = OpenSSL::Cipher::AES.new(256, :CBC)
ctx = OpenSSL::SSL::SSLContext.new
raw = File.read "root.cer"
cert = OpenSSL::X509::Certificate.new raw
cert.version = 2
ef = OpenSSL::X509::ExtensionFactory.new
require 'rubygems'
require 'digest/md5'
require 'ruby-progressbar'
puts "Certificate Hash Collision"
puts "By G.Disney-Leugers"
puts "Warning this tool only works with DER encoded certificates"
puts "Please save CA to spoof root.cer"
$i = {}
for $i in 1..99999