Saturday, April 20, 2013

KALI LINUX FOR PENETRATION TESTING


 HELLO ,

 this is the most advanced penetration testing from BACKTRACK offensive team.


what's new

DOWNLOAD

Wednesday, December 19, 2012

solaris some useful commands-1



    Explain the boot process?
    Boot process dived into 4 phases.
    1. POST
    2. OBPROM
    3. KERNEL INITIALIZATION
    4. INIT PHASES
    5.SVC statd
    POST: Power on self test, It will detect hardware, machine host ID,serial No, architecture type, memory and Ethernet address and it will load the primary program called bootblk.
    OBP: Open boot programmable,
                1.Diagnosing all the system hardware and memory.
                2.Initializing the boot parameter.
                3.Creating device trees and load the boot block from (0-15 sector), it is called as
                   secondary boot programmable ufsboot.
    KERNEL
    INITIALIZATION: ufsboot load the kernel (generic unix), kernel will load all the necessary
                             devices modules to mount the root partition to continue the booting process.

    Init Phase : It will started by executing of /etc/init program and start other process reading the
                       /etc/inittab files, as the directory in the /etc/inittab files.
    Svc startd : It will read the rcp data and start the services
    What is the difference between init 1 and init s ?
    If you switch from multiuser mode to init s and switch it back to multiuser mode.then remote useres automatically reconnects to the system.
    where as in the case of init 1. they have to reconnect manully means they have to relogin
    Explain about init phases
    There are 8 run level.
    Init0: Shutting down the system and bring back the system to OBP prompt (OK)
    Init1: Single user mode for administrative
    Init2: Multi user mode without resource sharing
    Init3: Multi user mode with resource sharing
    Init4: Not in use
    Init5: Shutdown and power off the system
    Init6: Reboot the system to default run level
    Inits: Single user mode but user login are disabled

    Explain rc script and run level
    Rc script : check and mount the file system, start and stop the various process.
    Run level: Base on the init phases 8 run level
    Which file will take place while booting.
    # /etc/inittab
    How many file to modify the host name to be changed without rebooting the system.
    There are 6 files.
    #vi /etc/hosts
    #vi /etc/nodename
    #vi /etc/hostname.hme
    #vi /etc/net/ticlts/hosts
    #vi /etc/net/ticosts/hosts
    #vi /etc/net/ticotsord/hosts
    Where the ip address will be stored
    # /etc/hosts
    # /etc/hosts.equi
    # /etc/hosts.hme
    How to configure the network card
    # ifconfig hme0 plumb
    # ifconfig hme0 192.9.200.10 netmask 255.255.255.0 up
    # vi /etc/hosts ( update the ip address )
    # vi /etc/hosts.hme0 ( update the ip address ) --> to bring the interface along with the ipaddress during boot time.

    How to configure the virtual ip address
    Infinity virtual ip address can be created.
    # ifconfig hme0:1 plumb
    # ifconfig hme0:1 192.9.200.10 netmask 255.255.255.0 up
    # vi /etc/hosts ( update the ip address )
    # vi /etc/hosts.hme0:1 ( update the ip address ) --> to bring the interface along with the ipaddress during boot time.

    How to find the network card speed
    # ndd –get /dev/hme link_speed          
    1 = 100mbps
    0 = 10mbps

    How to modify network card speed
    # ndd –set /dev/hme instance 0
    # ndd –get /dev/hme link_status
    # ndd –get /dev/hme link_mode
                 To modify
    # ndd –set /dev/eri instance 0
    # ndd –set /dev/eri adv_100T4_cap0
    # ndd –set /dev/eri adv_100fdx_cap1
    # ndd –set /dev/eri adv_100hdx_cap0
    # ndd –set /dev/eri adv_10fdx_cap0
    # ndd –set /dev/eri adv_10hdx_cap0
    # ndd –set /dev/eri adv_autoneg_cap0
    How to find the hardware configuration
    OK banner --> from the open boot prompt
    # prtconf
    # sysdef
    # /use/platform/sun4u/sbin/prtdiag

   How will you find the number of hard disk
    # format
    #dmesg  --> this will not give the correct answer
    #sysdef
    #iostat –En  --> it wont show the Fibre channel
    OK show-devs --> it will show the device scsi bus channel
    OK probe-scsi-all --> This will deteck all the scsi bus channel, it will show CD-ROM/DVD-ROM also
    Difference between probe-scsi-all and probe-scsi
    OK probe-scsi-all: it will show all the scsi devices connected internal and external
    OK probe-scsi: it will show only internal scsi devices connected
    How to create core dump and crash dump
    #coreadm
    Procedure for Firmware upgrade Shutdown root cron on csslu377 servers  #./etc/init.d/cron stop
    Reset the system controller from the console.# resetsc -y Upgrade the firmware on the system controller  > cd /114527-04 > lom -G ./sgrtos.flash> lom -G ./sgsc.flash Escape to lom> and reset the SC:  lom> resetsc -y Upgrade the firmware on the system boards:> lom -G ./lw8cpu.flash> lom -G ./lw8pci.flash Shutdown the Operating System. #shutdown –i0 –g0 –y
    This may take a while for the server to come up
    > poweroff> poweron
    Which file to be configuring the logs messages (like: /var/adm/message etc…)
    #/etc/syslog.conf
  Which file maintain the kernel
    # /etc/path_to_inst
  This will be quite complicative, because kernel is the core of the operating system, its an image of the OS. whereas /etc/path_to_inst are the drivers are stored for the enabled hardware.
    How will see the kernel version
    Ok banner --> This will not show the Kernel
    Ok .version  --> This will tell the open boot prompt version otherwords, FIRMWARE
    # prtconf –V
    # showrev --> will show the installed patches
    # uname –x

