Skip to content

Instantly share code, notes, and snippets.

View MRW01F's full-sized avatar
🥱
lazy

MihirGosai MRW01F

🥱
lazy
View GitHub Profile
@MRW01F
MRW01F / ASLR_DEP.ps1
Created April 26, 2023 11:02
A powershell script to Enable/Disable, ASLR & DEP. Mainly for security testing purpose. !!! DO NOT RUN THIS SCRIPT ON PERSONAL/WORK DEVICE !!!
# Prompt the user for input
$choice = Read-Host "Enter 1 to enable DEP and ASLR, 2 to disable DEP and ASLR"
if ($choice -eq "1") {
# Enable DEP and ASLR
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "MoveImages" -Value 1
bcdedit.exe /set {current} nx AlwaysOn
Write-Host "DEP and ASLR have been enabled."
}
elseif ($choice -eq "2") {
@MRW01F
MRW01F / revil_import_builder.py
Created November 11, 2022 13:21 — forked from OALabs/revil_import_builder.py
IDA Python script to decipher and label REvil imports
import json
# fn_name = "wsprintfW"
# api_hash = 0x0B6D391AE
export_db = {}
def get_api_hash(fn_name):
result = 0x2b
for c in fn_name:
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.IO.Pipes;
using System.Linq;
using System.Management;
using System.Net;
@MRW01F
MRW01F / SwapToFile.sh
Created January 17, 2022 16:41
Create a Swap File
# Create file with requred size (replace 512 with whatever you want)
dd if=/dev/zero of=/swapfile bs=1M count=512 status=progress
# Changing permission
chmod 600 /swapfile
# make it a swap file
mkswap /swapfile
# Turning on the swipe