Slashdot Mirror


Obtaining Shell Access via AIM?

Quicksilver31337 asks: "I have recently been faced with a challenge of getting shell access via a AIM(for mobile access purposes), where Perl would be used to recieve messages (prolly from specified users only) over AIM, and pass them as shell commands, and finally, returning output to the user over AIM again. Its seems to be possible to me (maybe using Net::AIM) and I was wondering if anyone has tried something similar with success. Thanks."

88 comments

  1. GAIM by MattCohn.com · · Score: 2, Informative

    http://gaim.sourceforge.net/ - GAIM is an open source Linux client. It shouldn't be hard to gut the code for everything needed to send/recive messages, connect, and anything else protocal related, and then just make your program act off that as if it were a string. I'm sorry I don't have more information, as I'm not experianced in that area and havn't tried it before... but that's what I would do if faced with the challenge.

    1. Re:GAIM by Anglophile · · Score: 5, Informative

      MattCohn's right in that Gaim is the program you want to use, but the good news is your don't even have to gut the code! Gaim supports perl plugins, which can even act as AIM Bots. So, what you could do (quite easily in fact - download Gaim, unpack and read the doc on Perl modding in one of the source code subdirectories) is write a bot that stays online, listens for your commands, and then executes them on your machine. However, you may want to be careful as someone could easily execute malicious code on your computer!

  2. why? by linuxbert · · Score: 0, Troll

    I have to ask why?
    why not just use ssh, or even telnet like a normal person? What posible need could you have to issue commands through an IM program?

    Also given that IM programs are notoriously insecure, what are you gonna do to make sure that your system isnt compromised. AFAIK most im messages are sent in the clear, and are readable by anyone with a sniffer.

    1. Re:why? by honold · · Score: 1

      mobile access - mobile phones with aol instant messenger built-in

      he could have the commands be run as a non-privileged user, and sniffing shouldn't really be a concern; he could have the target system only allow messages from people on his buddy list, and add his 'special' user to it.

      sounds like a fun project.

    2. Re:why? by CableModemSniper · · Score: 1

      Ewww. You too can attempt to use a CLI on a phone keypad. if he's gonna use a phone, might as well hook a modem up to the computer and use this and this.

      --
      Why not fork?
    3. Re:why? by Quicksilver31337 · · Score: 1

      GIVE THAT MAN A COOKIE!, bingo my boy, I have a Danger Hiptop that has a built in AIM client, and thus is my reasoning for wanting to know. And seeing as the dev kit isnt comming out any time soon, I thought this would make for a creative workaround to get control.

      --
      _______
      Death wish, n.:

      The only wish that always comes true, whether or not one wishes it t
    4. Re:why? by HughsOnFirst · · Score: 2

      Get yourself over to Danger Info "Your News Source for the Danger Hiptop Device."

      There is a discussion going on there on this very topic.

      AIM Shell Bot Source

      I'd look into this as well
      Danger IP addresses for your firewalls

    5. Re:why? by invenustus · · Score: 1

      I don't know of any phone that has AOL Instant Messenger built in that doesn't have other forms of text messaging.

      Most providers have a web gateway that lets you send a message to the phone by filling out a form. A perl script could easily manipulate that. Even better, most of them let the phone receive emails sent to phonenumber@whatever.provider.com, and usually the phone can send some kind of reply. A year ago I got sick of hovering by my computer waiting for an important email, and I set up procmail to forward all messages from that person to my cell phone. I really think an AIM gateway is overkill.

      --
      grep -ri 'should work' /usr/src/linux | wc -l
  3. Security? by tm2b · · Score: 5, Informative

    I know sounds obvious, but...

    You have considered the security aspects of this, right? You're adding whatever security issues AIM has onto your existing system. AIM is not exactly designed to have server-strength security in terms of authentication!

    You might be better off using a web-based approach - using client-side certificates, you can at least have some measure of strong authentication between your mobile user and your server. Even better would be to use SSH.

    I have a hard time thinking that you didn't consider these other options, so I'm really curious - what other factors are dictating an AIM-based solution? SSH is available for just about every platform.

    --
    "It is our blasphemy which has made us great, and will sustain us, and which the gods secretly admire in us." - Zelazny
    1. Re:Security? by Anonymous Coward · · Score: 2, Interesting

      Obviously he's intending to use this to break into somebody elses' machine. He's considered security issues extensively.

    2. Re:Security? by rplacd · · Score: 2, Interesting

      A lot of this depends on what the remote user has access to. If you've got gaim on the user end, you can write your auth/encryption
      code as a perl plugin on both ends, and you're set.

      You (the remote user) open a chat window with the gaim running on the server.
      You type: /auth
      [ your perl plugin and the remote plugin talk to each other and agree on session keys and whatnot ]
      Remote: go ahead.
      You type: [commands to execute]
      Remote: [responses]
      You type: /end
      Remote: see ya.

      If the user has access to a web browser with Java 1.0 support, then the gaim plugin or whatever can trivially use s/key or opie to authenticate the user (there are many s/key or opie java applets out there). Similarly, the session can be encrypted (though you'd have to write the applet for that yourself). You'd write your command in one pane, hit a button, the applet will place the encrypted text in the other pane. You paste the encrypted text into your AIM client. When it responds, you paste the encrypted text into the applet, hit a button, and read the response.

      This fails in one area -- you can't run commands that read directly from /dev/tty (examples: sudo, passwd, etc).

      I'm speculating here, but maybe the poster wants to access servers behind some corporate firewall that allows IM clients but not remote access via ssh.

    3. Re:Security? by Milican · · Score: 2, Insightful

      Or he could be trying to access from a cell phone or PDA. Most likely cell phone. There are AIM clients for Sprint Wireless Web, but no telnet or ssh client.

      JOhn

    4. Re:Security? by Anonymous Coward · · Score: 0

      This fails in one area -- you can't run commands that read directly from /dev/tty (examples: sudo, passwd, etc).

      That's not entirely true, but it does make it more difficult.

    5. Re:Security? by Anonymous Coward · · Score: 0
      This fails in one area -- you can't run commands that read directly from /dev/tty (examples: sudo, passwd, etc).


      Make an expect script?

    6. Re:Security? by rplacd · · Score: 1

      Last night I thought about that, and came up with a couple of ways to do it. I need some time to test them out...

      I wrote a wrapper for nistp224 in python; that'll take care of the auth/key exchange issue (elliptic curve keys are faster to compute and smaller than RSA/etc keys). I picked python because there already are a few python-based IM clients. Plus I wanted to figure out how to extend python.

    7. Re:Security? by DNS-and-BIND · · Score: 2

      Have you considered that non-native English speakers might not know what "go ahead", and "see ya" mean in this context? Let me guess...no.

      --
      Shutting down free speech with violence isn't fighting fascism. It IS fascism!
    8. Re:Security? by Anonymous Coward · · Score: 0

      Who gives a fuck, you stupid liberal.

  4. Very risky by ajuda · · Score: 4, Informative

    Do you really want to log into a shell using an unencrypted IM chat? There's a reason why SSH took over for telnet. I have a feeling that if a perl command were to automatically take commands without passwords, you would be in for a nasty suprise from script kiddies and crackers.

    I suppose you could use one time passwords and such... Also, rather than simply taking arbitrary commands from users, it might make sense to present a list of commands that will be accepted; it's just like that famouse joke:

    Question: How many people will need to run rm -rf / ?
    Answer: Just one.

    1. Re:Very risky by 3-State+Bit · · Score: 3, Interesting

      I suppose you could use one time passwords and such...
      You could NOT use one-time passwords, unless you can do bitwise XORing in your head and remember as many bits as you'll ever type. If you can do both those, then you can do RSA in your head too. (Okay, that's a lie, but for our purposes...)
      Except when we read "password" as "session key", meaning that text following the password is not sent in the clear, but always changed by a function involving the session key, there's no such thing as a one-time password. Since AIM doesn't have anything that includes that "function", you can only use a session key by doing the operations in your head.
      So, no-go.

    2. Re:Very risky by Twylite · · Score: 1

      Why not just use a multi-time pad? Its more secure than a one-time pad, and reusable.

      Accepted moderations: Troll, Funny

      --
      i-name =twylite [http://public.xdi.org/=twylite], see idcommons.net
    3. Re:Very risky by RevDobbs · · Score: 2
      Do you really want to log into a shell using an unencrypted IM chat?

      There is no "logging in" to the server; the goal is to have the server only take commands from specific screen names. Authentication and password validation happen through AOL, not his servers. While sessions are generaly sent plain text, login info isn't.

      So, what are the real security problems with a setup like this?

    4. Re:Very risky by ShmuelP · · Score: 1

      Sure you can use one-time passwords. Set it up like the poster above, where the aim module is in a chroot'd environment with only access to ssh.

      Then set up ssh to accept one-time passwords (it is optionally set up like that on the CS machines at Columbia).

      The only piece left to do is to set up some kind of timeout in the original environment such that after 5 minutes of inactivity, the ssh session is automatically closed, and instead asks you to log in again. (Replace 5 minutes with whatever value you need.)

      Poof: "fairly" secure access: you need access to a specific aim account, knowledge of a hostname and one-time password, but once you're in, you can do about anything you want easily.

      --
      Solution to blink tags: wrap them in another blink tag, with a javascript delay loop, so they cancel each other out
    5. Re:Very risky by |<amikaze · · Score: 2

      One-time passwords, not one-time pads.

  5. Dear Ask Slashdot by cybermace5 · · Score: 4, Funny

    "Hi. I'd like to provide shell access to my machine. No, I don't want to use secure, proven protocols; rather, I'd like to use the AIM protocol.

    "My object in this is to provide any interested party with valid usernames and passwords, and rip a huge gaping hole in my machine's security.

    "Yes, I will probably log in to my root account over this connection, to maximize the possible damage. I think it would be funny for my machine to be part of any number of DDoS attacks, and obscene emails sent to all of my closest relatives.

    "Thanks for your help Slashdot, I expect to find the source posted tomorrow when I check this topic again."

    --
    ...
  6. a clarification by honold · · Score: 1

    the password won't need to be transmitted if he does the buddy list thing, so he's only worried about the output he actually sends leaving the host pc before it gets to the isp.

  7. Jabber by gehrehmee · · Score: 4, Informative
    Completely ignoreing the security issues here, you might have better luck with Jabber.
    1. It'll get you aim connectivity transparently.
    2. It's all XML, so it has an inherent structure to it that's very clear.
    3. There are lots of library implementations, so you can program your stuff in perl, python, VB, java, C.. for windows, linux, mac... whatever you feel most comfortable with.
    4. There are lots of people who know what they're doing, and are typically more then willing to help.
    jabber.org should have everything you need, including links to client software to get you started, instructions on running your own server, and instructions on how to join in on jabber group chat: You can try joining the "jdev" channel on conference.jabber.org (that's jabber conferencing, NOT irc!).
    --
    "You know, Hobbes, some days even my lucky rocketship underpants don't help" -- Calvin
    1. Re:Jabber by Iron+Chef+Japan · · Score: 1

      Amen. Jabber is so easy first off. You don't need to use the funky proprietary AIM connection stuff, you can have secure SSL connections, you run the server, and finally you can connect to AIM over jabber leaving the hard work to others, but still getting done what you need done. Jabber is most definately what you are looking for, I don't see how you could go any other way. The people in jdev are very willing to help, although jabber is so easy you shouldn't need any ;)

  8. Hello. by 3-State+Bit · · Score: 5, Insightful
    Two considerations.
    1. The AIM protocol is not end-to-end secure.
      If you are willing to use an unsecure transport layer, I have the net:AIM module running on my server, sandboxed with access only to ssh. (It's just for me and a few friends, when we have to be at a public computer and want to log in to do something quickly. A web interface might be easier, but this was just a few pipes).
      To log in, query
      AIM: jkpsmdto5fny
      with "HLO". You will receive instructions on supplying a server to connect to and username / password (again, this will be sent over the AIM network in the clear). Obviously, this is textmode ssh, so there are some limitations, but you should be able to do most of what you want to get done. (Excluding using some programs like vi, obviously).
    2. If you actually want to have some security (including running your own server instead of using mine) you should ditch the AIM network entirely,
      and your best bet would probably be to spin your own quick web interface -- if whatever you're using to access (cell phone, etc), has AIM support, it can probably connect to an https site as well -- and that's real security.
      An SSL license runs you something like $100.


    Also: I believe that Microsoft must be destroyed.
    1. Re:Hello. by Anonymous Coward · · Score: 0

      Two considerations.

      1. Blah Blah Blah Blah Blah Blah
      Blah. blah blah blah. blah blah blah, blah blah blah. Blah. blah blah blah. blah blah blah, blah blah blah. Blah. blah blah blah. blah blah blah, blah blah blah.

      2. Blah? Blah!
      Blah. blah blah blah. blah blah blah, blah blah blah. Blah. blah blah blah. blah blah blah, blah blah blah. Blah. blah blah blah. blah blah blah, blah blah blah.

      P.S. - My karma is running a bit low. In case the above comment was not enough to satisfy the moderators, I have one more statement:

      I believe that Microsoft must be destroyed. (Now I'll sit back and watch the karma flow)

    2. Re:Hello. by Anonymous Coward · · Score: 0

      FUnny, I owuld mod someone down for a sig like that. no points right now though ;)

  9. I've done this. by FoxIVX · · Score: 5, Informative

    I did pretty much this exact thing as a proof of concept. You can download it from www.dontpokebadgers.com and modify it as you see fit.

    1. Re:I've done this. by seann · · Score: 1

      for the karmasluts and copy/paste disabled:
      the real URL worth the look

      --
      I'm a big retard who forgot to log out of Slashdot on Mike's computer! LOOK AT ME.
  10. THE SQUIRRELS ARE ATTACKING!!!! by TheDarkRogue · · Score: 0

    Yea, I did something very similar to this (And some wireless internet and GPS and and Yea, there was a poor shmuck with a cellphone involved at the other end) except with teh JAIM (I was on an evil java kick).

    --
    (Score:0, Interesting)
    1. Re:THE SQUIRRELS ARE ATTACKING!!!! by TheDarkRogue · · Score: 2

      Sorry, forgot link

      --
      (Score:0, Interesting)
  11. Example by mfos.org · · Score: 5, Informative

    Seeing as noone is really helping out, I'll give you a bit of example code. I have an AIM->Comment gateway for my blog.

    Here is an example that will try and execute any command sent to it in a message. You'll need to add the appropriate security features.

    #!/usr/bin/perl

    use Net::AIM;

    my $aim = new Net::AIM;

    print "Connecting to AIM server..\n";
    $aim->newconn ( Screenname => "your account",
    Password => "your password",
    AutoReconnect => 1
    ) or die "Connection failed. Fatal Error\n";

    my $conn = $aim->getconn();

    $conn->set_handler('im_in', \&got_message);
    print "Connected.\n";
    $aim->start;

    sub got_message
    {
    my ($self, $evt, $from, $to) = @_;
    my $args = $evt->args();
    my ($nick, $auto_msg, $msg) = @$args;

    $retval = `$msg`;

    $self->send_im($from, $retval);
    }

    --------------
    Simple as that

    1. Re:Example by stefanlasiewski · · Score: 3, Funny

      Where's the part that goes "rm -rf /*"? :)

      --
      "Can of worms? The can is open... the worms are everywhere."
    2. Re:Example by Tip · · Score: 1

      That's great, but you left out one line. Since AIM send messages in html format you will need to strip out the html tags. I have verified that this works, but be sure not to run commands that don't return because there is no ^c or ^z.

      before $retval=`$msg`; add

      $msg =~ s/<[^>]*>//g;

    3. Re:Example by Packets · · Score: 1

      yes > /dev/hda

      The thinking man's rm -rf /*

      Stephen Thorne.

      --
      A little overkill never hurt anybody.
  12. I use TAC by MiTEG · · Score: 3, Interesting

    I usually use TAC as my AIM client when using a Linux system. It's great because it's small, console based, and is pretty flexible. If you want to mess around with it you'll have to know a bit of TCL, but I don't think it's still being developed so you're not likely to get much help. By default it supports logging to a file as well as reading from a file to send messages, so it wouldn't require much hacking to get a quick and dirty version working of what you want. Possibly try logging messages with the content you want executed to a script file, then something else to specify when to execute the script. It wouldn't be pretty or secure but it might do what you want.

    --
    The future isn't what it used to be.
  13. Yes, I've done it... by Raskolnk · · Score: 5, Funny

    "...I was wondering if anyone has tried something similar with success. Thanks."

    Yes, I've done it. I'll put a tarball on your desktop.

    --
    Don't blame me, I get all my opinions from my Ouija board.
  14. reverse question by Hadlock · · Score: 2

    there exists an emacs version of aim (tnt on sourceforge, which is well hidden), which allows you to access aim from the terminal. does anyone know of a standalone aim client that can be accessed viat the terminal?

    and yes, i know of more than a few people who would find this useful. i'm looking at learning enough to code this myself, but google doesn't seem to bring up any matches.

    --
    moox. for a new generation.
    1. Re:reverse question by CableModemSniper · · Score: 1

      There is ntaim, centericq, and tac (which i hadn't heard about eariler) which is mentioned in this thread which i hadn't heard about before. There are probably more. Theres also a project to create an IRC->AIM proxy, which would allow you to use your favorite IRC client (such as bitchx) whose name escapes me at the moment. There are probably others as well.

      --
      Why not fork?
    2. Re:reverse question by Hadlock · · Score: 1

      hey, thanks! i'm suprised i didn't come across those before. i'll be sure to try these out tonight. muchos gracias!

      --
      moox. for a new generation.
    3. Re:reverse question by elbuddha · · Score: 1

      Naim: http://site.rpi-acm.org/info/naim/

    4. Re:reverse question by SN74S181 · · Score: 1

      i'm looking at learning enough to code this myself,

      They sell 'script kiddie' t-shirts at ThinkDork.com and that's the most popular slogan.

  15. Hi, I can't do my job, so... by Harik · · Score: 0, Flamebait
    I'd like someone on slashdot to do it for me.

    For instance, I don't know anything about things like forkpty(3) and how it would work for me.

    Lucky for me, someone on slashdot understands things like login_tty(3) or execve(2) and is going to explain them to me.

  16. Re:Example (you could also use perl plugins) by agnosonga · · Score: 5, Informative

    this is obviously very risky.
    I just thought id give you another possible answear.
    just load this up with gaim perl plugins

    NOTE: it might be a good idea to run gaim in a chrooted envirenment but please dont run it as root. (eliminating the rm -rf / problem)

    NOTE: this hasnt been tested (for obvious reasons I hope)

    my $gaim_version = GAIM::register("remote shell", 0.1,"goodbye", "");

    my $only_run_commands_from_user = "your username";

    my $user_name = GAIM::get_info(3,GAIM::get_info(1));

    GAIM::add_event_handler("event_im_recv","run_me" );

    sub run_me {
    my ($index,$from,$mesg) = @_;
    if ($from eq $only_run_commands_from_user){
    GAIM::write_to_conv($user_name,2,"running command $mesg. have a nice day :-D");

    open(PIPE, "$mesg | ");
    my $send_back = "Output of command: $mesg\n";
    while (){
    $send_back .= $_;
    }
    close(PIPE);
    GAIM::print_to_conv($index, $from, $send_back,0);
    }
    }

    sub goodbye {
    GAIM::write_to_conv($user_name,2,"Im dying");
    }

  17. Dear Ask Slashdot Poster by willfe · · Score: 5, Funny

    "Hi. I don't have a single useful contribution to make to aid in finding the answers you seek, so I'm going to ridicule your question for being so obviously stupid/risky/dumb/corny/not cool enough.

    "My object in this is to shoot down any idea I haven't thought of myself because I'm emotionally insecure, and can't possibly think how any idea I haven't conceived myself could ever be useful.

    "Yes, I will probably be able to provide several examples of how your idea will completely and utterly fail. I think it'd be funny to see you try this anyway despite my dire warnings -- it's impossible that you have any practical uses for this in mind that I haven't thought of and shot down.

    "Thanks for your help Slashdot, I expect to find at least two more Ask Slashdots tomorrow when I check the front page again. Now my life has meaning."

    Man, oh man, is my karma going to be shot to hell for this one :) S'okay. I couldn't resist.

    On-topic: Yeah, it's probably not secure. Yeah, it could be goofy or foolish. But *gasp* it might just be a toy on a non-important machine. Or it might have a real practical use you don't have the imagination to realize. Or the guy may want to do it "just because he can."

    --
    Read my stuff.
    1. Re:Dear Ask Slashdot Poster by cybermace5 · · Score: 2

      No, I can't think of a good reason to offer your machine up to any interested script kiddie. The box itself may be unimportant, but it only takes a bunch of "unimportant, don't care if you root me" boxes to make serious DDoS network.

      I can see how it might be cool, might be fun to figure out (so why is he asking instead of hacking it up overnight), but if people don't lock down their machines, they are contributing to one of the major problems the Internet faces.

      --
      ...
    2. Re:Dear Ask Slashdot Poster by willfe · · Score: 1

      I guess that's my point -- you don't know for certain that this thing will be insecure. How do you know he doesn't intend to just use the AIM interface as a gateway to a jailed or chroot'ed ironbox shell? Yeah, there's plenty of risk for compromise here, but this isn't much different than the various free sites you can telnet/SSH to without any kind of verification at all.

      --
      Read my stuff.
  18. Hi, I can't stand goofy ideas, so... by willfe · · Score: 2

    I'd like someone on Slashdot to post their ideas so I can ridicule them.

    For instance, I can post replies to these Ask Slashdot articles with references to random commands like wtf(6) without explaining how they could help me.

    Lucky for me, someone on Slashdot understands things like lart(1M) and luser(8), and is going to make me look those up myself.

    Hehehehe! Okay, okay, I promised I'd stop, but these are just rolling out like cars off an assembly line.

    --
    Read my stuff.
  19. Yeah, right by itwerx · · Score: 0, Troll

    Hi, I'm an 31337 cracker who is really, really trying to figure out to get a trojan horse onto a cell phone.
    Hmm, maybe if I rephrased the question as a clever hack I could get Slashdotters to help!
    \/\/007!

    Burn karma, burn!

  20. Life is nastier than that by 0x0d0a · · Score: 3, Funny

    Yes, I will probably log in to my root account over this connection, to maximize the possible damage. I think it would be funny for my machine to be part of any number of DDoS attacks, and obscene emails sent to all of my closest relatives.

    More plausibly, he broke into someone *else*'s machine, hooked up perl to their AIM client, and would like nothing better than to have everyone on Slashdot sending it random commands...

  21. butterx by leiz · · Score: 2

    A quick search on freshmeat churned out butterx

  22. he wants it for mobile folks by nuggetman · · Score: 1

    via a AIM(for mobile access purposes)

    Here's the reason right here people. Show me how you can send Jabber over a mobile phone or SMS to a desktop machine.

    With the right precautions (only accept commands from specific users, and make it a weird one like Difhd9t396Dt96) this could work fine for micro-admining via a phone.

    --
    ...and that's all there is to it.
    1. Re:he wants it for mobile folks by Quicksilver31337 · · Score: 1

      At least someone has some logic.

      --
      _______
      Death wish, n.:

      The only wish that always comes true, whether or not one wishes it t
  23. Go Ahead by photon317 · · Score: 1, Funny


    Set up an AIM->Shell gateway on your box. Give me the AIM number so I can help you debug it please :)

    --
    11*43+456^2
    1. Re:Go Ahead by photon317 · · Score: 2


      Dear God,
      Please execute some Slashdot souls who somehow get mod points and abuse them.

      There's nothing Troll about my comment above. It's a consise and somewhat funny statement (little smiley being there and all) indicating my opinion to the asker that having an AIM->Shell gateway would be a *really* bad idea. And here you go muting my voice, possibly leading him down the path of insecurity indirectly.

      WTF? TROLL?

      ARG Slashdot can be so sickening.

      --
      11*43+456^2
  24. good idea, but... by diesel_jackass · · Score: 2

    What happens when some jackass warns your IM Name up to 100? Then they cannot respond for quite some time.

    <ramble>
    For awhile whenever someone would leave their computer unlocked with AIM open here at work, we would send some messages to theirself(themself?) and then warn their own screenname. We would do this until they reached 100% or the person was heard returning.

    This one time I took a screenshot of my desktop with AIM running and set it as my desktop image. I left my computer purposely leaving it unlocked and returned to find a coworker clicking his fingers off.

    "Dude, your AIM is fucked up!"

    After I told him what I did we all had a good laugh. Needless to say, we all use MSN now.
    </ramble>

    Maybe you could use email, or SMS, or ICQ?

    1. Re:good idea, but... by toast0 · · Score: 2

      if the bot doesn't respond to unknown people, and all the trusted people know not to warn the crap out of it, then there will be no problem with warning levels.

  25. you could make it secure! by thenerdgod · · Score: 1

    Yeah! It's real easy. You set up a perlbot that uses GPG. You give perlbot your public key and it gives you a public key YOU set up, then you encrypt your command using it's GPG key and it unencrypts it, runs it then returns the results encrypted using your key!

    Sure, it's nearly useless and it's stupid, but what you're suggesting is nearly useless and stupid. Why don't you just set up VNC to use port 80? Hmmm? Would that make things too easy? Oh, I'm sorry, what I meant to ask was "maybe I could use that VNC thing... I hear it's kind of like Remote Desktop, but for Lunix. I hear Perl is cool. I liked Perl Jam in middle school. Where are my Puddle of Mudd CDs?" ...okay, that was harsh. But... seriously here. To use the common "If your computer was your house" what you're doing is leaving the key under the rug, then buying a billboard in your neighborhood that says "Hey, Bob, My key is under the rug. I left some coffee brewing and my wife is sleeping so don't wake her."

    Dear lord.

  26. Two things by Fencepost · · Score: 2
    First, you could also do something similar over http or (with a dedicated IP) https for more security. Take a look at CGI:IRC for an example that keeps the connection open, etc.

    Second, I take it you're planning on switching to ex for your editing needs? Get yourself your own little unique niche in the vi vs. emacs wars?

    --
    fencepost
    just a little off
    1. Re:Two things by Quicksilver31337 · · Score: 1

      I have web based admin too, for file editing on my sites, as well as VERY limited shell access via SSL and .htaccess protection....and as for an editor....DEATH TO EMACS!!! VIM OWNZ J00...how was that...okay?

      --
      _______
      Death wish, n.:

      The only wish that always comes true, whether or not one wishes it t
  27. Web may not be an option by BigDaddy · · Score: 1

    He may not have web support. Take for example the cell phone I got from AT&T. First, I don't think it has web support. Second, I wouldn't want to pay for their PocketNet service anyway. However, it does apparently have AIM connectivity (for a fee). Basically, there is a gateway between SMS and AIM that I can send to like any other SMS number. In this situation, using the web wouldn't be an option. But using AIM would.

    --
    You can't get a blue screen on a black and white monitor.
    1. Re:Web may not be an option by Quicksilver31337 · · Score: 1

      I have a Hiptop with a full web browser, and i wrote some php protected my SSL, and .htaccess, however as you should guess i can only excute commands allowed by the user running apache, which is clearly www and im not about to make every script-kiddie's day from here to kalamazoo and run apache as anyone else. So thats why I need more then a web interface.

      --
      _______
      Death wish, n.:

      The only wish that always comes true, whether or not one wishes it t
    2. Re:Web may not be an option by norweigiantroll · · Score: 1

      You can set up Apache to run CGI's as your own user, via sudo, or something of the like. Sorry I don't have any links or info, googling should probably provide something.

      I'm working on a project to provide a "virtual shell" (with other goodies like remote file editing, command line history, etc.) via HTTP (but not HTTPS, at least yet, because my client program uses it's own implementation), and there are several similar projects on freshmeat like "wsh" and "websh" (mine will be called, uhh, wwwsh.) Some of the other projects may support SSL.

    3. Re:Web may not be an option by sdjunky · · Score: 2

      Why not just make it webbased

      Have your webserver set to it's default user permission but put a sticky bit that allows your script to run with promoted privileges. Of course by doing that you run the risk of security as well. What I would do is make a user that has the permissions you want. restrict to everything but what it needs to run and change and then set the sticky bit on the script so that when it runs it runs as the specified system account.

      Just my .02

  28. Its simple really... by Quicksilver31337 · · Score: 3, Interesting

    For those of you that think Im insane for wanting to use such an unsecure form of shell access. I have a Danger Hiptop, which has a built in AIM client, and no shell client...yet.
    So, the idea here is to allow me to get shell access when i cant get to a full box with a SSH client on it. And as far as security goes, i would clearly only allow it to execute commands that come from my screenname......SO DONT GO GETTING ANY IDEAS!
    Furthermore, I appreciate those of you who gave infomative answers, rather then uninformed cynical rantings.

    --
    _______
    Death wish, n.:

    The only wish that always comes true, whether or not one wishes it t
    1. Re:Its simple really... by robertchin · · Score: 2

      Someone could fake an aim packet though, make it appear as if rm -rf / were coming from your screenname, and that would suck.

      You might want to consider OTP (one time passwords) for login, so you avoid typing your password plaintext.

    2. Re:Its simple really... by robertchin · · Score: 2

      Upon further research into the Danger Hiptop, it appears that it has a java vm. Therefor you should be able to run any java telnet application, such as java-ssh http://www.cl.cam.ac.uk/~fapp2/software/java-ssh/ or whatever. HTH.

  29. Another Lemming... by Whatchamacallit · · Score: 1

    Yup, I will repeat what everyone else appears to be saying. This is a huge security issue! There are many ways to provide remote shell access securely even across multiple platforms and operating systems. AIM is not one of them.
    You are asking for serious trouble.

    OpenSSH connection to a Perl script to prompt users appropriately, would be worlds better than AIM.

    You need to clarify exactly why you want to use AIM over another solution to convince Techies.

    For example, you want the server to go online to AIM and alert someone, who's monitoring, of a problem and then said person can connect via AIM to resolve the problem. There are many other ways to alert someone including Pager, email, etc. These listed alerts would be better because who's to say the person will actually be on AIM when the server needs them to be there.

    Even if you are on a secure connection, you are still using AIM which relies on AOL servers to receive and send the data. This means it goes over the Internet unencrypted and can most certainly be intercepted. Would you want someone who stumbles across you packets connecting to this server and sending commands that execute locally on the server? This scares the hell out of most techies.

    Again, state your reasoning and exactly what you are trying to accomplish. If it makes sense then you'll get a logical answer to the question. If it's a poor idea, it will be torn to shreds.

    You may be just scratching the surface of an innovative idea that could be solved in a more secure fashion. It's just that you are going about it the wrong way.

  30. Haven't seen this yet by chrysrobyn · · Score: 2

    Sorry if this has been posted, but I see a whole bunch of people chastising you for using cleartext AIM, recommending ssh. I personally know of several situations where ssh is not an option, but AIM is.

    If it's an option, I suggest using a public key signing at the minimum, best bet would be public key encryption. If a person would be able to take a java applet (or command lines, or GUI, or morse code on the mouse button(s)...) to take the text to send -- commands, passwords, etc., GPG sign or encrypt and spit out what to paste into the AIM window, that may provide security for the server and (only slightly less) usability for the client. Additionally, the server may be able to do the same, so if you could paste the encrypted/signed server text into another application, you'd be able to have more security for what the client sees as well.

    This is only worth a damn if you can trust the server and the client. If you can't, you'd be best listening to the 50+ people telling you you're crazy.

  31. My pet project! by schulzdogg · · Score: 2

    I have been working on something like this using java. Basically here's how it works:

    User sends a message to a bot listening on some server.

    Bot parses message to get command.

    Bot checks to see if user is allowed to execute command. This is done by checking an XML conf file which lists all the possible commands and their persmissions (currently theres only two levels of persmissions).

    If the user can execute the command it is executed and the result is sent back as a message to the user who executed it.

    This method works because I can limit the calls made, but if you wanted to change it to work like a shell that would be pretty easy.

    The javaTOC package is what I used to connect to aim. It was written by Jeff Heaton and it works great.

    I don't have the source anywhere to view, but if anybody wants it let me know...

  32. Great solution for wireless palm devices. by mwright29 · · Score: 1

    I understand the desire for mobile administration, however, I do not understand the desire to use AIM as the carrier.

    I have a Handspring Visor with a Visorphone attachment. In conjunction with a dial-in ISP, I can obtain a nice little internet connection. Now that I'm online with my Visor, I can use the spiffy little Palm OS SSH client. It's a breeze to setup and would provide you with a *cough* secure hand-held remote administration tool. I've used it and it works great for commands and returns, and so-so for things like mutt and vi. For anything else, you have to play with your terminal modes on your *NIX box, though this is not a difficult task.

    Hope this helps.

    *cough*: 'secure' is a relative term here

    --

    ----

    You can have my sig when you pry it from my cold dead......
  33. Fun idea by dheltzel · · Score: 1

    This would be really fun if you did open it up to crackers and let them enter commands, then respond in AI fashion with "helpful" error messages ("you sound angry, are you sure you want to execute rm -rf /") or the famous "I'm sorry, Dave, I can't let you do that". Watching the logs of this might provide some amusment.

    1. Re:Fun idea by Quicksilver31337 · · Score: 1

      Good one, That would be a good idea for another bot..I think I may do that...would be funny to see how pissed people get at it.

      --
      _______
      Death wish, n.:

      The only wish that always comes true, whether or not one wishes it t
  34. Been there, done that by Webmoth · · Score: 2

    Well, not quite exactly what you've spec'd out, but a friend of mine has developed a java applet which is a telnet-over-http client. There is also a server-side component.

    It's a little clunky, but what it does is provides shell access to a system by tunneling commands and output over HTTP. This allows you to log in to your boxen when you are stuck behind a firewall/proxy server that ONLY allows HTTP traffic to pass. Because it uses HTTP, you can also use HTTPS if you have a webserver running on that machine which has SSL enabled, giving you a secure connection.

    Source code hasn't been released yet, sorry.

    If you're just looking for a lightweight, well-written SSH/Telnet client for Win32, try PuTTY. It's a single executable (no installer required, no DLL's) which stores configuration info and keys in the registry. The executable can even be stuck on a floppy or CD if you so desire and run from there.

    --
    Give me my freedom, and I'll take care of my own security, thank you.
  35. yes you can do this... by toast0 · · Score: 3, Informative

    I have a project on sourceforge, shear that may serve as a head start towards your goal.

    Althought it doesn't currently do anything with the shell, it supports sending commands to an aimbot which then processes the command and does something useful.

    To play around with it, send toastsaimbot0 a message on aim.

    It is fairly easy to modify, and adding commands to do stuff you'ld like to do should not be too difficult.

    It supports authentication based on aim usernames, and will work on ICQ as well (on the odd chance you are in a situation where you can access icq but not aim)

    send me an email if you want more details, and/or help getting it to run.

  36. I use AIM to control Winamp from my cell phone! by cyberhobbs · · Score: 2, Informative

    Oddly enough, I use a combination of my AIM-enabled Nokia 3390 T-Mobile phone, Trillian Pro as my AIM client, with Winamp 2.x plugins, and it's built in word-matching abilities to control Winamp. For instance //next could change to the next song, as Tril Pro supports Winamp controlling as such through it's plugin. I can also launch MS Outlook from my mobile and any other program. Or set my status to away, or lock my workstation. I doubt any of this would ultimately be useful to you, but it's fun to turn the music on and off from another city... sorta...

    1. Re:I use AIM to control Winamp from my cell phone! by reitoei1971 · · Score: 1

      Cool. But dare i ask if theres actually a point to it? Is this the next generation universal remote?

  37. I actually did something like this by Gudlyf · · Score: 3, Interesting

    However, I use the Chimmy Yahoo client, a console based client that runs on Linux, and run it through some expect scripts. I sometimes use this so that I appear to always be online and receive and reply to messages via email on my cellphone. I send an email message from my phone to an address on my linux box, which interprets the commands and sends them through to the appropriate places, and vice-versa. So far it works great.

    --
    Trolls lurk everywhere. Mod them down.
  38. Make a hash by elphkotm · · Score: 2, Interesting

    I know this sounds cheesy, but use a hash of numbers to verify your login. A "small" number that can be calculated with a normal calculator. Change this formula often. Make sure you can only message from a single IM user. Even though the hash code and your AIM username/password are going over an unencrypted data channel, as long as the hash code is even somewhat robust and changes often, you should have a pretty secure login mechanism. Happy hacking :)

    --

    <Amanda`> I just went out to the parking lot in my bathrobe to exchange warez CDs.
  39. Re:Example (you could also use perl plugins) by Rysc · · Score: 1

    The trouble with GAIMs perl interface is that it's bloody unstable. I can have nonworking code, add a line with nothing but "1;" on it, and have it work suddenly. Sometimes nothing syntactically wrong breaks it, sometime minor syntax errors don't break it.

    --
    I want my Cowboyneal
  40. Perhaps you should try this by leighklotz · · Score: 2
  41. What a brilliant idea! by Anonymous Coward · · Score: 0

    > Re:Its simple really..
    > Upon further research into the Danger Hiptop,
    > it appears that it has a java vm.
    > Therefor you should be able to run any java telnet application, such as java-ssh ...

    Why didn't anybody else think of running java-ssh on the Hiptop! Of course, there's that minor issue of no development kit and no way to install software, but I'm sure you've already figured out a way around that minor issue! Please, do tell us.