x86
发表于|更新于|CS Language
|总字数:24|阅读时长:1分钟|浏览量:
Introduction
- x86是一种复杂指令集架构的汇编语言
register in 32bit x86
-
esp
-
ebp
-
eip
相关推荐
2023-11-13
CSAPP bomblab
Intro CSAPP里传奇的实验 通过汇编能力拆除二进制炸弹,拯救世界! phase_1 通过strings_not_equal想到这里有个字符串判断 x/s 402400得到字符串为Border relations with Canada have never been better. phase_1就是上述字符串 phase_2 通过read_six_numbers得到phase_2是六个数字 add eax, eax可见每次取出的比较数字翻倍,第一个数字为1 phase_2就是1 2 4 8 16 32 phase_3 阅读反汇编,可知读取两个数字 第一个要比7小 第二个根据第一个有不同的分支答案 phase_4 第四题的func4是一个递归函数 phase_5 通过内存查找关键字符串flyers x/s 0x4024b0查找另一个敏感字符串maduiersnfotvbylSo you think you can stop the bomb with ctrl-c, do you? 输入的六个...
2023-11-11
CSAPP datalab
突发奇想,重做下CSAPP的lab,顺便把以前没做完的补上,希望能坚持下来 Links lab download Intro datalab主要是使用位运算来实现函数,考验对底层数据类型的掌握 修改bit.c文件以彰显你的位运算技术 32bit Solution bitXor 用位与和位非实现位异或 德摩根律走起 123int bitXor(int x, int y) { return ~(~(~x & y) & ~(x & ~ y));} tmin 要求返回最小的补码值0x10000000 123int tmin(void) { return 1 << 31;} isTmax 判断是否是补码最大值 由tmax的特征可得,特判0xFFFFFFFF 123int isTmax(int x) { return !(((x + 1) ^ x) ^ ~0x0) & !!(~x);} allOddBits 要求判断所有奇数位是否都为1 先取奇数位 再判断是否...
2023-08-25
CS161 Project 1
Project1 Q0 Customizer 以customizer - customizer身份获取后续密码 remus - ilearned Q1 Remus 要求我们使用缓冲区溢出注入代码,由此读取访问受限的文件README orbit.c12345678910111213#include <stdio.h>void orbit(){ char buf[8]; gets(buf);}int main(){ orbit(); return 0;} 可以发现gets()没有对读取的输入作越界处理,因此含有缓冲区溢出的隐患 ./debug-exploit并在第五行处打断点 gdb12345678910111213141516(gdb) b 5(gdb) r(gdb) x/16x buf0xbffffc68: 0xbffffd1c 0xb7ffc165 0x00000000 0x000000000xbffffc78: 0xbffffc88 0xb7ffc...
2023-08-20
CS161
The primary way of securing a system is understanding how it works? False. Oftentimes the best defense is to remove incentives for attackers Links ucb的一门系统安全课程 课程主页su20 课程主页su21用作proj 课程hw(toekn: G2DR3D) Lecture 1: Introduction Threat Model: 谁会攻击你、他们有什么样的资源 Lecture 2: Security Principles Don’t Blame the Users Security is Economics Prevention Detection, Defense in Depth Password Authentication Measuring Attacker Capabilities rubber-hose cryptanalysis Least P...
2023-05-17
CS162 Lecture 5: Device Drivers, Sockets, and IPC (Finished), Concurrency (Processes and Threads)
2023-05-17
CS162 Lecture 4: Fork, Introduction to I/O
pthread pthread library: POSIX thread library POSIX: Portable Operating System Interface(for uniX?) 一个重要的观点是,Every is a “File” File System File 是文件系统中被命名的数据 可以是文本,二进制数据 Metadata是文件的信息,包括size,Modification time,owner security info,access control Directory 包含文件和目录的“文件夹” I/O and Storage Layers C High-Level File API - Streams 文件高层次的抽象是输入输出流,流被认为是字节序列 C Low-Level File - File Descriptors Unix I/O的设计理念是 任何东西都是文件 使用前open 以字节为单位 在kernel中的buffer读写 直接使用系统调用实现,而stream是将系统调用read等打包...