GithubHelp home page GithubHelp logo

y11en / emoji-shellcoding Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rischardv/emoji-shellcoding

0.0 0.0 0.0 39 KB

🤩 Emoji shellcoding tools for RISC-V (32-bit and 64-bit)

License: Other

Shell 4.91% C++ 26.10% Python 20.20% C 11.43% Assembly 21.42% Makefile 14.33% CMake 0.63% M4 0.87% GDB 0.12%

emoji-shellcoding's Introduction

RISC-V: Emoji Shellcoding 🙂

By Hаdrien Ваrrаl and Georges-Axel Jaloyan

This work has been presented at DEFCON30 (slides)

Overview

This tool ⚒️ helps design RISC-V (both 32-bit and 64-bit) shellcodes capable of running arbitrary code, whose ASCII binary representation use only Unicode UTF-8 emojis 🤯.

It consists of an emoji unpacker. For any target shellcode (non-emoji), the tool will produce an emoji shellcode with the unpacker and the packed version of your shellcode. Run it on a RISC-V simulator/cpu and enjoy!

For a general introduction on RISC-V shellcoding, you may read the blog post by Thomas Karpiniec.

You can find our previous work on RISC-V alphanumeric shellcoding here: https://github.com/RischardV/riscv-alphanumeric-shellcoding.

Folder contents:

  • qemu: Full source code and prebuilt binary for the baremetal QEMU demo
  • esp32: Demos running on the Espressif ESP32-C3 board
  • hifiveu: Demos running on the HiFive-Unleashed board
  • payload: Source code of the payloads used
  • block: How we generated the available instructions
  • nopsled: The source code of our ⛔🛷 nopsled
  • scripts: Various helpers

Quick-try

Building the shellcodes requires to build a RISC-V toolchain from source. We only provide easy-to-test pre-built QEMU baremetal shellcodes.

The only prerequisite is having a RISC-V QEMU v6.0.0 or newer https://www.qemu.org/. On Ubuntu 22.04, you can install it using apt install qemu-system-misc.

Then:

  • cd emoji-shellcoding/qemu/prebuilt
  • cat shellcode.bin (optional, to print the shellcode. Open it in your favorite editor if your console does not support emojis)
  • ./launch_prebuilt use Ctrl+C to exit

Building && Testing

Start by cloning the repository:

git clone https://github.com/RischardV/emoji-shellcoding.git
cd emoji-shellcoding

Prerequisites:

On Ubuntu 22.04:

apt install build-essential gcc-riscv64-linux-gnu gcc-riscv64-unknown-elf qemu-system-misc m4

QEMU bare-metal shellcodes

  • Build the instructions lists (takes some time)
    • cd emoji-shellcoding/block
    • make
  • Build the shellcodes
    • cd emoji-shellcoding/qemu
    • make
  • Run the shellcodes
    • cd emoji-shellcoding/qemu
    • cat out/shellcode.bin (optional, to print the shellcode)
    • ./l use Ctrl+C to exit Expected results: The string "Hello, world!" should print on the screen.

Espressif ESP32-C3 shellcodes

Prerequisites:

Running instructions are very similar to QEMU Linux shellcodes above. Refer to them.

HiFive Unleashed Linux shellcodes

Prerequisites:

Running instructions are very similar to QEMU Linux shellcodes above. Refer to them.

License

This tool is released under Apache license. See LICENSE file.

emoji-shellcoding's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.