GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  RARUN2 (1)

NAME

rarun2 - radare2 utility to run programs in exotic environments

CONTENTS

Synopsis
Description
Directives
Examples
See Also
Authors

SYNOPSIS

rarun2 [[script.rr2]]

DESCRIPTION

This program is used as a launcher for running programs with different environment, arguments, permissions, directories and overridden default filedescriptors.

The program just accepts a single argument which is the filename of the configuration file to run the program.

It is useful when you have to run a program using long arguments or pass long data to stdin or things like that usually required for exploiting crackmes :)

DIRECTIVES

The rr2 (rarun2) configuration file accepts the following directives, described as key=value entries and comments defined as lines starting with ’#’.
arg[0-3]
  set value for argument N passed to the program
aslr enable or disable ASLR
bits set 32 or 64 bit (if the architecture supports it)
chdir change directory before executing the program
chroot
  run the program in chroot. requires some previous setup
clearenv
  unset the whole environment
core set no limit the core file size
connect
  connect stdin/stdout/stderr to a socket
envfile
  set a file with lines like ‘var=value‘ to be used as env
fork used with the listen option, allow to spawn a different process for each connection. Ignored when debugging.
input set string to be passed to the program via stdin
libpath
  override path where the dynamic loader will look for shared libraries
listen
  bound stdin/stdout/stderr to a listening socket
maxstack
  set the maximum size for the stack
maxproc
  set the maximum number of processes
maxfd set the maximum number of file descriptors
nice set the niceness level of the process
preload
  preload a library (not supported on Windows, only linux,osx,bsd)
program
  path to program to be executed
r2preload
  preload with libr2, kill -USR1 to get an r2 shell or -USR2 to spawn a webserver in a thread
r2preweb
  run the webserver in a thread just at starting the r2preload
setenv
  set value for given environment variable
setegid
  set effective process group id
seteuid
  set effective process uid
setgid
  set process group id
setuid
  set process uid
sleep sleep for the given amount of seconds
stdin select file to read data from stdin
stdout
  select file to replace stdout file descriptor
system
  execute the given command
timeout
  set a timeout
unsetenv
  unset one environment variable

EXAMPLES

Sample rarun2 script

$ cat foo.rr2
#!/usr/bin/rarun2
program=./pp400
arg0=10
stdin=foo.txt
chdir=/tmp
clearenv=true
setenv=EGG=eggsy
setenv=NOFUN=nogames
unsetenv=NOFUN
# EGG will be the only env variable
#chroot=.
./foo.rr2

Connecting a program to a socket

$ nc -l 9999
$ rarun2 program=/bin/ls connect=localhost:9999

Debugging a program redirecting io to another terminal

## open a new terminal and type ’tty’ to get
$ tty ; clear ; sleep 999999
/dev/ttyS010
## in another terminal run r2
$ r2 -d /bin/ls -e dbg.profile=foo.rr2
$ cat foo.rr2
#!/usr/bin/rarun2
stdio=/dev/ttys010

SEE ALSO

radare2(1), rahash2(1), rafind2(1), rabin2(1), radiff2(1), ragg2(1), rasm2(1),

AUTHORS

Written by pancake <pancake@nopcode.org>

Search for    or go to Top of page |  Section 1 |  Main Index


Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.