LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 10-17-2014, 09:43 AM   #1
Prince Imhotep
Member
 
Registered: Jan 2014
Posts: 45

Rep: Reputation: Disabled
S.O.S. I think my box is under attack


Hi,

Since the early morning, system monitor shows internet traffic that I'm not responsible of. What made me suspicous is that most of it was uploading, and I'm not running any application that needs to upload - like a bittorrent client for instance.

This behaviour shows significantly while I'm running google-chrome, and the uploading rises to 30+ KB/s. My OS is Ubuntu 14.04, with lxde desktop, and compiz+emerald. I began searching the web about a way to tell out what's going on. I stumbled on a page about lsof, and the page stated that the command running with theses options lsof +L1 will show processes using deleted files, which might correspond to an attack. I ran the command, and the result is in the chrome_attack.txt file attached to this post.

User-name is my user name.

So what I did, is

Code:
sudo kill $(lsof -t +L1)
to kill any suspecious process.

But there is still small internet traffic that runs without any corresponding command - that I know of - to cause it, and it's the first time such traffic shows. A screenshot of the system monitor window showing what I'm talking about is attached to the post.

Please any help is appreciated. I know zero about security, and I just don't know where to start. I thought linux is immune to such stuff. I only have avast anti-virus scanner installed, and that's it. The irony is that chrome was last updated just two days ago, which is rather hillariously pathetic.

Thanks.
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2014-10-17 15:41:28.png
Views:	47
Size:	70.0 KB
ID:	16672  
Attached Files
File Type: txt chrome_attack.txt (37.5 KB, 20 views)
 
Old 10-17-2014, 10:22 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
http://superuser.com/questions/50329...unted-as-tmpfs
 
Old 10-17-2014, 11:02 AM   #3
Prince Imhotep
Member
 
Registered: Jan 2014
Posts: 45

Original Poster
Rep: Reputation: Disabled
Thank you smallpond for your reply. I still didn't tryout the options suggested on the page you mentioned, I'll try it in a couple of minutes then post the results. Yet this doesn't explain the ghost traffic that appeared out of the blue this morning, and still here, usually the third graph in the shot I posted is zero, or there is no synchro traffic like this, do you have any explanation?
 
Old 10-17-2014, 11:05 AM   #4
Prince Imhotep
Member
 
Registered: Jan 2014
Posts: 45

Original Poster
Rep: Reputation: Disabled
also the strange upload bandwidth occupation by chrome, what it is uploading exactly? and to where?
 
Old 10-17-2014, 11:46 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
maybe this is rather a feature of chrome than anything else?
like, calling home to google to reprot on your browsing habits to "be able to offer optimized serach results"?

how about just using a different browser?

or at least set up chrome to not use any of those wonderful "enhancements"?

esp. those "keep background processes running after closing chrome"?
 
Old 10-17-2014, 11:57 AM   #6
Ihatewindows522
Member
 
Registered: Oct 2014
Location: Fort Wayne
Distribution: Ubuntu 16.04 LTS
Posts: 616
Blog Entries: 2

Rep: Reputation: 166Reputation: 166
Try using Chromium instead (and COMPLETELY unistalling Chrome!!) Chromium is open source and managed by the community that uses it, so no monkey business on the part of Google.

Code:
sudo apt-get remove chrome
sudo apt-get install chromium
Also, make sure you don't have any fishy extensions. Even the simplest of things can be spyware, as proven by the flashlight apps on the Play Store.
 
Old 10-17-2014, 12:15 PM   #7
Prince Imhotep
Member
 
Registered: Jan 2014
Posts: 45

Original Poster
Rep: Reputation: Disabled
Please take a look at the third graph in the window screenshot I attached, and tell me is this a normal behavior of a web browser?

I mean if it was download bandwidth I would think it's a page with a buggy refresh timing, a buggy jscript, but what would make a web browser take such upload bandwidth? and to upload what? and this is no joke I swear it, the browser is behaving this way on it's own.

