Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

.net IL Memory Patching?

Featured Replies

Posted

I'm wondering if there's any library available for patching IL code in-memory at run-time of a remote App, similar to how you'd perform detours or write memory to a remote C app.

Basically I'm dealing with an application I'd like to bypass some checks on but getting defeated by the packer's integrity protection when manipulating the IL in the binary itself, so I figured my next best option was to write a loader and patch the process in memory.

I've looked through a few different things:

https://github.com/0xd4d/dnlib - I haven't discovered any in-memory patching functions for IL code in specific locations in dnlib if it exists please do let me know.

Most of these just crashed within their own examples, which made me avoid them:

https://www.codeproject.com/Articles/16359/MethodLogger-Hook-into-method-calls-in-NET-binarie
https://www.codeproject.com/Articles/463508/NET-CLR-Injection-Modify-IL-Code-during-Run-time
https://www.codeproject.com/Articles/37549/CLR-Injection-Runtime-Method-Replacer

 

So far the only luck I've had is using dnspy breaking where I want to manipulate the process and then patching the IL code before continuing execution, I've though of ripping apart dnSpy or modifying it in some way to make it 'scripted' into a load of sorts but if there's something already built out there for doing this kind of thing It'd be great to know about it.

Basically all I'm doing is nopping/removing a specific section of IL code before the application reaches it.
 

You can do this with classic methods, I mean break on EP and patch and then resume main thread.

Not promoting the website but this could be related to your request : https://board.b-at-s.info/index.php?showtopic=9923

  • 4 weeks later...

Old thread, sorry, but I've used Harmony before to edit the memory of my own process. If you ILMerge it with your app and inject it in the target process, you should be able to do it just fine.

1 hour ago, HoLLy said:

Old thread, sorry, but I've used Harmony before to edit the memory of my own process. If you ILMerge it with your app and inject it in the target process, you should be able to do it just fine.

I have also used Harmony for these type of projects. @OP, I highly recommend you use it. Its great.

  • Author

Looks awesome thanks guys.

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.