Questions tagged [patching]

Patching is the process of adding or deleting code from an executable file in order to modify its functioning.

Filter by
Sorted by
Tagged with
0 votes
1 answer
85 views

Patching an old piece of software

First off, let me just start by preemptively apologizing if this isn't the right place to ask this question. If that is indeed the case, let me know and I will delete the post. It's just that I'm ...
0 votes
0 answers
32 views

Patch binary while documenting original at the same time in Ghidra

I'm starting work on a simultaneous documentation and patching project on a single binary. Some of the code to be documented will also be overwritten by the patch, but most of it won't, so I need a ...
0 votes
0 answers
47 views

Is Stud_PE a legitimate program?

I have a binary that crashes at certain user input, and after using Ghidra and x64Dbg to understand what's happening, I'd like to just fix the problem. I can use Ghidra to NOP the function call that ...
1 vote
0 answers
137 views

How does Play integrity api assures Genuine app binary

I discovered that we can use the Play integrity api instead of safetynet now to assure the integrity off an app that is running. I am wondering if people have a way of bypassing the "Genuine app ...
0 votes
1 answer
67 views

Updating legacy library in an already compiled binary

I'm dealing with a reverse engineering challenge involving a binary application that was statically compiled with a legacy library. While the legacy library is not vulnerable, it lacks certain ...
0 votes
0 answers
43 views

X64dbg question

I got a program that I try to patch. Normally you get a message box or something to get at the right point in program. But this program behaves else. It opens, then you can type in your license number ...
1 vote
0 answers
106 views

Inject a MessageBox to the PE file

I'd like to patch some Windows PE file to show just simple MessageBox. Taking into account that the PE in question doesn't import the MessageBoxA function if I'm right that all i need to do is to add ...
1 vote
1 answer
76 views

Need Help Figuring out Multi-byte (in-memory) byte replacement using ida script (idc)

"I am trying to create a simple IDC script for IDA 7.7, which takes a known memory address (in the format 0x00000000), a string of replacement bytes (either in the format ffffffff or ff ff ff ff, ...
1 vote
2 answers
175 views

Edit arm thumb2 intelhex file

I have intelhex file to arm 32 bits thumb 2. I want edit this file add/ change instructions. Looking for easy and free tool (prefer gui windows tool ) to do it please.
1 vote
0 answers
350 views

How to patch instruction with a call to a thunk function?

I started to use ghidra to begin doing some crackmes, and I need to change an instruction to a call to a thunk function. However, when I export the program back, I get a segfault. Inspecting it with ...
1 vote
2 answers
557 views

Changing the jne to je instruction causes program to generate error

I'm trying to change the instruction from jne to je I've change an instruction 75 0c jne [some_location] 75 0c is a 2 jump instruction. So, I've a chaged it to from 75 0c to 74 0c which is ...
1 vote
1 answer
71 views

Patching a B(ranch) causes segfault in ARMv7 binary, while the same patch (with JMP) works on x64 binary

Any ideas why trying to patch a ARMv7 binary causes a segfault while basically the same patch on the Win64 version of the software works as expected? Here is the Win64 version, that works UPX0:...
2 votes
0 answers
43 views

How does Windows Updates determine if the patches are compatible?

I am looking into Microsoft Windows updates, and how they are applied, after extracting the .msu file, we get some .cab files with patches (in PA30 format), and informations on the file attributes, ...
3 votes
2 answers
781 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 ...
0 votes
1 answer
2k views

How to Modify CBZ Branch in ARM64?

If I want after running the CBZ W0, loc_C5C8 command Run to the ADRP X8,#selRef_curent_version@PAGE command regardless of the condition (in picture), what should I do?
2 votes
0 answers
36 views

Finding a check in Chrome

Chrome doesn't allow switching on extensions which are not from the Chrome store. There is no this limitation in Chromium. So it is only in Chrome. It checks verified_contents.json (in which content ...
1 vote
0 answers
29 views

How can I create a patch to insert a menu into an executable file which does not have a menu? [duplicate]

I need help writing a patch that inserts a menu into an application which does not have one. When I an executable file in a resource editor, I found the menu and I saved the file again and it doesn't ...
3 votes
2 answers
446 views

Injecting C++ code, while also maximizing compatibility with other injections

Using the New Vegas Script Extender C++ API for Fallout New Vegas, I am able to write to the process' memory directly at runtime through a .dll plugin that's loaded by the NVSE injector. But it is not ...
1 vote
0 answers
250 views

IDA binary patch "has no file mapping"

I am trying to change one byte (TBZ to TBNZ) inside a ~40mb binary. Ive done this multiple times with other files but this time IDA is giving me a hard time by simply not patching and printing this to ...
1 vote
0 answers
83 views

Patched Mac application throws "Invalid value of (null) for entitlement" when running it

I have patched a specific application that I downloaded from the app store but when I ran the executable, it gave me a signal kill 9. I also reverted back the change I made, but the same error was ...
1 vote
0 answers
36 views

How to prevent dynamic loader from modifying binary in memory?

I have patched a loadable object (an .so file) from this: xor eax,0x304b7c0 to this: mov eax,0x0 When I try to run my binary with these modifications, the application loads the .so file and then it ...
1 vote
1 answer
99 views

Under what circumstances relative to instr rip+offsets to .rdata data may not match?

I have a 100Mb binary file, in which I need to find and patch specific bytes in a function. When disassembled in IDA, this function is the only thing that ever references on unique ASCII string via ...
0 votes
1 answer
322 views

Hex editing an IP address of a different length

I am performing some Windows malware research on a rogue AV software called SpySheriff (password: infected). I want to edit the IP address within the PE (.exe) file to change it to my honeypot IP ...
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 ...
1 vote
0 answers
135 views

