webinterface to bash

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bernhard Kuemel

    webinterface to bash

    Hi!

    To relief the problems of accessing a unix machine from behind a
    restrictive firewall or from an internet cafe I started to make a
    PHP web interface to bash. I'd like to hear your opinions and
    advice about my concept, especially regarding security.

    There is already such a thing
    (http://www.rohitab.com/cgiscripts/cgitelnet.html). However, it
    lacks interactive input to programs. To fix this I'd use a frame
    that displays the output of login, which turns into a shell that
    will run our commands. The whole session output will be a single
    http page. The input will be through a form in the small bottom
    frame which will be forwarded by a PHP script through a unix
    socket to the output PHP script. The output script uses
    proc_open() to start login and forwards the data from the input
    script through a pipe to login, bash and whatever command is
    running. Data from the bash output pipe is sent to the web browser.

    The input script will use stream_select() to wait for any data
    from the IPC socket or the bash output pipe.

    The script that defines the frames creates the socket in the file
    system and pass its name to the input/output scripts via URL
    parameter. It also generates a secret which the IO scripts use to
    authenticate themselves in the unix socket IPC. I believe without
    that any evil process could send commands to the output script.

    Of course the session must be encrypted with SSL. If no SSL
    certificate is bought from a certificate authority then IMO it
    should be possible and secure to make a certificate and compare
    its fingerprint with a copy on a small paper in a wallet.

    What do you think?

    Bernhard

    --
    Webspace; Low end Serverhousing ab 15 e, etc.: http://www.bksys.at
    Linux Admin/Programmierer: http://bksys.at/bernhard/services.html

  • Matt H

    #2
    Re: webinterface to bash

    On Wed, 17 Dec 2003 23:43:26 +0100, Bernhard Kuemel wrote:
    [color=blue]
    > Hi!
    >
    > To relief the problems of accessing a unix machine from behind a
    > restrictive firewall or from an internet cafe I started to make a
    > PHP web interface to bash. I'd like to hear your opinions and
    > advice about my concept, especially regarding security.[/color]

    Might I suggest MindTerm: http://www.mindbright.se/mindterm/, it's an ssh
    client java applet.

    Saves a lot of work on your part too. :)

    Comment

    • Jochem Huhmann

      #3
      Re: webinterface to bash

      Matt H <nntp@cox.net > writes:
      [color=blue]
      > On Wed, 17 Dec 2003 23:43:26 +0100, Bernhard Kuemel wrote:
      >[color=green]
      >> Hi!
      >>
      >> To relief the problems of accessing a unix machine from behind a
      >> restrictive firewall or from an internet cafe I started to make a
      >> PHP web interface to bash. I'd like to hear your opinions and
      >> advice about my concept, especially regarding security.[/color]
      >
      > Might I suggest MindTerm: http://www.mindbright.se/mindterm/, it's an ssh
      > client java applet.[/color]

      PhpShell or MyShell aren't that bad either.

      Information about Enlightenment, a Window Manager for Linux, LaTeX, a text formatting system, GIMPS, the Great Internet Mersenne Prime Search, PHP, a server-side scripting language and computers in general. Spiced up with my daily stories and experiences.


      Jochem

      --
      "A designer knows he has arrived at perfection not when there is no
      longer anything to add, but when there is no longer anything to take
      away." - Antoine de Saint-Exupery

      Comment

      • Måns Rullgård

        #4
        Re: webinterface to bash

        Matt H <nntp@cox.net > writes:
        [color=blue]
        > On Wed, 17 Dec 2003 23:43:26 +0100, Bernhard Kuemel wrote:
        >[color=green]
        >> Hi!
        >>
        >> To relief the problems of accessing a unix machine from behind a
        >> restrictive firewall or from an internet cafe I started to make a
        >> PHP web interface to bash. I'd like to hear your opinions and
        >> advice about my concept, especially regarding security.[/color]
        >
        > Might I suggest MindTerm: http://www.mindbright.se/mindterm/, it's an ssh
        > client java applet.
        >
        > Saves a lot of work on your part too. :)[/color]

        The problem is if the client side is behind a firewall that doesn't
        allow outgoing ssh connections. I've been in places where the only
        contact with the outside was through an HTTP proxy. In such cases, it
        might be possible to make the proxy believe you are connecting to an
        https server and run ssh that way. I've never tried it though.

        --
        Måns Rullgård
        mru@kth.se

        Comment

        Working...