Canedje
Posts: 265
Joined: Thu Mar 26, 2015 7:18 am

Virus protection

Mon Jun 01, 2015 2:39 pm

I do have the idea that my RPI is having a virus.

For about 2 weeks ago the command wgets was suddenly disapeared.
Today the crontab -e was changed by an other crontab, but not done by me.
About a month ago I did found a strange file called "dead.letter". I removed that.

Is there a possibility to check on virussen?
or how can I know somebody did log in?
I do have an extra personall login. Beside that I changed the standard password for user "pi" for about a week ago.

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Virus protection

Mon Jun 01, 2015 2:46 pm

are you connected to the internet ?
have you opened up remote login of your RPI from the internet
have you disabled user pi?
are you using ssh keys and not passwords
does anyone else have access to your RPI

then
if you are concered then copy any data you have off the SD card
re -image the SDcard from raspbain and put on the things you use
follow proper security

looking to see if you have a virus on a running system is not the way to do it
scan your sdcard on another machine

if an attacker has access then all bets are off - everything done via that machine should be considered broken
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

mikerr
Posts: 2825
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Virus protection

Mon Jun 01, 2015 2:59 pm

Canedje wrote: About a month ago I did found a strange file called "dead.letter". I removed that.
the dead.letter file is created when you start an email and fail to send it (equivalent to drafts)
Android app - Raspi Card Imager - download and image SD cards - No PC required !

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6229
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Virus protection

Mon Jun 01, 2015 3:00 pm

Viruses aren't really the thing to worry about. It's bad security practices like using weak or default password which will get you.

Canedje
Posts: 265
Joined: Thu Mar 26, 2015 7:18 am

Re: Virus protection

Mon Jun 01, 2015 3:02 pm

mikerr wrote:
Canedje wrote: About a month ago I did found a strange file called "dead.letter". I removed that.
the dead.letter file is created when you start an email and fail to send it (equivalent to drafts)
Thanks. Thats good news ;)

Canedje
Posts: 265
Joined: Thu Mar 26, 2015 7:18 am

Re: Virus protection

Mon Jun 01, 2015 3:04 pm

Is there somewhere a possibility to check who did login like in a logfile or so?

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: Virus protection

Mon Jun 01, 2015 3:09 pm

You might simply be experiencing a corrupted SD card; however, I doubt it.

The clue is your crontab. If crontab changes 'somebody' changed it. In any case, the solution is the same-- reimage the SD card and start over.

You may be able to save some file(s) but save the minimum and only save what you must... consider any file a trojan at this point (although its unlikely).

The problem here is that people put their RPi on the Internet without a firewall, and without changing the default password for PI. One simple thing an attacker can do easily is to create another userid and then give it sudo privileges. Look in your /etc/passwd file and see if you have users you're not aware of. Look in your /etc/sudoers file and see if another userid has been given permissions. Often an attacker is not trying to damage your PI... on the contrary... they often hope that your PI will run a long time before you notice that they have access to your system... that way they can use your system as a bot, as part of a DDOSA, or as a way to hide source id and other stuff.

Always put your computers (even your iddy bitty toys) behind a firewall, disable remote login (unless you must have it) and change default passwords... lock down your ssh, disable stupid protocols like telnet, and put your ssh on another port besides 22.
marcus
:ugeek:

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Virus protection

Mon Jun 01, 2015 3:10 pm

no , because any good cracker will have altered everything
run a scan from another machine
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Virus protection

Mon Jun 01, 2015 3:16 pm

Canedje wrote:Is there somewhere a possibility to check who did login like in a logfile or so?
/var/log/auth.log has all logins and security related stuff.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Troubleshooting”