22018, 1/1101 ȸ¿ø°¡ÀÔ  ·Î±×ÀΠ 
   song689
   uaf(use after free) ¿¹Á¦ Â¥¼­ µ¹¸®´Âµ¥ °ªÀÌ ´Ù¸£°Ô ³ª¿À³×¿ä

http://www.hackerschool.org/HS_Boards/zboard.php?AllArticle=true&no=36253 [º¹»ç]


#include <stdio.h>
#include <malloc.h>

typedef struct test_struct
{
  int num;
}test;

int main()
{
  test *p1;
  test *p2;

  p1 = malloc(256);
  p1->num = 54321;

  printf("p1->num : %d\n", p1->num);
  printf("p1->num Address : %p\n", &(p1->num));

  free(p1);

  p2 = malloc(256);

  printf("p2->num : %d\n", p2->num);
  printf("p2->num Address : %p\n", &(p2->num));
  return 0;
}

°á±£°ª :
p1->num : 54321
p1->num Address : 0x89d010
p2->num : -1119962248
p2->num Address : 0x89d010

¿ÖÀÌ·¸°Ô ³ª¿À´Â°ÅÁÒ? ÁÖ¼Òµµ °°Àºµ¥ ¿Ö °ªÀÌ ´Ù¸£°Ô ³ª¿Ã±î¿ä..
´Ù¸¥ ºÐµé ºí·Î±× º¸¸é Àú°°Àº °æ¿ì´Â ¾ø´õ¶ó°í¿ä..

  Hit : 8174     Date : 2018/06/20 11:05