UltraDebug

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: A C D R G Y M Z X S P
公益项目,接受捐赠
查看: 2483|回复: 1
收起左侧

[CTF] 静态链接ropchain利用 inndy_rop

[复制链接]
ollydbg

主题

0

回帖

UD

新手上路

UID
14
积分
26
注册时间
2022-1-21
最后登录
1970-1-1
2023-8-14 20:45:34 | 显示全部楼层 |阅读模式
在做题拼接pop_rdi_ret这种gadget的时候经常在想,是不是能整一个程序通过拼接程序中的gadtget来达到getshell的目的。今天做题的时候终于发现了原来ROPgadget中本身就实现了这种功能。

题目来源

buuctf——pwn——inndy_rop

参考链接
  • https://blog.csdn.net/Tokameine/article/details/120168519
  • https://trustfoundry.net/2019/07/18/basic-rop-techniques-and-tricks/
题目信息

32位程序,题目提示Ubuntu16
静态链接ropchain利用 inndy_rop - ollydbg_UltraDebug

IDA中显示900+函数,大概率是静态链接,没有使用动态链接

找了一圈没有找到system函数和execve函数
静态链接ropchain利用 inndy_rop - ollydbg_UltraDebug

这一点在patchelf的时候也得到了证实
静态链接ropchain利用 inndy_rop - ollydbg_UltraDebug

溢出点在overflow函数中
静态链接ropchain利用 inndy_rop - ollydbg_UltraDebug

解题思路

自己构造ropchain,通过int 80指令中断至内核态,进而通过[[系统调用表调用execve函数getshell。

关键步骤

利用下面的命令可以自动生成本静态链接程序的利用代码。

ROPgadget --binary rop --ropchain

可以自动生成ROPChain,参考链接2可以更好的理解下面的步骤。
[Asm] 纯文本查看 复制代码
ROP chain generation
===========================================================
 
- Step 1 -- Write-what-where gadgets
 
    [+] Gadget found: 0x8050cc5 mov dword ptr [esi], edi ; pop ebx ; pop esi ; pop edi ; ret
还有更多的精彩内容,作者设置为付费后可见
UltraDebug免责声明
✅以上内容均来自网友转发或原创,如存在侵权请发送到站方邮件9003554@qq.com处理。
✅The above content is forwarded or original by netizens. If there is infringement, please send the email to the destination 9003554@qq.com handle.
回复 打印

使用道具 举报

Noshiming

主题

0

回帖

UD

新手上路

UID
345
积分
45
注册时间
2024-2-23
最后登录
1970-1-1
2025-6-17 15:41:50 | 显示全部楼层
6
回复 打印

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|站点地图|UltraDebug ( 滇ICP备2022002049号-2 滇公网安备 53032102000034号)

GMT+8, 2025-12-11 07:53 , Processed in 0.035015 second(s), 12 queries , Redis On.

Powered by Discuz X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表