• Stars
    star
    112
  • Rank 312,240 (Top 7 %)
  • Language
    Perl
  • License
    GNU General Publi...
  • Created over 10 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Converts Machine Code to x86 (32-bit) Linux executable (auto-wrapping with ELF headers)

m2elf

Converts Machine Code to x86 (32-bit) Linux executable (auto-wrapping with ELF headers). This script comes included in Remnux v6

Command Usage

Options:
--in (input file)
--out (output file)
--binary (if the input is already binary form)
--mem (bytes)
--entry (This changes the entry point, it adds to the offset whichever decimal number is provided)
--writeover - changes the r-x of the .text to rwx; now you can have self modifying codes

m2elf --in source_file.m --out executable_file --mem 100

Example Source Files

  • hello.m - written in machine code, prints hello world. Use --mem 16
  • hello.b - same as above, but written in pure 1's and 0's :)
  • Spawnshell.m - shellcode from: http://phrack.org/issues/49/14.html#article, the difference with this .m file is that each instruction is commented. To get this to actually run, the --writeover argument must be used.

Source File Syntax

The source file can include ascii hex and binary byte by byte. Spacing between hex bytes not a requirment, but could reduce bugs (4 hex bytes could look like binary to m2elf if the hex is only 1's and 0's). In order for a binary byte to be interpreted as such, it needs to be a series of 8 1's and 0's preceded by an underscore, i.e. _01011000

Valid comments include #, //, ', and --

More Repositories

1

irasm

Interactive Redundant Assembler (shell)
Ruby
96
star
2

Learn

Learn the very basics of different languages
Assembly
48
star
3

tronsolitare

Bootable 512 byte OS that is a game
Assembly
24
star
4

Explosive-Steganography

Explosive Steganography tools and presentation (as given at the HOPE number 9 conference)
Perl
21
star
5

8ball

8ball
Perl
18
star
6

YouFLATE

An interactive tool that allows you to DEFLATE (compress) data using your own length-distance pairs, not merely the most efficient ones as is default with DEFLATE.
Perl
8
star
7

ARMaHYDAN

A tool for manipulating 'optional' bits in ARM processor instructions.
Perl
5
star
8

BootToLife

Game of Life as implemented in a 512 MBR image
Assembly
4
star
9

BootGenie

Patches for Boot Sector Games for Cheating
4
star
10

Tumor

Tumor
4
star
11

mcurses

A curses like library that 'draws' in memory instead of stdout
C
4
star
12

lightsout

A LightsOut MBR clone
Assembly
3
star
13

2600-Roulette

Tour random 2600 meetings, together
Python
3
star
14

CactusCon2017

Assembly
2
star
15

BootSlide

Boot Sector version of the 15 number slider puzzle
Assembly
2
star
16

tcpunmask

tcpunmask
Perl
2
star
17

ImmSuggest

Suggests a series of MOV and ADD instructions to use to get any 32-bit value into a register with Imm12 ARM encodings
Assembly
2
star
18

MinecraftPing

Harvesting ping responses from minecraft servers
Perl
1
star
19

RogueRouting

A helpful routing script for the rogue-like boot sector game BootRogue
Python
1
star
20

unimpress

Terminal slide software
Perl
1
star
21

BootMage

Companion gdb script to bootRogue, the rogue-like boot sector game
Assembly
1
star
22

VLC-History

A set of perl scripts letting me search the full history of video's I've watched in VLC
1
star
23

colors

Boot sector program that displays all color modes
Assembly
1
star
24

ThumbSlicer

Slice Thumbs
Python
1
star
25

toeknife

Carves partial DEFLATE data
Python
1
star