CTF-PWN: 全保護下格式化字符串利用 [第一屆“吾杯”網絡安全技能大賽 如果能重來] 賽后學習(不會)

通過網盤分享的文件:如果能重來.zip
鏈接: https://pan.baidu.com/s/1XKIJx32nWVcSpKiWFQGpYA?pwd=1111 提取碼: 1111 
--來自百度網盤超級會員v2的分享

漏洞分析

格式化字符串漏洞,在printf(format);

__int64 sub_13D7()
{char format[56]; // [rsp+10h] [rbp-40h] BYREFunsigned __int64 v2; // [rsp+48h] [rbp-8h]v2 = __readfsqword(0x28u);printf("Please input your name: ");if ( (int)sub_1247(format, 55LL) > 0 ){if ( dword_404C ){printf(format);--dword_404C;puts("There will be a gift for you here . . .");}else{puts("0.o? ");}return 0LL;}else{puts("Error reading name.");return 0xFFFFFFFFLL;}
}

確定參數偏移

? gdb pwn
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:<http://www.gnu.org/software/gdb/documentation/>.For help, type "help".
Type "apropos word" to search for commands related to "word"...
startpwndbg: loaded 165 pwndbg commands and 46 shell commands. Type pwndbg [--shell | --all] [filter] for a list.
pwndbg: created $rebase, $base, $bn_sym, $bn_var, $bn_eval, $ida GDB functions (can be used with print/break)
Reading symbols from pwn...
(No debugging symbols found in pwn)
------- tip of the day (disable with set show-tips off) -------
If you want Pwndbg to clear screen on each command (but still save previous output in history) use set context-clear-screen on
pwndbg> start
Temporary breakpoint 1 at 0x5555555550e0Temporary breakpoint 1, 0x00005555555550e0 in ?? ()
LEGEND: STACK | HEAP | CODE | DATA | WX | RODATA
───────────────────────────────────────[ REGISTERS / show-flags off / show-compact-regs off ]───────────────────────────────────────RAX  0x1cRBX  0RCX  0x7fffffffc478 —? 0x7fffffffc82b ?— 'SYSTEMD_EXEC_PID=1816'RDX  0x7ffff7fe0d60 ?— endbr64 RDI  0x7ffff7ffe190 —? 0x555555554000 ?— 0x10102464c457fRSI  0x7ffff7ffe730 ?— 0R8   0R9   2R10  0xfR11  0R12  0x5555555550e0 ?— endbr64 R13  0x7fffffffc460 ?— 1R14  0R15  0RBP  0RSP  0x7fffffffc460 ?— 1RIP  0x5555555550e0 ?— endbr64 
────────────────────────────────────────────────[ DISASM / x86-64 / set emulate on ]────────────────────────────────────────────────? 0x5555555550e0    endbr64 0x5555555550e4    xor    ebp, ebp                    EBP => 00x5555555550e6    mov    r9, rdx                     R9 => 0x7ffff7fe0d60 ?— endbr64 0x5555555550e9    pop    rsi                         RSI => 10x5555555550ea    mov    rdx, rsp                    RDX => 0x7fffffffc468 —? 0x7fffffffc80b ?— '/home/a5rz/Desktop/pwn/file/pwn'0x5555555550ed    and    rsp, 0xfffffffffffffff0     RSP => 0x7fffffffc460 (0x7fffffffc468 & -0x10)0x5555555550f1    push   rax0x5555555550f2    push   rsp0x5555555550f3    lea    r8, [rip + 0x426]           R8 => 0x555555555520 ?— endbr64 0x5555555550fa    lea    rcx, [rip + 0x3af]          RCX => 0x5555555554b0 ?— endbr64 0x555555555101    lea    rdi, [rip + 0x385]          RDI => 0x55555555548d ?— endbr64 
─────────────────────────────────────────────────────────────[ STACK ]──────────────────────────────────────────────────────────────
00:0000│ r13 rsp 0x7fffffffc460 ?— 1
01:00080x7fffffffc468 —? 0x7fffffffc80b ?— '/home/a5rz/Desktop/pwn/file/pwn'
02:00100x7fffffffc470 ?— 0
03:0018│ rcx     0x7fffffffc478 —? 0x7fffffffc82b ?— 'SYSTEMD_EXEC_PID=1816'
04:00200x7fffffffc480 —? 0x7fffffffc841 ?— 'SSH_AUTH_SOCK=/run/user/1000/keyring/ssh'
05:00280x7fffffffc488 —? 0x7fffffffc86a ?— 'SESSION_MANAGER=local/ubuntu:@/tmp/.ICE-unix/1816,unix/ubuntu:/tmp/.ICE-unix/1816'
06:00300x7fffffffc490 —? 0x7fffffffc8bc ?— 'PAPERSIZE=a4'
07:00380x7fffffffc498 —? 0x7fffffffc8c9 ?— 'GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/aab6f309_847c_4363_b37f_36574de33f67'
───────────────────────────────────────────────────────────[ BACKTRACE ]────────────────────────────────────────────────────────────? 0   0x5555555550e01              0x12   0x7fffffffc80b3              0x0
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
pwndbg> b *$rebase(0x1444)
Breakpoint 2 at 0x555555555401
pwndbg> run
Starting program: /home/a5rz/Desktop/pwn/file/pwn
Please input your name: aaaaaaaa%p%p%p%p%p%p%p%p%p%p%p%pBreakpoint 2, 0x0000555555555444 in ?? ()
LEGEND: STACK | HEAP | CODE | DATA | WX | RODATA
───────────────────────────────────────[ REGISTERS / show-flags off / show-compact-regs off ]───────────────────────────────────────RAX  0RBX  0x5555555554b0 ?— endbr64 RCX  0RDX  1RDI  0x7fffffffc2e0 ?— 'aaaaaaaa%p%p%p%p%p%p%p%p%p%p%p%pSomething strange here'RSI  0x7fffffffc2af ?— 0x1000000200a /* '\n ' */R8   0x18R9   0x18R10  0x555555556008 ?— 'Please input your name: 'R11  0x246R12  0x5555555550e0 ?— endbr64 R13  0x7fffffffc460 ?— 1R14  0R15  0RBP  0x7fffffffc320 —? 0x7fffffffc360 —? 0x7fffffffc370 ?— 0RSP  0x7fffffffc2d0 ?— 0RIP  0x555555555444 ?— call 0x5555555550b0
────────────────────────────────────────────────[ DISASM / x86-64 / set emulate on ]────────────────────────────────────────────────? 0x555555555444    call   printf@plt                  <printf@plt>format: 0x7fffffffc2e0 ?— 'aaaaaaaa%p%p%p%p%p%p%p%p%p%p%p%pSomething strange here'vararg: 0x7fffffffc2af ?— 0x1000000200a /* '\n ' */0x555555555449    mov    eax, dword ptr [rip + 0x2bfd]     EAX, [0x55555555804c]0x55555555544f    sub    eax, 10x555555555452    mov    dword ptr [rip + 0x2bf4], eax0x555555555458    lea    rdi, [rip + 0xbd9]                RDI => 0x555555556038 ?— 'There will be a gift for you here . . .'0x55555555545f    call   puts@plt                    <puts@plt>0x555555555464    jmp    0x555555555472              <0x555555555472>0x555555555472    mov    eax, 0                       EAX => 00x555555555477    mov    rdx, qword ptr [rbp - 8]0x55555555547b    xor    rdx, qword ptr fs:[0x28]0x555555555484    je     0x55555555548b              <0x55555555548b>
─────────────────────────────────────────────────────────────[ STACK ]──────────────────────────────────────────────────────────────
00:0000│ rsp 0x7fffffffc2d0 ?— 0
01:0008-048 0x7fffffffc2d8 ?— 0xf7fc37d0f7fc25c0
02:0010│ rdi 0x7fffffffc2e0 ?— 'aaaaaaaa%p%p%p%p%p%p%p%p%p%p%p%pSomething strange here'
03:0018-038 0x7fffffffc2e8 ?— '%p%p%p%p%p%p%p%p%p%p%p%pSomething strange here'
...2 skipped
06:0030-020 0x7fffffffc300 ?— 'Something strange here'
07:0038-018 0x7fffffffc308 ?— 'g strange here'
───────────────────────────────────────────────────────────[ BACKTRACE ]────────────────────────────────────────────────────────────? 0   0x5555555554441   0x5555555553bc2   0x5555555554a93   0x7ffff7df9083 __libc_start_main+2434   0x55555555510e
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
pwndbg> stack 90
00:0000│ rsp 0x7fffffffc2d0 ?— 0
01:0008-048 0x7fffffffc2d8 ?— 0xf7fc37d0f7fc25c0
02:0010│ rdi 0x7fffffffc2e0 ?— 'aaaaaaaa%p%p%p%p%p%p%p%p%p%p%p%pSomething strange here'
03:0018-038 0x7fffffffc2e8 ?— '%p%p%p%p%p%p%p%p%p%p%p%pSomething strange here'
...2 skipped
06:0030-020 0x7fffffffc300 ?— 'Something strange here'
07:0038-018 0x7fffffffc308 ?— 'g strange here'
08:0040-010 0x7fffffffc310 ?— 0x657265682065 /* 'e here' */
09:0048-008 0x7fffffffc318 ?— 0x4d8fe1de9078d800
0a:0050│ rbp 0x7fffffffc320 —? 0x7fffffffc360 —? 0x7fffffffc370 ?— 0
0b:0058+008 0x7fffffffc328 —? 0x5555555553bc ?— mov eax, 0
0c:0060+010 0x7fffffffc330 ?— 'welcome to WuCup !'
0d:0068+018 0x7fffffffc338 ?— 'to WuCup !'
0e:0070+020 0x7fffffffc340 ?— 0x555555002120 /* ' !' */
0f:0078+028 0x7fffffffc348 —? 0x7fffffffc460 ?— 1
10:0080+030 0x7fffffffc350 ?— 0
11:0088+038 0x7fffffffc358 ?— 0x4d8fe1de9078d800
12:0090+040 0x7fffffffc360 —? 0x7fffffffc370 ?— 0
13:0098+048 0x7fffffffc368 —? 0x5555555554a9 ?— mov eax, 0
14:00a0│+050 0x7fffffffc370 ?— 0
15:00a8│+058 0x7fffffffc378 —? 0x7ffff7df9083 (__libc_start_main+243) ?— mov edi, eax
16:00b0│+060 0x7fffffffc380 —? 0x7ffff7ffc620 (_rtld_global_ro) ?— 0x50fa700000000
17:00b8│+068 0x7fffffffc388 —? 0x7fffffffc468 —? 0x7fffffffc80b ?— '/home/a5rz/Desktop/pwn/file/pwn'
18:00c0│+070 0x7fffffffc390 ?— 0x100000000
19:00c8│+078 0x7fffffffc398 —? 0x55555555548d ?— endbr64 
1a:00d0│+080 0x7fffffffc3a0 —? 0x5555555554b0 ?— endbr64 
1b:00d8│+088 0x7fffffffc3a8 ?— 0xb19ed39ac14d0a56
1c:00e0+090 0x7fffffffc3b0 —? 0x5555555550e0 ?— endbr64 
1d:00e8+098 0x7fffffffc3b8 —? 0x7fffffffc460 ?— 1
1e:00f0+0a0 0x7fffffffc3c0 ?— 0
1f:00f8+0a8 0x7fffffffc3c8 ?— 0
20:0100+0b0 0x7fffffffc3d0 ?— 0x4e612c65464d0a56 ('V\nMFe,aN')
21:0108+0b8 0x7fffffffc3d8 ?— 0x4e613c25e1230a56
22:0110+0c0 0x7fffffffc3e0 ?— 0
...2 skipped
25:0128+0d8 0x7fffffffc3f8 ?— 1
26:0130+0e0 0x7fffffffc400 —? 0x7fffffffc468 —? 0x7fffffffc80b ?— '/home/a5rz/Desktop/pwn/file/pwn'
27:0138+0e8 0x7fffffffc408 —? 0x7fffffffc478 —? 0x7fffffffc82b ?— 'SYSTEMD_EXEC_PID=1816'
28:0140+0f0 0x7fffffffc410 —? 0x7ffff7ffe190 —? 0x555555554000 ?— 0x10102464c457f
29:0148+0f8 0x7fffffffc418 ?— 0
2a:0150+100 0x7fffffffc420 ?— 0
2b:0158+108 0x7fffffffc428 —? 0x5555555550e0 ?— endbr64 
2c:0160+110 0x7fffffffc430 —? 0x7fffffffc460 ?— 1
2d:0168+118 0x7fffffffc438 ?— 0
2e:0170+120 0x7fffffffc440 ?— 0
2f:0178+128 0x7fffffffc448 —? 0x55555555510e ?— hlt 
30:0180+130 0x7fffffffc450 —? 0x7fffffffc458 ?— 0x1c
31:0188+138 0x7fffffffc458 ?— 0x1c
32:0190│ r13 0x7fffffffc460 ?— 1
33:0198+148 0x7fffffffc468 —? 0x7fffffffc80b ?— '/home/a5rz/Desktop/pwn/file/pwn'
34:01a0│+150 0x7fffffffc470 ?— 0
35:01a8│+158 0x7fffffffc478 —? 0x7fffffffc82b ?— 'SYSTEMD_EXEC_PID=1816'
36:01b0│+160 0x7fffffffc480 —? 0x7fffffffc841 ?— 'SSH_AUTH_SOCK=/run/user/1000/keyring/ssh'
37:01b8│+168 0x7fffffffc488 —? 0x7fffffffc86a ?— 'SESSION_MANAGER=local/ubuntu:@/tmp/.ICE-unix/1816,unix/ubuntu:/tmp/.ICE-unix/1816'
38:01c0│+170 0x7fffffffc490 —? 0x7fffffffc8bc ?— 'PAPERSIZE=a4'
39:01c8│+178 0x7fffffffc498 —? 0x7fffffffc8c9 ?— 'GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/aab6f309_847c_4363_b37f_36574de33f67'
3a:01d0│+180 0x7fffffffc4a0 —? 0x7fffffffc91f ?— 'LANGUAGE=zh_CN:en_GB:en'
3b:01d8│+188 0x7fffffffc4a8 —? 0x7fffffffc937 ?— 'LANG=zh_CN.UTF-8'
3c:01e0+190 0x7fffffffc4b0 —? 0x7fffffffc948 ?— 'WAYLAND_DISPLAY=wayland-0'
3d:01e8+198 0x7fffffffc4b8 —? 0x7fffffffc962 ?— 'LC_IDENTIFICATION=zh_CN.UTF-8'
3e:01f0+1a0 0x7fffffffc4c0 —? 0x7fffffffc980 ?— 'XDG_SESSION_CLASS=user'
3f:01f8+1a8 0x7fffffffc4c8 —? 0x7fffffffc997 ?— 'XDG_CURRENT_DESKTOP=ubuntu:GNOME'
40:0200+1b0 0x7fffffffc4d0 —? 0x7fffffffc9b8 ?— 'PWD=/home/a5rz/Desktop/pwn/file'
41:0208+1b8 0x7fffffffc4d8 —? 0x7fffffffc9d8 ?— 'QT_IM_MODULE=ibus'
42:0210+1c0 0x7fffffffc4e0 —? 0x7fffffffc9ea ?— 'USER=a5rz'
43:0218+1c8 0x7fffffffc4e8 —? 0x7fffffffc9f4 ?— 'DESKTOP_SESSION=ubuntu'
44:0220+1d0 0x7fffffffc4f0 —? 0x7fffffffca0b ?— 'XDG_MENU_PREFIX=gnome-'
45:0228+1d8 0x7fffffffc4f8 —? 0x7fffffffca22 ?— 'OLDPWD=/home/a5rz/Desktop/pwn/file'
46:0230+1e0 0x7fffffffc500 —? 0x7fffffffca45 ?— 'LC_MEASUREMENT=zh_CN.UTF-8'
47:0238+1e8 0x7fffffffc508 —? 0x7fffffffca60 ?— 'DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus,guid=648017a497f89697dfa1bf47674d827a'
48:0240+1f0 0x7fffffffc510 —? 0x7fffffffcabc ?— 'LC_NUMERIC=zh_CN.UTF-8'
49:0248+1f8 0x7fffffffc518 —? 0x7fffffffcad3 ?— 'SSH_AGENT_LAUNCHER=gnome-keyring'
4a:0250+200 0x7fffffffc520 —? 0x7fffffffcaf4 ?— '_=/home/a5rz/Desktop/pwn/file/pwn'
4b:0258+208 0x7fffffffc528 —? 0x7fffffffcb16 ?— 'GTK_MODULES=gail:atk-bridge'
4c:0260+210 0x7fffffffc530 —? 0x7fffffffcb32 ?— 'VTE_VERSION=6800'
4d:0268+218 0x7fffffffc538 —? 0x7fffffffcb43 ?— 'XDG_SESSION_DESKTOP=ubuntu'
4e:0270+220 0x7fffffffc540 —? 0x7fffffffcb5e ?— 'QT_ACCESSIBILITY=1'
4f:0278+228 0x7fffffffc548 —? 0x7fffffffcb71 ?— 'GNOME_DESKTOP_SESSION_ID=this-is-deprecated'
50:0280+230 0x7fffffffc550 —? 0x7fffffffcb9d ?— 'GNOME_SETUP_DISPLAY=:1'
51:0288+238 0x7fffffffc558 —? 0x7fffffffcbb4 ?— 'LC_TIME=zh_CN.UTF-8'
52:0290+240 0x7fffffffc560 —? 0x7fffffffcbc8 ?— 'LOGNAME=a5rz'
53:0298+248 0x7fffffffc568 —? 0x7fffffffcbd5 ?— 'GNOME_TERMINAL_SERVICE=:1.112'
54:02a0│+250 0x7fffffffc570 —? 0x7fffffffcbf3 ?— 'LC_PAPER=zh_CN.UTF-8'
55:02a8│+258 0x7fffffffc578 —? 0x7fffffffcc08 ?— 'HOME=/home/a5rz'
56:02b0│+260 0x7fffffffc580 —? 0x7fffffffcc18 ?— 'GNOME_SHELL_SESSION_MODE=ubuntu'
57:02b8│+268 0x7fffffffc588 —? 0x7fffffffcc38 ?— 'XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/var/lib/snapd/desktop'
58:02c0│+270 0x7fffffffc590 —? 0x7fffffffcc7b ?— 'XMODIFIERS=@im=ibus'
59:02c8│+278 0x7fffffffc598 —? 0x7fffffffcc8f ?— 'XDG_RUNTIME_DIR=/run/user/1000'
pwndbg> ni
aaaaaaaa0x7fffffffc2af0x1(nil)0x180x18(nil)0xf7fc37d0f7fc25c00x61616161616161610x70257025702570250x70257025702570250x70257025702570250x6e696874656d6f53Something
aaaaaaaa
0x7fffffffc2af
0x1
(nil)
0x18
0x18
(nil)
0xf7fc37d0f7fc25c0
0x6161616161616161
0x70257025702570250x70257025702570250x70257025702570250x6e696874656d6f53Something

