0

I am trying to overwrite kinfo_proc structure but it does not allow me to overwrite it.

However, according to this page, I can overwrite this struct. http://man.openbsd.org/kvm_getprocs.3

I got struct kinfo_proc and then, write a value inside then I call kvm_close. After that, I called the list again but the value is still not changed..

How can I overwrite the value?

NoSleep
  • 127
  • 1
  • 10
  • Can you share the code please? – Nguai al Apr 29 '17 at 23:37
  • kvm_t *kvm = kvm_open(NULL, "/dev/null", NULL, O_RDWR, NULL); struct kinfo_proc *kinfo = kvm_getprocs(kvm, KERN_PROC_PROC, 0, &numofkinfo); /.. some changed ../ kvm_close(kvm); kvm = kvm_open(NULL, "/dev/null", NULL, O_RDWR, NULL); /.. contents are same ../ – NoSleep Apr 30 '17 at 00:01
  • Can you share the part where you are attempt to change the structure values? It is better to display the entire code. Code is interdependent so one area can impact other areas. – Nguai al Apr 30 '17 at 00:48

0 Answers0