LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-05-2021, 04:09 PM   #1
liquidglass
LQ Newbie
 
Registered: Jun 2021
Posts: 13

Rep: Reputation: Disabled
Angry How to extract log files from a compromised distro


I am totally reluctant to post this as I fear a torrent of scorn and ridicule. Yes, I have installed - previously - an ISO that was insufficiently verified. I was still running Windows so it is harder to check the signature in particular. Obviously, if I had googled the significance of verifying the signature I would not be writing this post now.

The image had checked out and I finally decided to install it. I installed it without persistence using Rufus directly over Windows 7 and it seemed to have gone well. I am using a wireless connection with an adapter I especially ordered which works with Linux out of the box.

After I adjusted a few things I logged off but not before looking at Netstat where I saw several IP addresses connected to my computer. I copied them down and checked them on my Windows laptop with a special utility. All three addresses were universities, one of them in Europe.

I was puzzled by this. Subsequently I also noticed that my modem would show someone logged in to my wireless network after I had already logged off. Apparently there are some installations that come with malware that gives a hacker access every time the user is logged in.

I decided to download another ISO from a different place and install it over the old one. I used my Windows laptop for this, of course, and yes, this time I did manage to verify the signature. Unfortunately and quite stupidly I did not reset my modem and the hacker was back within a day or two.

The trouble is, I’m not sure how these types of malware work. Is it a Trojan, a worm, a keylogger? Would resetting the modem eliminate this issue?

But more importantly, how did they gain access to the new installation which was clean as far as verifiable with checksums and sig??

I need to export those system log files (all the logs actually) but how do I do this without exporting the virus as well? I have heard people say that once you’re hacked the log files can get altered to hide the evidence but in a post inUbuntu somewhere it says there are signs, including the attempts at obfuscating.

Thanks for reading. Any constructive feedback is appreciated.
 
Old 07-05-2021, 04:29 PM   #2
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,463
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
How to extract log files from a compromised distro

Boot a live CD and copy the logs to a USB stick.

But I have to ask: What distro, and where did you download it from?
 
Old 07-05-2021, 06:35 PM   #3
liquidglass
LQ Newbie
 
Registered: Jun 2021
Posts: 13

Original Poster
Rep: Reputation: Disabled
Sorry, what?

I understand “copy the logs to a USB stick.”

I do not understand “Boot a live CD.” Can you please explain what you mean by that?

Do you mean I should boot the ISO that I installed on that laptop? That is on a USB, btw, not a disk. Is the reasoning that a clean copy of Linux Mint will load and be impervious to the virus? And will it have access to those logs? (I would think not.)

Also, is WiFi needed to download the logs?

Thanks rkelsen, looking forward to your reply.
 
Old 07-05-2021, 06:50 PM   #4
Grobe
Member
 
Registered: Aug 2019
Location: Close to north
Distribution: Fedora
Posts: 117

Rep: Reputation: Disabled
Quote:
Originally Posted by liquidglass View Post
I do not understand “Boot a live CD.” Can you please explain what you mean by that?
This one should explain clearly the what and why:
https://www.youtube.com/watch?v=fU3zCL5g_7E
 
Old 07-06-2021, 12:52 PM   #5
liquidglass
LQ Newbie
 
Registered: Jun 2021
Posts: 13

Original Poster
Rep: Reputation: Disabled
I’m sorry @Grobe maybe I should have anticipated this and explained that I can’t watch any YouTube videos right now.

I also don’t see anything inherently wrong with answering a pretty straightforward question with a straightforward answer that doesn’t require one to jump through any additional hoops?

Thanks for trying to help.
 
Old 07-06-2021, 01:49 PM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,982

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
Quote:
Originally Posted by liquidglass View Post
I installed it without persistence using Rufus directly over Windows 7 and it seemed to have gone well. I am using a wireless connection with an adapter I especially ordered which works with Linux out of the box.