得知偏移量為8,驗證

pwndbg> run
Starting program: /home/a5rz/Desktop/pwn/file/pwn 
Please input your name: aaaaaaaa%8$pBreakpoint 2, 0x0000555555555444 in ?? ()
LEGEND: STACK | HEAP | CODE | DATA | WX | RODATA
───────────────────────────────────────[ REGISTERS / show-flags off / show-compact-regs off ]───────────────────────────────────────RAX  0RBX  0x5555555554b0 ?— endbr64 RCX  0RDX  1RDI  0x7fffffffc2e0 ?— 0x6161616161616161 ('aaaaaaaa')RSI  0x7fffffffc2af ?— 0x10000000c0a /* '\n\x0c' */R8   0x18R9   0x18R10  0x555555556008 ?— 'Please input your name: 'R11  0x246R12  0x5555555550e0 ?— endbr64 R13  0x7fffffffc460 ?— 1R14  0R15  0RBP  0x7fffffffc320 —? 0x7fffffffc360 —? 0x7fffffffc370 ?— 0RSP  0x7fffffffc2d0 ?— 0RIP  0x555555555444 ?— call 0x5555555550b0
────────────────────────────────────────────────[ DISASM / x86-64 / set emulate on ]────────────────────────────────────────────────? 0x555555555444    call   printf@plt                  <printf@plt>format: 0x7fffffffc2e0 ?— 0x6161616161616161 ('aaaaaaaa')vararg: 0x7fffffffc2af ?— 0x10000000c0a /* '\n\x0c' */0x555555555449    mov    eax, dword ptr [rip + 0x2bfd]     EAX, [0x55555555804c]0x55555555544f    sub    eax, 10x555555555452    mov    dword ptr [rip + 0x2bf4], eax0x555555555458    lea    rdi, [rip + 0xbd9]                RDI => 0x555555556038 ?— 'There will be a gift for you here . . .'0x55555555545f    call   puts@plt                    <puts@plt>0x555555555464    jmp    0x555555555472              <0x555555555472>0x555555555472    mov    eax, 0                       EAX => 00x555555555477    mov    rdx, qword ptr [rbp - 8]0x55555555547b    xor    rdx, qword ptr fs:[0x28]0x555555555484    je     0x55555555548b              <0x55555555548b>
─────────────────────────────────────────────────────────────[ STACK ]──────────────────────────────────────────────────────────────
00:0000│ rsp 0x7fffffffc2d0 ?— 0
01:0008-048 0x7fffffffc2d8 ?— 0xf7fc37d0f7fc25c0
02:0010│ rdi 0x7fffffffc2e0 ?— 0x6161616161616161 ('aaaaaaaa')
03:0018-038 0x7fffffffc2e8 ?— 0x7fff70243825
04:0020-030 0x7fffffffc2f0 ?— 0
05:0028-028 0x7fffffffc2f8 —? 0x7fffffffc300 ?— 'Something strange here'
06:0030-020 0x7fffffffc300 ?— 'Something strange here'
07:0038-018 0x7fffffffc308 ?— 'g strange here'
───────────────────────────────────────────────────────────[ BACKTRACE ]────────────────────────────────────────────────────────────? 0   0x5555555554441   0x5555555553bc2   0x5555555554a93   0x7ffff7df9083 __libc_start_main+2434   0x55555555510e
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
pwndbg> c
Continuing.
aaaaaaaa0x6161616161616161�There will be a gift for you here . . .
[Inferior 1 (process 3806) exited normally]

