hi
in shared section:
i run this code and after run i rename exe file name but again it just remap section ( program know g_iShared old value )
but new copy of exe just create new section and g_iShared start from zero
so i think it must be 2 layer to check if section just need remap : one for image file ( file pointer ? ) and second for section ( Prototype PTEs ? ) in that image
and it was possible ( force it and loader think it need remaping like shared section ) loader remap memory of other program in my exe ?
in shared section:
Code: Select all
how windows know this section already is created so it must just re-map section in new program?#pragma comment(linker, "/SECTION:.shared,RWS")
#pragma data_seg(".shared")
int g_iShared = 0;
#pragma data_seg()
i run this code and after run i rename exe file name but again it just remap section ( program know g_iShared old value )
but new copy of exe just create new section and g_iShared start from zero
so i think it must be 2 layer to check if section just need remap : one for image file ( file pointer ? ) and second for section ( Prototype PTEs ? ) in that image
and it was possible ( force it and loader think it need remaping like shared section ) loader remap memory of other program in my exe ?
Code: Select all
#include<Windows.h>
#include<stdio.h>
#pragma comment(linker, "/SECTION:.shared,RWS")
#pragma data_seg(".shared")
int g_iShared = 0;
#pragma data_seg()
int main()
{
g_iShared++;
printf("number is %x",g_iShared);
getchar();
}
@R00tkitSMM