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
| # 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") { |
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 json | |
| # fn_name = "wsprintfW" | |
| # api_hash = 0x0B6D391AE | |
| export_db = {} | |
| def get_api_hash(fn_name): | |
| result = 0x2b | |
| for c in fn_name: |
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.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; |
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
| # 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 |