ebp總是指向上一個ebp,我們可以使用這個特性用第一個ebp改寫第二個ebp,再用第二個ebp作為跳板更改棧上任意地址?

pwndbg> stack 60
00:0000│ rsp 0x7fffffffc2d0 ?— 0
01:0008-048 0x7fffffffc2d8 ?— 0xf7fc37d0f7fc25c0
02:0010│ rdi 0x7fffffffc2e0 ?— 0x30 /* '0' */
03:0018-038 0x7fffffffc2e8 —? 0x7ffff7e67525 ?— cmp eax, -1
04:0020-030 0x7fffffffc2f0 ?— 0
05:0028-028 0x7fffffffc2f8 —? 0x7fffffffc300 ?— 'Something strange here'
06:0030-020 0x7fffffffc300 ?— 'Something strange here'
07:0038-018 0x7fffffffc308 ?— 'g strange here'
08:0040-010 0x7fffffffc310 ?— 0x657265682065 /* 'e here' */
09:0048-008 0x7fffffffc318 ?— 0x1fdd857982303200
0a:0050│ rbp 0x7fffffffc320 —? 0x7fffffffc360 —? 0x7fffffffc370 ?— 0
0b:0058+008 0x7fffffffc328 —? 0x5555555553bc ?— mov eax, 0
0c:0060+010 0x7fffffffc330 ?— 'welcome to WuCup !'
0d:0068+018 0x7fffffffc338 ?— 'to WuCup !'
0e:0070+020 0x7fffffffc340 ?— 0x555555002120 /* ' !' */
0f:0078+028 0x7fffffffc348 —? 0x7fffffffc460 ?— 1
10:0080+030 0x7fffffffc350 ?— 0
11:0088+038 0x7fffffffc358 ?— 0x1fdd857982303200
12:0090+040 0x7fffffffc360 —? 0x7fffffffc370 ?— 0
13:0098+048 0x7fffffffc368 —? 0x5555555554a9 ?— mov eax, 0
14:00a0│+050 0x7fffffffc370 ?— 0
15:00a8│+058 0x7fffffffc378 —? 0x7ffff7df9083 (__libc_start_main+243) ?— mov edi, eax
16:00b0│+060 0x7fffffffc380 —? 0x7ffff7ffc620 (_rtld_global_ro) ?— 0x50fa700000000
17:00b8│+068 0x7fffffffc388 —? 0x7fffffffc468 —? 0x7fffffffc80b ?— '/home/a5rz/Desktop/pwn/file/pwn'
18:00c0│+070 0x7fffffffc390 ?— 0x100000000
19:00c8│+078 0x7fffffffc398 —? 0x55555555548d ?— endbr64 
1a:00d0│+080 0x7fffffffc3a0 —? 0x5555555554b0 ?— endbr64 
1b:00d8│+088 0x7fffffffc3a8 ?— 0x3d68c2224b0eb8ed
1c:00e0+090 0x7fffffffc3b0 —? 0x5555555550e0 ?— endbr64 
1d:00e8+098 0x7fffffffc3b8 —? 0x7fffffffc460 ?— 1
1e:00f0+0a0 0x7fffffffc3c0 ?— 0
1f:00f8+0a8 0x7fffffffc3c8 ?— 0
20:0100+0b0 0x7fffffffc3d0 ?— 0xc2973dddcc0eb8ed
21:0108+0b8 0x7fffffffc3d8 ?— 0xc2972d9d6b60b8ed
22:0110+0c0 0x7fffffffc3e0 ?— 0
...2 skipped
25:0128+0d8 0x7fffffffc3f8 ?— 1
26:0130+0e0 0x7fffffffc400 —? 0x7fffffffc468 —? 0x7fffffffc80b ?— '/home/a5rz/Desktop/pwn/file/pwn'
27:0138+0e8 0x7fffffffc408 —? 0x7fffffffc478 —? 0x7fffffffc82b ?— 'SYSTEMD_EXEC_PID=1816'
28:0140+0f0 0x7fffffffc410 —? 0x7ffff7ffe190 —? 0x555555554000 ?— 0x10102464c457f
29:0148+0f8 0x7fffffffc418 ?— 0
2a:0150+100 0x7fffffffc420 ?— 0
2b:0158+108 0x7fffffffc428 —? 0x5555555550e0 ?— endbr64 
2c:0160+110 0x7fffffffc430 —? 0x7fffffffc460 ?— 1
2d:0168+118 0x7fffffffc438 ?— 0
2e:0170+120 0x7fffffffc440 ?— 0
2f:0178+128 0x7fffffffc448 —? 0x55555555510e ?— hlt 
30:0180+130 0x7fffffffc450 —? 0x7fffffffc458 ?— 0x1c
31:0188+138 0x7fffffffc458 ?— 0x1c
32:0190│ r13 0x7fffffffc460 ?— 1
33:0198+148 0x7fffffffc468 —? 0x7fffffffc80b ?— '/home/a5rz/Desktop/pwn/file/pwn'
34:01a0│+150 0x7fffffffc470 ?— 0
35:01a8│+158 0x7fffffffc478 —? 0x7fffffffc82b ?— 'SYSTEMD_EXEC_PID=1816'
36:01b0│+160 0x7fffffffc480 —? 0x7fffffffc841 ?— 'SSH_AUTH_SOCK=/run/user/1000/keyring/ssh'
37:01b8│+168 0x7fffffffc488 —? 0x7fffffffc86a ?— 'SESSION_MANAGER=local/ubuntu:@/tmp/.ICE-unix/1816,unix/ubuntu:/tmp/.ICE-unix/1816'
38:01c0│+170 0x7fffffffc490 —? 0x7fffffffc8bc ?— 'PAPERSIZE=a4'
39:01c8│+178 0x7fffffffc498 —? 0x7fffffffc8c9 ?— 'GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/aab6f309_847c_4363_b37f_36574de33f67'
3a:01d0│+180 0x7fffffffc4a0 —? 0x7fffffffc91f ?— 'LANGUAGE=zh_CN:en_GB:en'
3b:01d8│+188 0x7fffffffc4a8 —? 0x7fffffffc937 ?— 'LANG=zh_CN.UTF-8'