Patching out relative calls to DLL functions

I have googled, watched several videos, read the PE spec, and even read some blogs. I am at a loss on how to patch out a message box. I am working through a CTF whose first task is to disable a nag ...
3 votes
0 answers
40 views

How to patch bootstrap in NAND flash?

I read the layout or my NAND flash and saw that in the beginning of flash there is a bootstrap the the CPU load. That flash has ECC I read/write that flash. How can I analyze the bootstrap and change ...
2 votes
1 answer
196 views

ApplyPatches to input file via IDC

Anybody know, how via IDC scripts applying patching for input file (i mean context menu: "Edit - Patch program - Apply patches to input file"). I viewed entire idc.idc and didn't see desired ...
2 votes
2 answers
2k views

IDAPython Code <-> Data

I'm looking for a way, to make programmatically change of data type. This is the same as you press 'C' or 'D'. For example convert this: .text:00401008 unk_401008 db 55h ; U ; ...
0 votes
2 answers
227 views

IDA/Olly changing address bytes after patch during debugging on x86

I'm struggling with a patch in an x86 .exe. I replaced a MOV with a JMP but everytime I run the debugger, the address gets modified as a sort of rebasing: BE E4732201 MOV ESI,App.012273E4 should ...
5 votes
0 answers
490 views

Patching Jar File (2022)

Currently reversing a .jar program recreationally, and I understand the workflow proposed here: https://www.netspi.com/blog/technical/thick-application-penetration-testing/patching-java-executables-...
0 votes
1 answer
1k views

Change global variable value in IDA

I have a global variable stored in the data section: data:00007FF7DDBF78E4 00 00 00 00 dword_7FF7DDBF78E4 dd 0 Is there a way to change its value?
1 vote
1 answer
449 views

Binary diff + patching across versions

What are the current options for binary patching which works across different versions of the binary? E.g. we created a binary patch for a specific version of a binary and want to apply that patch to ...
1 vote
0 answers
40 views

Need help with patching .plt function

I want to patch a .plt function but my friend told me I should use "xref" to find the real caller. I found it and patched it, Will the .plt function execute? The function start with PUSH {R4-...
2 votes
2 answers
10k views

edit instructions directly in visual mode

I know we can edit opcodes in radare2's visual mode using i. But is there any way to edit instructions directly in visual mode? In my case, the instruction is: jae 0x8048450 And I want change it to: ...
0 votes
2 answers
644 views

How to prevent File Modification in C++

so i want to protect my software against reverse-engineering and i want to add checksum verification to prevent patching the binary but the problem that if i added a checksum verification the binary ...
1 vote
0 answers
405 views

ARM Cortex-M0 - How to either (non-intrusively) extract firmware or modify downloadable firmware (NuMicro NUC126)

As a hands-on introduction into RE, I've decided to take on a small, simple embedded device. In hindsight, it was probably a mistake. This "project" has consumed me for about 2 weeks. ...
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....
0 votes
2 answers
150 views

How to calculate the value needed to branch two points in IDA pro?

I need to find how to get the value to make a branch between two points in IDA Pro, but I can’t figure it out. For more context: the instructions I’m following says “Calculate the value needed to do a ...
1 vote
1 answer
140 views

Inserting two digits into binary per Hex - without making EXE corrupt

I dont have much knowledge with assemblers. I beg ur pardon in advance. I need to change an IP address in a win-binary (Net) where the IP its hard-coded. Just changing the IP with an Hex Editor would ...
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 ...
1 vote
1 answer
5k views

Bypass USB key activation of a software

(The software is Chinese and contains malware. I do not know if I could upload it here, so temporarily, please let me describe it) I am asked by a spa store to "do something" to make a ...
0 votes
1 answer
704 views

How to patch file by adding a branch instruction to another address in arm

I have disassembled two armv7 files in IDA. I am trying to figure out how I can create a patch to change one to another. The original file has: __text:00017B60 loc_17B60 ; ...
1 vote
0 answers
587 views

How to patch C# binary?

I have C# binary. I was able to use dnSpy to decompile it, and analyze. The binary was obfuscated with xenocode obfuscator. I figured out that I can directly manipulate IL instructions if I just find ...
0 votes
0 answers
81 views

SSL pinning deep problem

I'm working on one Android app for potential malware analysis and I am trying to MITM it. I found out that the verify function never executes (X509 class) when i hook onto my proxy but rather that app ...
1 vote
0 answers
537 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 ...
2 votes
0 answers
293 views

Automating binary patching in Hopper Disassembler using python

I am curious to know if anyone has done anything similar to what I am looking to achieve... I have a .ipa file (iOS application) that I load into to Hopper Disassembler. I search for a string to ...
-1 votes
2 answers
6k views

Make this function return true

Sorry, I'm quite new to assembly, and I'm trying to make the code bellow return true: .text:1000E3E0 ; =============== S U B R O U T I N E ======================================= .text:1000E3E0 .text:...
0 votes
1 answer
336 views

Calling MessageBoxW x64 confused about pointer

OK, I am very new to x64dbg. I used to use OllyDbg a lot and I'm having some problems with this. I just made a customized version of MS-PAINT for practice by changing a few things like the default ...
1 vote
2 answers
9k views

How to add code to compiled java class

I have java code that is compiled to a .class file. There is a function that gets few parameters and do some action (e.g. get int x and int y and do x+y) I want to add to this .class file code that ...
13 votes
3 answers
24k views

Remove code signature from a Mac binary

How can I remove the code signature from a binary so that I can patch it without the binary refusing to run afterwards? Needless to say, I'm not the original creator of the binary, nor I have the ...