Re: Creating file on login

From: Brad Arlt (arlt_at_cpsc.ucalgary.ca)
Date: 11/27/03

  • Next message: JM: "RE: TTY Login"
    Date: Thu, 27 Nov 2003 10:56:08 -0700
    To: Fausto <fausto@pix.com.br>
    
    

    On Thu, Nov 27, 2003 at 08:34:46AM -0300, Fausto wrote:
    > I have a system that when one try to login it create a file with the
    > name of the user that tried to log.
    > The problem is that if the do not exists the system creates the file
    > with the invalid user...
    > Can we do some exploit in this case...??
    > Is this problem dangerous...

    I am not sure an exploit is possible or practical. A login name of
    /etc/passwd or ../../../../../../passwd may not yield desirable results.

    And there is of course the simple (and possible) DoS on your
    filesystem where one just trys to login using random strings in an
    attempt to use all inodes on the filesystem (or disk space, whichever
    really...)

    A single log file, using XML or other easily parsible tagging system
    will yield the same result without the problems from above.

    Or you could just sanitize usernames before using them as a filename -
    sanitizing user input before you use it is always a good idea.
    -----------------------------------------------------------------------
       __o Bradley Arlt Security Team Lead
     _ \<_ arlt@cpsc.ucalgary.ca University Of Calgary
    (_)/(_) Joyously Canadian Computer Science

    ---------------------------------------------------------------------------
    ----------------------------------------------------------------------------


  • Next message: JM: "RE: TTY Login"

    Relevant Pages

    • Summary: login hang without forking a shell
      ... Thanks to Paul Sand for his fast response though his suggestion ... filesystem while system is running. ... 'Last successful login' msg after getting through ... and are not necessarily the views of NSW Health or Cancer Institute ...
      (Tru64-UNIX-Managers)
    • Re: From x86 to x86-64
      ... I just recently tried cloning a filesystem using cp and it worked ... I could login to root directly, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: [SLE] Ximian Desktop on SuSE 9.0 -- broken GDM
      ... If you compare what SHOULD be provided by gconf2 and what IS ... present in the filesystem, I think you'll see a difference. ... > configuration files (and Sessions directory) is? ... I'm finding my login ...
      (SuSE)
    • interesting device full issue on jail host machine
      ... filesystem full ... morning) of the above message in my system log of a machine used to ... I don't know what the user of that jail was doing or when it started ... My interesting issue is that on ssh login to OTHER JAILS on other / ...
      (freebsd-questions)
    • Re: Check Forced...what am I not doing?
      ... Rick Barry wrote: ... login, I got a series of text. ... feature that tries to ensure your filesystem is OK. ... nope, ubuntu uses ext3 by default, upon creation of the filesystem it sets ...
      (Ubuntu)