* Security concerns over local wu-ftpd setup.
@ 1995-11-17 5:00 Eric Bennett
1995-11-22 5:00 ` Musashi
0 siblings, 1 reply; 3+ messages in thread
From: Eric Bennett @ 1995-11-17 5:00 UTC (permalink / raw)
Cc: Linda May, Michael Santangelo
I've configured anonymous ftp using wu-ftpd for my site. I have two
remaining questions, one general, one specific:
The way I set it up is a little too slick for my taste. I _think_ my
security bases are all covered in this setup, but I'm too paranoid to
accept that. Have I overlooked something in the following configuration?
How do I set the UMASK for anon ftp users? It is now 022, but I want 002
so that created subdirectories can be cleaned up by Joe LocalUser too.
- - -
Goals for Anonymous FTP security:
1) Anon users be able to leave files in an incoming directory
2) That they be able to see those files, but not fetch them
3) Local users be able to delete those files
4) Anon FTPers not be able to get a list of local uids
File permissions in my ftp directory:
drwxrwxr-x 8 root archive 512 Nov 16 17:40 ./
dr-xr-xr-x 2 root system 512 Nov 17 00:13 bin/
---s--x--- 1 bin ftp 409600 Jun 16 15:30 bin/ls*
dr-xr-xr-x 4 root system 512 Nov 17 00:13 etc/
----r--r-- 1 ftp system 57 Nov 16 17:41 etc/group
----r--r-- 1 ftp system 6755 Nov 17 00:13 etc/passwd
drwxrwxr-x 2 ftp users 512 Nov 17 01:48 incoming/
-rw-r--r-- 1 root system 38 Nov 16 16:48 incoming/README
So that our UIDs can't be seen by an anonymous ftp user, I
1) created a passwd file which has our users in it
(unneeded stuff filtered out, of course)
2) set it owner/mode ftp.system/0044, so user ftp can't read it
3) set /bin/ls to bin.ftp/4110, setuid so that it can access passwd
as bin, and group readable so that local users can't use
this ls to peek at bin's files elsewhere (some of which
are sensitive)
4) turned off chmod in /usr/local/etc/ftpaccess so user ftp
can't change the mode of the passwd file.
So that incoming files can't be seen by ftp users
1) Made /incoming dir ftp.users/0775 so that ftp user and
regular user can create and delete files.
2) Set uploaded files to ftp.users/0064 in ftpaccess, so that
ftp can't see the contents and so users can
delete the file.
3) turned off chmod so anon user can't change mode
4) turned off umask for anon user in the hope that I'll find out
how to set the umask to 002 for new directories.
Have I missed anything? It's seems to work the way I want, but that doesn't
imply much. I'll summarize your responses if it seems worth it.
Thanks for reading this far!
Eric B.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Security concerns over local wu-ftpd setup.
[not found] <199511201847.NAA01931@marksys.misty.com>
@ 1995-11-20 5:00 ` Eric Bennett
0 siblings, 0 replies; 3+ messages in thread
From: Eric Bennett @ 1995-11-20 5:00 UTC (permalink / raw)
On Mon, 20 Nov 1995, Mark Thomas wrote:
> I think it is unwise for _any_ file or directory in the area to be owned
> by user "ftp". Also, I think you will probably want ftp to have read
> access to the etc/passwd file, so it can list owners of directories,
That's why ls is suid - so that ls can show user names instead of uids.
If ftp could read passwd, it could get the uids that way. Not having the
uids publicly visable was one of the goals. Ill thought out... well, yes!
That's why I'm appealing to the Usenet public for comment.
> Also you might not let ftp have read access to your incoming directory.
I want remote users to be able to verify the size of files they have
uploaded to make sure they have used the right file transfer type, as well
as just seeing that they got there, since they can't verify the uploaded
files themselves. I see the risk in nasty elements putting stolen
information in the *filenames*, but that is a more limited and more
noticable form of abuse.
Eric B.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Security concerns over local wu-ftpd setup.
1995-11-17 5:00 Security concerns over local wu-ftpd setup Eric Bennett
@ 1995-11-22 5:00 ` Musashi
0 siblings, 0 replies; 3+ messages in thread
From: Musashi @ 1995-11-22 5:00 UTC (permalink / raw)
To: bennett@hpel.umd.edu
Subject: Re: Security concerns over local wu-ftpd setup.
Newsgroups: comp.security.unix,comp.unix.osf.osf1
In-Reply-To: <Pine.OSF.3.91.951117083212.21688A-100000@chessie2.hpel.umd.edu>
Organization: College of Computing, Georgia Tech
Cc:
Bcc:
>So that our UIDs can't be seen by an anonymous ftp user, I
[...]
Make sure 'ls' does not support the -n flag.
>So that incoming files can't be seen by ftp users
> 1) Made /incoming dir ftp.users/0775 so that ftp user and
> regular user can create and delete files.
I STRONGLY recommend you make the incoming directory 1775 as opposed to
0775, as this will prevent others from overwriting/switching files that
do not belong to them.
Musashi
--
/ "Meddle not in the affairs of dragons, for \
*}=={*}>======- thou art crunchy and go well with ketchup." -======<{*}=={*
\ dragon@cc.gatech.edu /
Musashi - - -=- Finger for PGP key -=- - - Musashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1995-11-22 5:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-11-17 5:00 Security concerns over local wu-ftpd setup Eric Bennett
1995-11-22 5:00 ` Musashi
[not found] <199511201847.NAA01931@marksys.misty.com>
1995-11-20 5:00 ` Eric Bennett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox