2

I'm targeting a program that tries to open a file in /sys that doesn't exist. Is there a way to create that file so the program continues? (Normally you can't create flies in sysfs.)

SArcher
  • 141
  • 2

1 Answers1

2

Instead of creating a file, you can hook the open/read functions in the binary and make them return the data it needs. For example, using LD_PRELOAD:

https://github.com/poliva/ldpreloadhook

Igor Skochinsky
  • 36,553
  • 7
  • 65
  • 115