怎么在不知道基地址的情況下一次修改返回地址并且修改一個內存???這怎么可能

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/web/62138.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/62138.shtml
英文地址,請注明出處:http://en.pswp.cn/web/62138.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

selenium-常見問題解決方案匯總

selenium-常見問題解決方案 selenium版本selenium代理本地瀏覽器頁面Selenium之多窗口句柄的切換 selenium版本 selenium版本為: 3.141.0 注&#xff1a;selenium4x跟selenium3x會有不同的使用方法&#xff0c; selenium代理本地瀏覽器頁面 利用 Selenium 庫實現對 Google C…

Flask使用長連接

Flask使用flask_socketio實現websocket Python中的單例模式 在HTTP通信中&#xff0c;連接復用&#xff08;Connection Reuse&#xff09;是一個重要的概念&#xff0c;它允許客戶端和服務器在同一個TCP連接上發送和接收多個HTTP請求/響應&#xff0c;而不是為每個新的請求/響…

雨晨 26100.2454 Windows 11 24H2 專業工作站 極簡純凈版

文件: 雨晨 26100.2454 Windows 11 24H2 專業工作站極簡 install.esd 大小: 1947043502 字節 修改時間: 2024年12月6日, 星期五, 16:38:37 MD5: 339B7FDCA0130D432A0E98957738A9DD SHA1: 2978AE0CEAF02E52EC4135200D4BDBC861E07BE8 CRC32: 8C329C89 簡述&#xff1a; 由YCDIS…

