Skip to content

Instantly share code, notes, and snippets.

View jcran's full-sized avatar
💭
feelin fancy

Jonathan Cran jcran

💭
feelin fancy
View GitHub Profile
@fox-srt
fox-srt / CVE-2018-0101.rules
Last active April 10, 2018 09:42
Cisco ASA RCE / CVE-2018-0101 IDS Signatures
# IDS signatures for https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20180129-asa1:
alert udp any any -> any 500 (msg:"FOX-SRT - Suspicious - Possible Fragmented Cisco IKE/isakmp Packet HeapSpray (CVE-2018-0101)"; flow:to_server; content:"|84|"; offset:16; depth:1; content:"|02|"; distance:1; within:1; fast_pattern; byte_test:4,>,5000,5,relative; byte_test:2,>,5000,11,relative; byte_extract:4,36,fragment_match; byte_test:4,=,fragment_match,53,relative; byte_test:4,=,fragment_match,137,relative; byte_test:4,=,fragment_match,237,relative; threshold:type limit, track by_dst, count 1, seconds 600; classtype:attempted-admin; sid:21002339; rev:5;)
alert udp any any -> any 500 (msg:"FOX-SRT - Exploit - Possible Shellcode in Cisco IKE/isakmp - tcp/CONNECT/"; content:"tcp/CONNECT/"; fast_pattern:only; threshold:type limit, track by_src, count 1, seconds 600; priority:1; classtype:attempted-admin; sid:21002340; rev:2;)
@bmaupin
bmaupin / build-openssl.sh
Last active December 11, 2023 20:24
Build openssl (with SSLv2/3 support for security testing)
#!/bin/bash
# Cache sudo password
sudo -v
# Get latest OpenSSL 1.0.2 version from https://openssl.org/source/
# v1.1.0 seems to have removed SSLv2/3 support
openssl_version=1.0.2k
# Install build dependencies
@boazsegev
boazsegev / yank_all.rb
Last active January 6, 2020 13:32
Yank multiple versions of a single gem
#!/usr/bin/env ruby
# encoding: UTF-8
require'json'
def yank
gemname = (ARGV.index('-g') && ARGV[ARGV.index('-g') + 1]) || (puts('Please enter gem name:') || gets.strip)
data = JSON.parse `curl -s https://rubygems.org/api/v1/versions/#{gemname}.json`
versions = data.map {|v| v['number']} .reverse
puts "\n\n#{gemname} versions: #{versions.join ', '}"
puts "\nHow many versions to yank (starting at the first release) (none/ALL/number)?"
@markusklems
markusklems / lambda-dynamo
Last active September 24, 2021 03:48
Short aws lambda sample program that puts an item into dynamodb
// create an IAM Lambda role with access to dynamodb
// Launch Lambda in the same region as your dynamodb region
// (here: us-east-1)
// dynamodb table with hash key = user and range key = datetime
console.log('Loading event');
var AWS = require('aws-sdk');
var dynamodb = new AWS.DynamoDB({apiVersion: '2012-08-10'});
exports.handler = function(event, context) {
@mbbx6spp
mbbx6spp / README.md
Created December 4, 2011 04:24
Best UNIX shell-based tools I can't live without with example usages

Best UNIX Shell tools

These are a list of usages of shell commands I can't live without on UNIX-based systems.

Install

Mac OS X

Using Homebrew (yes, I am opinionated) you can install the following tools with the following packages: