Stack_Buffer_Overflow
我们平时说的栈溢出一般是指栈缓冲区溢出 (Stack Buffer Overflow)。 栈溢出的条件 程序必须向栈上写入数据。 写入的数据大小没有被很好地控制。 利用栈溢出的攻击方式直接现用 getshell若漏洞程序调用了现成的含有 systemcall 的函数,直接利用栈溢出覆盖函数返回地址为 systemcall 函数的地址 ROPROP(Return Oriented Programming)...
call_stack
IA-32 (Intel 32位) 寄存器Note: 32 位说明栈中指针偏移量以 32位(4字节)为一个基元。 EAX ~ EDX: 通用寄存器 (general purpose registers), 通用寄存器是通用的,但是有一部分指令对寄存器有特殊要求,这时它们分别有如下用途: EAX: 累加器 (“A” means Accumulator) EBX: 数据基地址暂存器 (“B” means Base) ECX: 循环计数器 (“C” means Counter) EDX: 操作数或操作结果暂存器 (“D” means Data) 为了方便存储较短的数据,通用寄存器都可以只使用低16位 ESI 和 EDI: 这两个寄存器优势也被包括在通用寄存器内,但是不能拆分,一般用作字符串操作的源指针和目的指针。 ESP 和 EBP: ESP 存储的是栈顶地址,即栈指针 (Stack Pointer),而 EBP 存储的是位于栈顶的栈帧的栈底地址,即基指针 (Base Pointer) 控制权移交 控制权是指 CPU...
Sorting Algorithm
Today, I’m learning sorting algorithm, and taking some notes in this passage. Selection SortI believe Selection Sort is the easiest sorting algorithm to understand, as it simply involves repeatedly finding the smallest elements in the unsorted portion of the array and swapping it with the first unsorted element. Let’s take a look at the implementation: Implementation12345678910111213141516/* Section Sort */void section_sort(int *nums, int numsSize) { // Outer loop: i represents the...
Configing My Arch
In the last passage, I have talked about my experience of installing the basic system of Arch Linux.Ok, now we have Installed the base system of archlinux, and here it’s time to do some basic configurations.首先启动到 arch 系统,登录 root 账户。 创建普通账户啥事都用 root 用户做的话是有风险的,并且很多软件对于 root 用户是有限制的。所以当然,我们需要有一个普通账户 123[root]# useradd -m <username>...[root]# passwd <username> 上述命令创建一个名为 username 的用户,并且为其创建用户目录。 创建用户之后可以使用 su <username> 命令切换到新创建的用户 配置 sudosudo 可以让我们很方便地进行高权限操作。输入下列命令,使用 vim...
My experience using archlinux
最近安装了一个 archlinux 玩玩, 发现真的挺麻烦的。我反复安装过几次,在这里记录一下我安装和配置基本系统的经历。 关于安装 arch 的一些建议arch 有非常完善,非常强大的 wiki 文档以及社区,在其中可以找到很多很多的帮助:arch 的 wiki 系统的安装安装一个系统,首先要制作一个安装介质,比如 USB 驱动器。 制作 USB flash drive制作 archlinux 安装介质(USB 驱动器)的步骤: 准备一个大小至少 2GB 的U盘,并备份好U盘中的数据(操作过程会将U盘格式化,清空其中的数据) 在 arch 下载页面 下载 arch 的可引导 ISO 文件。 下载并安装 rufus ,按照提示将 arch 的可引导 IOS 文件刻录到 USB 安装媒介。 配置 live 环境 在计算机加电自检时快速按下某个热键,进入引导加载程序菜单,选择 Arch Linux install medium 进入安装环境,安装环境默认的 Shell 是 Zsh。 第一步是连接互联网,可以直接使用有线网络,连接网线之后会自动联网,也可以使用 iwctl...