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.
"
waiting to happen. Expect to see hosting providers outlaw this quickly, if they haven't done so in their ToSes already.
...but may cause the equivalent amount of security problems.
The meme police, They live inside of my head
I look forward to the first web brower implimented using this CGI Shell :)
sorry, i am ignorant of the security implications... any comments?
Let me know when it hits 1.1 and maybe it will be safe. I only see problems with hacking right now. Old7
Oh now this is a big risk just waiting to happen.
How much energy does a sysadmin put into stopping a system from getting shell accessed via cgi?
and now there's users coming along wanting to get it done for free? Scary stuff. Opens a whole new world of 'risk' up
Is this not the ultimate cracker tool you ever saw?
What were they thinking?
It's Christmas everyday with BitTorrent.
This just smells unsecure.
We have enough issues with hacking when the kiddies need to exploit buffer overruns to gain shell access ... this is going to make life even more fun :P
(Score:-1, Wrong)
Countless local exploits suddenly made available remotely..
..There's a-dooin's a-transpirin'
So It actually does something useful? Im sick and tired of all you idiots who think a shell is better than a GUI.
GET
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.
Nonperiodic Central Trajectory
Isn't this too slow of a shell to be useful except for, say, exploiting for backdoors? I mean hell you might as well be running a shell with the Doom3 engine.
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
Sounds great, but this part scares me. Is CGI-Shell secure? At the moment, CGI-Shell is more like Telnet than like SSH. The password-protection is realised with htaccess - so username and password fly without encryption through the web. Also all other communication between you and the web-server not encrypted right now. But I will change this soon.
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.
There is lots of there shell-whores on different IRC networks that is always out after somewhere to run their eggdrop bots. I wonder if this CGI invention will have any impact on that, and maybe some webserver will have to "fix" this in some way.
I am not quite sure, but i would not like if anyone were running a program on my server that was intended for web hosting.
Note to self: get smarter troll to guard door.
Relax und watch das blinken cursor.
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.
this thing makes a webserver not less secure than without this thing, although this shoulnt be installed just for fun by somebody who hasnt got a clue
you really want to use it via https, if thats not yet implemented in the client they should do it
nice idea
God forbid ISPs actually have to secure their servers, and require that users not cause them to become insecure...how barbaric
In SOVIET RUSSIA... erm...NSA AMERICA, the Internet logs onto YOU!
This only EMULATES a shell. So it'd be very convenient to people more accustomed to a command line interface. Therefore, you can easily code it to check as to what it can and can't do (and combined with .htaccess, it should be secure).
might as well give you root.
Consensus is good, but informed dictatorship is better
Yeah, um unsecure as all get out. This can't be truly what was intented... CGI-shell, sounds like a problem to me... really people running a server would never install this. Its a basic security issue waiting to happen... there are definately better ways to get to a shell, this not among the best ones.
LW
-LoneWolf-
It is by will alone I set my mind in motion.
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.
Hmm.. I wonder how many people out there run their web servers as root, blindly install cgi scripts that people ask them to install, and will let one slip by that has their default shell has /sbin/sh (on a sun box).. >=)
Just when you make it idiotproof, some idiot builds a better idiot.
How secure is this? My web host gave me ssh access, but they put my account on a separate server (with all the users who want ssh), and they warned me that they won't honor their uptime guarantee because having ssh reduces the security of the server. It seems like ssh would be a lot more secure than this script.
Jason
ProfQuotes
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!!!!
Look at the code.
I see no way at all this could *ever* lead to any sercurity issues.
things connected to the internet rarely have any real problems with people abusing them, so I don't think this will have any issues at all.
and besides, shells don't let you do much anyways.
There are some odd things afoot now, in the Villa Straylight.
I see all these people already complaining about how this is a security risk, because they have this idea that shell == danger and they see the word "shell."
News flash, guys, this is still just a CGI script, meaning it will be run by an unprivelaged user. You won't be able to do anything with this that you couldn't have done with a CGI script before, and it's no more susceptible to being hacked than any other CGI script. Sure there's a security risk, but any time you let clients execute server code you're putting yourself out there. Now chill out.
A CGI shell simulation could save our people, if we use it with wisdom.
Boromir, son of Faramir, King of Gondor and Minas Tirith
But what can you do with CGI-emulated shell that you can't do with a simple FTP client? If the host bans you from shell access, wouldn't they also ban you from all CGI commands that could do anything that you could potentially do with a shell? And I belive that most TOS strictly forbid this (for no reason other than bandwidth and CPU cycles, because I'd imagine they would have already blocked most naughty things). Besides the "Holy shit, I'm l33t, I'm using a keyboard!" factor, why not just use a fucking FTP client to do chmod and copy files?
...he doesn't allow cgi-shell running on the same documentation and download site for the program. Not willing to eat one's own dogfood, or just doesn't smell like chicken?
This would be useful on my server and desktop, when trying to access a shell from my university's computer labs. They essentially block everything to the internet but http traffic.
Seeing as how I use my boxen as my development environment, it would be nice to be able to retrieve my assignments from my computer, while in the lab. It'd also be nice to be able to do my assignments on my box while in the lab, but it seems to me that I'd be reloading the page a lot which would become cumbersome.
I had emailed the network admin about this, and his reply was that he had no idea what I was talking about. Which may be good, or may be bad, when I go to talk to him about it.
In the mean time (or if outward ssh access is never granted) this might prove to be a half decent solution.
-kidlinux.
... 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
Can it run Lynx?
While this could be very useful in offering finer control of small dedicated servers (especially in ways that were unenvisioned when the server was created, meaning a predetermined command set couldn't encapsulate all possible uses), I have concerns about security, both in access control and also privacy (sniffing).
For example, if a toaster were controllable via HTTP, the user's toast-making preferences should be held private - indeed this is a sacred rite. For now I think it better to use somewhat more client-heavy schemes such as Java SSH applets. Granted this requires the creation of an account for each user instead of just a CGI directory, but this isn't a great deal more effort, and if you value your users enough to offer them a service (let alone toast!) that effort seems justified.
Could I interest anyone in some toast?
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
My hosting provider offered this type of CGI remote shell several years ago. They stopped offering it after they realized what a dumb fucking idea it was.
Good heavens Miss Sakamoto - you're beautiful!
That does not offer shell, you're with the wrong web host.
My host liquidweb, has a wrapper script that allows your cgi-bin to suid as you. Otherwise it runs as nobody. For instance, I want to have a cgi script that makes changes to my home dir, i can use their wrapper to give it access. In the same way I am sure I could set this up to give me a shell. However, I have an ssh account so it doesn't matter.
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:
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
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.
I am ignorant of theses types of issues but isn't this just like using Webmin.
every single web server on the face of the planet was just hacked
gobbles will be telling the world about how he h4x0r3d OpenBSD's website with this..
Trolling is a art,
Why bother with this when you can just execute an xterm from the CGI program, setting $DISPLAY to your desktop machine? This has been available since day 0 of CGI. Really.
People still use CGI?
Aren't there many more effective solutions to dynamic pages?
Moreover, it won't be long before this is on a blacklist of scripts.
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
sellinabox.com
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.
Let's examine some problems, shall we: -Most servers (if not all) run CGI scripts as a given user (ie: nobody, www, cgi, apache). If that user is a crippled or limited user, then CGI-Shell is useless for running commands other than "ls". If not, then that user could potentially kill things like the server process, which is also bad. -If all CGI scripts are run as the same user (see above), then anyone has access to files or directories created by another cgi-shell process. After all, they're owned by the same user. -Cleartext passwords via htpasswd. They didn't even _try_ to use SSL - it's so not hard. -Man-in-the-middle attack? Anyone could hijack your "shell" session. -Can anyone say backdoor?
Sure, this is cool to play around with and install on your home machine, but if anyone lets this into a production environment they're on crack. Either install sshd, or don't. But don't try to implement it over CGI.
I wonder if this story is just a troll...
There is no sig, there is only Zuul.
Would this not be reasonably secure if SSL was enabled? It's not like you are getting any extra functionality. If you have CGI access you can always upload a perl script or whatever and run arbitrary system commands.
"Luck is the residue of design" -- Branch Rickey
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
You can get a measure of security by running it under https:
OS Software is like love: The best way to make it grow is to give it away.
Then it was never there. CGI's which are written by users can do any of the things this "shell" can. What are you worried about specifically?
I was able to write this sort of shell script ages ago (maybe not use a real shell but execute commands just fine) but I never would because it opens your server right up. I doubt many hosts will let you run this script for long.
"You can now flame me, I am full of love,"
What I'd really like to find is a Java applet installed somewhere (ideally my home machine, but it could really be anywhere) that emulates a telnet/ssh client. That would allow me (and anyone I give htaccess to) to telnet/ssh to anywhere I want, from any terminal that's capable of running Java applets. Such an applet would be so mindbogglingly useful, I'm surprised I've never seen an instance of it yet.
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.
CGI-Shell allows the execution of any application and any command on the web-server. Various "comfort-features", such as a history and auto-completion with the tabulator are included - CGI-Shell offers in principle the same comfort as any other shell does. Unfortunately, applications interacting with the user (those that ask for input from the user), e.g. passwd are still a problem.
Trolls lurk everywhere. Mod them down.
Crackers've been getting shells via poorly written CGI for years, but now it's news?
shell_exec() will do what you want in one line of PHP.
Trolls lurk everywhere. Mod them down.
Seriously, this isn't exactly something which hasn't been done before. I remember, back in the day when I had no shell access, finding cgi scripts that did this. A quick check of cgi-resources.com shows one (webrsh) dating from 1998 which looks to do a lot more than this can. As for security, as long as your webserver can't access/execute anything potentially malicious, then I doubt you have much to fear from this.
if lynx and links won't work then screw 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!
/dev/dsp access.
I give the hosted users of my server ssh access for the sole reason that it keeps them from running shit like this.
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
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.
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/
This clearly doesn't open up any new security holes that weren't already there.
Its worse use would be making cracking a box a little more convienient by allowing the hacker to run commands faster. It's best use would be making administering your site a little more convienient if you aren't allowed shell access. There's nothing to get up in arms about.
Isn't slashdot supposed to be an audience that understands both the legitimate and illegitimate uses of technologies. Every tool is a weapon if ya hold it right. Right?
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
I once defaced a free webhost using a php shell program. I dont do those sort of things anymore but back then it was really funny.
GREAT! That's all we need - Yet another way for a hacker to exploit a server. What will they come up next?
Sheesh, this is old news:
http://www.speakeasy.org/~cgires/exec.html
first offense shut it off
second offense - bye bye mr customer.
if they don't offer a shell this cgi probably violates the AUP.
It's the sound of serveradmins everywhere dropping one after reading this story!
;)
See? Remote admin IS useful!
Everyone knows VNC. It is great. Some don't know that you can run VNC as a java application, so that you can use most any web-enabled workstation to interact with your servers. For a start, here's the Debian package: VNC Java.
Also, there is a Java SSH client here: Java SSH Client.
Good stuff, and both have saved me a number of times in the past.
fifth sigma, inc.
This has already been done, and better (with SSH support, to boot).
if(!toilet_paper) roll.replace(new roll);
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.
www.christopherlewis.com
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.
:-(
I guess I should have read the rest of the files in the tarball.
www.christopherlewis.com
..Free Live Free...
C'mon.... getting some input from html form and using it in system command (using the backticks ` i.e.), returning the output (formatted of course, to show everyone we know html) just isn't a good enough reason to be /.ed
Troll....
girl
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/
the source code is like 6 lines long. basically, fetch a param and run it in perl backticks. no taint checking, no input validation, no nothing. granted, these things are usually done to prevent shell access, but still. this is hardly a revolutionary piece of software (what's changed between 0.0 and .17a??)
BlueLines
--BlueLines "The cost of living hasn't affected it's popularity." -anonymous
I used a similar method to upack zip files on my old hosting provider's server.
It is ok to improvise when you don't have an option but if you really want shell access, find a hosting provider that gives you ssh access. Changing your hosting provider is very easy. Just get hosting somewhere and point your domain name to the new DNS servers.
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.
DO NOT LEAVE IT IS NOT REAL
Versus using the cgi shell program and typing "someEvilCommand -arg1 -arg2" at it's prompt?Before this program, you had to write a script like this (for example):
Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.
maybe you can use httptunnel, then you can use real ssh trough http
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.
This is barely different than what I used to write to get MindSpring REALLY pissed off at me, back when I was doing virtual hosting. Didn't take me awfully long after that to get myself a dedicated server.
It used a mixture of javascript and forms to remember the CWD between commands, required a password to start using, and didn't require any Perl modules. Every time a client wanted me to service their site, I would upload a copy of the script, and it would invariably work. Rather amusing.
His point is that your suggestion is off topic. This story was posted as a workaround for people who need but cannot get shell acess.
The web site is down at the moment but you can see the Freshmeat project page. The shell script is quite small, and easy to understand (at least I understood it, the last time I was looking at it ....).
RFC1925
In some case CGI can be seen to be a bad thing. It is, as you pointed out, notoriously insecure. However, it doesn't have to be, especially with Perl's variable tainting, and, to my mind, CGI scripts are a useful tool for users to have. Of course, I'm biased; the hosting company which serves up my webpage doesn't have mod_perl on its system, so I've done it all through CGI instead. When done correctly, Perl/CGI scripts can be very neat, even if they do give you more than enough rope to hang yourself with.
If your a hosting company and you don't feal secure with a user running a script like that. You should re-evaluate your security and consider taking on a different market. If you can setup a secure enuf server you shouldn't be running one.
BTW, your-site.com offers hosting for $5 / month with ssh & telnet access.
Have already seen something similar, been available for quite some time: CGI Telnet Although the CGI Telnet doesn't seem to be as full featured as today's featured app
Along the topic of stupid tricks,
I have a box that is behind NAT. I have contemplated a working solution that will allow you to Telnet to a box behind NAT
1st, get an account with a decent web space provider that lets you FTP.
2nd, when you want to executed a command on your NATed box, upload a file to this directory named something like COMMAND.RUN
3rd, set up a Cron job on your NATed computer to check to see if COMMAND.RUN exists on your Web provider account.Run this job at a given interval, i.e. every 5 or 10 seconds. If it does exist, read the file and pipe all lines of this file as input to a shell.
4th, pipe the output to a file and upload it calling it COMMAND.OUT
the one line of code to do pipes in and out looks like
5th, delete COMMAND.RUN on local and remote servers, archive all commands, if you want.
I may or may not build this app, but if I do, I'll submit it to Slashdot,Freshmeat,etc. If anybody has a simpler, faster and/or more secure way to use shell access to a NATed computer, please send tell me (I don't want any man in the middle who has an IP address broker TCP/IP connection crap as explained at Defcon and on slashdot here
~If you have never first posted, you don't read slashdot enough. If you have, you're a moron.
void
Is there a new troll sweepstakes whereupon one attempts to build a kind of demented haiku in one's posting history [slashdot.org]?
Dude.
Opinions on the Twiddler2 hand-held keyboard?
Is there a new troll sweepstakes whereupon one attempts to build a kind of demented haiku in one's posting history [slashdot.org]?
Excellent
Opinions on the Twiddler2 hand-held keyboard?
Is there a new troll sweepstakes whereupon one attempts to build a kind of demented haiku in one's posting history [slashdot.org]?
Observation.
Opinions on the Twiddler2 hand-held keyboard?
curl http://$HISADDR/scripts/..%255c..%255cwinnt/system 32/cmd.exe?/c+rundll32.exe+shell32.dll,SHExitWindo wsEx%201
Do you mean Curl, which is expensive, or do you mean Wget?
Will I retire or break 10K?
Linux under VM on zSeris (or s/390 or whetever IBM decides to call it....). Granted most ISP's can't afford a mainframe.
If you define a "mainframe" as any computer that can act as a server and run operating systems in virtualization, then you can get a mainframe for as low as $200: a Microtel box from Walmart.com running Linux inside Linux. Scale the price up to whatever hardware the ISP has on its racks.
Will I retire or break 10K?
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.
(see above)
THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
Africa's a continent, not a country. Mogadishu is in Somalia.
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?
(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
posting as AC for obvious reasons . . .
Well, it might be "obvious" for your average developer, but it's not obvious to webheads or to people who dabble in PERL but who are by no means experts.
I'm one of those people. In fact, last night I was thinking about how to create symbolic links on my webhost (who doesn't allow shell access) and figured I could cobble together something narrow with a web interface, when this story posted. Kewl, thought I.
Only problem is that the host on which I do have shell access doesn't have the right PERL modules installed and it will be a while before I can boot out of classic and into X (yup, I'm a little lazy, but I'll do it this weekend maybe.)
So, do you have any suggestions for where I could find a different CGI-Shell, one that doesn't have the same PERL module requirements?
That's the sig of some /.er, not from Jurassic Park. And a lame one at that.
I want to delete my account but Slashdot doesn't allow it.
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.
do a google on "mindterm ssh". it's a java applet that does ssh (1, maybe 2 as well, been a while since i looked at it) and vt100. it'll only connect (by default, this is a jvm thing) to the host it came from, but it's handy if you have a user base that may be "floaters" (i.e. may be on random machines traveling around; all they need is a web browser). ah, here's the link and it does support ssh2. it is free for "personal and limited commercial" use.
If you just need vt100/telnet style access (say, within your firewall'd lan) you might like ShellInABox, which is a GPL'd java applet shell for that purpose.
News for Geeks in Austin, TX
http://www.shellinabox.com
And I have to second this one. Rather than opening a script to take shell commands, this actually runs an interactive shell, with login and everything, completely tunnelled over HTTP, which is a problem for people who are stuck behind a very-hard firewall at a remote site (read - most people's work locations).
This space for rent. Call 1-800-STEAK4U
Jef Poskanzer's Experimental Command Line Interface allows interactive usage of several programs; as a demonstration, it lets you play Adventure!
Pretend that something especially witty is here. Thanks.
My program is, uh, very similar!!! WWWSH is a program written in C to give a remote shell. I have some features CGI-shell does, such as history (although I didn't get around to tab completion), and file uploading. It can also remotely edit files with an editor on your computer. It listens to see if the file has changed, and uploads the file just as you save it! Mine is also password protected, though not with the web server but in the CGI itself. Also, I have server CGIs written in Perl and C, so if compiled, it is impossible to tell what it does.
This is lame.
I've never used one of these because normally the only thing preventing you from logging in with SSH or telnet is that your shell is not a normal one.
But guess what.. there's this neat command called "chsh" on most of these systems. Normally it is setuid root so you can change your own shell. So you just run it on a TTY (since it requires a real TTY for you to type your password) and you can change your shell to /bin/bash.
Instead of posting specific instructions, I'll leave it as an excercise for the reader to discover how to create a TTY. Some hints follow.
You can run any program you can upload (including regular old shell script) as a CGI. Gee.. now what protocols can we think of kids that might allocate a TTY and allow one to use it over the network... hmmmm... But you know to run the server for this you will need an internet super server, because the server for this protocol is usually designed to work with this internet super server.
And let's see, this particular protocol's server normally runs the "login" program with a specific set of arguments upon a successful connection. Unfortunately that is no good as login must be run as root. But hmm, if you make a little program that just throws away it's arguments and runs a shell, you'd be in business. So now you can use a certain client program to connect to some port on your server which will immediately give you a shell under your acconut (yes, there is a brief window of opportunity here for someone impersonating as you). That shell is being run on a TTY, so you can actually use chsh. Assuming chsh is a setuid program as usual then you are in business-- most hosters do have SSH turned on by default.
Fair warning: Although you are not in any way breaching the security of the box, you are giving yourself easier access to things you already really had access to anyway (looking at it from the OS security model). One of my friends tried this and got dropped by his hoster. Were they right to drop him? I don't think so. Is it worth it to fight it? Not unless you want to make an example out of them and don't mind spending more than you'll ever get.
Adding new groups is all well and good until you come up with the limitation that a user can only be in so many groups. Some Unix systems I have administered limit users to be members of 16 groups, others to 32 groups. It makes it very difficult to manage fine-grained access. Additionally it causes some very subtle problems when using something like NIS and trying to login to a box that doesn't like you being in 32 groups!
Hmmm, sounds like I need to reevaluate how group memberships work on my systems.
Aw bollocks - I had 5 mod points yesterday, but wasted them modding down idiots. If only I'd kept one for a +1 funny.
"and besides, shells don't let you do much anyways."
Love it!
YAW.
Your head of state is a corrupt weasel, I hope you're happy.
I first used ACL's in 1978 on an ICL 1903T running George 3 (and George 4 in the hours of darkness).
Can we talk about dick size now?
Watch this Heartland Institute video
Actually, it shows that he has at least half a brain.
He may or may not have more than that.
Furry cows moo and decompress.
THAT WAS SO FUCKING FUNNY I AM SHITTING MYSELF
crap now i have to go change. Thanks a lot asshole-funny-man
Here's a secure shell...
This guy emulated Unix using JavaScript.
http://junix.da.ru/
I would mention that it is FROB.US, as I mentioned in my previous post. If you are having dns trouble then bitch at me on aim, my sn is SHEENmaster.
You can't judge a book by the way it wears its hair.
Unless the author of your webserver is particularly clueless, CGI scripts that run for more than a certain time (30 seconds?) get killed unceremoniously. 30-second uptimes are not suitable for running a botnet :-)
Why is this getting slashdotted? I've had CGI-Shell installed on my account since at least May 2002... No one else knew about this kind of thing? Oh, how the mighty have fallen. :)
Something mysterious is formed, born in the silent void. Waiting
alone and unmoving, it is at once still and yet in constant motion. It is
the source of all programs. I do not know its name, so I will call it the
Tao of Programming.
If the Tao is great, then the operating system is great. If the
operating system is great, then the compiler is great. If the compiler is
greater, then the applications is great. The user is pleased and there is
harmony in the world.
The Tao of Programming flows far away and returns on the wind of
morning.
-- Geoffrey James, "The Tao of Programming"
- this post brought to you by the Automated Last Post Generator...