Skip to content

Instantly share code, notes, and snippets.

View xpn's full-sized avatar
🦆
Migrating...

Adam Chester xpn

🦆
Migrating...
View GitHub Profile

Keybase proof

I hereby claim:

  • I am xpn on github.
  • I am xpn (https://keybase.io/xpn) on keybase.
  • I have a public key whose fingerprint is 6822 0B71 BB92 8ABC 8171 4C0F 6B0B E64F 9AF4 238C

To claim this, I am signing this object:

@xpn
xpn / gist:8640962
Created January 26, 2014 23:37
Metasploit capture/mssql .Net Client
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
namespace metasploit_sql_test
{
@xpn
xpn / fuzzme.c
Last active April 15, 2016 16:13
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
void print_success(void *input) {
if (*(char *)(input+1) == 'Y') {
printf("GOT: %s\n", input);
return;
}
<?
phpinfo();
?>
from pwn import *
import struct
WIDTH = 1
HEIGHT = 1000000
LOCAL = False
if LOCAL:
FREE_HOOK_OFFSET = -1230952
@xpn
xpn / apt33_dropshot_decoder.py
Created September 20, 2017 22:30
IDAPython encrypted string decoder for DROPSHOT - APT33
import idc
import idaapi
from idautils import *
decryptTable = 0x41BA3C
decryptTableEnd = 0x41BA77
decryptFunction = 0x4012A0
# Get the translation table
bytes = idaapi.get_many_bytes(decryptTable, decryptTable-decryptTableEnd)
@xpn
xpn / jenkins_passwords.rb
Created October 15, 2017 15:27
Recover jenkins credentials in meterpreter
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'nokogiri'
require 'digest'
require 'openssl'
require 'base64'
# r2pipe script using ESIL to decode the msfvenom jmp_call_additive XOR encoder
import r2pipe
import sys
def dump(addr):
pass
def startEsil():
r.cmd('e io.cache=true')
#!/usr/bin/env python
import sys
from ctypes import *
FILE_DEVICE_UNKNOWN = 0x00000022
METHOD_BUFFERED = 0
FILE_ANY_ACCESS = 0
TC_MAX_PATH = 260
@xpn
xpn / memdump.c
Created August 31, 2020 19:27
dotnet_memdump.c
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include "memdump.h"
#define DUMP_COUNT 50
// Headers which we will need to use throughout our session