pure-ftp woes

Discussion in 'Server Operation' started by d3th_n1gG4, Jan 22, 2007.

  1. d3th_n1gG4

    d3th_n1gG4 New Member

    Hi there

    I set up my server a couple of months ago and used the pure-ftp with mysql how to on the site and my server has been a happy camper until about 2 weeks ago, 2 events occurred not sure which one borked the server though.

    The first was an update via apt-get upgrade, the second was someone trying to brute force the server, looked like a zombie script. So I turned off the server as it was not needed for a day or so then fired it up again

    Once it was up I noticed the following. When I try and connect (I use filezilla as a client) i get the following

    Code:
    Status:	Connecting to <server> ...
    Status:	Connected with <server>. Waiting for welcome message...
    Response:	220---------- Welcome to Pure-FTPd ----------
    Response:	220-You are user number 1 of 50 allowed.
    Response:	220-Local time is now 17:16. Server port: 21.
    Response:	220-IPv6 connections are also welcome on this server.
    Response:	220 You will be disconnected after 15 minutes of inactivity.
    Command:	USER <user>
    Response:	331 User <user> OK. Password required
    Command:	PASS ********
    Response:	230-User <user>has group access to:  ftpgroup
    Response:	230 OK. Current restricted directory is /
    Command:	FEAT
    Response:	211-Extensions supported:
    Response:	 EPRT
    Response:	 IDLE
    Response:	 MDTM
    Response:	 SIZE
    Response:	 REST STREAM
    Response:	 MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
    Response:	 MLSD
    Response:	 ESTP
    Response:	 PASV
    Response:	 EPSV
    Response:	 SPSV
    Response:	 ESTA
    Response:	211 End.
    Command:	SYST
    Response:	215 UNIX Type: L8
    Status:	Connected
    Status:	Retrieving directory listing...
    Command:	PWD
    Response:	257 "/" is your current location
    Command:	TYPE A
    Response:	200 TYPE is now ASCII
    Command:	PASV
    Response:	227 Entering Passive Mode (88,198,5,149,192,40)
    Command:	LIST
    Error:	Transfer channel can't be opened. Reason: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
    Error:	Could not retrieve directory listing
    Command:	REST 0
    Error:	Timeout detected!
    Status:	Waiting to retry... (5 retries left)
    
    I thought it may initially be an issue with my user but it seems to affect all users, the other thing I did notice is that the virtual ftp user has no write access on their directory, and I have to manually chmod/chown the directory this however has been around since day 1 of my install.

    The actual ftp user is set to "No login allowed" in webmin and their home directory is set to /bin/null, and the virtual ftp users UID & GID are correct, I am at a bit of a loss here, any tips?
     
  2. falko

    falko Super Moderator Howtoforge Staff

  3. d3th_n1gG4

    d3th_n1gG4 New Member

    I do every 4 hours ;)


    this is my output

    Code:
    ROOTDIR is `/'
    Checking `amd'... not found
    Checking `basename'... not infected
    Checking `biff'... not found
    Checking `chfn'... not infected
    Checking `chsh'... not infected
    Checking `cron'... not infected
    Checking `crontab'... not infected
    Checking `date'... not infected
    Checking `du'... not infected
    Checking `dirname'... not infected
    Checking `echo'... not infected
    Checking `egrep'... not infected
    Checking `env'... not infected
    Checking `find'... not infected
    Checking `fingerd'... not found
    Checking `gpm'... not found
    Checking `grep'... not infected
    Checking `hdparm'... not found
    Checking `su'... not infected
    Checking `ifconfig'... not infected
    Checking `inetd'... not infected
    Checking `inetdconf'... not infected
    Checking `identd'... not found
    Checking `init'... not infected
    Checking `killall'... not infected
    Checking `ldsopreload'... not infected
    Checking `login'... not infected
    Checking `ls'... not infected
    Checking `lsof'... not found
    Checking `mail'... not infected
    Checking `mingetty'... not found
    Checking `netstat'... not infected
    Checking `named'... not infected
    Checking `passwd'... not infected
    Checking `pidof'... not infected
    Checking `pop2'... not found
    Checking `pop3'... not found
    Checking `ps'... not infected
    Checking `pstree'... not infected
    Checking `rpcinfo'... not infected
    Checking `rlogind'... not found
    Checking `rshd'... not found
    Checking `slogin'... not infected
    Checking `sendmail'... not infected
    Checking `sshd'... not infected
    Checking `syslogd'... not infected
    Checking `tar'... not infected
    Checking `tcpd'... not infected
    Checking `tcpdump'... not infected
    Checking `top'... not infected
    Checking `telnetd'... not found
    Checking `timed'... not found
    Checking `traceroute'... not found
    Checking `vdir'... not infected
    Checking `w'... not infected
    Checking `write'... not infected
    Checking `aliens'... no suspect files
    Searching for sniffer's logs, it may take a while... nothing found
    Searching for HiDrootkit's default dir... nothing found
    Searching for t0rn's default files and dirs... nothing found
    Searching for t0rn's v8 defaults... nothing found
    Searching for Lion Worm default files and dirs... nothing found
    Searching for RSHA's default files and dir... nothing found
    Searching for RH-Sharpe's default files... nothing found
    Searching for Ambient's rootkit (ark) default files and dirs... nothing found
    Searching for suspicious files and dirs, it may take a while... nothing found
    Searching for LPD Worm files and dirs... nothing found
    Searching for Ramen Worm files and dirs... nothing found
    Searching for Maniac files and dirs... nothing found
    Searching for RK17 files and dirs... nothing found
    Searching for Ducoci rootkit... nothing found
    Searching for Adore Worm... nothing found
    Searching for ShitC Worm... nothing found
    Searching for Omega Worm... nothing found
    Searching for Sadmind/IIS Worm... nothing found
    Searching for MonKit... nothing found
    Searching for Showtee... nothing found
    Searching for OpticKit... nothing found
    Searching for T.R.K... nothing found
    Searching for Mithra... nothing found
    Searching for OBSD rk v1... nothing found
    Searching for LOC rootkit... nothing found
    Searching for Romanian rootkit... nothing found
    Searching for Suckit rootkit... nothing found
    Searching for Volc rootkit... nothing found
    Searching for Gold2 rootkit... nothing found
    Searching for TC2 Worm default files and dirs... nothing found
    Searching for Anonoying rootkit default files and dirs... nothing found
    Searching for ZK rootkit default files and dirs... nothing found
    Searching for ShKit rootkit default files and dirs... nothing found
    Searching for AjaKit rootkit default files and dirs... nothing found
    Searching for zaRwT rootkit default files and dirs... nothing found
    Searching for Madalin rootkit default files... nothing found
    Searching for Fu rootkit default files... nothing found
    Searching for ESRK rootkit default files... nothing found
    Searching for rootedoor... nothing found
    Searching for ENYELKM rootkit default files... nothing found
    Searching for anomalies in shell history files... nothing found
    Checking `asp'... not infected
    Checking `bindshell'... INFECTED (PORTS:  1524 6667 31337)
    Checking `lkm'... chkproc: nothing detected
    Checking `rexedcs'... not found
    Checking `sniffer'... eth0: not promisc and no PF_PACKET sockets
    Checking `w55808'... not infected
    Checking `wted'... chkwtmp: nothing deleted
    Checking `scalper'... not infected
    Checking `slapper'... not infected
    Checking `z2'... chklastlog: nothing deleted
    Checking `chkutmp'... chkutmp: nothing deleted
    
    Not sure what port 1524 is but the machine is behaving.

    So what suggestions then a fresh install or move to something like vsftp? Multiple accounts are not mission critical on my server
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Do you use Portsentry? If so, I'm sure the message is caused by Portsentry.

    If it isn't too much hassle, I'd reinstall the system. And remember: never touch a running system. ;) (Or at least have a backup before you do.)
     
  5. d3th_n1gG4

    d3th_n1gG4 New Member

    yes I do use portsentry

    As tempting as a reinstall is its a bit of a bugger to do considering I have no failover system. Thanks for the advice anyways :)
     

Share This Page