ragg2 - radare2 utility to run programs in exotic environments
ragg2 [-a arch] [-b bits] [-k kernel] [-f format] [-o file]
[-i shellcode] [-I path] [-e encoder] [-B hexpairs] [-c k=v]
[-C file] [-d off:dword] [-D off:qword] [-w off:hexpair]
[-p padding] [-FOLsrxvh]
ragg2 is a frontend for r_egg, compile programs into tiny binaries for
x86-32/64 and arm.
This tool is experimental and it is a rewrite of the old rarc2 and
rarc2-tool programs as a library and integrated with r_asm and r_bin.
Programs generated by r_egg are relocatable and can be injected in a
running process or on-disk binary file.
ragg2-cc is another tool that comes with r2 and it is used to generate
shellcodes from C code. The final code can be linked with rabin2 and it
is relocatable, so it can be used to inject it on any remote process.
ragg2-cc is conceptually based on shellforge4, but only linux/osx
x86-32/64 platforms are supported.
The rr2 (ragg2) configuration file accepts the following directives,
described as key=value entries and comments defined as lines starting
with '#'.
-a arch set architecture x86, arm
-b bits 32 or 64
-k kernel windows, linux or osx
-f format select binary format (pe, elf, mach0)
-o file output file to write result of compilation
-i shellcode
specify shellcode name to be used (see -L)
-e encoder specify encoder name to be used (see -L)
-B hexpair specify shellcode as hexpairs
-c k=v set configure option for the shellcode encoder. The argument
must be key=value.
-C file include contents of file
-d off:dword
Patch final buffer with given dword at specified offset
-D off:qword
Patch final buffer with given qword at specified offset
-w off:hexpairs
Patch final buffer with given hexpairs at specified offset
-p padding Specify generic paddings with a format string.
-F autodetect native file format (osx=mach0, linux=elf, ..)
-O use default output file (filename without extension or a.out)
-I path add include path
-s show assembler code
-x execute (just-in-time)
$ cat hi.r
/* hello world in r_egg */
write@syscall(4);
exit@syscall(1);
main@global(128) {
.var0 = "hi!\n";
write(1,.var0, 4);
exit(0);
}
$ ragg2 -O -F hi.r
$ ./hi
hi!
$ cat hi.c
main() {
write(1, "Hello0, 6);
exit(0);
}
$ ragg2 hi.c
$ ./hi.c.bin
Hello
radare2(1), rahash2(1), rafind2(1), rabin2(1), rafind2(1), radiff2(1),
rasm2(1),
Written by pancake <[email protected]>.
RAGG2(1)
Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.
Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.
Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.
Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.
The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.
Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.
Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.
Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.