Re: Chown as regular user?

From: Michael Heiming (michael+USENET_at_www.heiming.de)
Date: 05/26/05

  • Next message: RedpIll: "Re: New "Ransom" virus!"
    Date: Thu, 26 May 2005 17:52:06 +0200
    
    

    In comp.os.linux.security SimonV <Simon.vanherweghe@gmail.com>:
    > Suid only works with compiled programs and perl scripts, no other
    > scripting language. (thats what I found when googl'ing)

    Not quite, one can write a small C wrapper calling some script no
    matter which language, make this wrapper suid call it and voila
    the script runs as root. That's how sudo works, it can run any
    script you like as root or any other user.

    > But I'm using perl, and indeed, they are running correctly with
    > set-uid.
    > The only thing that doesn't work is chown, because this is something
    > the root must do and I wont setuid my perl-script as root.

    Better it is. What about using GID bit on the dir you want to
    write to, as I already pointed out?

    -- 
    Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
    mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
    #bofh excuse 297: Too many interrupts
    

  • Next message: RedpIll: "Re: New "Ransom" virus!"

    Relevant Pages

    • Re: root privileges from cgi script?
      ... >'exec' family call to start your script, ... >Compile it, ... >able to use this program to become root on your system. ... Even with permissions of 4775 on the C program, it wasn't running "suid ...
      (comp.unix.shell)
    • IBM Informix Web DataBlade: Local root by design
      ... IBM Informix Web DataBlade: Local root by design ... Impact: Any user who can: 1) Save a Perl script anywhere on the server's ... admin right on any database can do it by loading the WDB module into ...
      (Bugtraq)
    • RE: Linux hacked
      ... I would also suggest using a simple script in the future that alerts ... Subject: Linux hacked ... To get back into your account you want to use, at the boot manager ... boot normally and you should be able to login as root with your new ...
      (Security-Basics)
    • Re: solaris root-setuid script to gain root?
      ... I was doing pen testing the other day and I found one root suid script ... "Because it was not possible to write a secure suid shell script, ... But my uname program runs with local user privs instead of root. ...
      (Pen-Test)
    • Re: BSDstats v3.0 - The Security Rewrite
      ... The bsdstats script could easily pick up that entry and set ... a management machine, and that management machine only has ... Email is sent to root containing IDTOKEN= as generated by host, root forwards that to rpt@xxxxxxxxxxxx, rpt@xxxxxxxxxxxx sends back KEY= value ... second time, submits report values to root, root forwards that to rpt@xxxxxxxxxxxx ... ...
      (freebsd-questions)