[docker中首次配置git環境與時間同步問題]

11月沒寫東西&#xff0c;12月初趕緊水一篇。 剛開始搭建docker服務器時&#xff0c;網上找一堆指令配置好git后&#xff0c;再次新建容器后忘記怎么配了&#xff0c;&#xff0c;這次記錄下。 一、git ssh指令法&#xff0c;該方法不用每次提交時輸入密碼 前期準備&#xff0…

MongoDB性能監控工具

mongostat mongostat是MongoDB自帶的監控工具&#xff0c;其可以提供數據庫節點或者整個集群當前的狀態視圖。該功能的設計非常類似于Linux系統中的vmstat命令&#xff0c;可以呈現出實時的狀態變化。不同的是&#xff0c;mongostat所監視的對象是數據庫進程。mongostat常用于…

linux下的python打包

linux下的python打包 一、pyinstaller 優點&#xff1a;打包簡單&#xff0c;將整個運行環境進行打包 缺點&#xff1a;打包文件大、臃腫、啟動慢 安裝pyinstaller包 pip install pyinstaller 打包一個文件 pyinstaller -D app.py會在當前路徑中生成build、dist文件夾還有…

Python模塊之random、hashlib、json、time等內置模塊語法學習

Python內置模塊語法學習 random、hashlib、json、time、datetime、os等內置模塊語法學習 模塊 簡單理解為就是一個.py后綴的一個文件 分為三種&#xff1a; 內置模塊&#xff1a;python自帶&#xff0c;可調用第三方模塊&#xff1a;別人設計的&#xff0c;可調用自定義模塊…

