点击蓝字,关注我们日期:2024-05-16作者:H4y0介绍:Linux_io_FILE 基础知识。0x00 前言_IO_FILE利用已成为CTF中PWN题的常规利用思路,逐渐成为基础知识,本文将介绍_IO_FILE的结构及标准I/O流相关内容。0x01 IO_FILE结构在libio.h文件中有如下定义:struct _IO_FILE { int _flags; /* High-order word is _IO_MAGIC; rest is flags. */#define _IO_file_flags _flags /* The following pointers correspond to the C++ streambuf protocol. */ /* Note: Tk uses the _IO_read_ptr and _IO_read_end fields directly. */ char* _IO_read_ptr; /* Current read pointer */ char* _IO_read_end; /* End of get area. */ char* _IO_read_base; /* Start of putback+get area. */ char* _IO_write_base; /* Start of put area. */ char* _IO_write_ptr; /* Current put pointer. */ char* _IO_write_end; /* End of put area. */ char* _IO_buf_base; /* Start of reserve area. */ char* _IO_buf_end; /* End of reserve area. */ /* The following fields are
………………………………