Tuesday, September 25, 2012

List LUNs attached to HBA / Disk controllers in Solaris 10

As a system administrator you may come across situations where in your SAN admin presents you some storage (LUNS) and you can’t find where the hell has it gone. The following are some of the ways to list the LUNS presented on a controller or all the controllers on the server.

1. Using fcinfo

In Solaris 10, you can use the “fcinfo” utility which is a 2 step process to identify the Luns presented to the server.

1. Find the HBA port WWN number on the server:
# fcinfo hba-port
This command will show the HBA Port WWN (world wide Node ) among other information like the Node WWN, Device name, manufacturer, firmware, driver details etc.
root@myserver:/root # fcinfo hba-port
HBA Port WWN: 21000022ff0553e9
OS Device Name: /dev/cfg/c5
Manufacturer: QLogic Corp.
Model: 371-4324-02
Firmware Version: 05.03.02
FCode/BIOS Version: BIOS: 2.02; fcode: 2.03; EFI: 2.01;
Serial Number: 0402R00-1102885753
Driver Name: qlc
Driver Version: 3.00p
Type: L-port
State: online
Supported Speeds: 2Gb 4Gb 8Gb
Current Speed: 4Gb
Node WWN: 20000022ff0553e9
Here 21000022ff0553e9 is the WWN number for the HBA port.

2. List SCSI targets for the remote port attached to the HBA port attached to the above.
# fcinfo -sl -p HBA-Port-WWN
root@myserver:/root # fcinfo remote-port -sl -p 21000022ff0553e9
Remote Port WWN: 202400a0b8744072
Active FC4 Types:
SCSI Target: yes
Node WWN: 200400a0b8744072
Link Error Statistics:
Link Failure Count: 1
Loss of Sync Count: 2
Loss of Signal Count: 72
Primitive Seq Protocol Error Count: 0
Invalid Tx Word Count: 0
Invalid CRC Count: 0
LUN: 0
Vendor: SUN
Product: LCSM100_F
OS Device Name: /dev/rdsk/c5t202400A0B8744072d0s2
LUN: 2 Vendor: SUN
Product: LCSM100_F
OS Device Name: /dev/rdsk/c5t202400A0B8744072d2s2
LUN: 31 Vendor: SUN
Product: Universal Xport
OS Device Name: /dev/rdsk/c5t202400A0B8744072d31s2
Here, LUN0 and LUN2 are the actual disks and LUN31 is the Command device for the Storage controller
2. Using cfgadm

You can also find the above information using the “cfgadm” utility. One of the following commands should reveal the LUNS attached to the controller. Although the later works only on Solaris 10.
# cfgadm -al -o show_FCP_dev c5
 
or
 
# cfgadm -al -o show_SCSI_LUNS c5
where c5 is the controller. If you do not mentioned the controller, it then displays for every single disk controller on the server.
root@myserver:/root # cfgadm -al -o show_FCP_dev c5
Ap_Id Type Receptacle Occupant Condition
c5 fc-private connected configured unknown
c5::202400a0b8744072,0 disk connected configured unknown
c5::202400a0b8744072,2 disk connected configured unknown
c5::202400a0b8744072,31 disk connected configured unknown
root@myserver:/root # cfgadm -al -o show_SCSI_LUN c5
Ap_Id Type Receptacle Occupant Condition
c5 fc-private connected configured unknown
c5::202400a0b8744072,0 disk connected configured unknown
c5::202400a0b8744072,2 disk connected configured unknown
c5::202400a0b8744072,31 disk connected configured unknown
 
                      thanks for Reading.. 

Popular Posts

Followers

Disclaimer

All Data and Information Provided on This BLOG is only for Education purposes only.If you done any thing else these in real time the blog is not Responsible.Try all those on your own risk.
IF you find any thing else here as per in violation of copyright law .mail me on srinathceh@gmail.com as soon as possible action will be taken.