從ctfwiki開始的pwn之旅 5.ret2csu

ret2csu 原理 在 64 位程序中&#xff0c;函數的前 6 個參數是通過寄存器傳遞的&#xff0c;但是大多數時候&#xff0c;我們很難找到每一個寄存器對應的 gadgets。 這時候&#xff0c;我們可以利用 x64 下的 __libc_csu_init 中的 gadgets。這個函數是用來對 libc 進行初始…

Ceph對象存儲

Ceph對象存儲1.概念對象存儲&#xff08;Object Storage&#xff09;是一種用于存儲大量非結構化數據的架構模型它使用簡單的HTTP或HTTPS協議進行文件訪問&#xff0c;而不是傳統的文件系統API與傳統的文件系統存儲方式不同&#xff0c;對象存儲不是將數據存儲在目錄或文件夾中…

嵌入式藍橋杯學習拓展 LCD翻轉顯示

通過配置SS和GS兩個標志位&#xff0c;實現掃描方向的切換。 將lcd.c的REG_932X_Init函數進行部分修改。 將LCD_WriteReg(R1, 0x0000);修改為LCD_WriteReg(R1,0x0100); 將LCD_WriteReg(R96, 0x2700); 修改為LCD_WriteReg(R96, 0xA700); void REG_932X_Init1(void) {LCD_Wr…

