CG CTF PWN When did you born?
生活随笔
收集整理的這篇文章主要介紹了
CG CTF PWN When did you born?
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
題目:
nc ctf.acdxvfsvd.net 1926
Try not to be naive
TIPS:
gets,棧溢出
https://pan.baidu.com/s/1nuZXEL7
提取密碼:dwvg
題解:
工具:
checksec
IDA Pro
下載
解壓
test.c
#include <stdio.h>struct Student {char name[8];int birth; };int main(void) {setbuf(stdin, 0);setbuf(stdout, 0);setbuf(stderr, 0);struct Student student;printf("What\'s Your Birth?\n");scanf("%d", &student.birth);while (getchar() != '\n') ;if (student.birth == 1926) {printf("You Cannot Born In 1926!\n");return 0;}printf("What\'s Your Name?\n");gets(student.name);printf("You Are Born In %d\n", student.birth);if (student.birth == 1926) {printf("You Shall Have Flag.\n");system("cat flag");} else {printf("You Are Naive.\n");printf("You Speed One Second Here.\n");}return 0; }?
總結
以上是生活随笔為你收集整理的CG CTF PWN When did you born?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CG CTF MISC MD5
- 下一篇: Codeforces 1196A Thr