LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
 
LinkBack Search this Thread
Old 06-06-2004, 03:32 PM   #1
bentman78
Member
 
Registered: Mar 2003
Location: Washington DC, USA
Distribution: Redhat
Posts: 210

Rep: Reputation: 30
block OS fingerprinting


GOod AFternoon,
I want to block OS fingerprinting of my server. Is there an iptables rule or something I can implement to stop OS fingerprinting? Thanks in advance!
 
Old 06-06-2004, 04:26 PM   #2
Alex Cavnar
Member
 
Registered: Jun 2003
Location: Nashville, TN
Distribution: FreeBSD, Slack, and DebianPPC
Posts: 60

Rep: Reputation: 15
You really can't block OS fingerprinting-- it's based on how the system responds to TCP packets.

I believe the Linux kernel's TCP sequencing changes A LOT-- and that feature is what allows port scanners to determine what OS is running. There are other factors, I believe, too. But, in a nutshell, you really can't block it.

If you're running a service on the system, you can determine what OS is running. I mean, you wouldn't exactly expect ProFTPd to be running on Windows 2000 Server. Even if you could block OS fingerprinting, someone could just manually determine what OS you're running. That's really a trivial task.

The most important thing is to keep your system updated, and make sure you're not running unneeded services. If you wanted to be a little safer, modify the identifying strings that the daemons provide to remote users. That way, they couldn't perhaps determine if you're running an unpatched version of some system service.
 
Old 06-07-2004, 01:33 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 21,610
Blog Entries: 47

Rep: Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413
On 2.2.x there where Madcamel's patches, on 2.4.x there's GRSecurity's stack randomisation and there's FPF.
 
Old 06-07-2004, 05:25 AM   #4
Technonotice
Member
 
Registered: Mar 2004
Location: UK
Distribution: Debian Unstable
Posts: 58

Rep: Reputation: 15
Re: block OS fingerprinting

Quote:
Originally posted by bentman78
GOod AFternoon,
I want to block OS fingerprinting of my server. Is there an iptables rule or something I can implement to stop OS fingerprinting? Thanks in advance!
Just a note, hopefully this isn't your only method, but don't rely upon security through obscurity!
 
Old 06-07-2004, 06:04 PM   #5
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
Quote:
but don't rely upon security through obscurity!
obscurity is always good as a finishing touch to confuse people (just be sure the system is actually secure, and not pretending to be)

maybe ippersonality (did i get that right?), but as Alex Cavnar said there are other ways to figure out what OS its running,

id say just tarpit any incoming connections that are not supposed to be there (especially along the M$ windows ports) .. that should help make people think twice before trying to fingerprint you (but they would probably know its linux , at least they would if they knew what was going on)

optionally you can set up a firewall using windows or a mac, set it up right and it should confuse OS detection for your linux boxes
 
Old 06-17-2004, 11:07 AM   #6
bentman78
Member
 
Registered: Mar 2003
Location: Washington DC, USA
Distribution: Redhat
Posts: 210

Original Poster
Rep: Reputation: 30
Re: Re: block OS fingerprinting

Quote:
Originally posted by Technonotice
Just a note, hopefully this isn't your only method, but don't rely upon security through obscurity!
Of course it isn't my only method. I have a linux firewall which works pretty well. I just wanted to throw randomization out there. For example, one time they scan they see linux, other times they see Windows, Mac, something like that.

How do you tarpit TCP connections? Is there a way to do this with iptables?
 
Old 06-17-2004, 11:18 AM   #7
Technonotice
Member
 
Registered: Mar 2004
Location: UK
Distribution: Debian Unstable
Posts: 58

Rep: Reputation: 15
Re: Re: Re: block OS fingerprinting

Quote:
Originally posted by bentman78
Of course it isn't my only method. I have a linux firewall which works pretty well. I just wanted to throw randomization out there. For example, one time they scan they see linux, other times they see Windows, Mac, something like that.
Ah right I can't imagine you could do that without rewriting how Linux responds to TCP packets, which TCP flags are enabled and its method of generating sequence numbers.

Quote:
Originally posted by bentman78
How do you tarpit TCP connections? Is there a way to do this with iptables?
Yep - a little Googling for tarpit iptables gave a very helpful page within the first few results.

http://www.lowth.com/howto/iptables-treasures.php

Scroll half way down and there's a section on it.
 
Old 06-17-2004, 11:23 AM   #8
bentman78
Member
 
Registered: Mar 2003
Location: Washington DC, USA
Distribution: Redhat
Posts: 210

Original Poster
Rep: Reputation: 30
Danka!
 
Old 06-18-2004, 04:16 AM   #9
paeng16
Member
 
Registered: May 2004
Posts: 47

Rep: Reputation: 15
Technonotice


Many thanks for your TARPIT LINK! This would really BEEF UP things!


BTW. what is DANKA????

__________________________________
 
Old 06-19-2004, 12:27 PM   #10
Technonotice
Member
 
Registered: Mar 2004
Location: UK
Distribution: Debian Unstable
Posts: 58

Rep: Reputation: 15
I assumed it was a misspelling of the german, "danke" for thank you
 
Old 06-19-2004, 05:14 PM   #11
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,408

Rep: Reputation: 108Reputation: 108
The methods you all mentioned are best for active scanning. But there are passive tools (example: p0f). You can still change the signature of your machine (and the results are not fully correct), but you don't know when you're probed (if you're running Apache, only one page needs to be viewed, etc).
 
Old 06-20-2004, 05:01 AM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 21,610
Blog Entries: 47

Rep: Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413
The methods you all mentioned are best for active scanning. But there are passive tools (example: p0f).
Sure I got P0f listening. Sigs of my boxen don't go further than P0f saying "Linux 2.4/2.6" and giving link info. For me that's enough.


You can still change the signature of your machine (...), but you don't know when you're probed
You're right about that, and since networking works that way there is nothing you can do to avoid it, you can only try and munge the results.


(if you're running Apache, only one page needs to be viewed, etc).
...and if you're running ftpd then active FTP mode will conveniently supply you with a SYN packet itself.
 
Old 06-21-2004, 08:47 AM   #13
bentman78
Member
 
Registered: Mar 2003
Location: Washington DC, USA
Distribution: Redhat
Posts: 210

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Technonotice
I assumed it was a misspelling of the german, "danke" for thank you
oops...I mistyped...hehe
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IPTables and PPTPD :S (to block or not to block) thewonka Linux - Networking 0 03-24-2005 06:58 PM
help me block an ip Zac2003 Linux - Security 1 11-03-2004 09:48 PM
How to block? Obie Linux - Security 6 05-15-2004 12:27 AM
how to block an ip porous Linux - Security 2 10-13-2003 02:55 PM
OS Fingerprinting and IPtables cirrusgr Linux - Networking 2 12-07-2002 06:48 PM


All times are GMT -5. The time now is 05:18 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration