Git Product home page Git Product logo

sc2elf's Introduction

sc2elf

Simple dotnet Native AOT app that uses [LibObjectFile] to convert shellcode to ELF.
Both 32-bit and 64-bit (x86, x64) shellcode is supported -> resulting in 32-bit or 64-bit ELF.
[Releases] are compiled for both linux-x64 and win-x64.

Description

It is compiled to Native AOT format to demonstrate how awesome it is (still, it was a pain as some dependency uses reflection that gets trimmed if we won't trick it :D). The [release] binaries available to download are native binaries without any dotnet dependency! (so just run and enjoy)

Native AOT compiled, using dotnet SDK 8.0.100-preview.3.23178.7
Dotnet SDK 8+ was chosen because of producing much smaller binaries.

Native AOT compilation is supported from the dotnet 7 version. If you want to use dotnet 7 for building, modify the project file to target net7.0 -> building is much easier for dotnet 7.

Building on Windows using dotnet SDK 8+:

Pretty easy:

  • Install or update to the latest Visual Studio (preview).
  • Install dotnet 8+ SDK.
  • Open .sln and restore nugets (LibObjectFile, CommandLineParser) -> should be automatic if you configured the nuget URL.
  • VS Terminale - "dotnet publish -r win-x64 -c Release"

Building on Linux using dotnet SDK 8+:

  • I don't wanna talk about it; just use the release binaries :) (as dotnet SDK 8+ is not available via the package manager, it is a pain in the ass)

Usage

-p, --path [Required. Path to shellcode file]

-a, --architecture [Required. Architecture: 32 or 64 (depending on the shellcode)]

-o, --offset [Optional. Start offset of the shellcode (default 0)]

--help [Display this help screen]

--version [Display version information]

Example

Convert shellcode to 32-bit ELF (shellcode Start Offset set to 66th byte):
sc2elf -a 32 -o 66 -p C:\shellcode.bin

sc2elf's People

Contributors

dump-guy avatar

Stargazers

 avatar AVA avatar  avatar  avatar Savino Basanisi avatar  avatar  avatar  avatar  avatar Tu Anh Dao avatar

Watchers

 avatar

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.