LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 04-27-2016, 01:22 AM   #1
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Cool Network probes


hi guys, how to detect network probes such as port scans, port sweeps or other types.

Is there a built-in tool in Linux to do this? SNMP can detect it?

Are there tools specifically for this?

Thank you.
 
Old 04-27-2016, 07:53 AM   #2
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 JJJCR View Post
hi guys, how to detect network probes such as port scans, port sweeps or other types.
Snort / Suricata PSAD, Scanlogd, iptables rule sets and more...


Quote:
Originally Posted by JJJCR View Post
Is there a built-in tool in Linux to do this?
Only thing built-in is NetFilter.


Quote:
Originally Posted by JJJCR View Post
SNMP can detect it?
SNMP serves another function: check your favorite search engine?
 
1 members found this post helpful.
Old 04-27-2016, 08:07 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
You can expect port-scans, and you should do scans yourself. Be certain that you know which ports are open.

Furthermore: don't expose "ssh!" Even though it's a "secure" shell, in that it encrypts the traffic that's sent across the wire, "it's still a shell" that, by default, offers anyone on Planet Earth a login: prompt.
 
1 members found this post helpful.
Old 04-28-2016, 01:23 AM   #4
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Smile

Quote:
Originally Posted by sundialsvcs View Post
You can expect port-scans, and you should do scans yourself. Be certain that you know which ports are open.

Furthermore: don't expose "ssh!" Even though it's a "secure" shell, in that it encrypts the traffic that's sent across the wire, "it's still a shell" that, by default, offers anyone on Planet Earth a login: prompt.
Didn't know the SSH offers a login prompt for everyone to try and break the Shell till the hands bleeds.
 
Old 04-28-2016, 01:34 AM   #5
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Lightbulb

Quote:
Originally Posted by unSpawn View Post
Snort / Suricata PSAD, Scanlogd, iptables rule sets and more...



Only thing built-in is NetFilter.



SNMP serves another function: check your favorite search engine?
Thanks unSpawn, i'll check on those stuff.
 
Old 04-28-2016, 08:57 AM   #6
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by sundialsvcs View Post
You can expect port-scans, and you should do scans yourself. Be certain that you know which ports are open.

Furthermore: don't expose "ssh!" Even though it's a "secure" shell, in that it encrypts the traffic that's sent across the wire, "it's still a shell" that, by default, offers anyone on Planet Earth a login: prompt.
I'm going to disagree with you here. SSH is a great tool and if used properly it is no more insecure then any other form of connection.
 
1 members found this post helpful.
Old 04-28-2016, 09:41 AM   #7
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,056

Rep: Reputation: 78
The key is to utilize a firewall to limit access to ports only to those who should access those ports..

In my experience, you usually have to open port 80 and port 443 to the world at large because these are the ones that server HTTP and HTTPS traffic, respectively. I always try to limit port 22 (the ssh port) such that only me and my web dev collaborators can connect to it.. This is not always possible -- like if you offer shared hosting or want to be able to connect to a machine from anywhere -- but you can usually set up something pretty restrictive and then open it up to specific IP addresses on request if your dev team is smallish.

Other ports, like MySQL server or something should probably not be open to the public either. Every open port, where some application is listening, offers a potentially exploitable doorway into your machine.
 
Old 04-28-2016, 01:38 PM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Quote:
Originally Posted by lazydog View Post
I'm going to disagree with you here. SSH is a great tool and if used properly it is no more insecure then any other form of connection.
The problem that I have with it is that ... the L33T H4X0R who starts hammering your sshd with passwords doesn't give a tinker's dam whether " the shell that is now offering him a login: prompt " encrypts its traffic or not. He has an avenue by which he can attempt to log-in to your system, and (by default ...) he needs nothing more than a password by which to do it.

(1) Obviously, ssh sometimes is "the pragmatic tool-of-choice." But there is a "right way" and a "wrong way" to do it ... and, there is a 'sticky' in this very forum which talks about what's right and what's wrong. The "right way" consists of digital certificates, where the fall-back use of "passwords" is specifically excluded.

(2) (Open)VPN ... once again using digital certificates ... is a superior alternative (IMHO) because it offers blanket protection. It manifests itself as "a secure router," and therefore is available equally to any-and-all clients on your local network. They don't have to "be sure to be doing the proper thing" in order for their communications to be secure: it just is "secure." (P-r-o-v-i-d-e-d ... t-h-a-t ... "PSKs == passwords(!)" are not being used to (in-)secure the VPN link!)

The crypto term for this is ... "entropy." A password, any(!) password, contains very little entropy. Therefore, it can reasonably be "guessed," and therefore, "forged." A digital certificate consisting of thousands of truly-random bits ... cannot. Such a certificate is not only un-forgeable, but it is also unique.

If you work in any office building, I daresay that you had to use some kind of badge to get to the place where you are now sitting. I'm sure that there was not someone standing there, asking you to "say the magic word."

Last edited by sundialsvcs; 04-28-2016 at 01:39 PM.
 
1 members found this post helpful.
Old 04-28-2016, 01:55 PM   #9
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by sundialsvcs View Post
The problem that I have with it is that ... the L33T H4X0R who starts hammering your sshd with passwords doesn't give a tinker's dam whether " the shell that is now offering him a login: prompt " encrypts its traffic or not. He has an avenue by which he can attempt to log-in to your system, and (by default ...) he needs nothing more than a password by which to do it.
"You got to stop thinking so negative son!!" Go back and read my post once again and re-read the word "Properly" several time and let it sink in.

There are several ways to secure ssh and keep the " L33T H4X0R " out.
 
Old 04-28-2016, 02:20 PM   #10
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,264
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
The problem with naive password enabled SSH is that they already know one user name - root, so all they have to guess is the password! So ___ALWAYS___ disable root login via SSH!

But even so, getting or guessing a user name is often not as difficult as you might think, and without something else limiting the number of guesses or blocking the path, it is almost inevitable that a sustained probe will be successful.

SSH with shared keys and disabled passwords effectively blocks that path - if you guard your keys.

Even so, moving it to a non-standard port and blocking by IP after a few failed attempts is still worthwhile.

I limit by iptables rules - 3 requests in 5 minutes gets you banned for an hour. 6 requests in 30 minutes gets you banned for life. Even so I still see adaptive bots probing at a sustained slow rate and manually ban them as I see them.

So, SSH is great - but _ONLY_ with shared keys and then _ONLY_ with rate limiting.
 
1 members found this post helpful.
Old 05-04-2016, 02:03 AM   #11
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Quote:
3 requests in 5 minutes gets you banned for an hour. 6 requests in 30 minutes gets you banned for life.
Waah..so strict heheh.. Actually, better to do that than to be sorry.
 
  


Reply

Tags
network, probes, threat



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
Possible successful probes detected newbie14 Linux - Security 25 04-26-2013 09:51 AM
Redhat Network Satellite and monitoring with probes givmeasec Red Hat 10 03-27-2012 08:49 AM
temperature probes for smoker Eppo Linux - Hardware 10 01-21-2012 06:50 PM
How Kudzu probes HardDisk alnreddy Linux - Hardware 4 12-06-2004 02:45 AM
Perl Probes rootyard Programming 0 03-17-2004 03:56 PM

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

All times are GMT -5. The time now is 10:30 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