Skip to content

Instantly share code, notes, and snippets.

View mahmoudimus's full-sized avatar
💭
@_@

Mahmoud Rusty Abdelkader mahmoudimus

💭
@_@
View GitHub Profile
@mahmoudimus
mahmoudimus / Mac OS X 10_5_ Windows Ctrl.xml
Created January 9, 2023 07:12 — forked from fljot/Mac OS X 10_5_ Windows Ctrl.xml
AutoHotkey mappings to emulate OSX keyboard shortcuts on Windows
<!-- put this to IDEA keymaps config folder. For v13 it is <userdir>\.IntelliJIdea13\config\keymaps\ -->
<?xml version="1.0" encoding="UTF-8"?>
<keymap version="1" name="Mac OS X 10.5+ Windows Ctrl" parent="Mac OS X 10.5+">
<action id="$Copy">
<keyboard-shortcut first-keystroke="meta C" />
<keyboard-shortcut first-keystroke="meta INSERT" />
<keyboard-shortcut first-keystroke="control C" />
<keyboard-shortcut first-keystroke="control INSERT" />
</action>
<action id="$Cut">
@mahmoudimus
mahmoudimus / OS X keyboard for Windows
Created January 9, 2023 07:12 — forked from erikmueller/OS X keyboard for Windows
AutoHotkey mappings to emulate OSX keyboard shortcuts on Windows
;
; AutoHotkey Version: 1.x
;
;
; --------------------------------------------------------------
; Emulate OSX keymap layout
; on Windows
; --------------------------------------------------------------
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
@mahmoudimus
mahmoudimus / r21337patch.py
Created January 6, 2023 21:21 — forked from scrapbird/r21337patch.py
Applies an x64dbg .1337 patch file to a binary in radare2. Call with: #!pipe ./r21337patch.py /path/to/patch.1337
#!/usr/bin/env python
import r2pipe
import sys
r2 = r2pipe.open()
# r2 base address
delta = 0x400000
@mahmoudimus
mahmoudimus / intel_pintools_vs2019.md
Created December 31, 2022 02:37 — forked from PollyP/intel_pintools_vs2019.md
Building and Running Intel Pintools with VS 2019 on Windows 10
@mahmoudimus
mahmoudimus / patmake.py
Created December 30, 2022 06:00 — forked from NeatMonster/patmake.py
Creates a pattern file from a database
"""
@file patmake.py
@brief Creates a pattern file from a database
@author neat
"""
import os
import idautils
import ida_bytes
import ida_funcs
@mahmoudimus
mahmoudimus / crossover-howtocompile.md
Created December 30, 2022 00:24 — forked from sarimarton/crossover-howtocompile.md
CodeWeavers CrossOver - How to compile from source! for macOS

This has been forked from https://gist.github.com/Alex4386/4cce275760367e9f5e90e2553d655309

For the latest discussion, see the comments there.

Updated guide (for CrossOver 20.0.0)

  • Install dependencies: Xcode developer tools (Command Line); cmake; gcc or clang to compile C code; bison >= 3.0 (can be upgraded via homebrew); xquartz; flex; mingw-w64; pkgconfig; you might also need freetype with brew install freetype
  • Make sure the right version of bison is in path: brew upgrade bison then check version and cd /usr/local/Cellar/bison/<version>/bin and export PATH="$(pwd):$PATH" then check with which bison
  • Download source (CodeWeavers CrossOver FOSS version Source) and extract it (double click the file in Finder or untar it: tar -xz source.tar.gz)
  • Add missing wine/include/distversion.h file with this content:
@mahmoudimus
mahmoudimus / hello_world_plugin.py
Created December 26, 2022 17:34 — forked from cmatthewbrooks/hello_world_plugin.py
The simplest possible IDA plugin with multiple actions
##############################################################################
#
# Name: hello_world_plugin.py
# Auth: @cmatthewbrooks
# Desc: A test plugin to learn how to make these work; Specifically, how to
# have multiple actions within the same plugin.
#
# In plain English, IDA will look for the PLUGIN_ENTRY function which
# should return a plugin object. This object can contain all the
# functionality itself, or it can have multiple actions.
@mahmoudimus
mahmoudimus / inject.py
Created December 22, 2022 22:11 — forked from romainthomas/inject.py
Mach-O code injection with LIEF and shell-factory
#!/usr/bin/env python
# Script associated with the blog post: https://lief-project.github.io/blog/2022-05-08-macho/
# It demonstrates code injection with shell-factory and LIEF
import lief
import pathlib
from pathlib import Path
CWD = Path(__file__).parent
@mahmoudimus
mahmoudimus / patches.txt
Created December 19, 2022 22:36 — forked from interferenc/patches.txt
Skylake-X and X299 BIOS patches to disable MSR 0xE2 lock AND TSC Fix
# SiInit
299D6F8B-2EC9-4E40-9EC6-DDAA7EBF5FD9 12 P:81E10080000033C1:9090909090909090
# PpmInitialize Reset IA32_TSC_ADJUST to 0 instead of enforcing 0xE2 lock
3FFCAE95-23CF-4967-94F5-16352F68E43B 10 P:742CB9E20000000F3248C1E220480BC20FBAE00F488944240872130FBAE80F89442408488B54240848C1EA200F30:BA00000000B800000000B93B0000000F309090909090909090909090909090909090909090909090909090909090
# CpuInitPei Reset IA32_TSC_ADJUST to 0 instead of enforcing 0xE2 lock
01359D99-9446-456D-ADA4-50A711C03ADA 12 P:B9E20000000F328BC8BE0080000023CE0BCF75190BC6894424088954240C8B54240C8B442408B9E20000000F30:BA00000000B800000000B93B0000000F3090909090909090909090909090909090909090909090909090909090
# CpuMpDxe to disable TSC writes
@mahmoudimus
mahmoudimus / idapython_cheatsheet.md
Created December 16, 2022 04:56 — forked from icecr4ck/idapython_cheatsheet.md
Cheatsheet for IDAPython