Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic RISCV64 shellcraft support #2322

Merged
merged 8 commits into from
Mar 29, 2024

Conversation

peace-maker
Copy link
Member

Add the minimum shellcraft templates to be able to use the generated linux syscall templates under RISCV64.

The mov template isn't 100% null-byte and newline free for all inputs yet. Larger values are just emitted using the li pseudo-instruction by the assembler which might contain null-bytes. The ecall instruction to trigger syscalls contains null-bytes and we'd need some encoder to get around that.

peace-maker and others added 8 commits December 30, 2023 23:03
The `mov` template isn't 100% null-byte and newline free
for all inputs. Certain larger values are just emitted using
the `li` pseudo-instruction by the assembler which might
contain null-bytes.

Co-authored-by: LevitatingLion <[email protected]>
diet-libc doesn't support RISCV, so borrow from musl.
Need to consider their license.
@peace-maker
Copy link
Member Author

This worked for me for a while so I'll merge and gather feedback when other start using it.

@peace-maker peace-maker merged commit cb54085 into Gallopsled:dev Mar 29, 2024
12 checks passed
@peace-maker peace-maker deleted the riscv_shellcraft branch March 29, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant