<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>LINICKX.com</title><link>https://www.linickx.com/</link><description></description><lastBuildDate>Sun, 16 Nov 2008 21:22:00 +0000</lastBuildDate><item><title>VM Mars Screenshots</title><link>https://www.linickx.com/vm-mars-screenshots</link><description>&lt;p&gt;&lt;a href="https://www.linickx.com/archives/658/vm-mars-screenshots/rescure-networking-no"&gt;&lt;img alt="" src="https://www.linickx.com/files/2008/11/rescure-networking-no-150x150.png" title="CentOS Rescue 01: Networking" /&gt;&lt;/a&gt;
Boot From
&lt;a href="http://www.mirrorservice.org/sites/mirror.centos.org/5.2/isos/i386/CentOS-5.2-i386-bin-1of6.iso"&gt;CentOS-5.2-i386-bin-1of6.iso&lt;/a&gt;
... then type "linux rescue", choose your keyboard layout and the images
show what happened next!!!&lt;/p&gt;
&lt;p&gt;VMware Host: Windows 2003 SP1&lt;br /&gt;
VMware Server Version 1.101&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Sun, 16 Nov 2008 21:22:00 +0000</pubDate><guid isPermaLink="false">tag:www.linickx.com,2008-11-16:vm-mars-screenshots</guid><category>Cisco</category><category>cs-mars</category><category>Linux</category><category>Security</category></item><item><title>CS-Mars V6.0 in VMWARE (Franken Mars)</title><link>https://www.linickx.com/cs-mars-v-6-0-in-vmware-franken-mars</link><description>&lt;p&gt;Emulating software is a very grey area for Cisco, they make their money
by selling boxes so I guess officially Cisco don't approve of things
like GNS3 and PEMU. BUT cisco make a lot of their money from techies
training in Cisco products who then get their management to buy boxes
their certified in, as a result cisco appear to turn a blind eye to
emulating their products for personal training purposes :)&lt;/p&gt;
&lt;p&gt;So, I'm installing a CS-Mars box in the next couple of weeks and wanted
to know what's new in version 6. How to setup version 4 is already
document here in this&lt;a href="http://www.securityie.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=36;t=000028"&gt;franken cs-mars
guide&lt;/a&gt;,
the thing is to upgrade from 4 to 6 is a re-image of the box. Upon
re-imaging my VMWare appliance I realised that the lilo commands
&lt;code&gt;linux rw init=/bin/bash&lt;/code&gt; didn't appear to work anymore. As a result I
have a v6 mars box I can't use due to a licensing problem.&lt;/p&gt;
&lt;p&gt;To get this working read through both the &lt;a href="http://www.securityie.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=36;t=000028"&gt;old
instructions&lt;/a&gt;,
and what I have written.&lt;/p&gt;
&lt;p&gt;The init/boot sequence of a mars box looks very much like a
centos/fedora boot, so I thought up a cunning new plan. I downloaded the
1st installation CD of &lt;a href="http://centos.org/"&gt;centos&lt;/a&gt;5, after booting this
CD instead of hitting "enter" and running the anaconda installer I typed
&lt;code&gt;linux rescue&lt;/code&gt;, this boots my appliance into a root linux shell. (&lt;em&gt;See
Update Below, boot from CentOS straight after MARS installs, don't let
MARS boot!&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;What happened next was a little hit and miss, if you're lucky you can
type&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;mkdir /mnt/opt
mount /dev/md2 /mnt/opt
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;you can then&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd /mnt/opt/janus/release/bin
mv pnlicense pnlicense.org
echo "/bin/echo d84f7ceaf50f9c45683e2efb77752d4f:License verified:4:0:0:4" &amp;gt; pnlicense
chmod +x pnlicense
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;as per the old documentation.&lt;/p&gt;
&lt;p&gt;If you're unlucky this "mount" will fail, in this case
&lt;code&gt;ls /mnt/sysimage&lt;/code&gt; if you can't see any files issue
&lt;code&gt;mount /dev/md1 /mnt/sysimage&lt;/code&gt; otherwise the plan is to change the root
password so that we can edit the pnlicense file later.&lt;/p&gt;
&lt;p&gt;Using vi edit /mnt/sysimage/etc/passwd, and change...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pnadmin:x:500:500::/opt/janus/release/bin:/opt/janus/release/bin/pnsh
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;for&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pnadmin:x:500:500::/opt/janus/release/bin:/bin/bash
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next, setup your editor variable, and edit the suders file...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;EDITOR=/mnt/sysimage/bin/vi;export EDITOR
visudo -f /mnt/sysimage/etc/suders
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and add..&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pnadmin ALL=(ALL)       NOPASSWD: ALL
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Reboot by exiting the shell.&lt;/p&gt;
&lt;p&gt;After the reboot login as pnadmin, you should now get a standard linux
bash shell rather than the "hardened" cisco one. Change the root
password...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo su
passwd root
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And put /etc/password back to how it was. Now from the "pn shell" you
can type expert and your root password will work and you'll have root
access to your mars box. With you new root access you can change the
pnlicense file as described before and complete the setup process.
:cool:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; As commented by secopt below, to make this work you need to
boot from the CentOS disk straight after the MARS image as installed, if
you let the MARS OS boot (&lt;em&gt;and start doing the oracle thing&lt;/em&gt;) then for
some reason the mount commands don't work!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE2:&lt;/strong&gt; The mount command doesn't work if you let MARS boot the 1st
time as it changes the superblock, rokov has posted the following work
around below...&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Assemble RAID&lt;br /&gt;
&lt;code&gt;mdadm –assemble /dev/md0 /dev/hda3 /dev/hdc3&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change ext3 superblock magick number  &lt;/p&gt;
&lt;p&gt;&lt;code&gt;dd if=/dev/md0 skip=2 count=1 | sed ’s/\x5A\x7B/\x53\xEF/’ | dd of=/dev/md0 seek=2 count=1&lt;/code&gt;
3.  Mount partition&lt;br /&gt;
&lt;code&gt;mount /dev/md0 /mnt&lt;/code&gt;
4.  Do anything you want with it.
5.  Unmount partition and change magic back  &lt;/p&gt;
&lt;p&gt;&lt;code&gt;umount /mnt &amp;amp;&amp;amp; d if=/dev/md0 skip=2 count=1 | sed ’s/\x53\xEF/\x5A\x7B/’ | dd of=/dev/md0 seek=2 count=1&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Wed, 01 Oct 2008 14:44:00 +0100</pubDate><guid isPermaLink="false">tag:www.linickx.com,2008-10-01:cs-mars-v-6-0-in-vmware-franken-mars</guid><category>Cisco</category><category>cs-mars</category><category>franken</category><category>Linux</category><category>Security</category></item></channel></rss>