<<URGENT>>Solution for CTF similar challenge
TOPIC : easyBOF
category: ROP, string format
Flag format : ADL{printable}
Source code:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
void init()
{
setvbuf(stdin, NULL, _IONBF, 0);
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stderr, NULL, _IONBF, 0);
}
void echo(char* buf)
{
printf(buf);
puts("");
}
void saySomething(char* buf)
{
read(0, buf, 0x10);
}
void bof(char* buf)
{
puts("Show your BOF");
read(0, buf, 0x100);
}
int main()
{
init();
char buf[0x10] = {0};
write(1 , "> ", 2);
saySomething(buf) ;
echo(buf);
bof(buf);
return 0;
}
LINKS for download file :
http://ctf.adl.tw/files/140da9235e75b0a ... Gi-R4i9lF0
## Please provide detailed explanation of solving idea and
solving codes FOR THE PROVIDED CODES.
## DO NOT COPY AND PASTE SIMILAR SUBJECT SOLUTION
<>Solution for CTF similar challenge TOPIC : easyBOF category: ROP, string format Flag format : ADL{printable} S
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am