The option on the page posted by smallpond didn't work and it seems that it's not supported, it doesn't appear in the man page. And I've got the message, that having deleted files invoked by chrome is how it goes, but still that doesn't explain the traffic behavior.
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2014-10-17 19:00:11.png
Views:	27
Size:	69.7 KB
ID:	16675  
 
Old 10-17-2014, 12:17 PM   #8
Prince Imhotep
Member
 
Registered: Jan 2014
Posts: 45

Original Poster
Rep: Reputation: Disabled
This is a very nice suggestion Ihatewindows522, and a sound one too but I need to make sure my system isn't infected with any thing.
 
Old 10-17-2014, 12:24 PM   #9
Prince Imhotep
Member
 
Registered: Jan 2014
Posts: 45

Original Poster
Rep: Reputation: Disabled
I remember I chose chrome over chromium after a search about "chrome vs. chromium", and it led me to this page http://askubuntu.com/questions/6253/...are-the-advant, which says that both chrome and chromium have usage-tracking code, but chrome is more stable than chromium.
 
Old 10-17-2014, 12:33 PM   #10
Ihatewindows522
Member
 
Registered: Oct 2014
Location: Fort Wayne
Distribution: Ubuntu 16.04 LTS
Posts: 616
Blog Entries: 2

Rep: Reputation: 166Reputation: 166
Quote:
Originally Posted by Prince Imhotep View Post
This is a very nice suggestion Ihatewindows522, and a sound one too but I need to make sure my system isn't infected with any thing.
Try

Code:
killall chrome
and see if the uploading stops. If it does, you can most likely just uninstall Chrome and be safe. If another process takes it's place, or the Chrome process starts again you've got deeper problems. If it is the case that you have something deeper, then you need to completely re-install, and wipe your harddrive with DBAN.

Also, what extensions do you have in Chrome?

EDIT: Come to think of it, it could be something with Ubuntu itself. Install WireShark and see where the packets are going. If they go to Amazon, get rid of Ubuntu altogether.

Last edited by Ihatewindows522; 10-17-2014 at 12:37 PM.
 
Old 10-18-2014, 04:49 AM   #11
Prince Imhotep
Member
 
Registered: Jan 2014
Posts: 45

Original Poster
Rep: Reputation: Disabled
Hi again, sorry for the delayed reply, I had to crash for a couple of hours.

I continued digging, and began to use iftop. I searched for a program that gives output like iftop and pipe/redirect to txt but found no other than iftop, but a newer version, as the one included in Trusty doesn't support but ncurses output. Downloaded the latest tar ball, and compiled it.

I used this command chain to output the addresses directly while idle - without any internet client running - ;

Code:
sudo iftop -t | grep -ie .b | grep -ie "=" | sed -n 's/^\s*//;s/\s*=.*//;s/<//p' >> iftop.out.txt
The output is attached to the post.

What appeared in the text file are four ip addresses ;
  1. all-systems.mcast.net
  2. 220-133-86-83.HINET-IP.hinet.net
  3. 192.168.1.254
  4. 224.0.0.251

The first and the last are multicast dns service calls, and I'm not fully aware yet of their importance. The third is my routers address on the lan. The second is my proof of the validity of my suspecions, it's reported to be a spammer address, one of the largest http://spam-vs-freedom.blogspot.com/...-hinetnet.html. WTF IS THAT DOING ON MY SYSTEM.

Now what should I do with that?

I will dig more and report back, any help is appreciated.

Thanks
Attached Files
File Type: txt iftop.out.txt (12.0 KB, 22 views)
 
Old 10-18-2014, 05:37 AM   #12
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Prince Imhotep View Post
Now what should I do with that?
i can only repeat previous advice that chrome is not the best choice if you are security/privacy aware.

you can also install some sort of hostsblock (this is my favorite, but there are various scripts like that) to get system-wide, browser-independent domain blocking.

i use this, and no need for adblock anymore.

ps: some very simple and basic advice about browsing habits, e.g. close your browser completely every now and then and delete all cookies and offline storage and cache. don't allow 3rd party cookies (from unknown domains).
don't blindly open all tabs from your previous session - because that just reloads all the (potentially suspicious) cookies and other content.
don't use google as your home page.

