Giter Club home page Giter Club logo

sclauncher's Introduction

SCLauncher - Basic Shellcode Tester, Debugger and PE-File Wrapper

This program is designed to load 32-bit or 64-bit shellcode and allow for execution or debugging. In addition, it can produce executable PE files based on the desired shellcode. This can ease testing as the output binary can be used by standard reverse engineering tools (i.e. IDA Pro (even free) and debuggers).

Release binaries are available. You can view a demo of this tool on YouTube

This program provides several options for working with your shellcode:

  • You can use the -pause argument to pause this program before executing the shellcode. This allows for a debugger to be attached and breakpoints to be set. Keep in mind that there are options available to have this utility set breakpoints for you, see the -bp argument.
  • You can produce PE files from your shellcode, then disassemble or debug them as you would a normal PE file.
  • You can run the the program directly under a debugger, providing the appropriate arguments through your debuggers interface.

Executing Shellcode From a File

The only required argument is to provide the path to the file that contains your shellcode. You do that by using the -f argument. This will be copied into memory and executed. Additionally, you can use the -ep argument to adjust the entry point by X bytes. This allows for shellcode that does not begin execution at the beginning of the binary blob. Finally, -bp determines if a breakpoint should be inserted before the shellcode. This will be done through a 0xCC byte, which is an INT3. This allows you to run the program under a debugger, defining the command line arguments as appropriate. Inserting a breakpoint will allow the debugger to interrupt execution before the shellcode is executed. If you are not running under a debugger, do not insert a breakpoint as that will cause the program to crash.

Producing a PE file

You can use the -pe argument to produce a PE file that essentially wraps the shellcode. The shellcode is placed in the .text section. The entry point is defined as the beginning of the section, unless the -ep argument is used. This argument will define an offset from the beginning of the section and be used to update the PE files entry point (i.e. AddressOfEntry field). Additionally, the -64 argument can be used to generate a 64-bit PE file, likely for 64-bit shellcode. The resulting PE file can be analyzed via common reverse engineering tools such as IDA Pro, Ghidra or a debugger such as x32dbg/WinDbg/etc.

What if I have a char array?

If you have shellcode that is not already in a binary state, you can use CyberChef to convert that shellcode and download it as a file.

Here is an example of shellcode from Exploit-DB that was converted to binary content on CyberChef.

Compiling From Source

This program is intended to be compiled with the C/C++ compiler from Microsoft. You can use the Developer Command Prompt after installing the free/community version to compile using cl. An example of this command would be:

cl sclauncher.c

This will produce the exectuable sclauncher.exe.

sclauncher's People

Contributors

jstrosch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

sclauncher's Issues

shellcode

if i have the shellcode from cobalt strike how i make like your shellcode (msf)
"\x89\xe5\x83\0c\x8b\x5b"

Disable ASLR in the generated PE file

This would be a simple modification to the PE headers and allow for the PE file produced from the shellcode to be at the default image base. Could be driven by a command line argument.

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.