Toyosi Oyinloye
Ret-gadgets in RISC-V-based Binaries Resulting in Traps for Hijackers
Oyinloye, Toyosi; Speakman, Lee; Eze, Thaddeus
Abstract
The presence of instructions within executable programs is what makes the binaries executable. However, attackers leverage on the same to achieve some form of Control Flow Hijacking (CFH). Such code re-use attacks have also been found to lead to Denial of Service (DoS). An example of code re-use attack is Return Oriented Programming (ROP) which is caused by passing input crafted as chained sequences of instructions that are already existing as subroutines in the target program. The instructions are called gadgets and they would normally end with ret. The ret instructions enable the flow of hijacked execution from one set of instruction to another within the attacker’s control. There could however be exceptions depending on the structure of the chained gadgets where the chained gadget fails to run its course due to inability of specific gadgets to replace the value in the return address (ra) register. The dangers of chained gadgets are not a new idea but the possibility for an attacker’s gadget chain to fall into a trap during a ROP attack is not commonly addressed. In addition to this, recent studies have revealed that understanding the behaviours of gadgets would be useful for building information base in training machine learning (ML) models to combat ROP. This study explains the behaviour of certain ROP gadgets showing the possibility of occurrence of a loop in execution during exploitation. A sample program which accesses gadgets from the GNU C library (glibc) is used to demonstrate the findings. Gadgets identified with this possibility are poor for chaining as they do not contain instructions to load or move new values to the ra register and would produce unreliable exploits. This would result in a trap for the chained gadgets instead of arbitrary code execution, and DoS on the path of the user. This implies that the impact that a ROP chain could have on a targeted process does not only rely on the underlying system architecture but also relies on the structure of the chained gadget. In this paper, the RISC-V architecture is the focus, new gadget finders (scripts are available) are presented, and sample of chained gadgets are analysed on a RISC-V-based binary.
Presentation Conference Type | Conference Paper (published) |
---|---|
Conference Name | 18th International Conference on Cyber Warfare and Security |
Start Date | Mar 9, 2023 |
End Date | Mar 10, 2023 |
Acceptance Date | Jan 5, 2023 |
Online Publication Date | Feb 28, 2023 |
Publication Date | Mar 9, 2023 |
Deposit Date | Mar 12, 2025 |
Publicly Available Date | Mar 14, 2025 |
Journal | International Conference on Cyber Warfare and Security |
Print ISSN | 2048-9889 |
Electronic ISSN | 2048-9870 |
Publisher | Academic Conferences and Publishing International |
Peer Reviewed | Peer Reviewed |
Volume | 18 |
Issue | 1 |
Pages | 291-299 |
DOI | https://doi.org/10.34190/iccws.18.1.968 |
Keywords | RISC-V; Return Oriented Programming; Denial of Service; Ret-gadgets; Code-reuse; Control Flow Hijack |
Files
Published Version
(1.1 Mb)
PDF
Publisher Licence URL
http://creativecommons.org/licenses/by-nc-nd/4.0/
You might also like
Looping in OLSRv2 in Mobile Ad-Hoc Networks, Loop Suppession and Loop Correction
(2009)
Journal Article
Factors Amplifying or Inhibiting Cyber Threat Intelligence Sharing
(2024)
Presentation / Conference Contribution
An analysis of loop formation in OLSRv2 in ad-hoc networks and limiting its negative impact
(2008)
Presentation / Conference Contribution
Policing The Cyber Threat: Exploring the Threat from Cyber Crime and the Ability of Local Law Enforcement to Respond
(2018)
Presentation / Conference Contribution
Downloadable Citations
About USIR
Administrator e-mail: library-research@salford.ac.uk
This application uses the following open-source libraries:
SheetJS Community Edition
Apache License Version 2.0 (http://www.apache.org/licenses/)
PDF.js
Apache License Version 2.0 (http://www.apache.org/licenses/)
Font Awesome
SIL OFL 1.1 (http://scripts.sil.org/OFL)
MIT License (http://opensource.org/licenses/mit-license.html)
CC BY 3.0 ( http://creativecommons.org/licenses/by/3.0/)
Powered by Worktribe © 2025
Advanced Search