Wednesday, January 21, 2009

Add partition devices on linux

I often end up with a Linux block device or file which contains a PC partition table. The `kpartx` utility (part of the Linux multipath-tools) can create device nodes for partitions which were not detected at boot.

# kpartx -av /dev/loop1
add map loop1p1 : 0 144522 linear /dev/loop1 63
#

Wednesday, December 10, 2008

Remove 'NO_HW' devices from `ioscan`.

When you pull a disk out of an HPUX system, `ioscan` will still show the device:
# ioscan -fnCdisk
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
disk 0 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c2t0d0 /dev/rdsk/c2t0d0
disk 1 0/1/1/0.1.0 sdisk NO_HW DEVICE HP 73.4GST373454LC
/dev/dsk/c2t1d0 /dev/rdsk/c2t1d0
disk 2 0/1/1/1.2.0 sdisk NO_HW DEVICE HP 73.4GST373454LC
/dev/dsk/c3t2d0 /dev/rdsk/c3t2d0

Here's how to remove all 'NO_HW' devices from the `ioscan` output:
ioscan -fCdisk|grep NO_HW|awk '{print $3}'|xargs -i -t rmsf -H {}

Monday, October 27, 2008

Finding a PID for a listening TCP port in Solaris

From SunManagers:

On recent versions of Solaris, "pfiles" will tell you about each and every program running which file descriptor matches to what.
cd /proc
pfiles *| more

Monday, June 9, 2008

Process Explorer for Windows

The Process Explorer display consists of two sub-windows. The top window always shows a list of the currently active processes, including the names of their owning accounts, whereas the information displayed in the bottom window depends on the mode that Process Explorer is in: if it is in handle mode you'll see the handles that the process selected in the top window has opened; if Process Explorer is in DLL mode you'll see the DLLs and memory-mapped files that the process has loaded. Process Explorer also has a powerful search capability that will quickly show you which processes have particular handles opened or DLLs loaded.

http://www.google.com/search?q=Process+Explorer

OSWA-Assistant Wireless Hacking ISO

The OSWA-Assistant is a no-Operating-System-required standalone toolkit which is solely focused on wireless auditing. As a result, in addition to the usual WiFi (802.11) auditing tools, it also covers Bluetooth and RFID auditing. Using the toolkit is as easy as popping it into your computer's CDROM and making your computer boot from it!

http://oswa-assistant.securitystartshere.org/