Skip to content

Instantly share code, notes, and snippets.

View claudijd's full-sized avatar
🦬

Jonathan Claudius claudijd

🦬
View GitHub Profile
@claudijd
claudijd / test_samples.txt
Last active August 29, 2015 14:06
Test Samples Run
$ ruby test_samples.rb
[+] samples/citadel2 is citadel (99.46% match)
[+] samples/pony2 is pony (99.2% match)
[+] samples/zeus2 is zeus (99.62% match)
@claudijd
claudijd / config.txt
Created December 10, 2014 03:13
Cisco SSL VPN Priv Esc Base Config
ciscoasa# sh run
: Saved
:
ASA Version 9.1(1)
!
hostname ciscoasa
enable password REDACTED encrypted
xlate per-session deny tcp any4 any4
xlate per-session deny tcp any4 any6
xlate per-session deny tcp any6 any4
@claudijd
claudijd / test.rb
Created January 8, 2015 03:14
Should be nil or not Foo RSpec 3 compatible
# Define some dummy classes to work with
class Foo
end
class Bar
end
# Define a custom RSpec matcher
RSpec::Matchers.define :be_nil_or_not_foo do
match do |actual|
actual.is_a?(Foo) == false || actual == nil
@claudijd
claudijd / example2.rb
Created February 3, 2015 05:04
Example of Ruby method source exploration using pry
msf > irb
[*] Starting IRB shell...
>> require 'pry'
=> true
>> binding.pry
[1] pry(#<Msf::Ui::Console::CommandDispatcher::Core>)> show-method framework.db.import_ip_list
From: /Users/jclaudius/code/metasploit-framework/lib/msf/core/db_manager/import/ip_list.rb @ line 2:
Owner: Msf::DBManager::Import::IPList
@claudijd
claudijd / gist:2d4e1c9caba454719c6f
Created April 3, 2015 16:59
Quick link dump share for DNS IXFR's
http://securityweekly.com/2011/11/02/incremental-zone-transfers-for/
http://docstore.mik.ua/orelly/networking_2ndEd/dns/ch10_04.htm
@claudijd
claudijd / whoa.rb
Last active August 29, 2015 14:20
Download latest version of all Ruby Gems on RubyGems
require "net/http"
require "uri"
pages = (1..213).to_a
pages.each do |page|
#Get the page
uri = URI.parse("https://rubygems.org/gems?page=" + page.to_s)
response = Net::HTTP.get_response(uri)
@claudijd
claudijd / rubygems_upgrade.rb
Created June 8, 2015 20:15
# RubyGems client upgrader script
# RubyGems client upgrader script
# Set some basic items to build on
home_path = Dir.home
# This is set for user RVM install (modify as needed for system RVM install)
rvm_path = home_path + "/.rvm"
rvm_rubies_path = rvm_path + "/rubies/"
check_paths = [
@claudijd
claudijd / test_server.rb
Last active August 29, 2015 14:22
Check for SSL issue
require 'net/http'
require 'openssl'
# Hack to stop verification failures
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
ip = ARGV[0]
if ip.nil?
puts "Usage: ruby test_server.rb 192.168.1.1"
@claudijd
claudijd / update.rb
Created June 18, 2015 12:57
I way to manually update RubyGems without susceptibility to CVE-2015-3900
require 'digest'
require 'net/http'
gem_file = 'rubygems-update-2.4.8.gem'
# Reference: https://rubygems.org/gems/rubygems-update/versions/2.4.8
sha256hash = "dbed858db605923d9cc77080de1a5f1ce6ac3c68924877c78665e0d85d7b3e73"
##################################################
# Download the Gem from RubyGems.org (over HTTPS)
@claudijd
claudijd / s_server_setup.txt
Created August 3, 2015 14:14
Setup basic s_server
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem -config /System/Library/OpenSSL/openssl.cnf
openssl s_server -cert mycert.pem -accept 1337 -www
curl https://127.0.0.1:1337/