Questions tagged [patching]
Patching is the process of adding or deleting code from an executable file in order to modify its functioning.
137
questions
3
votes
1
answer
2k
views
Getting Access Violation when patching a program
I'm very very newbie in assembly / ollydbg / reverse engineering. I'm totally lost with this error.
I have created a simple program in Delphi, just to explore in ollydbg. Here is the program's code:
...
0
votes
1
answer
182
views
Is it possible to change/disable the keybindings for a game by modifying the exe using x64db or a similar program? [closed]
So I have a game I've been making mods for. I'd rather not reference the title here to avoid it showing up in google searches and leading people to exploits.
By, default, it doesn't allow keybind ...
1
vote
1
answer
1k
views
VirtualProtect return value
VirtualProtect is straightforward but I get some results that I can't explain. Something's going on in the background probably but I'd like to know what.
The following is under Windows 7 SP1 Ultimate ...
1
vote
0
answers
138
views
Patch is detected yet hardware access breakpoint isn't hit
I wonder how is that possible.
I found debugger detection in TLS Callback function - there is conditional jump after some check.
When I step over it with debugger and modify ZF flag to bypass ...
1
vote
1
answer
862
views
Patching Application on OSX (Memory Protection)
I'm patching an executable on OSX. So far I know the patches have been applied successfully.
Steps taken (via LLDB):
lldb /users/Brandon/Desktop/Test.app/Contents/MacOS/Test
b start
run
br del 1
...
1
vote
1
answer
355
views
Patching MIPS binary file on IDA fails at build
I'm working on reverse a binary from a MIPS based router. In order to do it I'm emulating the binary with qemu, but the binary executes some routines before stating with the logic that skips the ...
4
votes
1
answer
3k
views
In-memory patching of .net code
Are there techniques for patching .net executables in memory? Let's say we've have a .net dll/exe, we identified what method we want to patch and what IL to replace the existing code with. Executing ...
4
votes
1
answer
3k
views
Injecting shellcode in ELF binary
I am trying to inject a piece of shellcode inside a 32-bit ELF executable. I am running Ubuntu 14.04 64-bit. Hence, all the commands I have run require explicit switches to produce 32-bit code. I am ...
2
votes
1
answer
1k
views
Insert a function call in an ELF executable
I want to patch an ELF executable to insert a function call (the function s2e_rawmon_loadmodule and its dependencies are to be linked statically, preferably) at the beginning.
This answer seems to ...
2
votes
3
answers
1k
views
How to make a valid patch to bypass self checking security measure?
I have got a DLL file that I want to modify. Each time the executable file which imports the DLL is executed it performs a self checking process to find out whether the file is valid or not. How can I ...
2
votes
2
answers
527
views
Avoid re-enabling patches between reruns in Ollydbg
In Ollydbg 1.1, when I create on the fly patches, they're automatically disabled when I restart the application (the debugged one, not Olly) and I have to enable them manually again.
Is there a menu ...
1
vote
1
answer
1k
views
Code-Cave Assembly Patching Issue in x64_dbg
I'm trying a code-cave approach to this query that was asked about on this forum earlier.
I'm using x64_dbg to perform this task. My issue here is that after I have written the extra lines of ...
1
vote
1
answer
2k
views
How to add code to Portable Executable?
I have a PE which I'd like to edit. I know I can create patches in OllyDbg and similar tools, but they all have one thing in common: I have to overwrite some present code in file. I wonder if it is ...
1
vote
1
answer
577
views
Patch driver loading process [closed]
Introduction
Since Windows Vista and higher versions a non-boot kernel-mode driver is installed by validating the certificate issued to sign the catalog file and each file associated with the catalog ...
1
vote
1
answer
158
views
Patch methods in COM dll
I have COM DLL with one class and one interface.
When I open it with COMView I see all the methods in the class/interface.
I want to modify the behavior of one method in this COM but I don't know how....
3
votes
1
answer
240
views
How to update the injected calls' address after patching binary?
After using IDA analysing a dll file, I replaced a call with another one. That is, replacing CALL xxxx with CALL ds:yyyy. (ds:yyyy has been referenced by other locations already). And I used IDA to ...
0
votes
2
answers
614
views
Why use some cracks a patch and a keygen? [closed]
A lot of cracked software in the internet looks like it's liberated with a patched executable and an additional key generator. Why so complicated? If the executable is patched why isn't the necessity ...
5
votes
1
answer
882
views
Replacing small length instruction with larger length instruction
Basically I want to replace MOVS R1, #0x0 with MOV.W R1, #0x123, since later instruction requires 4 bytes it is impossible to simply replace in HEX code.
I am using IDA Pro for analyzing native ...
2
votes
1
answer
793
views
Turn ¨Assemble¨ option on, in IDA Pro Demo
Is there a way to highlight "assemble" option in EDIT menu at IDA pro to apply a patch. Guess that idagui.cfg must be changed at some point, and turn NO to YES somewhere.
I use the last demo version....
4
votes
2
answers
10k
views
Workflow patching Java jar file
Normally I'm working with firmwares and native code executables, patching small things like constants, jump conditions etc. There I'm using IDA's disassembly to analyse what and where to patch.
With ...
5
votes
2
answers
2k
views
Patching a Mach-O Binary Header to remove a LC_SEGMENT
i have an ARMv7 Mach-O Executable on which I want to patch out a certain segment in the binary header which prevents DYLD injection.
more information here under point 3. of preventing dyld injection....
1
vote
0
answers
83
views
Where to identify and access the main object/closure in a JavaScript web app?
I want to add missing functionality to a web app's front end code JavaScript code.
I can find the code in the browser's developer tools by setting breakpoints and stepping through.
But in a large ...
2
votes
2
answers
730
views
Is there a way to tell the IDA debugger to apply all patches from the database?
I'm in the process of "enhancing" an Android application that comes with a huge compiled .so file. After patching about 200 bytes in the database, i'd like to attach to the running app, apply all ...
1
vote
0
answers
532
views
Static binary instrumentation tools for android .so libraries?
I'm trying to statically inject code into an android app.
The best way would be to use APKStudio and the like, but there are very harsh restrictions on the device and the app itself, so that apk ...
3
votes
2
answers
729
views
Convert Mach-O VM Address To File Offset
this maybe total no brainer but i'm really new to this and i'd really appreciate some help!
Basically i'm trying to patch(out aka nop) a obj-c function inside an iOS Application. I've successfully ...
4
votes
5
answers
8k
views
Making application load dll at start
I've added some functionality to existing application which works through dll injection - my dll loads and patches some stuff.
I would like it to be added to this application permanently so I don't ...
5
votes
4
answers
2k
views
Are there any modern assembly-level patching tools?
I've recently been undertaking a little RE project where I needed to patch the executable. For small modifications, I know enough x86 to patch in an jump, nop, infinite loop, etc, so a hex editor is ...
13
votes
2
answers
5k
views
How do the internals of a Windows update security patch work?
Wasn't sure where to ask this on stack exchange, so vote to close if you think it is in the wrong place.
I am analyzing a Windows security patch. Having never examined a windows security patch, and ...
3
votes
1
answer
392
views
Ollydbg 2.1 Allow for multiple saves or not make backups
I have been looking all around for an answer to this, so I am hoping I find an answer here.
I am working in Ollydbg 2.1 and every time I patch an exe it makes a foo.bak (backup) which is ok. However, ...
4
votes
1
answer
606
views
ELF counterpart for IDA Pro PE utilities
I'm interested in patching ELF files using IDA and the following PE utilities have proven very useful for patching PEs.
Does anyone know if there are some publicly available IDA scripts similar to ...
3
votes
3
answers
2k
views
Insert logging into existing binary code, ARM
I want to add logging to some function(s) in the shared (.so) library. (ARM, Android, a mix of Arm and Thumb modes; C++, some functions are virtual and therefore nameless, invoked via VFT.)
Does ...
7
votes
2
answers
2k
views
Virus uses a custom XOR encryption and need help possibly cracking it / Reversing EXE
As stated in my previous question i was infected by a encrypting virus that encrypts two 1024 byte blocks of any given file (First 1024, and last 1024) in some type of custom CFB XOR encryption. I ...
1
vote
1
answer
2k
views
automatically find and nop an instruction in IDA
These are my first steps in IDA script, so please be kind.
I want to create some sort of script that, every time it finds the following instruction:
MOV R1, #0x4D080
to automatically replace it ...
1
vote
2
answers
957
views
Patch a Java class inside a jar using C# [closed]
Being a beginner in C# I wonder if it is possible to patch a .class file inside a .jar?
Since jar files tend to act like "zip" files, the approach I think might work is to decompress the jar, patch ...
9
votes
1
answer
4k
views
IDA Pro: What does "Create EXE file..." option do?
I have come across File -> Create EXE file... option in IDA. I thought one couldn't use IDA for patching. I have tried playing with it. However, it gives me the following error: This type of output ...
7
votes
3
answers
4k
views
Patching a .Net 4.0 Binary in Olly or CFF Explorer
I have a challenge compiled in C# .net 4.0. I can see the source completely fine in Reflector. I'd like to change the source. I guess I do this by patching some bytes in the binary.
The problem I'm ...
8
votes
3
answers
2k
views
Ripping/pasting code into an executable using Olly
I'm working with some x86 assembly code and I need to rip from one executable and paste that code into another.
Originally, I had an executable that was meant to accept two command line parameters and ...