Slashdot Mirror


Shell Simulation Via CGI

mischi writes "CGI-Shell simulates a shell using CGI. So everybody who has a CGI-directory on a web-server, also has its own shell on it -- comparable with Telnet or SSH. That's really practical, because most webhosters don't offer a shell (for free) -- but do offer CGI. With CGI-Shell you can execute commands, copy files or just explore your webserver. Even a history and auto-completion with tabulator are included. "

62 of 332 comments (clear)

  1. Backdoors by TheGreek · · Score: 5, Interesting

    waiting to happen. Expect to see hosting providers outlaw this quickly, if they haven't done so in their ToSes already.

    1. Re:Backdoors by telecaster · · Score: 2, Funny

      the first command through your web server:

      % rm -f -r /

      I'll pass...

    2. Re:Backdoors by CaseyB · · Score: 5, Insightful

      If the users currently have the ability to FTP CGI scripts to the server and run them, then how is this is any less secure?

    3. Re:Backdoors by mobiGeek · · Score: 2, Insightful
      % rm -f -r /
      The only thing that should be affected by this is your own web account. If not, then you are paying your hosting service too much!

      If you misconfigure this thing, or leave it lying around, or make the password guessable...well, how's this different from having a buggy CGI-script or otherwise?

      --

      ...Beware the IDEs of Microsoft...

    4. Re:Backdoors by telecaster · · Score: 2, Insightful

      On your servers and mine...

      But...

      I once worked on a machine that had "nobody" with write permissions.

      I had to explain to the client that because the web server was working fine, that it didn't mean that the security and permissions were in tact.

      The admin (a windows guy) decided that since he kept getting the "permission denied" when any web page was displayed, the best thing to do was to give "all access" permissions to "nobody".

      Once again, I explained to him that unlike Windows, permissions on Linux and Unix is a bit more flexible and clearly something that shouldn't be taken lightly -- I got this glazed look, and simply fixed it all for him and told him to leave that box alone "and stick with NT".

      A CGI to do shell commands. Another thing to worry about on your customer machines...
      no thanks

    5. Re:Backdoors by gl4ss · · Score: 2, Insightful

      so?

      the user has already the right to run serverside stuff to run this, so what's the problem?

      it's not like you should as a webhoster trust the individual users of you to be competent enough to write secure cgi scripts.

      i would kinda think that people would be putting passwords on their cgi-shells, otherwise they could just as well give their ftp passes on their page as well.

      --
      world was created 5 seconds before this post as it is.
    6. Re:Backdoors by JonathanX · · Score: 2, Interesting

      Agree. This is one of the most useless things I recall ever seeing. It does have a "cool factor" to it, but I can't think of any legitimate need for it other than circumventing the native restrictions on shared hosting accounts. If you want a shell that bad, get your own server.

    7. Re:Backdoors by drive · · Score: 2, Insightful

      i'm also a UNIX user but i have to agree with some other posters that ACL's are a good thing. it's one of the MS things (yes, there aren't many) that i like.

    8. Re:Backdoors by sqlrob · · Score: 2, Interesting

      OK then if it's so easy to use how do you do this?

      Directory X:
      Group A has read
      Group B has read/write
      Group C has write
      Group D (not owner) can assign permissions
      User Z (A member of C) needs read/write

  2. web brower by Mordac · · Score: 5, Funny

    I look forward to the first web brower implimented using this CGI Shell :)

  3. Re:security? by smerritt · · Score: 5, Informative

    Well, most CGIs run as the user ID of the web server, so unless something like Apache's suEXEC is being used, this is no substitute for having genuine shell access.

    If two or more people on a server both install this, they can read and modify each other's files, etc. since the CGIs will be running as the same user.

  4. Doesn't IIS Already Have This? by Aix · · Score: 5, Funny


    GET /scripts/..%255c%255c../winnt/system32/cmd.exe?/c+ dir

    Someone always seems to be trying to run shell commands on my Apache server. I wish they would realize that Apache doesn't have this "shell" feature.

    Seriously, though, this is the most hideously insecure thing I have ever heard of.

    1. Re:Doesn't IIS Already Have This? by Gudlyf · · Score: 5, Funny
      Put this in your .htaccess file and you might get lucky and give them a taste of their own medicine:

      RedirectMatch permanent (.*)c+dir http://127.0.0.1/scripts/..%255c..%255cwinnt/syste m32/cmd.exe?/c+rundll32.exe+shell32.dll,SHExitWind owsEx%201

      --
      Trolls lurk everywhere. Mod them down.
    2. Re:Doesn't IIS Already Have This? by Q2Serpent · · Score: 2, Informative

      Oh man, that's awesome. Kudos.

      It just redirects the client making the request to try and load the given page from the local machine. Assuming that the client making the request (the worm) understands redirections, that line makes it attempt to load 127.0.0.1 (the local IIS server that the worm infected) with a URL that will exploit the local worm (hehe) and use rundll32 to shut down the client's windows machine.

      If it works, it's brilliant. I'm not sure the worm reads redirects, though. Anyone actually witness this working?

    3. Re:Doesn't IIS Already Have This? by YetAnotherDave · · Score: 2, Informative

      nope, sorry, I have yet to see a work that honors redirects...

      would be nice, tho

    4. Re:Doesn't IIS Already Have This? by langed · · Score: 3, Interesting
      As I recall, this was covered here on /. before, under vigilantism, relating to Code Red.

      Yeah it works--I got some pretty upset phone calls last year at my university, when my box had shut down an NT "corridor" machine to the scripted, dynamic "student accounts pages"... They pulled my internet connection for 3 days (it happened over a weekend) with an order to fix it before they restored my connection.

      They also threatened to bill me for their damages--an estimated $700. (I have no idea where they dreamed up that number.)

      I'm just too lazy to go find a link--there has been declared today a "low brain activity advisory" by the National Weather Service. :)

    5. Re:Doesn't IIS Already Have This? by ebonkyre · · Score: 2, Funny

      Our 404 generates a normal file not found message unless the requested page was "default.ida" or one of the other IIS exploits, in which case it sends:

      Content-type: text/plain

      Hi! How are you?
      I send you this file in order to have your advice
      See you later. Thanks

      Sadly, I'm not aware of any virii that would actually get the joke...

      --
      "Time is an abstract concept devised by carbon-based lifeforms to monitor their ongoing decay." - Thundercleese
    6. Re:Doesn't IIS Already Have This? by flonker · · Score: 2, Interesting

      I wrote something that does this (win32 only) way back when. Here it is, complete with source code. It doesn't do much anymore, as the security holes exploited by the worms have by and large been patched, without removing the worm.

    7. Re:Doesn't IIS Already Have This? by corvi42 · · Score: 2, Funny

      How's about this one:

      RedirectMatch permanent (.*)c+dir http://www.microsoft.com/scripts/..%255c..%255cwin nt/syste m32/cmd.exe?/c+rundll32.exe+shell32.dll,SHExitWind owsEx%201

      --

      There are a thousand forms of subversion, but few can equal the convenience and immediacy of a cream pie -Noel Godin
  5. Surprised... by unborracho · · Score: 2, Interesting

    I'm surprised we haven't seen this come out earlier.. it's always been practical to do, given most free ISPs offer a directory that's flagged executable.

    Kudos to these guys who developed this, but I hate to see how this is going to be exploited

    --
    "You had this look that of an angel, it was such a bad disguise" --Dishwalla
    1. Re:Surprised... by Hanno · · Score: 3, Interesting
      I'm surprised we haven't seen this come out earlier..

      I'm surprised this is considered news, since it's an age-old idea.



      Friends of mine once used a cheapo ISP who did not offer shell access, but who made the mistake of running Apache with root priviledges. They used a similar script years ago to do remote administration of their site on that mis-configured server. They never exploited the security hole, but they always thought it was funny that they had a "limited web account" yet full access to everything on the server.

      --

      ------------------
      You may like my a cappella music
  6. Simulation? by SirTwitchALot · · Score: 2, Insightful

    This doesn't sound like a shell simulation to me, this sounds like another interface to an actual shell. I doubt your hosting company would be very pleased if you installed this.

    --
    Go away, or I will replace you with a very small shell script.
  7. UID issues by Ryu2 · · Score: 5, Interesting

    Most webserver setups run under a non-priveleged UID of 'nobody' or the like... which means that normally, the web server user would not be able to access files owned by YOUR own UID. Would there be some sort of set-UID involved here?

    --
    There's 10 types of people in this world, those who understand binary and those who don't.
  8. Give me a break by Anonymous Coward · · Score: 3, Insightful

    This is such old news, these types of CGIs have been around a while. And for those worried about the security of this - give me a break. All CGIs are potentially dangerous. Just because this one happens to offer an interface that's familiar doesn't make it more dangerous than a CGI with a hidden back door or security hole.

  9. I've used something exatly like this for months by stratjakt · · Score: 4, Interesting

    I use it to add ipfwd lines to an internal router box around here. Runs in cgi under apache, lets me type sh commands and see the output.

    This is just a new version of an old product, and has the same major problem: "applications interacting with the user (those that ask for input from the user), e.g. passwd are still a problem. "

    So it's good for doing a chmod or ipfwd line, but you cant run vi or the like.

    How hard would it be to get full terminal emulation through a browser applet?

    --
    I don't need no instructions to know how to rock!!!!
    1. Re:I've used something exatly like this for months by acroyear · · Score: 3, Insightful

      Doesn't need to run vi. An experienced Unix user (with a malicious streak) could easily come up with some sed and awk to muck around with just about anything... keep in mind, if a file can be read by "anybody" (/etc/passwd is one of these), it can be read (via /bin/cat) by "nobody". No they can't get passwords, but it allows them to get the list of users on the box and quickly reduce the # of options when it comes to running passwd dictionary scripts for login attempts.

      --
      "But remember, most lynch mobs aren't this nice." (H.Simpson)
      -- Joe
    2. Re:I've used something exatly like this for months by stratjakt · · Score: 2, Informative

      What I use has a list of commands it's allowed to run.

      So you could limit it to ls, rm, mv, and cp with the users security level.

      All it does is shell commands and pipe stdout back onto the form.

      It's such a trivial script I'm surprised its newsworthy even by /.'s low standards.

      --
      I don't need no instructions to know how to rock!!!!
  10. Re:Shell whores. by The+Bungi · · Score: 2, Funny
    what is the eggdrop bot

    I'm no 1337 geek, but it sounds like breakfast to me. Maybe it has something to do with the Slashdot omelette?

  11. To Paraphrase Jurrassic Park... by MidKnight · · Score: 2, Insightful

    ... some developer got so excited about what they can do, they forgot to think about if they should.

    Just imaging Jeff Goldblum doing his bug-eyed, the-sky-is-falling scientist bit :)

    --Mid

  12. Probable hosting service response. by Minupla · · Score: 5, Informative

    If I were a hosting service, I'd be visiting the creator of that with a LART. The big reason why hosting providers do not generally provide shell accounts is that its much much harder to harden a box against attempts from a non-root user to leverage their access to get root. I predict you'll see a lot of hosting providers move away from allowing CGI because of this and things like it. That was the policy at places I ran. You couldn't put up CGI without paying for one of the sysadmins to do a security check of the script.

    Min

    --
    On the whole, I find that I prefer Slashdot posts to twitter ones because I don't get limited to 140 chars before
  13. Re:Shell whores. by Chaswell · · Score: 3, Informative

    Oldest IRC channel control bot. The bot logs in, sits in a channel and manages ownership of the channel and protects the channel from take over. A bot of some sort is pretty important if some one plans to run a large channel for any length of time.

    You can get more info here.

  14. Stop whinging - this is a good thing by cliveholloway · · Score: 5, Interesting

    Any exploits that this allows idiots/script kiddies to do are exploits that a Perl programmer with half a brain can write in about 6 lines of code:

    use CGI;
    my $q=CGI->new();
    my $command = $q->param('command')
    $command and print $q->header('text/plain').`$command`."\n" and exit;
    print $q->header.$q->start_html.$q->start_form.$q->textf ield('command').$q->end_form.$q->end_html;

    If your web server is so badly configured that this creates security issues for you, you seriously need to read up on security.

    .02

    cLive ;-)

    --
    -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
    1. Re:Stop whinging - this is a good thing by geekoid · · Score: 4, Funny

      thus proviong that cLive ;-) is a "Perl programmer with half a brain ". ;)

      --
      The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
  15. Re:security? by Gudlyf · · Score: 5, Informative

    I haven't taken a look at it myself, but my first thought is that this is no more harmful than what any one line PHP script could do. So long as the web admins aren't idiots and have things setup the right way, they should have nothing to worry about.

    --
    Trolls lurk everywhere. Mod them down.
  16. I had the opposite by infiniti99 · · Score: 4, Insightful

    This 'cgi shell' trick is not new. If you have cgi access, then you pretty much have system access. I don't even see the point of providers restricting shell access. Between that and cgi, there's no difference in power, only in convenience.

    I once had the opposite problem. About 10 years ago, my ISP gave shell accounts and a web folder, but did not offer cgi. Again, why bother? I got around it rather easily by running my own http server on a non-standard port from my shell account. Then if I wanted to link to a cgi from my web page, I just had to include the ":port" in the URL.

  17. Re:security? by StressedEd · · Score: 2, Funny
    So long as the web admins aren't idiots...
    Heh heh he... Chortle chortle...... Evil cackle.


    I expect this is a big "if".... ;-)

    --
    Be nice to people on the way up. You will meet them again on your way down!
  18. You people are so negative! by Ayanami+Rei · · Score: 3, Interesting

    Whine whine whine script kiddies paradise, whine whine whine backdoor shenanigans

    baka.

    1) commands run with as much permissions as the perl script itself, including umask. If there just happens to be a local r00t expl0it, well that's too bad. Perhaps it would motivate the server owner to apply some patches. Any damage would be limited to that which can be done with shell access otherwise (which this is supposed to provide). Moreover, it would behoove the owner of said script to make a few simple changes and use a white list of allowed commands or a blacklist of dubious things to prevent shenanigans (IE no eval, command interpolation, or exec, and limiting PATH)

    2) htaccess is as secure as telnet (perhaps moreso). I have telnet open to untrusted accounts, and I've not been rooted. The only thing I would complain about is how browsers manage basic auth permissions. I would encourage users to modify the script to remove any weird html and write a user-interface shell script (using curl or something) to provide a pseudo-terminal session. This would prevent the session from being hijacked by browser bugs or by just not closing out of Moz or IE.

    3) Finally, there is nothing about this that would prevent you from using SSL... a feature that some sites might provide as a side effect of having a management, ecommerce, or sign-up site hosted on the same machine.

    One thing I don't like is the lack of simple console i/o. It would be nice to provide simple console support via HTTP/1.1 streaming and javascript on the client side; it wouldn't be interactive but it could at least emulate things like no-echo with a "password" textbox vs. a normal textbox.
    It sounds like a lot of work though.

    --
    THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
  19. shellinabox by idan · · Score: 2, Interesting
    ... has supported this for a long time:


    sellinabox.com

  20. This is news? by Kryptolus · · Score: 4, Insightful

    Isn't something like this obvious?

    Such "shell" CGIs have been around for a while.

    I don't see why this ad...i mean...story deserves to be posted.

    --

    --
    Violators will be prosecuted and prosecutors will be violated.
  21. Re:security? by NivenHuH · · Score: 2, Informative

    I'm not too familiar with CGI-Shell.. so.. take what I say lightly... Potential security problems: -Transmission of your user/pass in clear text (unless the script is ran via HTTPS) -Bad admins (there are a lot out there) run http as root.. which means root runs the cgi script. Unless the admin digs through the script to make sure it's free of exploits.. (which very few of the admins who run http as root do) it could do something like.. execute the shell as root or execute a priviledged shell (/sbin/sh on sun) -Even if http is running as it's own user, unless it's started in a chrooted jail, the script will have access to modify stuff the http user owns.. this means the http binaries, logs, etc.. I'm sure there are more things that can be exploited... I'm by far not a security expert.. I do know that reguardless of what kinda CGI script you put in place, it's always opening that much more of your box to a possible exploit.

    --
    Just when you make it idiotproof, some idiot builds a better idiot.
  22. Not to be stupid by Bob+Abooey · · Score: 2, Insightful

    But now that's it 2003 and you can get FREE (as in mp3) *nix pretty why would this or getting a shell account for that matter, even be relevant? I can understand why trying to get a shell account was of value in 1990 but today when you can run *nix at home for FREE I don't get it.

    --

    All the best,
    --Bob

  23. A pretty neat idea, actually. by mobiGeek · · Score: 2, Interesting
    What were they thinking?
    This tool is meant to be installed by someone who wants shell access to an account that they already have read and execute access to. If their web account is set up correctly (which it should be if the ISP is worth a damn), then the worst that happens is that the account of the web customer gets compromised...and that is the web customer's fault for installing the script when they don't know what they are doing.

    I, for one, am considering using this on a couple of my customers' sites. They are hosted on systems where I can't get shell access. This will let me configure some things on the system without having an identical setup on my own box (or running a bunch of "echo `env | sort`" type CGI scripts)

    I won't keep this script around in the account. When I need it I can upload it, do my deeds, and then remove it. I can change passwd each time I re-install.

    BTW: I don't consider this any less secure than the (clear-text) FTP access I have to the account. The fact that this program exists means that anyone could have written it (or a similar proggy) and uploaded it to the CGI-BIN directory.

    --

    ...Beware the IDEs of Microsoft...

  24. Go figure... by foxtrot · · Score: 3, Funny

    Crackers've been getting shells via poorly written CGI for years, but now it's news?

  25. Re:How about a Java ssh/telnet applet? by iggymanz · · Score: 2, Informative

    ssh java applets exist: http://javassh.org/

    I like this idea better than a cgi-bin shell which might pass along naughty combinations of characters, and has everything in plain text to risk snooping.

  26. lynx!? by SHEENmaster · · Score: 2, Informative

    if lynx and links won't work then screw this!

    I give the hosted users of my server ssh access for the sole reason that it keeps them from running shit like this.

    /etc/security/ contains all the settings needed to keep them from fucking stuff up. Before I configured process restrictions a user's chat server spun out of control, eventually spawning so many processes that the mouse didn't get enough processor time to move and there wasn't enough ram to start another login shell or http connection!

    Despite the BOFH myths, which I am guilty of perpetuating, not all sysadmins are jackasses. So long as the sysadmin knows you and you promise not to abuse priveledges you can get everything short of root and /dev/dsp access.

    If you really need shell access and don't want to risk losing your account just send your sysadmin a thinkgeek caffeine sampler and some shirts. Massive capacity SCSI disks are a great substitute.

    --
    You can't judge a book by the way it wears its hair.
  27. Re:How about a Java ssh/telnet applet? by PunchMonkey · · Score: 3, Funny

    Yeah, you sure wouldn't find it by googling java ssh or maybe by going to javassh.org.

    I mean... that would just be too easy and too obvious.

    --
    I'll have something intelligent to add one of these days...
  28. Its only a problem if your web host is a moron... by bteeter · · Score: 2, Insightful

    Speaking as a Web Host - I wouldn't mind this one bit. We run suEXEC on our servers, so any commands that they execute under this CGI-Shell would run under their own permissions anyhow.

    They can do no worse running this script than they can already do on the command line. Since we use fairly tight permissions on the server, there isn't a lot they can do to disrupt things anyways.

    A PHP Shell script has been around for a while - THAT version can cause some security issues since typically PHP runs as nobody. Then the trick is making sure nobody doesn't have any special permissions that could cause a server issue.

    Basically, if your diligent, this script shouldn't cause any more problems than any other CGI script.

    Take care,

    Brian
    --
    http://www.assortedinternet.com/

  29. Been there, done that by Kakurenbo+Shogun · · Score: 2, Interesting

    I made a script like this a few years back that I called "Telweb". It was mainly an experiment to see if I could make it work (and for use briefly on a server where I didn't have a shell account). I only ever told one person about it, and hesitated even to do that, because the results if it every got into the wild were "too terrible to imagine."

    --
    Convert RSS to HTML - integrate webfeeds into your website
  30. Re:How about a Java ssh/telnet applet? by CaptainStormfield · · Score: 3, Informative

    A very quick and dirty Google search produced numberous promising links. I tried the mindterm java app on a whim, and it worked quite well. If you are not completely paranoid, you can even use the link on their site to d/l the java applet, rather than taking up space on your web account.

    --
    "The dinosaurs died because they didn't have a space program." - Niven
  31. Re:How about a Java ssh/telnet applet? by spinkham · · Score: 2, Informative

    They've been avalible for quite a few years, type "java ssh" into google for a whole mess of them...
    TightVNC also includes a java client if you want to have a graphical remote connection.
    I carry a business card size cd with putty and tightVNC and such on it to use most of the time though...

    --
    Blessed are the pessimists, for they have made backups.
  32. Reinventing the wheel... by Hershmire · · Score: 2, Informative

    This has already been done, and better (with SSH support, to boot).

    --
    if(!toilet_paper) roll.replace(new roll); //Stupid roommates.
  33. Even better; use the Java Telnet Application by macemoneta · · Score: 2, Informative

    The Java Telnet Application supports SSH, and if you require SSL and password access to the directory in your web server, you can be reasonably secure with the login.

    --

    Can You Say Linux? I Knew That You Could.

  34. BS by mindstrm · · Score: 3, Informative

    I'm as much of a unix nut as the next guy.. but NT's ACL system is far more robust and flexible than the traditional unix system... hands down.

    Example: Can the standard unix permissions give access to everyone in group a,b, and c, except for user x who is also a member of groups b and c, and y, as well as ensuring that z has full access to everything? No, you can't.

    If you allow your customers to upload their own cgis, this is merely a tool.

    This IS a good tool.

  35. Is it worse than CGI? by Zeinfeld · · Score: 5, Insightful
    When Rob and ARI hacked up CGI it was done as an overnight hack in about 18 hours total. It was not a protocol change so it got no security review.

    My first response was 'you what?'

    Over the next few years we saw countless exploits of the form 'add this to the command line arguments, execute an arbitrary command'.

    This is one reason why I so hate 'its only like what we do before' type security arguments. What you are already doing may be braindamaged.

    People like to complain about IIS security but they fail to acknowledge that the single architectural issue that has led to those exploits is structurally similar to CGI. The game is to persuade a script to execute an arbitrary command.

    Apache has had fewer exploits simply because the bugs are attributed to the braindamaged scripts written by the users.

    If you want to run a secure Web server the thing to do is to turn off all scripting. Compiling the scripts and linking them into the server as a plug in is a lot more satisfactory as an architectural approach, especially if you have ways to reduce the privilleges of that module to least priv.

    --
    Looking for an Information Security student project suggestion?
    Try http://dotcrimeManifesto.com/
  36. Actually, that is EXACTLY what they've done by Anonymous Coward · · Score: 2, Informative
    I'm shocked at how incredibly stupid this is. I'm even more shocked that someone deemed it appropriate as a Slashdot story. This is the CGI, sans GPL license header:
    #!/usr/bin/perl
    use strict;
    use CGI qw(:standard);
    my $befehl = param("befehl");
    my $ausgabe = `($befehl 2>&1)`;
    chomp($ausgabe);
    print <<ENDE;
    Content-type: text/html
    $ausgabe
    ENDE
  37. Violation of principles by babbage · · Score: 2, Insightful
    This is a bad idea for the same reasons that routing all traffic through port 80 to get past firewalls is a bad idea. There is a great benefit in knowing that a given port or protocol will have certain properties & not others, and piggybacking other protocols through that channel disrupts & diminishes that benefit. If you want to allow your users access to service X, then give it to them plainly rather than screwing around with things like this. If your ISP prohibits shell access, they aren't just doing it to be mean -- they're trying to protect both themselves & you from negligent or malicious users (and if you yourself happen to be negligent or malicious then this is all the more important, but I know that you're a skilled & benevolent hacker -- this kind of policy is aimed at those other people *wink*).

    As others have said, there are so many ways this could be abused, either willfully or by accident. You can make the situation a little bit better by restricting this service to HTTPS sites, certain users or IPs, etc -- but why bother reinventing the wheel when, in the form of SSH (or even Telnet), this is a more or less solved problem?

    I do not see this as a good idea for general Geocities styled simple CGI site hosting. It might be useful in certain restricted environments -- your server's co-location facility only allows port 80, but you have VPN access & can usefully tunnel in this way -- but any example I can think of (like the one I just wrote) is pretty contrived & probably full of holes. It is a pretty clever engineering hack, but not one that should probably be released into the wild -- it addresses the wrong problem in the wrong way, albeit cleverly.

  38. No change to the level of security by DunbarTheInept · · Score: 2, Insightful
    Okay, on order for this program to work, you need to have an ISP that lets you upload any arbitrary CGI script you feel like. So really, how is this a change in the security level??


    Before this program, you had to write a script like this (for example):

    #!/usr/bin/perl
    print "Content-Type: text/html\n";
    print "\n";
    system( "someEvilCommand -arg1 -arg2" );
    Versus using the cgi shell program and typing "someEvilCommand -arg1 -arg2" at it's prompt?
    --

    Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.

  39. Security VS Convenience by cornice · · Score: 2, Insightful

    All I'm seeing is posts about how insecure this is. Although I think this could open some holes it really isn't that much worse than some other CGI script. What people fail to realize is that the rights of this script are likely to be near zero. If you don't have shell access then you don't have rights to do much of anything. Thus there really isn't much that you can do with it. For some reason people seem to be thinking "full shell access" and "CGI" at the same time and this really isn't the case. I think this will be useful primarily in situations where you already have shell access, cgi-wrap or suexec, an SSL connection and no access to SSH. For when you're at your new girlfriend's house and you just haven't installed CygWin yet.

    Actually what I _really_ wish I could find is a nice, free, secure file transfer program. I use scp but our designer doesn't seem to get it or ssh. I just want a nice gui that he can run on his Mac that is a bit more secure than ftp.

  40. This is what perl's safe mode is for by addikt10 · · Score: 3, Insightful

    Perl's safe mode prevents this from executing on the server. Now, if they aren't running Perl in safe mode for their users' CGI scripts, then they have no business having a server on the net.

    They do, however.

  41. Shell != ability to run one command at a time by Colz+Grigor · · Score: 2, Informative
    This CGI program that runs a command via back-ticks (i.e. `ls`) is not a shell by my standards.

    A shell is more than the ability to run simple commands; it provides an environment to run commands, maintain a command-line history, spawn processes, store variables, etc.

    And any good CGI Shell should also take output from the system command and format it into HTML that will display in a browser the same as it would in the shell.

    Am I missing something here, or is this "cgi shell" thing really not newsworthy?

    ::Colz Grigor

  42. Front Doors, not Back Doors. Admin work! by billstewart · · Score: 3, Insightful
    It's not a back door, it's a front door. The question is where you are once you walk in the door - chrooted jail, or do you have the run of the house? CGI always offered the possibility of doing lots of things that might be unsafe, and requires administration of systems in a way that restricts the options available to the browser to things that are either relatively safe to the system as a whole or only able to bother the user who installed this in his own directory. You should have done this anyway! And of course, if you're a user, you probably shouldn't install this application on a server you actually care much about until the security features get upgraded a bit.

    (Obviously if your hosting provider uses a Windows system instead of Unix, the answer to "where are you" is "Probably nowhere interesting", though it can probably be adapted to support Windows command line services as well.)

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  43. This is new? by Zone-MR · · Score: 4, Informative

    Scripts like this for both perl and PHP have existed for quite some time. They basically rely on one command like exec or system. In essence they just run whatever you pass them and spit out the output.

    Since this got so much publicity I was expecting something new, such as the ability to interact with interactive programs. But it seems this one lacks that feature aswell, in essence making it a poor substitute for a real shell. Pico, micq, bitchx, su, passwd, any interactive program is UNUSABLE.

    That is its biggest limitation.