From owner-freebsd-questions@freebsd.org Tue Jan 10 04:38:30 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EED77CA80CC for ; Tue, 10 Jan 2017 04:38:30 +0000 (UTC) (envelope-from bycn82@gmail.com) Received: from mail-ua0-x22f.google.com (mail-ua0-x22f.google.com [IPv6:2607:f8b0:400c:c08::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A659F18FF for ; Tue, 10 Jan 2017 04:38:30 +0000 (UTC) (envelope-from bycn82@gmail.com) Received: by mail-ua0-x22f.google.com with SMTP id 96so54523905uaq.3 for ; Mon, 09 Jan 2017 20:38:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=qMz6LxTAEuDhNAPCwPJ3welWAcnWTQ6uDR4nkbXiFJs=; b=ljwd8Ewwp/g3NBQhkTlDpGPYDOW0AzyR42cOnSG/JeOKrEr4JbfIuOvJsky3Wo3WWl X++WDtv0IqajoDTvnZq9xi1dxYLFBHBAfuO04YoQ+bx4jt7eeZBpzP0JQIiXrNmzcWES UutctFdN2t9zhIc8Kr024tVhtUZB5F13hw+pn5zYk42YLOW3C++0ZBqOfWBA0iqWXktb NKLX7WLey0PCow6ehjWJWTXvMkfpE46paokajA7xtW931FSOKMz0D9Qy44iyb+GncKLZ Les4WBIKrSdfxDT5xbJhxvN6pl0icH1T8XpMGYCaDtmGofMCkpo7By3nHBt2bhEero7O +R8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=qMz6LxTAEuDhNAPCwPJ3welWAcnWTQ6uDR4nkbXiFJs=; b=L+q4g2xvG/vHvBMKCnvi4TeyMckvWI2VasSwHjQ7kNkSD5j6pki7GXFVuKjgnJ6Xr5 IllehZrHQZEFcFLpC5PnR/qa1waEkNG1jYwLQuphaPTFxjVAn32Nf9S2KewSDMEowMn+ HjFPns8/kKwW4m5Hb9Anaez5F68kQdPPwU8mcdKttioxTiWPyhbSUobS2XacskhEmNRz c2GYQOXpsyQWu0ZCS5l5GoWusXkxhzOdBfWBz+0oROK6B38njwcWuFKSMzR5XPTx/yaz PWtLkCPXonvB2XlWiun9WhIYl8wJs4MMf81w080UP6tEravZeMUmebxyykeK5b1VPouN gt0g== X-Gm-Message-State: AIkVDXIixLyixPrVFbWgn25JPyAA6/c1qwqG2AQ+W2Uztt2go950Hd3VyQioNq6OV7VQc74IeLYsbW5dzHj4kw== X-Received: by 10.159.48.79 with SMTP id i15mr628692uab.13.1484023109799; Mon, 09 Jan 2017 20:38:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.94.132 with HTTP; Mon, 9 Jan 2017 20:38:29 -0800 (PST) Reply-To: bycn82@dragonflybsd.org In-Reply-To: References: From: Bill Yuan Date: Tue, 10 Jan 2017 12:38:29 +0800 Message-ID: Subject: Re: /tmp/swap is causing my CPU busy To: Warren Block Cc: FreeBSD Questions Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 04:38:31 -0000 Confirmed, Someone hacked into my DEV environment, the password is too insecure :( Thanks. On 10 January 2017 at 12:09, Warren Block wrote: > On Tue, 10 Jan 2017, Bill Yuan wrote: > > On 10 January 2017 at 01:04, Warren Block wrote: >> On Tue, 10 Jan 2017, Bill Yuan wrote: >> >> Hi, >> Need support here. I just noticed my machine is busy and a >> process is the >> root cause, I am not familiar with the memory/SWAP, Can >> someone please help >> to take a look? any info is required? please let me know. >> >> #top >> 52 processes: 1 running, 50 sleeping, 1 zombie >> CPU: 3.5% user, 0.0% nice, 0.6% system, 0.0% interrupt, >> 95.9% idle >> Mem: 53M Active, 997M Inact, 133M Wired, 44M Buf, 791M Free >> Swap: 2100M Total, 2100M Free >> >> PID USERNAME THR PRI NICE SIZE RES STATE C >> TIME WCPU >> COMMAND >> 25592 root 10 25 0 778M 9272K uwait 3 >> 0:38 19.02% >> .swap >> 25599 root 1 20 0 7416K 2596K CPU0 0 >> 0:00 0.11% top >> >> #ps -axd | grep swap >> 25481 0 S+ 0:00.00 | | `-- grep swap >> 22927 - Ss 172:10.74 |-- /tmp/.swap >> >> #uname -a >> FreeBSD NetGate1 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 >> r306420: Thu >> Sep 29 03:40:55 UTC 2016 >> root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC >> i386 >> >> >> That does not look good to me. A hidden file named ".swap" that i= s >> *running*, and as root? I would immediately disconnect that machine fro= m >> the net and then check to see if that's a compromise, because it sure lo= oks >> fishy. >> > > I=E2=80=8Bt is inside my dev environment, but I want to know what it is.= =E2=80=8B >> > > It is not a standard file, let's start with that. Again, I would isolate > it until I was very sure it was not a problem. > > Do you have some sort of blogging software or exploitable PHP web thing > installed? > > Can this questionable file be killed without coming back? > pkill .swap > pgrep .swap > > What kind of file is it? > file /tmp/.swap > > When was it put there? > ls -lh /tmp/.swap