小程序 —— Day1

組件 — view和scroll-view view 類似于HTML中的div&#xff0c;是一個塊級元素 案例&#xff1a;通過view組件實現頁面的基礎布局 scroll-view 可滾動的視圖區域&#xff0c;用來實現滾動列表效果 案例&#xff1a;實現縱向滾動效果 scroll-x屬性&#xff1a;允許橫向滾動…

git pull error: cannot lock ref

Git: cannot lock ref ‘refs/remotes/origin/feature/xxx’: refs/remotes/origin/feature/xxx/car’ exists; cannot create refs/remotes/origin/feature/xxx git remote prune origin重新整理服務端和本地的關聯關系即可

pubmed關鍵詞搜索技能1:待更新

1&#xff0c;白話變為領域內學術詞&#xff1a; 例如&#xff0c;我想要做蛋白質糖基化修飾以功能&#xff0c;這個領域課題&#xff0c;則 第一性原理&#xff0c;首先是拆分詞匯&#xff1a;糖基化&#xff08;一般比蛋白質、修飾、功能要在title中更常見&#xff0c;或者是…

iPhone手機清理軟件:相冊清理大師推薦

隨著智能手機成為我們日常生活的必需品&#xff0c;手機中的數據日益膨脹&#xff0c;尤其是照片和視頻這類容易積累的文件。對于iPhone用戶來說&#xff0c;管理這些文件&#xff0c;特別是清理相冊變得尤為重要。本文將介紹一款備受推崇的iPhone手機清理軟件——CleanMyPhone…

