Tuesday, April 19, 2011

Metasploit tut. part1

To install Metasploit:

  1. Install the necessary Ruby dependencies. Most new distros will already have the latest that you will need.
    • sudo apt-get install ruby libruby rdoc
    • sudo apt-get install rubygems

       2. Go to Metasploit's webpage and download
            http://www.metasploit.com/download/

    This post is based on the linux install.

    To start the program type msfconsole into a terminal.

    Your prompt should look like:

                    _                  _       _ _
                   | |                | |     (_) |
     _ __ ___   ___| |_ __ _ ___ _ __ | | ___  _| |_
    | '_ ` _ \ / _ \ __/ _` / __| '_ \| |/ _ \| | __|
    | | | | | |  __/ || (_| \__ \ |_) | | (_) | | |_
    |_| |_| |_|\___|\__\__,_|___/ .__/|_|\___/|_|\__|
                                | |
                                |_|


           =[ metasploit v3.6.0-release [core:3.6 api:1.0]
    + -- --=[ 648 exploits - 340 auxiliary
    + -- --=[ 216 payloads - 27 encoders - 8 nops
           =[ svn r11889 updated 43 days ago (2011.03.07)

    Warning: This copy of the Metasploit Framework was last updated 43 days ago.
             We recommend that you update the framework at least every other day.
             For information on updating your copy of Metasploit, please see:
                 http://www.metasploit.com/redmine/projects/framework/wiki/Updating

    msf >

    To start learning any program in linux, you find out what commands you have at your disposal.

    If you type help you will see a list of commands and databases available.

    Use show -h to see the exploits, payloads, and other info.

    exploits will be packages gained at specific systems where payloads are are the code or binary which is going to be sent to the target system.

    Thursday, April 14, 2011

    IOS Recovery for Cisco 2960 switch using ROMMON (Recovery Mode)

    The task at hand was to update the IOS's of new 2960 switches using a pre-built text file for the commands.
     The loaded text file accidentally blew away the IOS from flash memory.

    To fix this you need :
    -Cisco IOS for switch
    -console cable
    -Hyper Terminal (for sending files via Xmodem)

    At the rommon prompt for the switch type:
    set BAUD 115200 to change the baud rate of the switch for a faster transfer through the serial console.

    Reset your hyper terminal session and set it's baud rate to 115200.

    At the rommon prompt ( switch: ) for the switch now type:

    switch:  flash_init
    switch:  copy xmodem: flash: file-name

    The switch will respond with:
    Begin the Xmodem or Xmodem-1K transfer now...
    CCC


    Then go to Hyper Terminal's menu bar, selected Transfer, then Send File.
    Select the file to send and select Xmodem as the protocol.

    This process takes around 45 minutes.