c - address out of bounds about buffer overflow -
recently, trying use point clobbering utilize vulnerability of xp vm. thing that, has changed address function pointed to function address(in case function arc injection(r)), when program jump function "arc injection(r)", gdb tells me r address 0xbalbala out of bounds? kind of known may relate scope of variable. can 1 tell me how can use point clobbering jump function , use argument? thank much.
void arcinjection(char *r) { printf("in arcinjection()\n"); system(r); } void (*funcptr)(int,int, char **);
here part of switch:
case 5: arcinjection(command); break; case 6: funcptr(argv[++i][0]-48,argc,argv); // changed address function pointed to address of case 5, in case case 5 cannot use argument command, has been defined in main program.
Comments
Post a Comment