Last edited by ondoho; 10-18-2014 at 05:40 AM.
 
Old 10-18-2014, 06:19 AM   #13
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Prince Imhotep View Post
I continued digging, and began to use iftop.
It was suggested you use wireshark (and to that I add running 'lsof -Pwlni 2>&1>/tmp/lsof.log' as root user once). One of the reasons for running a full packet capture (tcpdump, tshark, etc, etc) is that you get the full payload which makes it easier to assess what traffic is actually sent. (Running 'lsof' gives you a netstat-like output with PID and UID.) By not following the packet capture suggestion you waste time and effort.


*Please don't change browser (and delay installing something past-millennium and crude like "hostsblock") until you've found out what's causing this traffic.
 
Old 10-19-2014, 08:14 AM   #14
Prince Imhotep
Member
 
Registered: Jan 2014
Posts: 45

Original Poster
Rep: Reputation: Disabled
Sorry for taking so long to reply but I had to learn how to set up wireshark to capture interfaces without running as root. Simple trick, but quirky and takes some time to make it.

Quote:
Originally Posted by unSpawn View Post
It was suggested you use wireshark
I hope I didn't leave the impression of not following advice, It's just that command line tools manual pages are simple - usually - and rather straight forward to setup - even compile - and apply. I have tried to use wireshark some time ago, and couldn't make it run without being root, and I knew that time there should be some twist in the setup, and it had to be dug out, and that had to take time, etc., etc.....so I dropped it back then, cause I didn't need it. This is why I opted to simple tools, which were savvy too.

Now that I have wireshark up and running, I don't know how to use it, or how can it be useful in the current situation?...further help is needed.

Quote:
Originally Posted by unSpawn View Post
Running 'lsof' gives you a netstat-like output with PID and UID.
The output of lsof is of limited use, because it doesn't show the ip address/dns resolution of the remote source/destination, it just shows an asterisk.

Quote:
Originally Posted by unSpawn View Post
*Please don't change browser (and delay installing something past-millennium and crude like "hostsblock") until you've found out what's causing this traffic.
This is how I'm thinking too, I have to know first to what extent the creepy stuff has infested my system, and how. And that doesn't mean I wont follow advice, It's just that I need to make sure.
 
Old 10-19-2014, 12:06 PM   #15
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Prince Imhotep View Post
Now that I have wireshark up and running, I don't know how to use it, or how can it be useful in the current situation?...further help is needed.
Load your packet capture then head over to:
- Statistics > Summary: check the average packets/sec, MBit/sec and see if that's reason for concern,
- Statistics > Protocol Hierarchy: this shows you what the most used protocol will be,
- Analayse > Expert Info: see the "chats" tab and select "count" to get an idea what most of the request are (if any).
Finally selecting a line in the packet list pane will show its protocol contents and payload in the other two panes.
*Should you think it beneficial to share your packet capture then please contact me via email.


Quote:
Originally Posted by Prince Imhotep View Post
The output of lsof is of limited use, because it doesn't show the ip address/dns resolution of the remote source/destination, it just shows an asterisk.
IMHO one should avoid using address resolution when using command line tools until it's absolutely necessary as it takes time. Usually there's a "-n" switch to prohibit it. And I'd rather see the output of (sudo) 'lsof -Pwlni 2>&1>/tmp/lsof.log' for myself if you don't mind.
 
  


Reply

Tags
attack, crack, google chrome, lsof, traffic



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] simulating blackhole attack and wormhole attack in ns-2 aditijigyasi Linux - Newbie 7 07-04-2016 08:50 AM
LXer: Huge horde of droids pummel code box GitHub in password-guess attack LXer Syndicated Linux News 0 11-21-2013 10:31 PM
My raspbian box have to ping other box first then other host can see my box jtingkir Linux - Networking 10 08-09-2013 07:53 AM
URGENT: hacker's attack on linux box yawe_frek Linux - Security 4 08-08-2007 06:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration