› Forums › Network Management › ZeroShell › Spoofing MAC under VMware
- This topic is empty.
-
AuthorPosts
-
August 6, 2008 at 9:01 pm #41126
Selanec
MemberI’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?August 6, 2008 at 9:12 pm #46739imported_fulvio
ParticipantThe 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
FulvioAugust 7, 2008 at 12:57 am #46740Selanec
MemberNope… 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! πAugust 7, 2008 at 8:00 am #46741imported_fulvio
ParticipantChanging 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
FulvioAugust 7, 2008 at 12:39 pm #46742Selanec
MemberSo 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. πAugust 7, 2008 at 1:55 pm #46743imported_fulvio
Participantroot@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
August 8, 2008 at 12:13 pm #46744Selanec
MemberEwwwww… 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!
-
AuthorPosts
- You must be logged in to reply to this topic.