This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This script can easily configure /etc/krb5.conf for evil-winrm, by providing a domain fqdn and domain controller name | |
So that evil-winrm can be used with kerberos authentication | |
Evil-winrm Example: | |
```bash | |
export KRB5CCNAME=Administrator.ccache | |
evil-winrm -i forest.htb.local -r htb.local | |
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
def checksum(pin): | |
''' | |
Standard WPS checksum algorithm. | |
@pin — A 7 digit pin to calculate the checksum for. | |
Returns the checksum value. | |
''' | |
accum = 0 | |
while pin: | |
accum += (3 * (pin % 10)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Initial code by Matt Harzewski | |
# https://gist.github.com/mattvh/6692349 | |
# Read more: http://www.webmaster-source.com/2013/09/25/finding-a-websites-favicon-with-ruby/ | |
# https://github.com/hajimes/mmh3 | |
require "httparty" | |
require "nokogiri" | |
require "base64" | |
require "murmurhash3" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// start with: | |
// frida -U -l pinning.js -f [APP_ID] --no-pause | |
Java.perform(function () { | |
console.log('') | |
console.log('===') | |
console.log('* Injecting hooks into common certificate pinning methods *') | |
console.log('===') | |
var X509TrustManager = Java.use('javax.net.ssl.X509TrustManager'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// spawn-interactive-process.cpp : Defines the entry point for the console application. | |
// Do not forget to link against wtsapi32.lib | |
// How to test this: use psexec from SysInternals, such as ```psexec -s c:\windows\system32\cmd.exe``` | |
// to run CMD under NT AUTHORITY\SYSTEM account (you can confirm this by running whoami) and then | |
// run spawn-interactive-process (feel free to disable waiting for debugger). The result is a notepad process | |
// running under interactive user credentials and on the interactive desktop launched from a service running under | |
// system account. | |
#include <stdio.h> | |
#include <tchar.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function string.fromhex(str) | |
return (str:gsub('..', function (cc) | |
return string.char(tonumber(cc, 16)) | |
end)) | |
end | |
function string.tohex(str) | |
return (str:gsub('.', function (c) | |
return string.format('%02X', string.byte(c)) | |
end)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Example taken from Gray Hat Python | |
The script inject a shellcode which tasks is to kill the given process, so that the process will not be killed by our process directly. | |
''' | |
import sys | |
from ctypes import * | |
# We set the EXECUTE access mask so that our shellcode will execute in the memory block we have allocated | |
PAGE_EXECUTE_READWRITE = 0x00000040 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov [email protected] 2012 | |
//UPDATE: This gist has been made into a Node.js module and now can be installed with "npm install js-crawler" | |
//the Node.js version does not use Phantom.JS, but the API available to the client is similar to the present gist | |
(function(host) { | |
function Crawler() { | |
this.visitedURLs = {}; | |
}; | |