Skip to main content

Interactive environment for crafting shellcodes. Also, it just can be used as a simple assembler/disassembler

Project description

# Shellen

## General
Shellen is an interactive shellcoding environment. If you want a handy tool to write shellcodes, then shellen may be your friend. Also, it can be used just as assembly/disassembly tool.

It uses [keystone](https://github.com/keystone-engine/keystone) and [capstone](https://github.com/aquynh/capstone) engines for all provided operations.

## Installing
Just clone this repo and see the chapter ```How to run```.
```sh
git clone https://github.com/merrychap/shellen.git
cd ./shellen
```
In the future it will be changed on ```pip```.

## How to run:
To run shellen just type the next in your terminal:
```sh
$ python3 main.py
```
There is ```help``` command inside the tool, that will explain almost everything.

## Features
Shellen was created for assembling and disassembling instructions, so there are two modes of using the tool: **asm** and **dsm** respectively. Of course, there are some other possibilities.

### Prompt
It also has a usefull prompt, displaying current mode and chosen architecture exactly for this mode. It looks as follows:
```
asm:x86_32 >
```
You can edit your input like you're typing in a terminal. Also, it has a history of commands (just type up arrow to see them).

To change current mode, enter ```asm``` or ```dsm``` in the prompt.
```
dsm:arm32 > asm

[+] Changed to asm (assembly) mode

asm:x86_32 > dsm

[+] Changed to dsm (disassembly) mode

dsm:arm32 >
```

### Assembling
To assembly instuctions, type them separated by colons as follows:
```
asm:x86_32 > mov edx, eax; xor eax, eax; inc edx; int 80;
[+] Bytes count: 7
Raw bytes: "\x89\xc2\x31\xc0\x42\xcd\x50"
Hex string: "89c231c042cd50"
```
If your assembled bytes contain a null byte, then shellen will tell you about this.

### Disassembling
It works exactly as assembling. Type your bytes in the input prompt and see the result!
```
dsm:x86_32 > 89c231c042cd50
0x00080000: mov edx, eax
0x00080002: xor eax, eax
0x00080004: inc edx
0x00080005: int 0x50
```

### Architectures
```asm``` and ```dsm``` modes work for different architectures. To see a list of available architectures for a current mode, type this:
```
dsm:x86_32 > archs
┌────────┬────────┬─────────┬─────────┬────────┐
│ │ │ │ │ │
│ arm32 │ mips32 │ sparc32 │ systemz │ x86_16 │
│ arm64 │ mips64 │ sparc64 │ │ x86_32 │
│ arm_tb │ │ │ │ x86_64 │
└────────┴────────┴─────────┴─────────┴────────┘
```

And if you want to change current architecture, enter follow:
```
dsm:x86_32 > setarch arm32

[+] Architecture of dsm changed to arm32
```

### Base commands
Command | Description
------- | -----------
```clear``` | Clear the terminal screen. As usual ```cls``` on Windows or ```clear``` on *nix systems.
```help``` | Show the help message.
```quit,q,exit``` | Finish the current session and quit


## Requirements
- [keystone](https://github.com/keystone-engine/keystone)
- [capstone](https://github.com/aquynh/capstone)
- [colorama](https://github.com/tartley/colorama)
- [termcolor](https://pypi.python.org/pypi/termcolor)
- [terminaltables](https://github.com/Robpol86/terminaltables)


## TODO
- [ ] Syscalls lists
- [ ] Database of common shellcodes

## Pictures
Just a little bunch of pictures

Example of using the tool.
<p align="center">
<img src="screens/use.png">
</p>

Help screen.
<p align="center">
<img src="screens/help.png">
</p>

Architecture tables.
<p align="center">
<img src="screens/tables.png">
</p>


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shellen-0.0.10.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shellen-0.0.10-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file shellen-0.0.10.tar.gz.

File metadata

  • Download URL: shellen-0.0.10.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for shellen-0.0.10.tar.gz
Algorithm Hash digest
SHA256 8339d7c2daa452453e033f849c598cabd6f066e677c5ab08046674f407130f6d
MD5 0492cb651de37746607ad97bd400fcf9
BLAKE2b-256 cbaf8c44755fe6e4c37f1a8184cd51499e557630a401c2b1c008aa5ebbe2abe2

See more details on using hashes here.

File details

Details for the file shellen-0.0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for shellen-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 4fb746a0f5dca84c8026ff0c284ff17b0f767d7f9c9d32654b8eee80ebe49884
MD5 e96d89a0bfba1795b55b2872e4a52d9b
BLAKE2b-256 cdff04222b46784e374c252085a3ac6f069df8d2ac719e9d338e125b9f7cf2c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page