On Thu, 31 Jul 2008 14:48:14 +0200, Markus Mueller <[EMAIL PROTECTED]> wrote:
> Bill Moran schrieb:
>> In response to Markus Mueller <[EMAIL PROTECTED]>:
>>> 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:


The resulting 'OS' is hardly different from 'FreeBSD' though, so you
will soon want to change stuff like the boot loader:

    # pwd
    # fgrep -ir '"FreeBSD' .
    ./common/interp_forth.c:    ficlSetEnv(bf_sys, "FreeBSD_version", 
    ./common/newvers.sh:echo "char bootprog_name[] = \"FreeBSD/${3} ${2}\";" > 
    ./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
    # 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
    # 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

freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to