2016BCTF-bcloud分析

这是一道CTF题,涉及到The House of Force技术

首先运行一下,看一下大致流程,
root@yang-virtual-machine:~/ctf# ./bcloud
Input your name:
123
Hey 123! Welcome to BCTF CLOUD NOTE MANAGE SYSTEM!
Now let's set synchronization options.
Org:
qwe
Host:
asd
OKay! Enjoy:)
1.New note
2.Show note
3.Edit note
4.Delete note
5.Syn
6.Quit
option--->>
1
Input the length of the note content:
ssssssssssssssssss
Input the content:
Create success, the id is 0
1.New note
2.Show note
3.Edit note
4.Delete note
5.Syn
6.Quit
option--->>



然后放到IDA中静态分析一下,为了提高可读性,对一些变量进行了重命名。


首先分析一下input_name函数的伪代码:
int input_name()
{
  char s; // [sp+1Ch] [bp-5Ch]@1
  int heap_of_name; // [sp+5Ch] [bp-1Ch]@1
  int v3; // [sp+6Ch] [bp-Ch]@1

  v3 = *MK_FP(__GS__, 20);
  memset(&s, 0, 0x50u);
  puts("Input your name:");
  read_user_define((int)&s, 64, 10);
  heap_of_name = (int)malloc(0x40u);
  dword_804B0CC = heap_of_name;
  strcpy((char *)heap_of_name, &s);
  print_info(heap_of_name);
  return *MK_FP(__GS__, 20) ^ v3;
}


我们输入name时,保存到s处,也就是bp-5
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值