SpringBoot 開源停車場管理收費系統

一、下載項目文件 下載源碼項目文件口令&#xff1a; 【前端小程序地址】(3.0)&#xff1a;伏脂火器白澤知洞座/~6f8d356LNL~:/【后臺管理地址】(3.0)&#xff1a;伏脂火器仇恨篆洞座/~0f4a356Ks2~:/【崗亭端地址】(3.0)&#xff1a;動作火器智匯堂多好/~dd69356K6r~:/復制口令…

網絡原理之 TCP 協議

目錄 1. TCP 協議格式 2. TCP 原理 (1) 確認應答 (2) 超時重傳 (3) 連接管理 a) 三次握手 b) 四次揮手 (4) 滑動窗口 (5) 流量控制 (6) 擁塞控制 (7) 延時應答 (8) 捎帶應答 3. TCP 特性 4. 異常情況的處理 1) 進程崩潰 2) 主機關機 (正常流程) 3) 主機掉電 (…

STM32使用RCC(Reset Clock Contorl,復位時鐘控制器)配置時鐘以及時鐘樹

RCC主要作用 設置系統時鐘SYSCLK&#xff08;System Clock&#xff09;頻率&#xff1b;設置AHB、APB2、APB1以及各個外設分頻因子&#xff0c;從而設置HCLK、PCLK2、PCLK1以及各個外設的時鐘頻率&#xff1b;控制AHB、APB2、APB1這三條總線時鐘以及每個外設的時鐘開啟&#xf…

安防視頻監控平臺Liveweb視頻匯聚管理系統管理方案

智慧安防監控Liveweb視頻管理平臺能在復雜的網絡環境中&#xff0c;將前端設備統一集中接入與匯聚管理。國標GB28181協議視頻監控/視頻匯聚Liveweb平臺可以提供實時遠程視頻監控、視頻錄像、錄像回放與存儲、告警、語音對講、云臺控制、平臺級聯、磁盤陣列存儲、視頻集中存儲、…

PostGIS的歷史發展

自從 GIS 軟件開發以來&#xff0c;ShapeFile等格式被廣泛用于存儲空間數據&#xff0c;但這些文件格式文件需要特殊的軟件才能讀取和寫入&#xff0c;并發用戶可能會導致數據損壞和速度變慢&#xff0c;并且復雜的問題需要復雜的軟件來處理。 因此&#xff0c;對多用戶的支持、…

【目標跟蹤】AntiUAV600數據集詳細介紹

AntiUAV600數據集的提出是為了適應真實場景&#xff0c;即無人機可能會隨時隨地出現和消失。目前提出的Anti-UAV任務都只是將其看做與跟蹤其他目標一樣的任務&#xff0c;沒有結合現實情況考慮。 論文鏈接&#xff1a;https://arxiv.org/pdf/2306.15767https://arxiv.org/pdf/…