Date: Thu, 31 Jul 2008 16:20:49 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Markus Mueller <casparos@yahoo.de> Cc: Bill Moran <wmoran@potentialtech.com>, freebsd-questions@freebsd.org Subject: Re: own OS-Name Message-ID: <87k5f242by.fsf@kobe.laptop> In-Reply-To: <4891B48E.9090907@yahoo.de> (Markus Mueller's message of "Thu, 31 Jul 2008 14:48:14 %2B0200") References: <4891256E.6090903@yahoo.de> <20080731075515.c0f01099.wmoran@potentialtech.com> <4891B48E.9090907@yahoo.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 31 Jul 2008 14:48:14 +0200, Markus Mueller <casparos@yahoo.de> wrote: > Bill Moran schrieb: >> In response to Markus Mueller <casparos@yahoo.de>: >>> I will create my own *BSD OS based on FreeBSD. How can I change the >>> Name of this OS ? I mean, that in Logfiles, for example, of >>> servers, which I connect by sufing in the web and in application >>> which locate the OS instead "FREEBSD" an another OS-Name "MyOS-Name" >>> will be displayed. >> >> In addition to Giorgos' answer, there are tools, such as nmap, that >> identify the OS by it's behaviour and not by any string that appears >> anywhere. In order to convince those tools that your OS is not >> FreeBSD, you'll have to alter the IP code to cause it to behave in a >> manner that is unique. Good luck doing _that_ without breaking >> things. > > the command "uname" must get these information from a file. in which > file are these informations ? i can editing this file simply with my > own informations and my "OS" based on FREEBSD. this can be the > solution of my problem. Hi Markus, That's slightly touching just the tip of the iceberg. See what Bill wrote about 'OS fingerprinting' above. If you just want to change the uname output, then all you need is to edit one file: /usr/src/sys/conf/newvers.sh The resulting 'OS' is hardly different from 'FreeBSD' though, so you will soon want to change stuff like the boot loader: # pwd /usr/src/sys/boot # fgrep -ir '"FreeBSD' . ./common/interp_forth.c: ficlSetEnv(bf_sys, "FreeBSD_version", __FreeBSD_version); ./common/newvers.sh:echo "char bootprog_name[] = \"FreeBSD/${3} ${2}\";" > vers.c ./i386/libfirewire/firewire.c: crom_add_simple_text(src, root, &buf->vendor, "FreeBSD Project"); ./i386/libfirewire/firewire.c: crom_add_simple_text(src, &buf->unit, &buf->spec, "FreeBSD"); ./ia64/ski/efi_stub.c: L"FreeBSD", 0, 0, ./ia64/ski/sal_stub.c: "FreeBSD", # the __FreeBSD_version magic in sys/param.h: # pwd /usr/src/sys/sys # fgrep __FreeBSD_version param.h * __FreeBSD_version numbers are documented in the Porter's Handbook. #undef __FreeBSD_version #define __FreeBSD_version 800040 /* Master, propagated to newvers */ # the system variables in the default make(1) includes: # pwd /usr/share/mk # expand sys.mk | grep 'FreeBSD[ ]*?=' .FreeBSD ?= true # and the list goes on for a while. Even if you _do_ change *all* the strings that say "FreeBSD" to something else, you still haven't done anything to change the OS fingerprint, and you already have a stack of patches that needs "maintenance", or "forward porting" as FreeBSD releases new patches, new versions and moves on. _That_ is what I meant when I wrote that it's non trivial :) It's certainly possible. The OpenBSD team did this when they split off NetBSD. The Dragonfly BSD folks have done it already when they branched from FreeBSD 4.X. So you can definitely do it. But you should probably understand a lot about the way the system works before doing that, and changing just the "uname" output is not enough. - Giorgos
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87k5f242by.fsf>