After I adjusted a few things I logged off but not before looking at Netstat where I saw several IP addresses connected to my computer. I copied them down and checked them on my Windows laptop with a special utility. All three addresses were universities, one of them in Europe.
would be nice to know more about it. It looks strange for me
Quote:
Originally Posted by liquidglass View Post
Subsequently I also noticed that my modem would show someone logged in to my wireless network after I had already logged off. Apparently there are some installations that come with malware that gives a hacker access every time the user is logged in.
How do you know that? Can you give us some details?
Quote:
Originally Posted by liquidglass View Post
I decided to download another ISO from a different place and install it over the old one. I used my Windows laptop for this, of course, and yes, this time I did manage to verify the signature. Unfortunately and quite stupidly I did not reset my modem and the hacker was back within a day or two.
And again, how do you know that?
Quote:
Originally Posted by liquidglass View Post
The trouble is, I’m not sure how these types of malware work. Is it a Trojan, a worm, a keylogger? Would resetting the modem eliminate this issue?

But more importantly, how did they gain access to the new installation which was clean as far as verifiable with checksums and sig??
obviously we have no any idea, you gave no any real information or detail.
Quote:
Originally Posted by liquidglass View Post
I need to export those system log files (all the logs actually) but how do I do this without exporting the virus as well? I have heard people say that once you’re hacked the log files can get altered to hide the evidence but in a post inUbuntu somewhere it says there are signs, including the attempts at obfuscating.
You can safely copy those log files (actually I don't know which files), that will not harm anything.

But first you need to boot another os, which is surely not infected. That's why was suggested to download and boot a live cd. And probably reset your modem.


Quote:
Originally Posted by liquidglass View Post
I’m sorry @Grobe maybe I should have anticipated this and explained that I can’t watch any YouTube videos right now.
You have another windows laptop I guess you can use that to create that live cd (actually on an usb) and boot it. But probably not.
Quote:
Originally Posted by liquidglass View Post
I also don’t see anything inherently wrong with answering a pretty straightforward question with a straightforward answer that doesn’t require one to jump through any additional hoops?
Believe me, much easier (and much more efficient) to send a link to a good page instead of copying that content or explaining that again in a few lines. Not only for me, but also for you.

But first of all without details we cannot help you further.
 
1 members found this post helpful.
Old 07-06-2021, 01:51 PM   #7
Grobe
Member
 
Registered: Aug 2019
Location: Close to north
Distribution: Fedora
Posts: 117

Rep: Reputation: Disabled
Red face I don't do your homework

Quote:
Originally Posted by liquidglass View Post
I also don’t see anything inherently wrong with answering a pretty straightforward question with a straightforward answer that doesn’t require one to jump through any additional hoops?
No, nothing wrong, but this is subjects that under normal circumstances can be searched up on internet on google, duckduckgo, etc that require little effort.

Also, nobody pays me anything to participate in this forum so I don't see what is wrong about not wasting my time on simple tasks that one must expect the thread starter to perform him/herself.

It's like - I don't do your homework, if you se what I mean.
 
1 members found this post helpful.
Old 07-06-2021, 03:25 PM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,712

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by liquidglass View Post
Sorry, what?
I understand “copy the logs to a USB stick.”

I do not understand “Boot a live CD.” Can you please explain what you mean by that? Do you mean I should boot the ISO that I installed on that laptop? That is on a USB, btw, not a disk. Is the reasoning that a clean copy of Linux Mint will load and be impervious to the virus? And will it have access to those logs? (I would think not.)

Also, is WiFi needed to download the logs?
I'm seeing an oft-repeated pattern in these posts, one that's been recurring for about a year or so. Hoping this isn't yet another in that long line, but what you're posting and saying isn't adding up logically.

You loaded Linux; so you obviously know how to not only download Linux, but create bootable media...yet don't understand how to boot from it? How did you install Linux if you can't boot? You claim 'malware that gives hackers access' to your modem. What evidence do you have? How did you see this? And is it more likely some 'hacker' got in through 'malware', or that you have a neighbor using your wifi? Or a device in your house is logged into your network??

You say yourself:
Quote:
Originally Posted by liquidglass
I also don’t see anything inherently wrong with answering a pretty straightforward question with a straightforward answer that doesn’t require one to jump through any additional hoops?
...yet you still haven't said what you downloaded, from where, despite being asked. Seems like a pretty straightforward question with a straightforward answer.

You're at once claiming to be knowledgeable (asking about UFW/firewall settings, which ports are open, able to track wifi 'hackers', reset modems, etc.), and also so inexperienced that you don't know how to boot from external media.

I'm with pan64; provide some evidence, answer some easy questions that you've been asked, and provide details and we can try to help. Otherwise, there is nothing we can tell you.
 
2 members found this post helpful.
Old 07-06-2021, 11:10 PM   #9
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,463
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
Quote:
Originally Posted by liquidglass View Post
I also don’t see anything inherently wrong with answering a pretty straightforward question with a straightforward answer that doesn’t require one to jump through any additional hoops?
Perhaps this will help then: https://en.wikipedia.org/wiki/Live_CD

I'm going to reiterate my question: Please tell us what you downloaded and from where. The kind of incidents you're referring to are not common in Linux distributions or Open Source software in general.

As can be seen with the Audacity debacle, 'phoning home' is a practice which is routinely condemned, and software which does so is all but admonished from the community. The developers of Audacity have had to back down, and have now modified theirs to be an 'opt-in' system, instead of 'opt-out' by default.

Hence my curiosity about what you downloaded and where you got it.
 
Old 07-07-2021, 02:51 AM   #10
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 liquidglass View Post
I am totally reluctant to post this as I fear a torrent of scorn and ridicule. Yes, I have installed - previously - an ISO that was insufficiently verified. I was still running Windows so it is harder to check the signature in particular. Obviously, if I had googled the significance of verifying the signature I would not be writing this post now.

The image had checked out and I finally decided to install it. I installed it without persistence using Rufus directly over Windows 7 and it seemed to have gone well. I am using a wireless connection with an adapter I especially ordered which works with Linux out of the box.

After I adjusted a few things I logged off but not before looking at Netstat where I saw several IP addresses connected to my computer. I copied them down and checked them on my Windows laptop with a special utility. All three addresses were universities, one of them in Europe.

I was puzzled by this. Subsequently I also noticed that my modem would show someone logged in to my wireless network after I had already logged off. Apparently there are some installations that come with malware that gives a hacker access every time the user is logged in.

I decided to download another ISO from a different place and install it over the old one. I used my Windows laptop for this, of course, and yes, this time I did manage to verify the signature. Unfortunately and quite stupidly I did not reset my modem and the hacker was back within a day or two.

The trouble is, I’m not sure how these types of malware work. Is it a Trojan, a worm, a keylogger? Would resetting the modem eliminate this issue?

But more importantly, how did they gain access to the new installation which was clean as far as verifiable with checksums and sig??

I need to export those system log files (all the logs actually) but how do I do this without exporting the virus as well? I have heard people say that once you’re hacked the log files can get altered to hide the evidence but in a post inUbuntu somewhere it says there are signs, including the attempts at obfuscating.

Thanks for reading. Any constructive feedback is appreciated.
All this seems very unlikely.
I just answered another post where you broke your system (essentially turning a stable release into a testing release, rebooting, getting weird glitches) ans suspected you got infected.
Now it's something to do with image file verification?

As others said, take a deep breath and do not rush to conclusions until you have some proof.

Occam's razor applies.
 
1 members found this post helpful.
  


Reply



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
How to log internal-sftp chroot jailed users access log to /var/log/sftp.log file LittleMaster Linux - Server 0 09-04-2018 03:45 PM
server got compromised need help in reading audit.log haseem saeed Linux - Newbie 14 06-28-2017 06:59 PM
[SOLVED] zorin os linux possibly compromised linux distro and website ballsystemlord Linux - Security 4 04-04-2016 10:59 PM
how do log files extract information from the packets? Avanti Linux - Security 6 01-11-2012 11:21 AM
exim4 / portmap compromised. problem "solved" -> exim4 question & rkhunter log eichenhain Linux - Security 2 01-10-2011 11:00 AM

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

All times are GMT -5. The time now is 12:26 AM.

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