Spoofing MAC under VMware

Home Page Forums Network Management ZeroShell Spoofing MAC under VMware

This topic contains 5 replies, has 0 voices, and was last updated by  Selanec 10 years, 5 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #41126

    Selanec
    Member

    I’m using VMware under Vista for Zeroshell and Ubuntu.
    At every start of a virtual machine,
    VMware is addressing it with a MAC address of it’s own range…
    somethng like 00:0C:29:xx:xx:xx
    When the Zeroshell is up you can change the MAC…
    with ifconfig command to any MAC you want,
    and it stays like that until you reboot the virtual machine.
    Then it gets back to the old 00:0C:29:xx:xx:xx range.
    For the Ubuntu I managed to find and change the boot file…
    /etc/rc.local to execute the command lines like…
    ifconfig ETH00 down hwether (MAC address)
    ifconfig ETH00 up
    and spoof the MAC at every boot.
    Zeroshell has the same dir and same file,
    but it just wont work…
    Any help?

    #46739

    imported_fulvio
    Participant

    The script /etc/rc.local corresponds to the Post Boot script in the section [Setup][Startup] of the web interface. Changing the mac addresses in the Post Boot script is too late for Zeroshell. Try to change them in the Pre Boot script of [Setup][Startup].

    Regards
    Fulvio

    #46740

    Selanec
    Member

    Nope… the PreBoot script doesn’t change anything even if it is changed, saved and enabled under the web interface. I made it work… this is what I did:
    I deleted everything in /etc/rc.local …
    then I added…
    ifconfig ETH00 down hw ether 001966392e48
    ifconfig ETH00 up
    … in the Post Boot script … I forgot to enable the check button.
    Rebooted the system and nothing!
    Then I saw I forgot to check the check box to enable it.
    But before that I opened the rc.local and the code was there.
    The main problem with executing the rc.local file was the enable/disable check box.
    What does the check box changes, how does it enables/disables the rc.local?
    Finally: it works!
    ooyeah! 😀

    #46741

    imported_fulvio
    Participant

    Changing the hw address in post boot is not quite correct, but if foy you it works it is ok. Keep in mindthat that in pre boot the interfaces are not named ETH00, ETH01, … but with more traditional names: eth0, eth1, …

    Regards
    Fulvio

    #46742

    Selanec
    Member

    So how is the Post Boot script /etc/rc.local enabled by the check button?
    What is being changed by the enable/disable check button?
    It must be some pre-boot script that has some on/off option.
    If it’s not a secret of course. 🙂

    #46743

    imported_fulvio
    Participant

    root@test root> cat /etc/rc.d/rc3.d/S98rc.local


    #!/bin/sh
    . /etc/kerbynet.conf
    if ! [ -r "$REGISTER/system/startup/EnabledScript" ] ; then
    echo yes > "$REGISTER/system/startup/EnabledScript"
    fi
    $SCRIPTS/runscript postboot

    root@test root> cat /root/kerbynet.cgi/scripts/runscript


    #!/bin/bash
    . /etc/kerbynet.conf
    SCRIPTNAME="$1"
    OPT="$2"
    [ -z "$SCRIPTNAME" ] && exit
    DIR=$REGISTER/system/startup/scripts
    cd $DIR/$SCRIPTNAME 2>/dev/null || exit
    DESCRIPTION="`cat Description 2> /dev/null`"
    if [ "$OPT" = test ] ; then
    VIEW="cat"
    export SCRIPT=/tmp/ScriptToRun$$
    tr -d "r" > $SCRIPT
    chmod 755 $SCRIPT
    else
    VIEW="logger -t Scripts"
    export SCRIPT=./File
    fi

    if [ "`cat Enabled 2>/dev/null`" = yes -o "$OPT" = test ] ; then
    [ "$OPT" != test ] && echo -n "[$DESCRIPTION]: Running ... " | $VIEW
    [ "$OPT" != test ] && echo -n "Script [$DESCRIPTION]: Running ... "
    [ "$OPT" = test ] && echo
    ( $SCRIPT 2>&1 ; echo $? >/tmp/StartupScriptError$$ ) | $VIEW
    if [ "`cat /tmp/StartupScriptError$$`" = 0 ] ; then
    RESULT=SUCCESS
    else
    RESULT="ERROR (`cat /tmp/StartupScriptError$$`)"
    fi
    rm -f /tmp/StartupScriptError$$
    [ "$OPT" = test ] && rm -f $SCRIPT
    [ "$OPT" != test ] && echo $RESULT
    [ "$OPT" = test ] && echo
    echo "[$DESCRIPTION]: $RESULT" | $VIEW
    else
    echo "[$DESCRIPTION]: Disabled" | $VIEW
    fi
    #46744

    Selanec
    Member

    Ewwwww… that was so cruel. 😀
    I’m just joking.
    I’m not that much into programming,
    but I’m happy to know that my reasoning is OK.
    I can understand few of it.

    Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.